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BAAoBC,cACzB5N,KAAK6N,aAAaD,cAEd5N,KAAKuJ,qBACPvJ,KAAKF,kBAAkB0J,eAAexJ,KAAKuJ,oBAAsB,CAC/DJ,YAAanJ,KAAKmJ,YAClBM,QAASzJ,KAAKyJ,QACdR,WAAYjJ,KAAKiJ,WACjBS,WAAY1J,KAAK0J,WACjBC,aAAc3J,KAAKgJ,WAAWK,QAGpC,CAAC7H,kDAnNmB4G,GAAkB0F,mDAAlB1F,EAAkB1G","names":["i0","RoboWelcomeComponent","constructor","apiService","toastMessagesService","appSessionService","authService","this","ngOnInit","auth","user","isTokenValid","rawAuthToken","users","getById","id","userId","pipe","tap","data","content","subscribe","isLeftSidenavActive","appHeaderVisible","simulatorKeyClick","show","title","message","type","EToastMessageType","onTry","static","core","selectors","ctx","routes","path","redirectTo","pathMatch","component","RoboRxnRoutingModule","RouterModule","NG_MODULES","SharedModule","ProjectsSharedModule","RoboRxnModule","DatePipe","imports","SmilesEditorHeaderComponent","SmilesEditorTextualComponent","SmilesEditorComponent","SmilesEditorDialogComponent","SmilesEditorModule","BillingInformationDialogComponent","BaseModal","dialogData","super","FormGroup","firstName","FormControl","Validators","lastName","email","phone","addressLine1","addressLine2","addressLine3","locality","province","postalCode","countryName","countryCode2","countryCode3","taxCalculationError","User","placeholderAddress","country","userBillingInformation","form","patchValue","addressValue","fullAddress","isEditingBillingAddress","okLabel","onValueChange","addressFormat","onToggleIsEditingBillingAddress","onClose","close","emit","status","EDialogCloseEventStatus","onContinue","valid","value","_angular_core__WEBPACK_IMPORTED_MODULE_5__","SynthesisWizardComponent","formBuilder","router","loaderService","eventTrackingService","projectId","projectName","paragraphs","sequenceId","synthesisCreationSource","synthesisWizardForm","group","aiModel","isLoading","ESynthesisCreationSource","aiModels","getAiModelsForSynthesisFromText","getAiModelsForSynthesisFromSequence","finalize","response","defaultModel","aiModelItems","models","map","model","isDefault","name","selected","onGetSynthesis","notificationMessage","duration","synthesisProcedures","getAction","method","relation","body","get","isBodyRaw","hide","trackEvent","closeModal","navigate","_angular_core__WEBPACK_IMPORTED_MODULE_7__","SuperListComponent","injector","searchString","isSmiles","TableModel","Table","Subscription","itemsPerPageOptions","ApiService","ToastMessagesService","Router","AppSessionService","tableModel","pageLength","defaultItemsPerPage","currentPage","defaultFirstPage","header","mapTableHeaders","tableListStateName","listTableState","filters","searchData","tableHeaders","loadData","tableItems","skeletonModel","totalItems","totalDataLength","sortRequestParams","filter","h","sorted","sort","a","b","metadata","sortingPriority","property","direction","ascending","IApiSortDirection","isSearching","Object","keys","filtersQuery","length","showTable","showNoResultsMatchingSearch","showNoItemsFound","apiRequestPrams","query","getMongoQuery","searchFields","page","size","sorting","queryParams","smiles","setTableData","isPollingRequest","items","pagination","tableData","mapTableModel","forEach","i","_","k","console","error","onFilter","event","onSearch","search","onSelectPage","onSort","index","toggleSorting","descending","multipleSorting","resetPagination","unselectAll","selectAll","getSelectedRows","isRowSelected","ngOnDestroy","apiCallSubscription","unsubscribe","subscription","_angular_core__WEBPACK_IMPORTED_MODULE_6__"],"sourceRoot":"webpack:///","sources":["./src/app/modules/robo-rxn/robo-welcome/robo-welcome.component.html","./src/app/modules/robo-rxn/robo-welcome/robo-welcome.component.ts","./src/app/modules/robo-rxn/robo-rxn-routing.module.ts","./src/app/modules/robo-rxn/robo-rxn.module.ts","./src/app/modules/smiles-editor/smiles-editor.module.ts","./src/app/modules/subscription/billing-information-dialog/billing-information-dialog.component.html","./src/app/modules/subscription/billing-information-dialog/billing-information-dialog.component.ts","./src/app/modules/synthesis/synthesis-wizard/synthesis-wizard.component.ts","./src/app/modules/synthesis/synthesis-wizard/synthesis-wizard.component.html","./src/app/shared/components/super-list/super-list.component.ts"],"sourcesContent":["<ibm-mlrp-header [hasSidenav]=\"true\"\n  *ngIf=\"appHeaderVisible\">\n  <ibm-header-global>\n    <ibm-user-overflow-menu></ibm-user-overflow-menu>\n  </ibm-header-global>\n</ibm-mlrp-header>\n\n<div class=\"w-100 welcome-page\"\n  [ngClass]=\"{'no-header': !appHeaderVisible}\">\n  <div class=\"header\">\n    <div ibmRow>\n      <h2 ibmCol\n        [columnNumbers]=\"{ md: 3 }\"\n        class=\"header-title\">\n        Proudly introducing the first remotely accessible, autonomous chemical laboratory.\n      </h2>\n\n      <div ibmCol\n        [columnNumbers]=\"{ md: 5 }\"\n        class=\"video-container\">\n        <iframe id=\"ytplayer\"\n          type=\"text/html\"\n          width=\"1920\"\n          height=\"1080\"\n          class=\"video\"\n          src=\"https://www.youtube.com/embed/h02K8nWgVD4?autoplay=0\"\n          frameborder=\"0\"></iframe>\n      </div>\n    </div>\n  </div>\n\n  <div ibmRow\n    class=\"mt-7\">\n    <div ibmCol>\n      <h2 class=\"text-center body-title\">\n        IBM RoboRXN for Chemistry is a pioneer project combining AI, Automation and Cloud to\n        accelerate material discovery\n      </h2>\n    </div>\n  </div>\n\n  <div ibmRow\n    class=\"text-center top-row\">\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 5 }\"\n      class=\"top-card mb-7\">\n      <img src=\"assets/img/robo-welcome/group-7.svg\"\n        class=\"top-icon\" />\n      <div class=\"title\">Artificial Intelligence</div>\n      <div>\n        State-of-the-art artificial intelligence architectures are the brain of RoboRXN. Trained\n        to learn the art of synthetic organic chemistry, it automates synthesis procedures by\n        converting chemical recipes to machine-readable instructions.\n      </div>\n    </div>\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 5 }\"\n      class=\"top-card mb-7\">\n      <img src=\"assets/img/robo-welcome/robot-chemical-hardware-icon.svg\"\n        class=\"top-icon\" />\n      <div class=\"title\">Robotic Chemical Hardware</div>\n      <div>\n        RoboRXN is hardware agnostic. It combines artificial intelligence with a commercially\n        available automation hardware to execute complex sequences of chemical procedures.\n      </div>\n    </div>\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 5 }\"\n      class=\"top-card mb-7\">\n      <img src=\"assets/img/robo-welcome/group-6.svg\"\n        class=\"top-icon\" />\n      <div class=\"title\">Cloud Technology</div>\n      <div>\n        RoboRXN is cloud-native by design, making your chemical laboratory accessible from\n        anywhere in the world.\n      </div>\n    </div>\n  </div>\n\n  <!-- Interactive RoboRXN -->\n  <div ibmRow\n    class=\"py-7 mt-7 align-items-stretch\">\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 8 }\"\n      class=\"synthesis-from-literature-container\">\n      <img src=\"assets/img/robo-welcome/interactive_roborxn.gif\"\n        class=\"shadow-image\"\n        width=\"100%\" />\n    </div>\n\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 8 }\"\n      class=\"d-flex flex-column justify-content-center\">\n      <div class=\"p-6\">\n        <h1 class=\"mb-6\">Gain more time to design and innovate</h1>\n        <p>\n          RXN is revolutionizing industrial chemistry, by transforming it into a high tech\n          business. The combination of AI, Automation and Cloud relieves the chemist from tedious\n          repetitive tasks, allowing more time and space for what really matters - design and\n          innovation.\n        </p>\n        <p>\n          Starting from a retrosynthesis and using state-of-the-art AI models, RoboRXN generates a\n          list of instructions to program the automation hardware. Here's how it works:\n        </p>\n\n        <ul class=\"mt-6\">\n          <li>Connect to RoboRXN through a web browser</li>\n          <li class=\"mt-5\">Draw or paste a molecule of your choice</li>\n          <li class=\"mt-5\">Use RoboRXN AI as an assistant to get a synthesis recommendation</li>\n          <li class=\"mt-5\">\n            RoboRXN programs the hardware to execute the production of your molecule\n          </li>\n        </ul>\n\n        <a ibmButton=\"primary\"\n          class=\"mt-7\"\n          routerLink=\"/projects\">\n          Try it now!\n        </a>\n      </div>\n    </div>\n  </div>\n\n  <!-- Synthesis from literature -->\n  <div ibmRow\n    class=\"align-items-stretch\">\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 8 }\"\n      class=\"d-flex flex-column justify-content-center\">\n      <div class=\"p-6\">\n        <h1 class=\"mb-6\">Unlock the knowledge of unstructured data</h1>\n        <p>\n          RoboRXN allows you to create molecules directly from the literature or your lab notes.\n          The AI model has been trained on corpus of around one million patents. Here's how it\n          works:\n        </p>\n\n        <ul class=\"mt-6\">\n          <li>Copy and paste paragraphs describing chemical procedures into a text box</li>\n          <li class=\"mt-5\">Let RoboRXN extract a standardized list of actions</li>\n          <li class=\"mt-5\">\n            RoboRXN translates actions to machine-readable instructions which are fed to the\n            automation hardware\n          </li>\n        </ul>\n\n        <a ibmButton=\"primary\"\n          class=\"mt-7\"\n          routerLink=\"/projects\">\n          Try it now!\n        </a>\n      </div>\n    </div>\n\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 8 }\"\n      class=\"synthesis-from-literature-container\">\n      <img src=\"assets/img/robo-welcome/synthesis_from_literature.gif\"\n        class=\"shadow-image\"\n        width=\"100%\" />\n    </div>\n  </div>\n\n  <!-- Testing -->\n  <div ibmRow\n    class=\"py-7 pb-0 mt-7 align-items-stretch\">\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 11 }\"\n      class=\"text-center bg-white p-7 align-items-center d-flex flex-column justify-content-center\">\n      <img src=\"assets/img/robo-welcome/robot-chemical-hardware-icon.svg\"\n        alt=\"\"\n        width=\"50\" />\n      <h1 class=\"mb-6\">Interested in testing the technology?</h1>\n      <p class=\"align-items-center\">\n        Activate the simulator key right away and unleash the power of Cloud and AI:\n      </p>\n      <p class=\"d-flex align-items-center justify-content-center\">\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\n      <a ibmButton=\"primary\"\n        class=\"mt-7\"\n        routerLink=\"/account/profile\">\n        Activate now!\n      </a>\n    </div>\n\n    <div ibmCol\n      [columnNumbers]=\"{ lg: 5 }\"\n      class=\"text-center bg-gray p-7 align-items-center d-flex flex-column justify-content-center\">\n      <p>\n        If you are interested in trying the full system, including the automation hardware\n        <br />\n        <span class=\"ibm-type-italic\">or</span> <br />\n        in learning more about on-premise installation, please <br />\n      </p>\n      <p>\n        <a ibmButton=\"ghost\"\n          class=\"font-weight-bold mt-3\"\n          href=\"mailto:o9y9r0m7g6b4l2o6@ibm-research.slack.com?subject=RoboRXN key request&body=Hi, I am interested in the autonomous lab RoboRXN activation key. Best,\"\n          target=\"_blank\">\n          <span class=\"mt-1\">get in touch</span>\n          <ibm-icon-email size=\"20\"\n            class=\"bx--btn__icon fill-interactive\"></ibm-icon-email>\n        </a>\n      </p>\n    </div>\n  </div>\n</div>","import { Component, OnInit } from '@angular/core';\nimport { User } from '@app/core/models';\nimport { ApiService, AppSessionService, ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { AuthService } from '@app/libs/bitforce/services';\nimport { tap } from 'rxjs/operators';\n\n@Component({\n  selector: 'ibm-robo-welcome',\n  templateUrl: './robo-welcome.component.html',\n  styleUrls: ['./robo-welcome.component.scss'],\n})\nexport class RoboWelcomeComponent implements OnInit {\n  simulatorKey = 'z7WcYzqPGEcFW.iY2VUA7hvzTs4';\n\n  constructor(\n    private apiService: ApiService,\n    private toastMessagesService: ToastMessagesService,\n    private appSessionService: AppSessionService,\n    private authService: AuthService\n  ) {}\n\n  ngOnInit() {\n    if (!this.apiService.auth.user && this.authService.isTokenValid(this.authService.rawAuthToken)) {\n      this.apiService.users\n        .getById<User>({\n          id: this.authService.userId,\n        })\n        .pipe(\n          tap(data => {\n            this.authService.user = data.content;\n          })\n        )\n        .subscribe(() => {\n          this.appSessionService.isLeftSidenavActive = !!this.apiService.auth.user;\n        });\n    } else {\n      this.appSessionService.isLeftSidenavActive = !!this.apiService.auth.user;\n    }\n  }\n\n  get appHeaderVisible() {\n    return !!this.apiService.auth.user;\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  onTry() {}\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { RoboWelcomeComponent } from './robo-welcome/robo-welcome.component';\n\nconst routes: Routes = [\n  { path: '', redirectTo: 'welcome', pathMatch: 'full' },\n  {\n    path: 'welcome',\n    component: RoboWelcomeComponent,\n  },\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class RoboRxnRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { DatePipe } from '@angular/common';\n\nimport { SharedModule } from '@app/shared/shared.module';\nimport { RoboRxnRoutingModule } from './robo-rxn-routing.module';\nimport { ProjectsSharedModule } from '../projects/projects-shared/projects-shared.module';\nimport { RoboWelcomeComponent } from './robo-welcome/robo-welcome.component';\n\nconst NG_MODULES = [SharedModule, RoboRxnRoutingModule, ProjectsSharedModule];\nconst NG_COMPONENTS = [RoboWelcomeComponent];\n@NgModule({\n  imports: [...NG_MODULES],\n  declarations: [...NG_COMPONENTS],\n  providers: [DatePipe],\n})\nexport class RoboRxnModule {}\n","import { NgModule } from '@angular/core';\n\nimport { SharedModule } from '@app/shared/shared.module';\nimport { SmilesEditorHeaderComponent } from './smiles-editor-header/smiles-editor-header.component';\nimport { SmilesEditorTextualComponent } from './smiles-editor-textual/smiles-editor-textual.component';\nimport { SmilesEditorComponent } from './smiles-editor/smiles-editor.component';\nimport { SmilesEditorDialogComponent } from './smiles-editor-dialog/smiles-editor-dialog.component';\n\nconst NG_MODULES = [SharedModule];\nconst NG_COMPONENTS = [\n  SmilesEditorHeaderComponent,\n  SmilesEditorTextualComponent,\n  SmilesEditorComponent,\n  SmilesEditorDialogComponent,\n];\n\n@NgModule({\n  imports: [...NG_MODULES],\n  exports: [SmilesEditorComponent],\n  declarations: [...NG_COMPONENTS],\n})\nexport class SmilesEditorModule {}\n","<ibm-modal [open]=\"open\"\n  size=\"md\"\n  [hasScrollingContent]=\"false\">\n  <ibm-modal-header (closeSelect)=\"onClose()\">\n    <h4>Billing address</h4>\n  </ibm-modal-header>\n  <section class=\"bx--modal-content\">\n    <form [formGroup]=\"form\">\n      <div ibmRow\n        class=\"mb-6\">\n        <div ibmCol>\n          <label class=\"bx--label\">First name</label>\n          <input ibmText\n            theme=\"dark\"\n            placeholder=\"First name\"\n            *ibmValidationMessage=\"form.get('lastName')\"\n            formControlName=\"firstName\">\n        </div>\n        <div ibmCol>\n          <label class=\"bx--label\">Last name</label>\n          <input ibmText\n            theme=\"dark\"\n            placeholder=\"Last name\"\n            *ibmValidationMessage=\"form.get('firstName')\"\n            formControlName=\"lastName\">\n        </div>\n      </div>\n      <div ibmRow\n        class=\"mb-6\">\n        <div ibmCol>\n          <label class=\"bx--label\">Email</label>\n          <input ibmText\n            theme=\"dark\"\n            placeholder=\"Email\"\n            *ibmValidationMessage=\"form.get('email')\"\n            formControlName=\"email\">\n        </div>\n      </div>\n      <div ibmRow\n        class=\"mb-6\">\n        <div ibmCol>\n          <label class=\"bx--label\">Phone number</label>\n          <input ibmText\n            theme=\"dark\"\n            placeholder=\"Phone number\"\n            *ibmValidationMessage=\"form.get('phone')\"\n            formControlName=\"phone\">\n        </div>\n      </div>\n      <div ibmRow\n        class=\"mb-6\">\n        <div ibmCol>\n          <ng-container *ngIf=\"!isEditingBillingAddress\">\n            <ibm-label [invalid]=\"taxCalculationError\"\n              [invalidText]=\"'The address you entered is not valid'\">{{placeholderAddress}}\n              <div class=\"position-relative w-100\">\n                <input ibmText\n                  theme=\"dark\"\n                  [placeholder]=\"placeholderAddress\"\n                  [value]=\"addressValue\"\n                  [readOnly]=\"true\"\n                  [invalid]=\"taxCalculationError\"\n                  [invalidText]=\"'The address you entered is not valid'\">\n                <svg icon\n                  ibmIconEdit\n                  size=\"16\"\n                  class=\"edit-address\"\n                  (click)=\"onToggleIsEditingBillingAddress()\"></svg>\n              </div>\n            </ibm-label>\n          </ng-container>\n          <ibm-search-billing-address *ngIf=\"isEditingBillingAddress\"\n            (valueChange)=\"onValueChange($event)\"></ibm-search-billing-address>\n        </div>\n      </div>\n    </form>\n\n  </section>\n  <ibm-modal-footer>\n    <button ibmButton=\"secondary\"\n      (click)=\"onClose()\">\n      Cancel\n    </button>\n    <button ibmButton=\"primary\"\n      [disabled]=\"!form.valid\"\n      (click)=\"onContinue()\">\n      {{okLabel}}\n    </button>\n  </ibm-modal-footer>\n</ibm-modal>","import { Component, Inject, OnInit } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { IAddressFormatWithCountry, User, UserBillingInformation } from '@app/core/models';\nimport { ApiService } 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-billing-information-dialog',\n  templateUrl: './billing-information-dialog.component.html',\n  styleUrls: ['./billing-information-dialog.component.scss'],\n})\nexport class BillingInformationDialogComponent extends BaseModal implements OnInit {\n  form = new FormGroup({\n    firstName: new FormControl(null, [Validators.required]),\n    lastName: new FormControl(null, [Validators.required]),\n    email: new FormControl(null, [Validators.required, Validators.email]),\n    phone: new FormControl(null, [Validators.required]),\n    addressLine1: new FormControl(null, [Validators.required]),\n    addressLine2: new FormControl(null),\n    addressLine3: new FormControl(null),\n    locality: new FormControl(null, [Validators.required]),\n    province: new FormControl(null, [Validators.required]),\n    postalCode: new FormControl(null, [Validators.required]),\n    countryName: new FormControl(null, [Validators.required]),\n    countryCode2: new FormControl(null, [Validators.required]),\n    countryCode3: new FormControl(null, [Validators.required]),\n  });\n\n  isEditingBillingAddress = false;\n  placeholderAddress: string;\n  addressValue: string;\n  taxCalculationError: boolean;\n  okLabel = 'Save';\n\n  constructor(\n    @Inject('dialogData')\n    private dialogData: {\n      userBillingInformation: UserBillingInformation;\n      taxCalculationError: boolean;\n      okLabel: string;\n    },\n    private apiService: ApiService\n  ) {\n    super();\n    this.taxCalculationError = this.dialogData.taxCalculationError;\n  }\n\n  ngOnInit(): void {\n    const user = new User(this.apiService.auth.user);\n    this.placeholderAddress = `Address - ${user.country.countryName}`;\n    if (this.dialogData.userBillingInformation) {\n      this.form.patchValue(this.dialogData.userBillingInformation);\n      this.addressValue = this.dialogData.userBillingInformation.fullAddress;\n      if (!this.addressValue) {\n        this.isEditingBillingAddress = true;\n      }\n    } else {\n      this.isEditingBillingAddress = true;\n    }\n\n    if (this.dialogData.okLabel) {\n      this.okLabel = this.dialogData.okLabel;\n    }\n  }\n\n  onValueChange(addressFormat: IAddressFormatWithCountry) {\n    if (!addressFormat) {\n      this.form.patchValue({ addressLine1: null });\n    } else {\n      this.taxCalculationError = false;\n      this.form.patchValue(addressFormat);\n    }\n  }\n\n  onToggleIsEditingBillingAddress() {\n    this.form.patchValue({\n      addressLine1: null,\n      addressLine2: null,\n      addressLine3: null,\n      locality: null,\n      province: null,\n      postalCode: null,\n      countryName: null,\n      countryCode2: null,\n      countryCode3: null,\n    });\n    this.isEditingBillingAddress = !this.isEditingBillingAddress;\n  }\n\n  onClose() {\n    this.close.emit({\n      status: EDialogCloseEventStatus.CLOSE,\n    } as IDialogCloseEvent<IAddressFormatWithCountry>);\n  }\n\n  onContinue() {\n    if (this.form.valid) {\n      this.close.emit({\n        status: EDialogCloseEventStatus.OK,\n        data: this.form.value,\n      } as IDialogCloseEvent<IAddressFormatWithCountry>);\n    }\n  }\n}\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { finalize } from 'rxjs/operators';\nimport { AiModel, SynthesisProcedure } from '@app/core/models';\nimport { ApiService, EventTrackingService, ToastMessagesService } from '@app/core/services';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { BaseModal, ListItem } from 'carbon-components-angular';\nimport { ESynthesisCreationSource } from '@app/shared/enums/synthesis.enum';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\n\n@Component({\n  selector: 'ibm-synthesis-wizard',\n  templateUrl: './synthesis-wizard.component.html',\n  styleUrls: ['./synthesis-wizard.component.scss'],\n})\nexport class SynthesisWizardComponent extends BaseModal implements OnInit {\n  synthesisWizardForm: UntypedFormGroup;\n  aiModelItems: ListItem[] = [];\n  isLoading = false;\n  projectId: string;\n  projectName: string;\n  paragraphs: string[];\n  sequenceId: string;\n  synthesisCreationSource: ESynthesisCreationSource;\n\n  constructor(\n    @Inject('dialogData')\n    public dialogData: {\n      projectId: string;\n      projectName: string;\n      synthesisCreationSource: ESynthesisCreationSource;\n      paragraphs?: string[];\n      sequenceId?: string;\n    },\n    private formBuilder: UntypedFormBuilder,\n    private router: Router,\n    private loaderService: LoaderService,\n    private apiService: ApiService,\n    private toastMessagesService: ToastMessagesService,\n    private eventTrackingService: EventTrackingService\n  ) {\n    super();\n    this.projectId = this.dialogData.projectId;\n    this.projectName = this.dialogData.projectName;\n    this.paragraphs = this.dialogData.paragraphs;\n    this.sequenceId = this.dialogData.sequenceId;\n    this.synthesisCreationSource = this.dialogData.synthesisCreationSource;\n  }\n\n  ngOnInit(): void {\n    this.synthesisWizardForm = this.formBuilder.group({\n      aiModel: [null, Validators.required],\n    });\n    this.isLoading = true;\n    (this.synthesisCreationSource === ESynthesisCreationSource.TEXT\n      ? this.apiService.aiModels.getAiModelsForSynthesisFromText()\n      : this.apiService.aiModels.getAiModelsForSynthesisFromSequence()\n    )\n      .pipe(finalize(() => (this.isLoading = false)))\n      .subscribe(response => {\n        let defaultModel: AiModel = null;\n        this.aiModelItems =\n          response.content.models?.map(model => {\n            const isDefault = model.isDefault;\n            if (isDefault) {\n              defaultModel = model;\n            }\n            return {\n              content: model.name,\n              selected: isDefault,\n            };\n          }) || [];\n\n        if (defaultModel) {\n          this.synthesisWizardForm.patchValue({ aiModel: defaultModel.name });\n        }\n      });\n  }\n\n  onGetSynthesis() {\n    this.loaderService.show();\n    if (this.synthesisCreationSource) {\n      const notificationMessage = this.toastMessagesService.show({\n        title: 'Predict experimental procedure',\n        message: 'Please wait, we are creating the synthesis procedure, this might take a while.',\n        type: EToastMessageType.SUCCESS,\n        duration: 40000,\n      });\n      this.apiService.synthesisProcedures\n        .getAction<SynthesisProcedure>({\n          method: 'POST',\n          relation:\n            this.synthesisCreationSource === ESynthesisCreationSource.TEXT\n              ? 'create-from-paragraph'\n              : 'create-from-sequence',\n          body: {\n            aiModel: this.synthesisWizardForm.get('aiModel').value,\n            paragraphs: this.paragraphs,\n            projectId: this.projectId,\n            sequenceId: this.sequenceId,\n          },\n          isBodyRaw: true,\n        })\n        .pipe(\n          finalize(() => {\n            this.loaderService.hide();\n          })\n        )\n        .subscribe(response => {\n          this.eventTrackingService.trackEvent('Plan a Synthesis');\n\n          this.toastMessagesService.close(notificationMessage);\n          this.closeModal();\n          this.router.navigate([\n            `/projects`,\n            this.projectId,\n            this.projectName,\n            'synthesis',\n            'procedures',\n            response.content.id,\n          ]);\n        });\n    }\n  }\n}\n","<ibm-modal [open]=\"open\"\n  [hasScrollingContent]=\"false\">\n  <ibm-modal-header (closeSelect)=\"closeModal()\">\n    <h3>Get Synthesis</h3>\n  </ibm-modal-header>\n  <div ibmModalContent>\n    <p class=\"mb-5\">\n      We continuously update our AI models. As a default, the predictions are powered by the\n      best version of our models. Other model releases can be selected with the dropdown menu.\n    </p>\n    <form (ngSubmit)=\"onGetSynthesis()\"\n      [formGroup]=\"synthesisWizardForm\">\n      <section>\n        <ibm-dropdown label=\"AI model version\"\n          placeholder=\"Choose AI model\"\n          formControlName=\"aiModel\"\n          itemValueKey=\"content\"\n          [skeleton]=\"isLoading\"\n          [dropUp]=\"false\">\n          <ibm-dropdown-list [items]=\"aiModelItems\"></ibm-dropdown-list>\n        </ibm-dropdown>\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]=\"!synthesisWizardForm.valid\"\n      (click)=\"onGetSynthesis()\">\n      Get Synthesis\n    </button>\n  </ibm-modal-footer>\n</ibm-modal>","import { Component, Injector, OnDestroy, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { ApiService, AppSessionService, ToastMessagesService } from '@app/core/services';\nimport { IApiRequest, IApiResponse, IApiSortDirection, IApiSorting } from '@app/libs/bitforce/api';\nimport { getMongoQuery } from '@app/libs/bitforce/utils';\nimport { ETableList } from '@app/shared/enums/table-list.enum';\nimport { Table, TableHeaderItem, TableItem, TableModel } from 'carbon-components-angular';\nimport { Subscription } from 'rxjs';\nimport { IActiveFilters } from '../filters/filters.component';\nimport { IIbmSearchData } from '../search-bar/search-bar.interface';\n\n@Component({\n  template: '',\n})\nexport abstract class SuperListComponent<T> implements OnInit, OnDestroy {\n  public searchData: IIbmSearchData = {\n    searchString: '',\n    isSmiles: false,\n  };\n  public filters: IActiveFilters = {};\n  public isLoading = true;\n  public itemsPerPageOptions = [10, 20, 30];\n  private tableModel = new TableModel();\n  private skeletonModel = Table.skeletonModel(1, 8);\n  protected apiCallSubscription = new Subscription();\n  protected subscription = new Subscription();\n  protected defaultFirstPage = 1;\n  protected defaultItemsPerPage = this.itemsPerPageOptions[0];\n  protected items: T[];\n  protected apiService: ApiService;\n  protected appSessionService: AppSessionService;\n  protected toastMessagesService: ToastMessagesService;\n  protected router: Router;\n  protected multipleSorting = true;\n  protected searchFields = ['name'];\n  protected tableListStateName: ETableList;\n\n  constructor(public injector: Injector) {\n    this.apiService = injector.get<ApiService>(ApiService);\n    this.toastMessagesService = injector.get<ToastMessagesService>(ToastMessagesService);\n    this.router = injector.get<Router>(Router);\n    this.appSessionService = injector.get<AppSessionService>(AppSessionService);\n  }\n\n  protected abstract mapTableHeaders(): TableHeaderItem[];\n  protected abstract mapTableModel(items: T[]): TableItem[][];\n  protected abstract loadData();\n\n  ngOnInit() {\n    this.tableModel.pageLength = this.defaultItemsPerPage;\n    this.tableModel.currentPage = this.defaultFirstPage;\n    this.tableModel.header = this.mapTableHeaders();\n\n    if (this.tableListStateName && this.appSessionService.listTableState[this.tableListStateName]) {\n      this.tableModel.currentPage = this.appSessionService.listTableState[\n        this.tableListStateName\n      ].currentPage;\n      this.tableModel.pageLength = this.appSessionService.listTableState[this.tableListStateName].pageLength;\n      this.filters = this.appSessionService.listTableState[this.tableListStateName].filters;\n      this.searchData = this.appSessionService.listTableState[this.tableListStateName].searchData;\n      this.tableModel.header = this.appSessionService.listTableState[this.tableListStateName].tableHeaders;\n    }\n\n    this.loadData();\n  }\n\n  get tableItems() {\n    return this.isLoading ? this.skeletonModel : this.tableModel;\n  }\n\n  get totalItems() {\n    return this.tableModel.totalDataLength;\n  }\n\n  get sortRequestParams() {\n    return this.tableModel.header\n      .filter(h => h.sorted)\n      .sort((a, b) => a.metadata.sortingPriority - b.metadata.sortingPriority)\n      .map(h => ({\n        property: h.metadata.property,\n        direction: h.ascending ? IApiSortDirection.ASC : IApiSortDirection.DESC,\n      }));\n  }\n\n  get isSearching(): boolean {\n    return !!this.searchData?.searchString || !!Object.keys(this.filters?.filtersQuery || {}).length;\n  }\n\n  get pageLength() {\n    return this.tableModel.pageLength;\n  }\n\n  get currentPage() {\n    return this.tableModel.currentPage;\n  }\n\n  get showTable() {\n    return this.isLoading || this.isSearching || this.totalItems > 0;\n  }\n\n  get showNoResultsMatchingSearch() {\n    return this.totalItems === 0 && this.isSearching && !this.isLoading;\n  }\n\n  get showNoItemsFound() {\n    return this.totalItems === 0 && !this.isLoading && !this.isSearching;\n  }\n\n  get apiRequestPrams(): IApiRequest {\n    return {\n      query: getMongoQuery(\n        this.filters,\n        !this.searchData.isSmiles && this.searchData.searchString,\n        !this.searchData.isSmiles && this.searchFields\n      ),\n      page: this.currentPage - 1,\n      size: this.pageLength,\n      sorting: this.sortRequestParams,\n      queryParams: { ...(this.searchData.isSmiles ? { smiles: this.searchData.searchString } : {}) },\n    };\n  }\n\n  setTableData(response: IApiResponse<T[]>, isPollingRequest = false) {\n    this.items = response.content;\n    this.tableModel.totalDataLength = response.pagination.totalItems;\n    const tableData = this.mapTableModel(this.items);\n    if (!isPollingRequest) {\n      this.tableModel.data = tableData;\n    } else {\n      if (this.currentPage === response.pagination.page + 1) {\n        if (this.tableModel.data.length === tableData.length) {\n          this.tableModel.data.forEach((tableItems, i) => {\n            tableItems.forEach((_, k) => {\n              this.tableModel.data[i][k] = tableData[i][k];\n            });\n          });\n        } else {\n          this.tableModel.data = tableData;\n        }\n      } else {\n        console.error(\n          `Polling page mismatch, current: ${this.currentPage}, response: ${response.pagination.page}`\n        );\n      }\n    }\n    this.tableModel.pageLength = response.pagination.size;\n  }\n\n  onFilter(event) {\n    this.filters = event;\n    this.tableModel.currentPage = this.defaultFirstPage;\n    this.loadData();\n  }\n\n  onSearch(search: IIbmSearchData) {\n    this.searchData = search;\n    this.tableModel.currentPage = this.defaultFirstPage;\n    this.loadData();\n  }\n\n  onSelectPage(page) {\n    this.tableModel.currentPage = page;\n    this.loadData();\n  }\n\n  onSort(index) {\n    this.tableModel.currentPage = this.defaultFirstPage;\n    if (this.tableModel.header[index].metadata && this.tableModel.header[index].metadata.toggleSorting) {\n      this.tableModel.header[index].sorted = !this.tableModel.header[index].sorted;\n      if (this.tableModel.header[index].sorted) {\n        this.tableModel.header[index].descending = true;\n      }\n    } else {\n      this.tableModel.header[index].sorted = !(\n        this.tableModel.header[index].sorted && this.tableModel.header[index].descending\n      );\n      if (this.tableModel.header[index].sorted) {\n        // if already sorted flip sorting direction\n        this.tableModel.header[index].ascending = this.tableModel.header[index].descending;\n      }\n    }\n\n    if (!this.multipleSorting) {\n      // reset all sort values except the selected\n      for (let i = 0; i < this.tableModel.header.length; i++) {\n        if (i !== index) {\n          this.tableModel.header[i].descending = true;\n          this.tableModel.header[i].ascending = false;\n          this.tableModel.header[i].sorted = false;\n        }\n      }\n    }\n\n    this.loadData();\n  }\n\n  resetPagination() {\n    this.tableModel.currentPage = this.defaultFirstPage;\n  }\n\n  protected unselectAll() {\n    this.tableModel.selectAll(false);\n  }\n\n  protected getSelectedRows(): T[] {\n    if (!this.tableModel) {\n      return [];\n    }\n\n    return this.items.filter((_, index) => this.tableModel.isRowSelected(index));\n  }\n\n  ngOnDestroy(): void {\n    this.apiCallSubscription.unsubscribe();\n    this.subscription.unsubscribe();\n\n    if (this.tableListStateName) {\n      this.appSessionService.listTableState[this.tableListStateName] = {\n        currentPage: this.currentPage,\n        filters: this.filters,\n        pageLength: this.pageLength,\n        searchData: this.searchData,\n        tableHeaders: this.tableModel.header,\n      };\n    }\n  }\n}\n"],"x_google_ignoreList":[]}