diff --git a/DESCRIPTION b/DESCRIPTION index 325c3f0..eec2c0a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,7 @@ Authors@R: c(person("John", "Harrold", comment = c(ORCID="0000-0003-2052-4373"))) Maintainer: John Harrold Description: Complete work flow for the analysis of pharmacokinetic pharmacodynamic (PKPD), physiologically-based pharmacokinetic (PBPK) and systems pharmacology models including: creation of ordinary differential equation-based models, pooled parameter estimation, individual/population based simulations, rule-based simulations for clinical trial design and modeling assays, deployment with a customizable 'Shiny' app, and non-compartmental analysis. System-specific analysis templates can be generated and each element includes integrated reporting with 'PowerPoint' and 'Word'. -URL: https://ubiquity.tools/rworkflow +URL: https://r.ubiquity.tools SystemRequirements: Perl BugReports: https://github.com/john-harrold/ubiquity/issues License: BSD_2_clause + file LICENSE diff --git a/R/ubiquity.r b/R/ubiquity.r index aa98c6d..8596577 100644 --- a/R/ubiquity.r +++ b/R/ubiquity.r @@ -292,7 +292,7 @@ return(cfg)} #'@param overwrite if \code{TRUE} the new workshop files will overwrite any existing files present (\code{FALSE}) #'@param copy_files if \code{TRUE} the files will be written to the output_directory, if \code{FALSE} only the names and locations of the files will be returned (\code{TRUE}) #'@param output_directory directory where workshop files will be placed (getwd()) -#'@details Valid sections are "Simulation", "Estimation", "Titration" "Reporting", and "NCA" +#'@details Valid sections are "Simulation", "Estimation", "In Vitro", "Titration" "Reporting", and "NCA" #' #'@return list #'@examples @@ -304,7 +304,7 @@ workshop_fetch <- function(section = "Simulation", copy_files = TRUE, output_directory = getwd()){ res = list() - allowed = c("Simulation", "Estimation", "Titration", "Reporting", "Testing", "NCA") + allowed = c("Simulation", "Estimation", "In Vitro", "Titration", "Reporting", "Testing", "NCA") isgood = TRUE # This function only works if we're using the package @@ -379,6 +379,16 @@ workshop_fetch <- function(section = "Simulation", "analysis_visit_infusion_dosing.r", "system.txt") write_file = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) + } else if(section=="In Vitro") { + sources = c(file.path(src_dir, "analysis_in_vitro.R" ), + file.path(src_dir, "mk_data_in_vitro.R" ), + file.path(csv_dir, "in_vitro_er_data.csv" ), + file.path(sys_dir, "system-in_vitro.txt" )) + destinations = c("analysis_in_vitro.R", + "mk_data_in_vitro.R", + "in_vitro_er_data.csv", + "system-in_vitro.txt") + write_file = c(TRUE, TRUE, TRUE, TRUE) } else if(section=="Testing") { sources = c(file.path(src_dir, "workshop_test.R")) destinations = c("workshop_test.R") diff --git a/_pkgdown.yml b/_pkgdown.yml index dfd0208..a0fb291 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,5 +1,7 @@ url: https://r.ubiquity.tools template: + #math-rendering: mathjax + math-rendering: katex bootstrap: 5 params: bootswatch: united @@ -105,6 +107,8 @@ navbar: href: articles/Deployment.html - text: "Trial/Rule-Based Simulations" href: articles/Titration.html + - text: "Estimation of In Vitro/Static Systems" + href: articles/In_Vitro.html - text: "Non-Compartmental Analysis" href: articles/NCA.html - text: "Integrated Word and PowerPoint Reporting" diff --git a/docs/404.html b/docs/404.html index 9eb5454..51e8910 100644 --- a/docs/404.html +++ b/docs/404.html @@ -12,11 +12,12 @@ - + - + + @@ -48,6 +49,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 12707ed..ff47d1d 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -1,5 +1,5 @@ -License • ubiquity +License • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/articles/Deployment.html b/docs/articles/Deployment.html index 13ab9b9..e0640fa 100644 --- a/docs/articles/Deployment.html +++ b/docs/articles/Deployment.html @@ -12,11 +12,12 @@ - + - + + Skip to contents @@ -47,6 +48,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -91,7 +93,7 @@

    John Harrold & Anson K Abraham

    -

    2024-10-19

    +

    2024-10-20

    Source: vignettes/Deployment.Rmd
    Deployment.Rmd
    @@ -112,7 +114,7 @@

    IntroductionDavda etal. mAbs, 6(4), 1094-1102) :

    -library(ubiquity)
    +library(ubiquity)
     system_new(file_name = "system.txt", system_file = "mab_pk", overwrite = TRUE)
     cfg = build_system(system_file = "system.txt")

    Use ?system_new to see a list of the available system @@ -236,7 +238,7 @@

    Model scripts
    -if(!require(ubiquity)){
    +if(!require(ubiquity)){
       source(file.path('library', 'r_general', 'ubiquity.R')) }
     cfg = build_system(system_file="system.txt")
    @@ -308,12 +310,12 @@

    Model reports\rightarrowtransient/rgui/default/gui_state.RData +cfg \rightarrow +transient/rgui/default/gui_state.RData
  • -som -\rightarrowtransient/rgui/default/gui_som.RData +som \rightarrow +transient/rgui/default/gui_som.RData
  • Next load the test script, modify the report name accordingly, and diff --git a/docs/articles/Estimation.html b/docs/articles/Estimation.html index ae19ac3..a6fc255 100644 --- a/docs/articles/Estimation.html +++ b/docs/articles/Estimation.html @@ -12,11 +12,12 @@ - + - + + Skip to contents @@ -47,6 +48,7 @@

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -104,7 +106,7 @@

    Introduction
    -library(ubiquity)
    +library(ubiquity)
     fr = workshop_fetch(section="Estimation", overwrite=TRUE)

    These functions take two bracketed arguments. The first argument is diff --git a/docs/articles/NCA.html b/docs/articles/NCA.html index f2fc6de..c3dc8dc 100644 --- a/docs/articles/NCA.html +++ b/docs/articles/NCA.html @@ -12,11 +12,12 @@ - + - + + Skip to contents @@ -47,6 +48,7 @@

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -119,11 +121,9 @@

    Introductionunits=time×concentrationunits=time \times concentration) +AUC - The area under the curve (units=time \times concentration)
  • -AUMC - The area under the first moment curve -(units=time2×concentrationunits=time^2 \times concentration)
  • +AUMC - The area under the first moment curve (units=time^2 \times concentration)

    These properties are all based on observational data. So the Cmax and Tmax will most certainly not be at @@ -134,23 +134,26 @@

    IntroductionAUC=0tfCdti=1n1Ci+Ci+12×(ti+1ti),AUMC=0tft×Cdti=1n1tiCi+ti+1Ci+12×(ti+1ti) -AUC = \int_0^{t_f} Cdt \approx \sum_{i=1}^{n-1}{\frac{C_i+C_{i+1}}{2}\times (t_{i+1}-t_{i})}, \ \ \ \ \ -AUMC = \int_0^{t_f} t\times Cdt \approx \sum_{i=1}^{n-1}{\frac{t_iC_i+t_{i+1}C_{i+1}}{2}\times (t_{i+1}-t_{i})} -

    +

    +AUC = \int_0^{t_f} Cdt +\approx \sum_{i=1}^{n-1}{\frac{C_i+C_{i+1}}{2}\times (t_{i+1}-t_{i})} + +AUMC = \int_0^{t_f} t\times Cdt +\approx \sum_{i=1}^{n-1}{\frac{t_iC_i+t_{i+1}C_{i+1}}{2}\times +(t_{i+1}-t_{i})} +

    This can be done in Excel pretty easily. Depending on the data and the analysis other properties can be calculated. For example we can calculate the clearance, steady-state volume of distribution and terminal half-life:

      -
    • Clearance: -CL=DoseAUCCL = \frac{Dose}{AUC} +
    • Clearance: CL = +\frac{Dose}{AUC}
    • -
    • Mean residence time: -MRT=AUMCAUCMRT = \frac{AUMC}{AUC} +
    • Mean residence time: MRT = +\frac{AUMC}{AUC}
    • -
    • Steady state volume of distribution: -Vss=MRT×CLV_{ss} = MRT \times CL +
    • Steady state volume of distribution: V_{ss} = MRT \times CL
    • Half-life: Terminal slope of the natural log of the data
    @@ -171,7 +174,7 @@

    Introduction
    -library(ubiquity)
    +library(ubiquity)
     fr = workshop_fetch(section="NCA", overwrite=TRUE)

    This creates several files in the working directory. First are data sets:

    @@ -207,7 +210,7 @@

    Quick Template for Running NCA
    -library(ubiquity)
    +library(ubiquity)
     cfg = build_system()
     fr = system_fetch_template(cfg, template = "NCA")

    This will create the file analysis_nca.R in the current @@ -448,166 +451,166 @@

    Summarizing Datacomponents field.

    - - + +
    - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + +

    ID

    Cmax

    Tmax

    Half-life

    AUC last

    ID

    Cmax

    Tmax

    Half-life

    AUC last

    (ng/ml)

    (ng/ml)

    1

    9,950

    1

    423

    1,760,000

    1

    9,950

    1

    423

    1,760,000

    2

    11,300

    1

    477

    2,510,000

    2

    11,300

    1

    477

    2,510,000

    3

    7,420

    1

    500

    2,320,000

    3

    7,420

    1

    500

    2,320,000

    4

    5,760

    1

    589

    1,650,000

    4

    5,760

    1

    589

    1,650,000

    5

    6,460

    1

    574

    1,890,000

    5

    6,460

    1

    574

    1,890,000

    6

    9,460

    1

    526

    2,450,000

    6

    9,460

    1

    526

    2,450,000

    7

    13,800

    1

    627

    3,230,000

    7

    13,800

    1

    627

    3,230,000

    8

    7,160

    1

    567

    1,970,000

    8

    7,160

    1

    567

    1,970,000

    9

    9,180

    1

    561

    2,180,000

    9

    9,180

    1

    561

    2,180,000

    10

    4,760

    1

    500

    1,250,000

    10

    4,760

    1

    500

    1,250,000

    11

    4,670

    1

    599

    1,630,000

    11

    4,670

    1

    599

    1,630,000

    12

    12,100

    1

    546

    2,620,000

    12

    12,100

    1

    546

    2,620,000

    13

    6,380

    1

    581

    2,010,000

    13

    6,380

    1

    581

    2,010,000

    14

    5,130

    1

    549

    1,620,000

    14

    5,130

    1

    549

    1,620,000

    15

    4,910

    1

    751

    1,890,000

    15

    4,910

    1

    751

    1,890,000

    16

    7,580

    1

    619

    1,640,000

    16

    7,580

    1

    619

    1,640,000

    17

    10,200

    1

    507

    2,500,000

    17

    10,200

    1

    507

    2,500,000

    18

    10,600

    1

    639

    2,900,000

    18

    10,600

    1

    639

    2,900,000

    Mean (Std Dev)

    563 (73.1)

    2110000 (517000)

    Mean (Std Dev)

    563 (73.1)

    2110000 (517000)

    Median

    1

    Median

    1

    diff --git a/docs/articles/Reporting.html b/docs/articles/Reporting.html index 6d856e1..b276400 100644 --- a/docs/articles/Reporting.html +++ b/docs/articles/Reporting.html @@ -12,11 +12,12 @@ - + - + +
    Skip to contents @@ -47,6 +48,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -128,7 +130,7 @@

    Reporting workshop filesTo make a copy of the example scripts in the current working directory run the following:

    -library(ubiquity)
    +library(ubiquity)
     fr = workshop_fetch(section="Reporting", overwrite=TRUE)

    This should create the following scripts

      @@ -648,153 +650,153 @@

      PowerPoint - - + +
      - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + +

      Master/Template

      onbrand

      Content

      Master/Template

      onbrand

      Content

      Name

      Placeholder

      Type

      Name

      Placeholder

      Type

      title_slide

      title

      text

      title_slide

      title

      text

      sub_title

      text

      sub_title

      text

      section_slide

      title

      text

      section_slide

      title

      text

      sub_title

      text

      sub_title

      text

      title_only

      title

      text

      title_only

      title

      text

      content_text

      title

      text

      content_text

      title

      text

      sub_title

      text

      sub_title

      text

      content_body

      text

      content_body

      text

      content_list

      title

      text

      content_list

      title

      text

      sub_title

      text

      sub_title

      text

      content_body

      list

      content_body

      list

      two_content_header_list

      title

      text

      two_content_header_list

      title

      text

      sub_title

      text

      sub_title

      text

      content_left_header

      text

      content_left_header

      text

      content_left

      list

      content_left

      list

      content_right_header

      text

      content_right_header

      text

      content_right

      list

      content_right

      list

      two_content_header_text

      title

      text

      two_content_header_text

      title

      text

      sub_title

      text

      sub_title

      text

      content_left_header

      text

      content_left_header

      text

      content_left

      text

      content_left

      text

      content_right_header

      text

      content_right_header

      text

      content_right

      text

      content_right

      text

      two_content_list

      title

      text

      two_content_list

      title

      text

      sub_title

      text

      sub_title

      text

      content_left

      list

      content_left

      list

      content_right

      list

      content_right

      list

      two_content_text

      title

      text

      two_content_text

      title

      text

      sub_title

      text

      sub_title

      text

      content_left

      text

      content_left

      text

      content_right

      text

      content_right

      text

      @@ -807,70 +809,70 @@

      Word following styles defined. When you create the onbrand mapping file you will need to use the onbrand Style name listed.

      - - + +
      - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +

      onbrand

      Word

      Style

      onbrand

      Word

      Style

      Style

      Style

      Type

      Style

      Style

      Type

      Code

      Code

      paragraph

      Code

      Code

      paragraph

      Figure_Caption

      graphic title

      paragraph

      Figure_Caption

      graphic title

      paragraph

      Heading_1

      heading 1

      paragraph

      Heading_1

      heading 1

      paragraph

      Heading_2

      heading 2

      paragraph

      Heading_2

      heading 2

      paragraph

      Heading_3

      heading 3

      paragraph

      Heading_3

      heading 3

      paragraph

      Normal

      Normal

      paragraph

      Normal

      Normal

      paragraph

      Notes

      Notes

      paragraph

      Notes

      Notes

      paragraph

      TOC

      toc 1

      paragraph

      TOC

      toc 1

      paragraph

      Table_Caption

      table title

      paragraph

      Table_Caption

      table title

      paragraph

      Table

      Table Grid

      table

      Table

      Table Grid

      table

      diff --git a/docs/articles/Simulation.html b/docs/articles/Simulation.html index c2b3c63..111a424 100644 --- a/docs/articles/Simulation.html +++ b/docs/articles/Simulation.html @@ -12,11 +12,12 @@ - + - + + Skip to contents @@ -47,6 +48,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • @@ -105,7 +107,7 @@

      Introduction
      -library(ubiquity)
      +library(ubiquity)
       fr = workshop_fetch(section="Simulation", overwrite=TRUE)

      This should create the following scripts:

        @@ -153,8 +155,8 @@

        Simulating an Indiv the celarance to a value of .015 you could simply use: parameters$CL = 0.15.

        Next different simulation options can be set. For example the -following will set the duration of the simulation to three months -(3months×4weeksmonth×7daysweek)\left(3\ \mbox{months} \times 4\frac{\mbox{weeks}}{\mbox{month}}\times7\frac{\mbox{days}}{\mbox{week}}\right) +following will set the duration of the simulation to three months \left(3\ \mbox{months} \times +4\frac{\mbox{weeks}}{\mbox{month}}\times7\frac{\mbox{days}}{\mbox{week}}\right) in days:

         cfg = system_set_option(cfg, group  = "simulation", 
        diff --git a/docs/articles/Titration.html b/docs/articles/Titration.html
        index 009b609..63bba93 100644
        --- a/docs/articles/Titration.html
        +++ b/docs/articles/Titration.html
        @@ -12,11 +12,12 @@
         
         
         
        -
        +
         
         
         
        -
        +
        +
         
         
             Skip to contents
        @@ -47,6 +48,7 @@
             
      • Deploying Your Models in a Shiny App
      • Trial/Rule-Based Simulations
      • +
      • Estimation of In Vitro/Static Systems
      • Non-Compartmental Analysis
      • Integrated Word and PowerPoint Reporting
      • @@ -115,7 +117,7 @@

        Introduction
        -library(ubiquity)
        +library(ubiquity)
         fr = workshop_fetch(section="Titration", overwrite=TRUE)

        This should provide you with the following scripts:

          diff --git a/docs/articles/index.html b/docs/articles/index.html index c573f76..c364a8b 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,5 +1,5 @@ -Articles • ubiquity +Articles • ubiquity Skip to contents @@ -26,6 +26,7 @@
        • Deploying Your Models in a Shiny App
        • Trial/Rule-Based Simulations
        • +
        • Estimation of In Vitro/Static Systems
        • Non-Compartmental Analysis
        • Integrated Word and PowerPoint Reporting
        • @@ -68,6 +69,8 @@

          All vignettes

          Howtos
          +
          Analysis of Static In Vitro System
          +
          Modeling Language
          Noncompartmental Analysis
          diff --git a/docs/authors.html b/docs/authors.html index e137eb2..47962af 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,5 +1,5 @@ -Authors and Citation • ubiquity +Authors and Citation • ubiquity Skip to contents @@ -26,6 +26,7 @@
        • Deploying Your Models in a Shiny App
        • Trial/Rule-Based Simulations
        • +
        • Estimation of In Vitro/Static Systems
        • Non-Compartmental Analysis
        • Integrated Word and PowerPoint Reporting
        • diff --git a/docs/deps/KaTex-0.16.10/katex.min.css b/docs/deps/KaTex-0.16.10/katex.min.css new file mode 100644 index 0000000..b5337aa --- /dev/null +++ b/docs/deps/KaTex-0.16.10/katex.min.css @@ -0,0 +1 @@ +@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.10"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/docs/deps/KaTex-0.16.10/katex.min.js b/docs/deps/KaTex-0.16.10/katex.min.js new file mode 100644 index 0000000..e701cfd --- /dev/null +++ b/docs/deps/KaTex-0.16.10/katex.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Yn}});class r{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let n,o,s="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;n=i.start,o=i.end,n===e.length?s+=" at end of input: ":s+=" at position "+(n+1)+": ";const t=e.slice(n,o).replace(/[^]/g,"$&\u0332");let r,a;r=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),a=o+15":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;const a=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?a(e.body[0]):e:"font"===e.type?a(e.body):e};var l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(i,(e=>s[e]))},hyphenate:function(e){return e.replace(o,"-$1").toLowerCase()},getBaseElem:a,isCharacterBox:function(e){const t=a(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){const t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}};const h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function c(e){if(e.default)return e.default;const t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class m{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const t in h)if(h.hasOwnProperty(t)){const r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:c(r)}}reportNonstrict(e,t,r){let o=this.strict;if("function"==typeof o&&(o=o(e,t,r)),o&&"ignore"!==o){if(!0===o||"error"===o)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===o?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+o+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){let n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){const t=l.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class p{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return u[d[this.id]]}sub(){return u[g[this.id]]}fracNum(){return u[f[this.id]]}fracDen(){return u[b[this.id]]}cramp(){return u[y[this.id]]}text(){return u[x[this.id]]}isTight(){return this.size>=2}}const u=[new p(0,0,!1),new p(1,0,!0),new p(2,1,!1),new p(3,1,!0),new p(4,2,!1),new p(5,2,!0),new p(6,3,!1),new p(7,3,!0)],d=[4,5,4,5,6,7,6,7],g=[5,5,5,5,7,7,7,7],f=[2,3,4,5,6,7,6,7],b=[3,3,5,5,7,7,7,7],y=[1,1,3,3,5,5,7,7],x=[0,1,2,3,2,3,2,3];var w={DISPLAY:u[0],TEXT:u[2],SCRIPT:u[4],SCRIPTSCRIPT:u[6]};const v=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];const k=[];function S(e){for(let t=0;t=k[t]&&e<=k[t+1])return!0;return!1}v.forEach((e=>e.blocks.forEach((e=>k.push(...e)))));const M=80,z={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class A{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createDocumentFragment();for(let t=0;te.toText())).join("")}}var T={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const B={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},C={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function N(e,t,r){if(!T[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),o=T[t][n];if(!o&&e[0]in C&&(n=C[e[0]].charCodeAt(0),o=T[t][n]),o||"text"!==r||S(n)&&(o=T[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}const q={};const I=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],H=function(e,t){return t.size<2?e:I[e-1][t.size-1]};class O{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||O.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=R[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){const t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new O(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:H(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:R[e-1]})}havingBaseStyle(e){e=e||this.style.text();const t=H(O.BASESIZE,e);return this.size===t&&this.textSize===O.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==O.BASESIZE?["sizing","reset-size"+this.size,"size"+O.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){let t;if(t=e>=5?0:e>=3?1:2,!q[t]){const e=q[t]={cssEmPerMu:B.quad[t]/18};for(const r in B)B.hasOwnProperty(r)&&(e[r]=B[r][t])}return q[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}O.BASESIZE=6;var E=O;const L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},V=function(e){return"string"!=typeof e&&(e=e.unit),e in L||e in D||"ex"===e},P=function(e,t){let r;if(e.unit in L)r=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{let o;if(o=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=o.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=o.fontMetrics().quad}o!==t&&(r*=o.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},F=function(e){return+e.toFixed(4)+"em"},G=function(e){return e.filter((e=>e)).join(" ")},U=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}},Y=function(e){const t=document.createElement(e);t.className=G(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e",t};class W{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return Y.call(this,"span")}toMarkup(){return X.call(this,"span")}}class _{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return Y.call(this,"a")}toMarkup(){return X.call(this,"a")}}class j{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e=''+l.escape(this.alt)+'=n[0]&&e<=n[1])return r.name}}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=$[this.text])}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=F(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=G(this.classes));for(const e in this.style)this.style.hasOwnProperty(e)&&(t=t||document.createElement("span"),t.style[e]=this.style[e]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="0&&(r+="margin-right:"+this.italic+"em;");for(const e in this.style)this.style.hasOwnProperty(e)&&(r+=l.hyphenate(e)+":"+this.style[e]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');const n=l.escape(this.text);return e?(t+=">",t+=n,t+="",t):n}}class K{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(let t=0;t':''}}class Q{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="","\\gt",!0),se(ie,le,ye,"\u2208","\\in",!0),se(ie,le,ye,"\ue020","\\@not"),se(ie,le,ye,"\u2282","\\subset",!0),se(ie,le,ye,"\u2283","\\supset",!0),se(ie,le,ye,"\u2286","\\subseteq",!0),se(ie,le,ye,"\u2287","\\supseteq",!0),se(ie,he,ye,"\u2288","\\nsubseteq",!0),se(ie,he,ye,"\u2289","\\nsupseteq",!0),se(ie,le,ye,"\u22a8","\\models"),se(ie,le,ye,"\u2190","\\leftarrow",!0),se(ie,le,ye,"\u2264","\\le"),se(ie,le,ye,"\u2264","\\leq",!0),se(ie,le,ye,"<","\\lt",!0),se(ie,le,ye,"\u2192","\\rightarrow",!0),se(ie,le,ye,"\u2192","\\to"),se(ie,he,ye,"\u2271","\\ngeq",!0),se(ie,he,ye,"\u2270","\\nleq",!0),se(ie,le,xe,"\xa0","\\ "),se(ie,le,xe,"\xa0","\\space"),se(ie,le,xe,"\xa0","\\nobreakspace"),se(ae,le,xe,"\xa0","\\ "),se(ae,le,xe,"\xa0"," "),se(ae,le,xe,"\xa0","\\space"),se(ae,le,xe,"\xa0","\\nobreakspace"),se(ie,le,xe,null,"\\nobreak"),se(ie,le,xe,null,"\\allowbreak"),se(ie,le,be,",",","),se(ie,le,be,";",";"),se(ie,he,me,"\u22bc","\\barwedge",!0),se(ie,he,me,"\u22bb","\\veebar",!0),se(ie,le,me,"\u2299","\\odot",!0),se(ie,le,me,"\u2295","\\oplus",!0),se(ie,le,me,"\u2297","\\otimes",!0),se(ie,le,we,"\u2202","\\partial",!0),se(ie,le,me,"\u2298","\\oslash",!0),se(ie,he,me,"\u229a","\\circledcirc",!0),se(ie,he,me,"\u22a1","\\boxdot",!0),se(ie,le,me,"\u25b3","\\bigtriangleup"),se(ie,le,me,"\u25bd","\\bigtriangledown"),se(ie,le,me,"\u2020","\\dagger"),se(ie,le,me,"\u22c4","\\diamond"),se(ie,le,me,"\u22c6","\\star"),se(ie,le,me,"\u25c3","\\triangleleft"),se(ie,le,me,"\u25b9","\\triangleright"),se(ie,le,fe,"{","\\{"),se(ae,le,we,"{","\\{"),se(ae,le,we,"{","\\textbraceleft"),se(ie,le,pe,"}","\\}"),se(ae,le,we,"}","\\}"),se(ae,le,we,"}","\\textbraceright"),se(ie,le,fe,"{","\\lbrace"),se(ie,le,pe,"}","\\rbrace"),se(ie,le,fe,"[","\\lbrack",!0),se(ae,le,we,"[","\\lbrack",!0),se(ie,le,pe,"]","\\rbrack",!0),se(ae,le,we,"]","\\rbrack",!0),se(ie,le,fe,"(","\\lparen",!0),se(ie,le,pe,")","\\rparen",!0),se(ae,le,we,"<","\\textless",!0),se(ae,le,we,">","\\textgreater",!0),se(ie,le,fe,"\u230a","\\lfloor",!0),se(ie,le,pe,"\u230b","\\rfloor",!0),se(ie,le,fe,"\u2308","\\lceil",!0),se(ie,le,pe,"\u2309","\\rceil",!0),se(ie,le,we,"\\","\\backslash"),se(ie,le,we,"\u2223","|"),se(ie,le,we,"\u2223","\\vert"),se(ae,le,we,"|","\\textbar",!0),se(ie,le,we,"\u2225","\\|"),se(ie,le,we,"\u2225","\\Vert"),se(ae,le,we,"\u2225","\\textbardbl"),se(ae,le,we,"~","\\textasciitilde"),se(ae,le,we,"\\","\\textbackslash"),se(ae,le,we,"^","\\textasciicircum"),se(ie,le,ye,"\u2191","\\uparrow",!0),se(ie,le,ye,"\u21d1","\\Uparrow",!0),se(ie,le,ye,"\u2193","\\downarrow",!0),se(ie,le,ye,"\u21d3","\\Downarrow",!0),se(ie,le,ye,"\u2195","\\updownarrow",!0),se(ie,le,ye,"\u21d5","\\Updownarrow",!0),se(ie,le,ge,"\u2210","\\coprod"),se(ie,le,ge,"\u22c1","\\bigvee"),se(ie,le,ge,"\u22c0","\\bigwedge"),se(ie,le,ge,"\u2a04","\\biguplus"),se(ie,le,ge,"\u22c2","\\bigcap"),se(ie,le,ge,"\u22c3","\\bigcup"),se(ie,le,ge,"\u222b","\\int"),se(ie,le,ge,"\u222b","\\intop"),se(ie,le,ge,"\u222c","\\iint"),se(ie,le,ge,"\u222d","\\iiint"),se(ie,le,ge,"\u220f","\\prod"),se(ie,le,ge,"\u2211","\\sum"),se(ie,le,ge,"\u2a02","\\bigotimes"),se(ie,le,ge,"\u2a01","\\bigoplus"),se(ie,le,ge,"\u2a00","\\bigodot"),se(ie,le,ge,"\u222e","\\oint"),se(ie,le,ge,"\u222f","\\oiint"),se(ie,le,ge,"\u2230","\\oiiint"),se(ie,le,ge,"\u2a06","\\bigsqcup"),se(ie,le,ge,"\u222b","\\smallint"),se(ae,le,ue,"\u2026","\\textellipsis"),se(ie,le,ue,"\u2026","\\mathellipsis"),se(ae,le,ue,"\u2026","\\ldots",!0),se(ie,le,ue,"\u2026","\\ldots",!0),se(ie,le,ue,"\u22ef","\\@cdots",!0),se(ie,le,ue,"\u22f1","\\ddots",!0),se(ie,le,we,"\u22ee","\\varvdots"),se(ie,le,ce,"\u02ca","\\acute"),se(ie,le,ce,"\u02cb","\\grave"),se(ie,le,ce,"\xa8","\\ddot"),se(ie,le,ce,"~","\\tilde"),se(ie,le,ce,"\u02c9","\\bar"),se(ie,le,ce,"\u02d8","\\breve"),se(ie,le,ce,"\u02c7","\\check"),se(ie,le,ce,"^","\\hat"),se(ie,le,ce,"\u20d7","\\vec"),se(ie,le,ce,"\u02d9","\\dot"),se(ie,le,ce,"\u02da","\\mathring"),se(ie,le,de,"\ue131","\\@imath"),se(ie,le,de,"\ue237","\\@jmath"),se(ie,le,we,"\u0131","\u0131"),se(ie,le,we,"\u0237","\u0237"),se(ae,le,we,"\u0131","\\i",!0),se(ae,le,we,"\u0237","\\j",!0),se(ae,le,we,"\xdf","\\ss",!0),se(ae,le,we,"\xe6","\\ae",!0),se(ae,le,we,"\u0153","\\oe",!0),se(ae,le,we,"\xf8","\\o",!0),se(ae,le,we,"\xc6","\\AE",!0),se(ae,le,we,"\u0152","\\OE",!0),se(ae,le,we,"\xd8","\\O",!0),se(ae,le,ce,"\u02ca","\\'"),se(ae,le,ce,"\u02cb","\\`"),se(ae,le,ce,"\u02c6","\\^"),se(ae,le,ce,"\u02dc","\\~"),se(ae,le,ce,"\u02c9","\\="),se(ae,le,ce,"\u02d8","\\u"),se(ae,le,ce,"\u02d9","\\."),se(ae,le,ce,"\xb8","\\c"),se(ae,le,ce,"\u02da","\\r"),se(ae,le,ce,"\u02c7","\\v"),se(ae,le,ce,"\xa8",'\\"'),se(ae,le,ce,"\u02dd","\\H"),se(ae,le,ce,"\u25ef","\\textcircled");const ve={"--":!0,"---":!0,"``":!0,"''":!0};se(ae,le,we,"\u2013","--",!0),se(ae,le,we,"\u2013","\\textendash"),se(ae,le,we,"\u2014","---",!0),se(ae,le,we,"\u2014","\\textemdash"),se(ae,le,we,"\u2018","`",!0),se(ae,le,we,"\u2018","\\textquoteleft"),se(ae,le,we,"\u2019","'",!0),se(ae,le,we,"\u2019","\\textquoteright"),se(ae,le,we,"\u201c","``",!0),se(ae,le,we,"\u201c","\\textquotedblleft"),se(ae,le,we,"\u201d","''",!0),se(ae,le,we,"\u201d","\\textquotedblright"),se(ie,le,we,"\xb0","\\degree",!0),se(ae,le,we,"\xb0","\\degree"),se(ae,le,we,"\xb0","\\textdegree",!0),se(ie,le,we,"\xa3","\\pounds"),se(ie,le,we,"\xa3","\\mathsterling",!0),se(ae,le,we,"\xa3","\\pounds"),se(ae,le,we,"\xa3","\\textsterling",!0),se(ie,he,we,"\u2720","\\maltese"),se(ae,he,we,"\u2720","\\maltese");const ke='0123456789/@."';for(let e=0;e{if(G(e.classes)!==G(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(const r in t.style)if(t.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;return!0},Ie=function(e){let t=0,r=0,n=0;for(let o=0;ot&&(t=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},Re=function(e,t,r,n){const o=new W(e,t,r,n);return Ie(o),o},He=(e,t,r,n)=>new W(e,t,r,n),Oe=function(e){const t=new A(e);return Ie(t),t},Ee=function(e,t,r){let n,o="";switch(e){case"amsrm":o="AMS";break;case"textrm":o="Main";break;case"textsf":o="SansSerif";break;case"texttt":o="Typewriter";break;default:o=e}return n="textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular",o+"-"+n},Le={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},De={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var Ve={fontMap:Le,makeSymbol:Ne,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ce(e,"Main-Bold",t).metrics?Ne(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===oe[t][e].font?Ne(e,"Main-Regular",t,r,n):Ne(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Re,makeSvgSpan:He,makeLineSpan:function(e,t,r){const n=Re([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=F(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){const o=new _(e,t,r,n);return Ie(o),o},makeFragment:Oe,wrapFragment:function(e,t){return e instanceof A?Re([],[e],t):e},makeVList:function(e,t){const{children:r,depth:n}=function(e){if("individualShift"===e.positionType){const t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth;let o=n;for(let e=1;e0)return Ne(s,h,o,t,i.concat(c));if(l){let e,n;if("boldsymbol"===l){const t=function(e,t,r,n,o){return"textord"!==o&&Ce(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(s,o,0,0,r);e=t.fontName,n=[t.fontClass]}else a?(e=Le[l].fontName,n=[l]):(e=Ee(l,t.fontWeight,t.fontShape),n=[l,t.fontWeight,t.fontShape]);if(Ce(s,e,o).metrics)return Ne(s,e,o,t,i.concat(n));if(ve.hasOwnProperty(s)&&"Typewriter"===e.slice(0,10)){const r=[];for(let a=0;a{const r=Re(["mspace"],[],t),n=P(e,t);return r.style.marginRight=F(n),r},staticSvg:function(e,t){const[r,n,o]=De[e],s=new J(r),i=new K([s],{width:F(n),height:F(o),style:"width:"+F(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=He(["overlay"],[i],t);return a.height=o,a.style.height=F(o),a.style.width=F(n),a},svgData:De,tryCombineChars:e=>{for(let t=0;t{const r=t.classes[0],n=e.classes[0];"mbin"===r&&l.contains(et,n)?t.classes[0]="mord":"mbin"===n&&l.contains(Qe,r)&&(e.classes[0]="mord")}),{node:i},a,h),ot(o,((e,t)=>{const r=at(t),n=at(e),o=r&&n?e.hasClass("mtight")?Ye[r][n]:Ue[r][n]:null;if(o)return Ve.makeGlue(o,s)}),{node:i},a,h),o},ot=function(e,t,r,n,o){n&&e.push(n);let s=0;for(;sr=>{e.splice(t+1,0,r),s++})(s)}n&&e.pop()},st=function(e){return e instanceof A||e instanceof _||e instanceof W&&e.hasClass("enclosing")?e:null},it=function(e,t){const r=st(e);if(r){const e=r.children;if(e.length){if("right"===t)return it(e[e.length-1],"right");if("left"===t)return it(e[0],"left")}}return e},at=function(e,t){return e?(t&&(e=it(e,t)),rt[e.classes[0]]||null):null},lt=function(e,t){const r=["nulldelimiter"].concat(e.baseSizingClasses());return Je(t.concat(r))},ht=function(e,t,r){if(!e)return Je();if(We[e.type]){let n=We[e.type](e,t);if(r&&t.size!==r.size){n=Je(t.sizingClasses(r),[n],t);const e=t.sizeMultiplier/r.sizeMultiplier;n.height*=e,n.depth*=e}return n}throw new n("Got group of unknown type: '"+e.type+"'")};function ct(e,t){const r=Je(["base"],e,t),n=Je(["strut"]);return n.style.height=F(r.height+r.depth),r.depth&&(n.style.verticalAlign=F(-r.depth)),r.children.unshift(n),r}function mt(e,t){let r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);const n=nt(e,t,"root");let o;2===n.length&&n[1].hasClass("tag")&&(o=n.pop());const s=[];let i,a=[];for(let e=0;e0&&(s.push(ct(a,t)),a=[]),s.push(n[e]));a.length>0&&s.push(ct(a,t)),r?(i=ct(nt(r,t,!0)),i.classes=["tag"],s.push(i)):o&&s.push(o);const l=Je(["katex-html"],s);if(l.setAttribute("aria-hidden","true"),i){const e=i.children[0];e.style.height=F(l.height+l.depth),l.depth&&(e.style.verticalAlign=F(-l.depth))}return l}function pt(e){return new A(e)}class ut{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){const e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G(this.classes));for(let t=0;t0&&(e+=' class ="'+l.escape(G(this.classes))+'"'),e+=">";for(let t=0;t",e}toText(){return this.children.map((e=>e.toText())).join("")}}class dt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return l.escape(this.toText())}toText(){return this.text}}var gt={MathNode:ut,TextNode:dt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);{const e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",F(this.width)),e}}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},newDocumentFragment:pt};const ft=function(e,t,r){return!oe[t][e]||!oe[t][e].replace||55349===e.charCodeAt(0)||ve.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=oe[t][e].replace),new gt.TextNode(e)},bt=function(e){return 1===e.length?e[0]:new gt.MathNode("mrow",e)},yt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";const r=t.font;if(!r||"mathnormal"===r)return null;const n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";let o=e.text;if(l.contains(["\\imath","\\jmath"],o))return null;oe[n][o]&&oe[n][o].replace&&(o=oe[n][o].replace);return N(o,Ve.fontMap[r].fontName,n)?Ve.fontMap[r].variant:null},xt=function(e,t,r){if(1===e.length){const n=vt(e[0],t);return r&&n instanceof ut&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let o;for(let r=0;r0&&(e.text=e.text.slice(0,1)+"\u0338"+e.text.slice(1),n.pop())}}}n.push(s),o=s}return n},wt=function(e,t,r){return bt(xt(e,t,r))},vt=function(e,t){if(!e)return new gt.MathNode("mrow");if(_e[e.type]){return _e[e.type](e,t)}throw new n("Got group of unknown type: '"+e.type+"'")};function kt(e,t,r,n,o){const s=xt(e,r);let i;i=1===s.length&&s[0]instanceof ut&&l.contains(["mrow","mtable"],s[0].type)?s[0]:new gt.MathNode("mrow",s);const a=new gt.MathNode("annotation",[new gt.TextNode(t)]);a.setAttribute("encoding","application/x-tex");const h=new gt.MathNode("semantics",[i,a]),c=new gt.MathNode("math",[h]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");const m=o?"katex":"katex-mathml";return Ve.makeSpan([m],[c])}const St=function(e){return new E({style:e.displayMode?w.DISPLAY:w.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Mt=function(e,t){if(t.displayMode){const r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ve.makeSpan(r,[e])}return e},zt=function(e,t,r){const n=St(r);let o;if("mathml"===r.output)return kt(e,t,n,r.displayMode,!0);if("html"===r.output){const t=mt(e,n);o=Ve.makeSpan(["katex"],[t])}else{const s=kt(e,t,n,r.displayMode,!1),i=mt(e,n);o=Ve.makeSpan(["katex"],[s,i])}return Mt(o,r)};const At={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Tt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};var Bt=function(e,t,r,n,o){let s;const i=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(s=Ve.makeSpan(["stretchy",t],[],o),"fbox"===t){const e=o.color&&o.getColor();e&&(s.style.borderColor=e)}}else{const e=[];/^[bx]cancel$/.test(t)&&e.push(new Q({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new Q({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const r=new K(e,{width:"100%",height:F(i)});s=Ve.makeSvgSpan([],[r],o)}return s.height=i,s.style.height=F(i),s},Ct=function(e){const t=new gt.MathNode("mo",[new gt.TextNode(At[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Nt=function(e,t){const{span:r,minWidth:n,height:o}=function(){let r=4e5;const n=e.label.slice(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){const s="ordgroup"===(o=e.base).type?o.body.length:1;let i,a,l;if(s>5)"widehat"===n||"widecheck"===n?(i=420,r=2364,l=.42,a=n+"4"):(i=312,r=2340,l=.34,a="tilde4");else{const e=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][e],i=[0,239,300,360,420][e],l=[0,.24,.3,.3,.36,.42][e],a=n+e):(r=[0,600,1033,2339,2340][e],i=[0,260,286,306,312][e],l=[0,.26,.286,.3,.306,.34][e],a="tilde"+e)}const h=new J(a),c=new K([h],{width:"100%",height:F(l),viewBox:"0 0 "+r+" "+i,preserveAspectRatio:"none"});return{span:Ve.makeSvgSpan([],[c],t),minWidth:0,height:l}}{const e=[],o=Tt[n],[s,i,a]=o,l=a/1e3,h=s.length;let c,m;if(1===h){c=["hide-tail"],m=[o[3]]}else if(2===h)c=["halfarrow-left","halfarrow-right"],m=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error("Correct katexImagesData or update code here to support\n "+h+" children.");c=["brace-left","brace-center","brace-right"],m=["xMinYMin","xMidYMin","xMaxYMin"]}for(let n=0;n0&&(r.style.minWidth=F(n)),r};function qt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function It(e){const t=Rt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Rt(e){return e&&("atom"===e.type||re.hasOwnProperty(e.type))?e:null}const Ht=(e,t)=>{let r,n,o;e&&"supsub"===e.type?(n=qt(e.base,"accent"),r=n.base,e.base=r,o=function(e){if(e instanceof W)return e;throw new Error("Expected span but got "+String(e)+".")}(ht(e,t)),e.base=n):(n=qt(e,"accent"),r=n.base);const s=ht(r,t.havingCrampedStyle());let i=0;if(n.isShifty&&l.isCharacterBox(r)){const e=l.getBaseElem(r);i=ee(ht(e,t.havingCrampedStyle())).skew}const a="\\c"===n.label;let h,c=a?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(n.isStretchy)h=Nt(n,t),h=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+F(2*i)+")",marginLeft:F(2*i)}:void 0}]},t);else{let e,r;"\\vec"===n.label?(e=Ve.staticSvg("vec",t),r=Ve.svgData.vec[1]):(e=Ve.makeOrd({mode:n.mode,text:n.label},t,"textord"),e=ee(e),e.italic=0,r=e.width,a&&(c+=e.depth)),h=Ve.makeSpan(["accent-body"],[e]);const o="\\textcircled"===n.label;o&&(h.classes.push("accent-full"),c=s.height);let l=i;o||(l-=r/2),h.style.left=F(l),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-c},{type:"elem",elem:h}]},t)}const m=Ve.makeSpan(["mord","accent"],[h],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},Ot=(e,t)=>{const r=e.isStretchy?Ct(e.label):new gt.MathNode("mo",[ft(e.label,e.mode)]),n=new gt.MathNode("mover",[vt(e.base,t),r]);return n.setAttribute("accent","true"),n},Et=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));je({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{const r=Ze(t[0]),n=!Et.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:r}},htmlBuilder:Ht,mathmlBuilder:Ot}),je({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{const r=t[0];let n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Ht,mathmlBuilder:Ot}),je({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:o}},htmlBuilder:(e,t)=>{const r=ht(e.base,t),n=Nt(e,t),o="\\utilde"===e.label?.12:0,s=Ve.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{const r=Ct(e.label),n=new gt.MathNode("munder",[vt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});const Lt=e=>{const t=new gt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};je({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n,funcName:o}=e;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:r[0]}},htmlBuilder(e,t){const r=t.style;let n=t.havingStyle(r.sup());const o=Ve.wrapFragment(ht(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let i;o.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),i=Ve.wrapFragment(ht(e.below,n,t),t),i.classes.push(s+"-arrow-pad"));const a=Nt(e,t),l=-t.fontMetrics().axisHeight+.5*a.height;let h,c=-t.fontMetrics().axisHeight-.5*a.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=o.depth),i){const e=-t.fontMetrics().axisHeight+i.height+.5*a.height+.111;h=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:i,shift:e}]},t)}else h=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:a,shift:l}]},t);return h.children[0].children[0].children[1].classes.push("svg-align"),Ve.makeSpan(["mrel","x-arrow"],[h],t)},mathmlBuilder(e,t){const r=Ct(e.label);let n;if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){const o=Lt(vt(e.body,t));if(e.below){const s=Lt(vt(e.below,t));n=new gt.MathNode("munderover",[r,s,o])}else n=new gt.MathNode("mover",[r,o])}else if(e.below){const o=Lt(vt(e.below,t));n=new gt.MathNode("munder",[r,o])}else n=Lt(),n=new gt.MathNode("mover",[r,n]);return n}});const Dt=Ve.makeSpan;function Vt(e,t){const r=nt(e.body,t,!0);return Dt([e.mclass],r,t)}function Pt(e,t){let r;const n=xt(e.body,t);return"minner"===e.mclass?r=new gt.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0],r.type="mi"):r=new gt.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new gt.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}je({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ke(o),isCharacterBox:l.isCharacterBox(o)}},htmlBuilder:Vt,mathmlBuilder:Pt});const Ft=e=>{const t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};je({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){let{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Ft(t[0]),body:Ke(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),je({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){let{parser:r,funcName:n}=e;const o=t[1],s=t[0];let i;i="\\stackrel"!==n?Ft(o):"mrel";const a={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:Ke(o)},h={type:"supsub",mode:s.mode,base:a,sup:"\\underset"===n?null:s,sub:"\\underset"===n?s:null};return{type:"mclass",mode:r.mode,mclass:i,body:[h],isCharacterBox:l.isCharacterBox(h)}},htmlBuilder:Vt,mathmlBuilder:Pt}),je({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Ft(t[0]),body:Ke(t[0])}},htmlBuilder(e,t){const r=nt(e.body,t,!0),n=Ve.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){const r=xt(e.body,t),n=new gt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});const Gt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ut=e=>"textord"===e.type&&"@"===e.text;function Yt(e,t,r){const n=Gt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:n,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[e],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[o],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}je({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){const r=t.havingStyle(t.style.sup()),n=Ve.wrapFragment(ht(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=F(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){let r=new gt.MathNode("mrow",[vt(e.label,t)]);return r=new gt.MathNode("mpadded",[r]),r.setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new gt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),je({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){let{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){const r=Ve.wrapFragment(ht(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new gt.MathNode("mrow",[vt(e.fragment,t)])}}),je({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;const o=qt(t[0],"ordgroup").body;let s="";for(let e=0;e=1114111)throw new n("\\@char with invalid code point "+s);return a<=65535?i=String.fromCharCode(a):(a-=65536,i=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:r.mode,text:i}}});const Xt=(e,t)=>{const r=nt(e.body,t.withColor(e.color),!1);return Ve.makeFragment(r)},Wt=(e,t)=>{const r=xt(e.body,t.withColor(e.color)),n=new gt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};je({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){let{parser:r}=e;const n=qt(t[0],"color-token").color,o=t[1];return{type:"color",mode:r.mode,color:n,body:Ke(o)}},htmlBuilder:Xt,mathmlBuilder:Wt}),je({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){let{parser:r,breakOnTokenText:n}=e;const o=qt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",o);const s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:o,body:s}},htmlBuilder:Xt,mathmlBuilder:Wt}),je({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){let{parser:n}=e;const o="["===n.gullet.future().text?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:o&&qt(o,"size").value}},htmlBuilder(e,t){const r=Ve.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=F(P(e.size,t)))),r},mathmlBuilder(e,t){const r=new gt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",F(P(e.size,t)))),r}});const _t={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jt=e=>{const t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},$t=(e,t,r,n)=>{let o=e.gullet.macros.get(r.text);null==o&&(r.noexpand=!0,o={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,o,n)};je({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){let{parser:t,funcName:r}=e;t.consumeSpaces();const o=t.fetch();if(_t[o.text])return"\\global"!==r&&"\\\\globallong"!==r||(o.text=_t[o.text]),qt(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",o)}}),je({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e,o=t.gullet.popToken();const s=o.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new n("Expected a control sequence",o);let i,a=0;const l=[[]];for(;"{"!==t.gullet.future().text;)if(o=t.gullet.popToken(),"#"===o.text){if("{"===t.gullet.future().text){i=t.gullet.future(),l[a].push("{");break}if(o=t.gullet.popToken(),!/^[1-9]$/.test(o.text))throw new n('Invalid argument number "'+o.text+'"');if(parseInt(o.text)!==a+1)throw new n('Argument number "'+o.text+'" out of order');a++,l.push([])}else{if("EOF"===o.text)throw new n("Expected a macro definition");l[a].push(o.text)}let{tokens:h}=t.gullet.consumeArg();return i&&h.unshift(i),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h),h.reverse()),t.gullet.macros.set(s,{tokens:h,numArgs:a,delimiters:l},r===_t[r]),{type:"internal",mode:t.mode}}}),je({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=jt(t.gullet.popToken());t.gullet.consumeSpaces();const o=(e=>{let t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t})(t);return $t(t,n,o,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),je({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=jt(t.gullet.popToken()),o=t.gullet.popToken(),s=t.gullet.popToken();return $t(t,n,s,"\\\\globalfuture"===r),t.gullet.pushToken(s),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});const Zt=function(e,t,r){const n=N(oe.math[e]&&oe.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},Kt=function(e,t,r,n){const o=r.havingBaseStyle(t),s=Ve.makeSpan(n.concat(o.sizingClasses(r)),[e],r),i=o.sizeMultiplier/r.sizeMultiplier;return s.height*=i,s.depth*=i,s.maxFontSize=o.sizeMultiplier,s},Jt=function(e,t,r){const n=t.havingBaseStyle(r),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=F(o),e.height-=o,e.depth+=o},Qt=function(e,t,r,n,o,s){const i=function(e,t,r,n){return Ve.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,o,n),a=Kt(Ve.makeSpan(["delimsizing","size"+t],[i],n),w.TEXT,n,s);return r&&Jt(a,n,w.TEXT),a},er=function(e,t,r){let n;n="Size1-Regular"===t?"delim-size1":"delim-size4";return{type:"elem",elem:Ve.makeSpan(["delimsizinginner",n],[Ve.makeSpan([],[Ve.makeSymbol(e,t,r)])])}},tr=function(e,t,r){const n=T["Size4-Regular"][e.charCodeAt(0)]?T["Size4-Regular"][e.charCodeAt(0)][4]:T["Size1-Regular"][e.charCodeAt(0)][4],o=new J("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),s=new K([o],{width:F(n),height:F(t),style:"width:"+F(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=Ve.makeSvgSpan([],[s],r);return i.height=t,i.style.height=F(t),i.style.width=F(n),{type:"elem",elem:i}},rr={type:"kern",size:-.008},nr=["|","\\lvert","\\rvert","\\vert"],or=["\\|","\\lVert","\\rVert","\\Vert"],sr=function(e,t,r,n,o,s){let i,a,h,c,m="",p=0;i=h=c=e,a=null;let u="Size1-Regular";"\\uparrow"===e?h=c="\u23d0":"\\Uparrow"===e?h=c="\u2016":"\\downarrow"===e?i=h="\u23d0":"\\Downarrow"===e?i=h="\u2016":"\\updownarrow"===e?(i="\\uparrow",h="\u23d0",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",h="\u2016",c="\\Downarrow"):l.contains(nr,e)?(h="\u2223",m="vert",p=333):l.contains(or,e)?(h="\u2225",m="doublevert",p=556):"["===e||"\\lbrack"===e?(i="\u23a1",h="\u23a2",c="\u23a3",u="Size4-Regular",m="lbrack",p=667):"]"===e||"\\rbrack"===e?(i="\u23a4",h="\u23a5",c="\u23a6",u="Size4-Regular",m="rbrack",p=667):"\\lfloor"===e||"\u230a"===e?(h=i="\u23a2",c="\u23a3",u="Size4-Regular",m="lfloor",p=667):"\\lceil"===e||"\u2308"===e?(i="\u23a1",h=c="\u23a2",u="Size4-Regular",m="lceil",p=667):"\\rfloor"===e||"\u230b"===e?(h=i="\u23a5",c="\u23a6",u="Size4-Regular",m="rfloor",p=667):"\\rceil"===e||"\u2309"===e?(i="\u23a4",h=c="\u23a5",u="Size4-Regular",m="rceil",p=667):"("===e||"\\lparen"===e?(i="\u239b",h="\u239c",c="\u239d",u="Size4-Regular",m="lparen",p=875):")"===e||"\\rparen"===e?(i="\u239e",h="\u239f",c="\u23a0",u="Size4-Regular",m="rparen",p=875):"\\{"===e||"\\lbrace"===e?(i="\u23a7",a="\u23a8",c="\u23a9",h="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="\u23ab",a="\u23ac",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(i="\u23a7",c="\u23a9",h="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(i="\u23ab",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(i="\u23a7",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(i="\u23ab",c="\u23a9",h="\u23aa",u="Size4-Regular");const d=Zt(i,u,o),g=d.height+d.depth,f=Zt(h,u,o),b=f.height+f.depth,y=Zt(c,u,o),x=y.height+y.depth;let v=0,k=1;if(null!==a){const e=Zt(a,u,o);v=e.height+e.depth,k=2}const S=g+x+v,M=S+Math.max(0,Math.ceil((t-S)/(k*b)))*k*b;let z=n.fontMetrics().axisHeight;r&&(z*=n.sizeMultiplier);const A=M/2-z,T=[];if(m.length>0){const e=M-g-x,t=Math.round(1e3*M),r=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*e)),o=new J(m,r),s=(p/1e3).toFixed(3)+"em",i=(t/1e3).toFixed(3)+"em",a=new K([o],{width:s,height:i,viewBox:"0 0 "+p+" "+t}),l=Ve.makeSvgSpan([],[a],n);l.height=t/1e3,l.style.width=s,l.style.height=i,T.push({type:"elem",elem:l})}else{if(T.push(er(c,u,o)),T.push(rr),null===a){const e=M-g-x+.016;T.push(tr(h,e,n))}else{const e=(M-g-x-v)/2+.016;T.push(tr(h,e,n)),T.push(rr),T.push(er(a,u,o)),T.push(rr),T.push(tr(h,e,n))}T.push(rr),T.push(er(i,u,o))}const B=n.havingBaseStyle(w.TEXT),C=Ve.makeVList({positionType:"bottom",positionData:A,children:T},B);return Kt(Ve.makeSpan(["delimsizing","mult"],[C],B),w.TEXT,n,s)},ir=.08,ar=function(e,t,r,n,o){const s=function(e,t,r){t*=1e3;let n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,M);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,M,r)}return n}(e,n,r),i=new J(e,s),a=new K([i],{width:"400em",height:F(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ve.makeSvgSpan(["hide-tail"],[a],o)},lr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],hr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],cr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],mr=[0,1.2,1.8,2.4,3],pr=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ur=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"stack"}],dr=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],gr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},fr=function(e,t,r,n){for(let o=Math.min(2,3-n.style.size);ot)return r[o]}return r[r.length-1]},br=function(e,t,r,n,o,s){let i;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),i=l.contains(cr,e)?pr:l.contains(lr,e)?dr:ur;const a=fr(e,t,i,n);return"small"===a.type?function(e,t,r,n,o,s){const i=Ve.makeSymbol(e,"Main-Regular",o,n),a=Kt(i,t,n,s);return r&&Jt(a,n,t),a}(e,a.style,r,n,o,s):"large"===a.type?Qt(e,a.size,r,n,o,s):sr(e,t,r,n,o,s)};var yr={sqrtImage:function(e,t){const r=t.havingBaseSizing(),n=fr("\\surd",e*r.sizeMultiplier,dr,r);let o=r.sizeMultiplier;const s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let i,a,l=0,h=0,c=0;return"small"===n.type?(c=1e3+1e3*s+80,e<1?o=1:e<1.4&&(o=.7),l=(1+s+ir)/o,h=(1+s)/o,i=ar("sqrtMain",l,c,s,t),i.style.minWidth="0.853em",a=.833/o):"large"===n.type?(c=1080*mr[n.size],h=(mr[n.size]+s)/o,l=(mr[n.size]+s+ir)/o,i=ar("sqrtSize"+n.size,l,c,s,t),i.style.minWidth="1.02em",a=1/o):(l=e+s+ir,h=e+s,c=Math.floor(1e3*e+s)+80,i=ar("sqrtTall",l,c,s,t),i.style.minWidth="0.742em",a=1.056),i.height=h,i.style.height=F(l),{span:i,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,o,s){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),l.contains(lr,e)||l.contains(cr,e))return Qt(e,t,!1,r,o,s);if(l.contains(hr,e))return sr(e,mr[t],!1,r,o,s);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:mr,customSizedDelim:br,leftRightDelim:function(e,t,r,n,o,s){const i=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-i,r+i),h=Math.max(l/500*901,2*l-a);return br(e,h,!0,n,o,s)}};const xr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},wr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function vr(e,t){const r=Rt(e);if(r&&l.contains(wr,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function kr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}je({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{const r=vr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:xr[e.funcName].size,mclass:xr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Ve.makeSpan([e.mclass]):yr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{const t=[];"."!==e.delim&&t.push(ft(e.delim,e.mode));const r=new gt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");const n=F(yr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),je({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:vr(t[0],e).text,color:r}}}),je({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=vr(t[0],e),n=e.parser;++n.leftrightDepth;const o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);const s=qt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{kr(e);const r=nt(e.body,t,!0,["mopen","mclose"]);let n,o,s=0,i=0,a=!1;for(let e=0;e{kr(e);const r=xt(e.body,t);if("."!==e.left){const t=new gt.MathNode("mo",[ft(e.left,e.mode)]);t.setAttribute("fence","true"),r.unshift(t)}if("."!==e.right){const t=new gt.MathNode("mo",[ft(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),r.push(t)}return bt(r)}}),je({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=vr(t[0],e);if(!e.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{let r;if("."===e.delim)r=lt(t,[]);else{r=yr.sizedDelim(e.delim,1,t,e.mode,[]);const n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{const r="\\vert"===e.delim||"|"===e.delim?ft("|","text"):ft(e.delim,e.mode),n=new gt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});const Sr=(e,t)=>{const r=Ve.wrapFragment(ht(e.body,t),t),n=e.label.slice(1);let o,s=t.sizeMultiplier,i=0;const a=l.isCharacterBox(e.body);if("sout"===n)o=Ve.makeSpan(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/s,i=-.5*t.fontMetrics().xHeight;else if("phase"===n){const e=P({number:.6,unit:"pt"},t),n=P({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;const a=r.height+r.depth+e+n;r.style.paddingLeft=F(a/2+e);const l=Math.floor(1e3*a*s),c="M400000 "+(h=l)+" H0 L"+h/2+" 0 l65 45 L145 "+(h-80)+" H400000z",m=new K([new J("phase",c)],{width:"400em",height:F(l/1e3),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});o=Ve.makeSvgSpan(["hide-tail"],[m],t),o.style.height=F(a),i=r.depth+e+n}else{/cancel/.test(n)?a||r.classes.push("cancel-pad"):"angl"===n?r.classes.push("anglpad"):r.classes.push("boxpad");let s=0,l=0,h=0;/box/.test(n)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),s=t.fontMetrics().fboxsep+("colorbox"===n?0:h),l=s):"angl"===n?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s=4*h,l=Math.max(0,.25-r.depth)):(s=a?.2:0,l=s),o=Bt(r,n,s,l,t),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=F(h)):"angl"===n&&.049!==h&&(o.style.borderTopWidth=F(h),o.style.borderRightWidth=F(h)),i=r.depth+l,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var h;let c;if(e.backgroundColor)c=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:i},{type:"elem",elem:r,shift:0}]},t);else{const e=/cancel|phase/.test(n)?["svg-align"]:[];c=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:o,shift:i,wrapperClasses:e}]},t)}return/cancel/.test(n)&&(c.height=r.height,c.depth=r.depth),/cancel/.test(n)&&!a?Ve.makeSpan(["mord","cancel-lap"],[c],t):Ve.makeSpan(["mord"],[c],t)},Mr=(e,t)=>{let r=0;const n=new gt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[vt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){const r=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};je({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=qt(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,body:i}},htmlBuilder:Sr,mathmlBuilder:Mr}),je({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=qt(t[0],"color-token").color,i=qt(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:i,borderColor:s,body:a}},htmlBuilder:Sr,mathmlBuilder:Mr}),je({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),je({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"enclose",mode:r.mode,label:n,body:o}},htmlBuilder:Sr,mathmlBuilder:Mr}),je({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});const zr={};function Ar(e){let{type:t,names:r,props:n,handler:o,htmlBuilder:s,mathmlBuilder:i}=e;const a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o};for(let e=0;e{if(!e.parser.settings.displayMode)throw new n("{"+e.envName+"} can be used only in display mode.")};function Rr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Hr(e,t,r){let{hskipBeforeAndAfter:o,addJot:s,cols:i,arraystretch:a,colSeparationType:l,autoTag:h,singleRow:c,emptySingleRow:m,maxNumCols:p,leqno:u}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){const t=e.gullet.expandMacroAsText("\\arraystretch");if(null==t)a=1;else if(a=parseFloat(t),!a||a<0)throw new n("Invalid \\arraystretch: "+t)}e.gullet.beginGroup();let d=[];const g=[d],f=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Nr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(qr(e));;){let t=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),t={type:"ordgroup",mode:e.mode,body:t},r&&(t={type:"styling",mode:e.mode,style:r,body:[t]}),d.push(t);const o=e.fetch().text;if("&"===o){if(p&&d.length===p){if(c||l)throw new n("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===o){w(),1===d.length&&"styling"===t.type&&0===t.body[0].body.length&&(g.length>1||!m)&&g.pop(),b.length0&&(x+=.25),c.push({pos:x,isDashed:e[t]})}for(v(i[0]),r=0;r0&&(p+=y,le)))for(r=0;r=a)continue;(o>0||e.hskipBeforeAndAfter)&&(i=l.deflt(c.pregap,u),0!==i&&(z=Ve.makeSpan(["arraycolsep"],[]),z.style.width=F(i),M.push(z)));let d=[];for(r=0;r0){const e=Ve.makeLineSpan("hline",t,m),r=Ve.makeLineSpan("hdashline",t,m),n=[{type:"elem",elem:h,shift:0}];for(;c.length>0;){const t=c.pop(),o=t.pos-k;t.isDashed?n.push({type:"elem",elem:r,shift:o}):n.push({type:"elem",elem:e,shift:o})}h=Ve.makeVList({positionType:"individualShift",children:n},t)}if(0===T.length)return Ve.makeSpan(["mord"],[h],t);{let e=Ve.makeVList({positionType:"individualShift",children:T},t);return e=Ve.makeSpan(["tag"],[e],t),Ve.makeFragment([h,e])}},Lr={c:"center ",l:"left ",r:"right "},Dr=function(e,t){const r=[],n=new gt.MathNode("mtd",[],["mtr-glue"]),o=new gt.MathNode("mtd",[],["mml-eqn-num"]);for(let s=0;s0){const t=e.cols;let r="",n=!1,o=0,i=t.length;"separator"===t[0].type&&(a+="top ",o=1),"separator"===t[t.length-1].type&&(a+="bottom ",i-=1);for(let e=o;e0?"left ":"",a+=c[c.length-1].length>0?"right ":"";for(let e=1;e-1?"alignat":"align",s="split"===e.envName,i=Hr(e.parser,{cols:r,addJot:!0,autoTag:s?void 0:Rr(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display");let a,l=0;const h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){let e="";for(let r=0;r0&&c&&(n=1),r[e]={type:"align",align:t,pregap:n,postgap:0}}return i.colSeparationType=c?"align":"alignat",i};Ar({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){const r=(Rt(t[0])?[t[0]]:qt(t[0],"ordgroup").body).map((function(e){const t=It(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Hr(e.parser,o,Or(e.envName))},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let r="c";const o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),r=t.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),o.cols=[{type:"align",align:r}]}}const s=Hr(e.parser,o,Or(e.envName)),i=Math.max(0,...s.body.map((e=>e.length)));return s.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){const t=Hr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){const r=(Rt(t[0])?[t[0]]:qt(t[0],"ordgroup").body).map((function(e){const t=It(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");let o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=Hr(e.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new n("{subarray} can contain only one column");return o},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=Hr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Or(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Vr,htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){l.contains(["gather","gather*"],e.envName)&&Ir(e);const t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Rr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Hr(e.parser,t,"display")},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Vr,htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Ir(e);const t={autoTag:Rr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Hr(e.parser,t,"display")},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Ir(e),function(e){const t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();const r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}let r=[];const o=[r];for(let a=0;a-1);else{if(!("<>AV".indexOf(o)>-1))throw new n('Expected one of "<>AV=|." after @',l[t]);for(let e=0;e<2;e++){let r=!0;for(let h=t+1;h{const r=e.font,n=t.withFont(r);return ht(e.body,n)},Gr=(e,t)=>{const r=e.font,n=t.withFont(r);return vt(e.body,n)},Ur={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};je({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=Ze(t[0]);let s=n;return s in Ur&&(s=Ur[s]),{type:"font",mode:r.mode,font:s.slice(1),body:o}},htmlBuilder:Fr,mathmlBuilder:Gr}),je({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{let{parser:r}=e;const n=t[0],o=l.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Ft(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:o}}}),je({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n,breakOnTokenText:o}=e;const{mode:s}=r,i=r.parseExpression(!0,o);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:i}}},htmlBuilder:Fr,mathmlBuilder:Gr});const Yr=(e,t)=>{let r=t;return"display"===e?r=r.id>=w.SCRIPT.id?r.text():w.DISPLAY:"text"===e&&r.size===w.DISPLAY.size?r=w.TEXT:"script"===e?r=w.SCRIPT:"scriptscript"===e&&(r=w.SCRIPTSCRIPT),r},Xr=(e,t)=>{const r=Yr(e.size,t.style),n=r.fracNum(),o=r.fracDen();let s;s=t.havingStyle(n);const i=ht(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm;i.height=i.height0?3*c:7*c,u=t.fontMetrics().denom1):(h>0?(m=t.fontMetrics().num2,p=c):(m=t.fontMetrics().num3,p=3*c),u=t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight;m-i.depth-(e+.5*h){let r=new gt.MathNode("mfrac",[vt(e.numer,t),vt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=P(e.barSize,t);r.setAttribute("linethickness",F(n))}}else r.setAttribute("linethickness","0px");const n=Yr(e.size,t.style);if(n.size!==t.style.size){r=new gt.MathNode("mstyle",[r]);const e=n.size===w.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const r=new gt.MathNode("mo",[new gt.TextNode(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(r),null!=e.rightDelim){const r=new gt.MathNode("mo",[new gt.TextNode(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}return bt(t)}return r};je({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];let i,a=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,a="(",l=")";break;case"\\\\bracefrac":i=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:s,hasBarLine:i,leftDelim:a,rightDelim:l,size:h,barSize:null}},htmlBuilder:Xr,mathmlBuilder:Wr}),je({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:o,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),je({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:o}}});const _r=["display","text","script","scriptscript"],jr=function(e){let t=null;return e.length>0&&(t=e,t="."===t?null:t),t};je({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){let{parser:r}=e;const n=t[4],o=t[5],s=Ze(t[0]),i="atom"===s.type&&"open"===s.family?jr(s.text):null,a=Ze(t[1]),l="atom"===a.type&&"close"===a.family?jr(a.text):null,h=qt(t[2],"size");let c,m=null;h.isBlank?c=!0:(m=h.value,c=m.number>0);let p="auto",u=t[3];if("ordgroup"===u.type){if(u.body.length>0){const e=qt(u.body[0],"textord");p=_r[Number(e.text)]}}else u=qt(u,"textord"),p=_r[Number(u.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:c,barSize:m,leftDelim:i,rightDelim:l,size:p}},htmlBuilder:Xr,mathmlBuilder:Wr}),je({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){let{parser:r,funcName:n,token:o}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:qt(t[0],"size").value,token:o}}}),je({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(qt(t[1],"infix").size),i=t[2],a=s.number>0;return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Xr,mathmlBuilder:Wr});const $r=(e,t)=>{const r=t.style;let n,o;"supsub"===e.type?(n=e.sup?ht(e.sup,t.havingStyle(r.sup()),t):ht(e.sub,t.havingStyle(r.sub()),t),o=qt(e.base,"horizBrace")):o=qt(e,"horizBrace");const s=ht(o.base,t.havingBaseStyle(w.DISPLAY)),i=Nt(o,t);let a;if(o.isOver?(a=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:i}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=Ve.makeVList({positionType:"bottom",positionData:s.depth+.1+i.height,children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),n){const e=Ve.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t);a=o.isOver?Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Ve.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return Ve.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t)};je({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:$r,mathmlBuilder:(e,t)=>{const r=Ct(e.label);return new gt.MathNode(e.isOver?"mover":"munder",[vt(e.base,t),r])}}),je({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[1],o=qt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:r.mode,href:o,body:Ke(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{const r=nt(e.body,t,!1);return Ve.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=wt(e.body,t);return r instanceof ut||(r=new ut("mrow",[r])),r.setAttribute("href",e.href),r}}),je({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=qt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");const o=[];for(let e=0;e{let{parser:r,funcName:o,token:s}=e;const i=qt(t[0],"raw").string,a=t[1];let l;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");const h={};switch(o){case"\\htmlClass":h.class=i,l={command:"\\htmlClass",class:i};break;case"\\htmlId":h.id=i,l={command:"\\htmlId",id:i};break;case"\\htmlStyle":h.style=i,l={command:"\\htmlStyle",style:i};break;case"\\htmlData":{const e=i.split(",");for(let t=0;t{const r=nt(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));const o=Ve.makeSpan(n,r,t);for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&o.setAttribute(t,e.attributes[t]);return o},mathmlBuilder:(e,t)=>wt(e.body,t)}),je({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Ke(t[0]),mathml:Ke(t[1])}},htmlBuilder:(e,t)=>{const r=nt(e.html,t,!1);return Ve.makeFragment(r)},mathmlBuilder:(e,t)=>wt(e.mathml,t)});const Zr=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{const t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");const r={number:+(t[1]+t[2]),unit:t[3]};if(!V(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};je({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{let{parser:o}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},l="";if(r[0]){const e=qt(r[0],"raw").string.split(",");for(let t=0;t{const r=P(e.height,t);let n=0;e.totalheight.number>0&&(n=P(e.totalheight,t)-r);let o=0;e.width.number>0&&(o=P(e.width,t));const s={height:F(r+n)};o>0&&(s.width=F(o)),n>0&&(s.verticalAlign=F(-n));const i=new j(e.src,e.alt,s);return i.height=r,i.depth=n,i},mathmlBuilder:(e,t)=>{const r=new gt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);const n=P(e.height,t);let o=0;if(e.totalheight.number>0&&(o=P(e.totalheight,t)-n,r.setAttribute("valign",F(-o))),r.setAttribute("height",F(n+o)),e.width.number>0){const n=P(e.width,t);r.setAttribute("width",F(n))}return r.setAttribute("src",e.src),r}}),je({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=qt(t[0],"size");if(r.settings.strict){const e="m"===n[1],t="mu"===o.value.unit;e?(t||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):t&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:o.value}},htmlBuilder(e,t){return Ve.makeGlue(e.dimension,t)},mathmlBuilder(e,t){const r=P(e.dimension,t);return new gt.SpaceNode(r)}}),je({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{let r;"clap"===e.alignment?(r=Ve.makeSpan([],[ht(e.body,t)]),r=Ve.makeSpan(["inner"],[r],t)):r=Ve.makeSpan(["inner"],[ht(e.body,t)]);const n=Ve.makeSpan(["fix"],[]);let o=Ve.makeSpan([e.alignment],[r,n],t);const s=Ve.makeSpan(["strut"]);return s.style.height=F(o.height+o.depth),o.depth&&(s.style.verticalAlign=F(-o.depth)),o.children.unshift(s),o=Ve.makeSpan(["thinbox"],[o],t),Ve.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{const r=new gt.MathNode("mpadded",[vt(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",t+"width")}return r.setAttribute("width","0px"),r}}),je({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){let{funcName:r,parser:n}=e;const o=n.mode;n.switchMode("math");const s="\\("===r?"\\)":"$",i=n.parseExpression(!1,s);return n.expect(s),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",body:i}}}),je({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new n("Mismatched "+e.funcName)}});const Kr=(e,t)=>{switch(t.style.size){case w.DISPLAY.size:return e.display;case w.TEXT.size:return e.text;case w.SCRIPT.size:return e.script;case w.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};je({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Ke(t[0]),text:Ke(t[1]),script:Ke(t[2]),scriptscript:Ke(t[3])}},htmlBuilder:(e,t)=>{const r=Kr(e,t),n=nt(r,t,!1);return Ve.makeFragment(n)},mathmlBuilder:(e,t)=>{const r=Kr(e,t);return wt(r,t)}});const Jr=(e,t,r,n,o,s,i)=>{e=Ve.makeSpan([],[e]);const a=r&&l.isCharacterBox(r);let h,c,m;if(t){const e=ht(t,n.havingStyle(o.sup()),n);c={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(r){const e=ht(r,n.havingStyle(o.sub()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(c&&h){const t=n.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+i;m=Ve.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:F(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:F(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(h){const t=e.height-i;m=Ve.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:F(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e}]},n)}else{if(!c)return e;{const t=e.depth+i;m=Ve.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:F(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}}const p=[m];if(h&&0!==s&&!a){const e=Ve.makeSpan(["mspace"],[],n);e.style.marginRight=F(s),p.unshift(e)}return Ve.makeSpan(["mop","op-limits"],p,n)},Qr=["\\smallint"],en=(e,t)=>{let r,n,o,s=!1;"supsub"===e.type?(r=e.sup,n=e.sub,o=qt(e.base,"op"),s=!0):o=qt(e,"op");const i=t.style;let a,h=!1;if(i.size===w.DISPLAY.size&&o.symbol&&!l.contains(Qr,o.name)&&(h=!0),o.symbol){const e=h?"Size2-Regular":"Size1-Regular";let r="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(r=o.name.slice(1),o.name="oiint"===r?"\\iint":"\\iiint"),a=Ve.makeSymbol(o.name,e,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),r.length>0){const e=a.italic,n=Ve.staticSvg(r+"Size"+(h?"2":"1"),t);a=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:n,shift:h?.08:0}]},t),o.name="\\"+r,a.classes.unshift("mop"),a.italic=e}}else if(o.body){const e=nt(o.body,t,!0);1===e.length&&e[0]instanceof Z?(a=e[0],a.classes[0]="mop"):a=Ve.makeSpan(["mop"],e,t)}else{const e=[];for(let r=1;r{let r;if(e.symbol)r=new ut("mo",[ft(e.name,e.mode)]),l.contains(Qr,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new ut("mo",xt(e.body,t));else{r=new ut("mi",[new dt(e.name.slice(1))]);const t=new ut("mo",[ft("\u2061","text")]);r=e.parentIsSupSub?new ut("mrow",[r,t]):pt([r,t])}return r},rn={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};je({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,o=n;return 1===o.length&&(o=rn[o]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:en,mathmlBuilder:tn}),je({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ke(n)}},htmlBuilder:en,mathmlBuilder:tn});const nn={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};je({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:en,mathmlBuilder:tn}),je({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:en,mathmlBuilder:tn}),je({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=nn[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:en,mathmlBuilder:tn});const on=(e,t)=>{let r,n,o,s,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,o=qt(e.base,"operatorname"),i=!0):o=qt(e,"operatorname"),o.body.length>0){const e=o.body.map((e=>{const t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),r=nt(e,t.withFont("mathrm"),!0);for(let e=0;e{let{parser:r,funcName:n}=e;const o=t[0];return{type:"operatorname",mode:r.mode,body:Ke(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:on,mathmlBuilder:(e,t)=>{let r=xt(e.body,t.withFont("mathrm")),n=!0;for(let e=0;ee.toText())).join("");r=[new gt.TextNode(e)]}const o=new gt.MathNode("mi",r);o.setAttribute("mathvariant","normal");const s=new gt.MathNode("mo",[ft("\u2061","text")]);return e.parentIsSupSub?new gt.MathNode("mrow",[o,s]):gt.newDocumentFragment([o,s])}}),Br("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),$e({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ve.makeFragment(nt(e.body,t,!1)):Ve.makeSpan(["mord"],nt(e.body,t,!0),t)},mathmlBuilder(e,t){return wt(e.body,t,!0)}}),je({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){let{parser:r}=e;const n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){const r=ht(e.body,t.havingCrampedStyle()),n=Ve.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]},t);return Ve.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){const r=new gt.MathNode("mo",[new gt.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new gt.MathNode("mover",[vt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),je({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"phantom",mode:r.mode,body:Ke(n)}},htmlBuilder:(e,t)=>{const r=nt(e.body,t.withPhantom(),!1);return Ve.makeFragment(r)},mathmlBuilder:(e,t)=>{const r=xt(e.body,t);return new gt.MathNode("mphantom",r)}}),je({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{let r=Ve.makeSpan([],[ht(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(let e=0;e{const r=xt(Ke(e.body),t),n=new gt.MathNode("mphantom",r),o=new gt.MathNode("mpadded",[n]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),je({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{const r=Ve.makeSpan(["inner"],[ht(e.body,t.withPhantom())]),n=Ve.makeSpan(["fix"],[]);return Ve.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{const r=xt(Ke(e.body),t),n=new gt.MathNode("mphantom",r),o=new gt.MathNode("mpadded",[n]);return o.setAttribute("width","0px"),o}}),je({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;const n=qt(t[0],"size").value,o=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:o}},htmlBuilder(e,t){const r=ht(e.body,t),n=P(e.dy,t);return Ve.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){const r=new gt.MathNode("mpadded",[vt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),je({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){let{parser:t}=e;return{type:"internal",mode:t.mode}}}),je({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){let{parser:n}=e;const o=r[0],s=qt(t[0],"size"),i=qt(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&qt(o,"size").value,width:s.value,height:i.value}},htmlBuilder(e,t){const r=Ve.makeSpan(["mord","rule"],[],t),n=P(e.width,t),o=P(e.height,t),s=e.shift?P(e.shift,t):0;return r.style.borderRightWidth=F(n),r.style.borderTopWidth=F(o),r.style.bottom=F(s),r.width=n,r.height=o+s,r.depth=-s,r.maxFontSize=1.125*o*t.sizeMultiplier,r},mathmlBuilder(e,t){const r=P(e.width,t),n=P(e.height,t),o=e.shift?P(e.shift,t):0,s=t.color&&t.getColor()||"black",i=new gt.MathNode("mspace");i.setAttribute("mathbackground",s),i.setAttribute("width",F(r)),i.setAttribute("height",F(n));const a=new gt.MathNode("mpadded",[i]);return o>=0?a.setAttribute("height",F(o)):(a.setAttribute("height",F(o)),a.setAttribute("depth",F(-o))),a.setAttribute("voffset",F(o)),a}});const an=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];je({type:"sizing",names:an,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!1,r);return{type:"sizing",mode:o.mode,size:an.indexOf(n)+1,body:s}},htmlBuilder:(e,t)=>{const r=t.havingSize(e.size);return sn(e.body,r,t)},mathmlBuilder:(e,t)=>{const r=t.havingSize(e.size),n=xt(e.body,r),o=new gt.MathNode("mstyle",n);return o.setAttribute("mathsize",F(r.sizeMultiplier)),o}}),je({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let{parser:n}=e,o=!1,s=!1;const i=r[0]&&qt(r[0],"ordgroup");if(i){let e="";for(let t=0;t{const r=Ve.makeSpan([],[ht(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(let e=0;e{const r=new gt.MathNode("mpadded",[vt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),je({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n}=e;const o=r[0],s=t[0];return{type:"sqrt",mode:n.mode,body:s,index:o}},htmlBuilder(e,t){let r=ht(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ve.wrapFragment(r,t);const n=t.fontMetrics().defaultRuleThickness;let o=n;t.style.idr.height+r.depth+s&&(s=(s+c-r.height-r.depth)/2);const m=a.height-r.height-s-l;r.style.paddingLeft=F(h);const p=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+m)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){const r=t.havingStyle(w.SCRIPTSCRIPT),n=ht(e.index,r,t),o=.6*(p.height-p.depth),s=Ve.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:n}]},t),i=Ve.makeSpan(["root"],[s]);return Ve.makeSpan(["mord","sqrt"],[i,p],t)}return Ve.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){const{body:r,index:n}=e;return n?new gt.MathNode("mroot",[vt(r,t),vt(n,t)]):new gt.MathNode("msqrt",[vt(r,t)])}});const ln={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT};je({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!0,r),i=n.slice(1,n.length-5);return{type:"styling",mode:o.mode,style:i,body:s}},htmlBuilder(e,t){const r=ln[e.style],n=t.havingStyle(r).withFont("");return sn(e.body,n,t)},mathmlBuilder(e,t){const r=ln[e.style],n=t.havingStyle(r),o=xt(e.body,n),s=new gt.MathNode("mstyle",o),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return s.setAttribute("scriptlevel",i[0]),s.setAttribute("displaystyle",i[1]),s}});$e({type:"supsub",htmlBuilder(e,t){const r=function(e,t){const r=e.base;if(r)return"op"===r.type?r.limits&&(t.style.size===w.DISPLAY.size||r.alwaysHandleSupSub)?en:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===w.DISPLAY.size||r.limits)?on:null:"accent"===r.type?l.isCharacterBox(r.base)?Ht:null:"horizBrace"===r.type&&!e.sub===r.isOver?$r:null;return null}(e,t);if(r)return r(e,t);const{base:n,sup:o,sub:s}=e,i=ht(n,t);let a,h;const c=t.fontMetrics();let m=0,p=0;const u=n&&l.isCharacterBox(n);if(o){const e=t.havingStyle(t.style.sup());a=ht(o,e,t),u||(m=i.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());h=ht(s,e,t),u||(p=i.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}let d;d=t.style===w.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;const g=t.sizeMultiplier,f=F(.5/c.ptPerEm/g);let b,y=null;if(h){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(i instanceof Z||t)&&(y=F(-i.italic))}if(a&&h){m=Math.max(m,d,a.depth+.25*c.xHeight),p=Math.max(p,c.sub2);const e=4*c.defaultRuleThickness;if(m-a.depth-(h.height-p)0&&(m+=t,p-=t)}const r=[{type:"elem",elem:h,shift:p,marginRight:f,marginLeft:y},{type:"elem",elem:a,shift:-m,marginRight:f}];b=Ve.makeVList({positionType:"individualShift",children:r},t)}else if(h){p=Math.max(p,c.sub1,h.height-.8*c.xHeight);const e=[{type:"elem",elem:h,marginLeft:y,marginRight:f}];b=Ve.makeVList({positionType:"shift",positionData:p,children:e},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");m=Math.max(m,d,a.depth+.25*c.xHeight),b=Ve.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:a,marginRight:f}]},t)}const x=at(i,"right")||"mord";return Ve.makeSpan([x],[i,Ve.makeSpan(["msupsub"],[b])],t)},mathmlBuilder(e,t){let r,n,o=!1;e.base&&"horizBrace"===e.base.type&&(n=!!e.sup,n===e.base.isOver&&(o=!0,r=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);const s=[vt(e.base,t)];let i;if(e.sub&&s.push(vt(e.sub,t)),e.sup&&s.push(vt(e.sup,t)),o)i=r?"mover":"munder";else if(e.sub)if(e.sup){const r=e.base;i=r&&"op"===r.type&&r.limits&&t.style===w.DISPLAY||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.style===w.DISPLAY||r.limits)?"munderover":"msubsup"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"munder":"msub"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"mover":"msup"}return new gt.MathNode(i,s)}}),$e({type:"atom",htmlBuilder(e,t){return Ve.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){const r=new gt.MathNode("mo",[ft(e.text,e.mode)]);if("bin"===e.family){const n=yt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});const hn={mi:"italic",mn:"normal",mtext:"normal"};$e({type:"mathord",htmlBuilder(e,t){return Ve.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){const r=new gt.MathNode("mi",[ft(e.text,e.mode,t)]),n=yt(e,t)||"italic";return n!==hn[r.type]&&r.setAttribute("mathvariant",n),r}}),$e({type:"textord",htmlBuilder(e,t){return Ve.makeOrd(e,t,"textord")},mathmlBuilder(e,t){const r=ft(e.text,e.mode,t),n=yt(e,t)||"normal";let o;return o="text"===e.mode?new gt.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new gt.MathNode("mn",[r]):"\\prime"===e.text?new gt.MathNode("mo",[r]):new gt.MathNode("mi",[r]),n!==hn[o.type]&&o.setAttribute("mathvariant",n),o}});const cn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};$e({type:"spacing",htmlBuilder(e,t){if(mn.hasOwnProperty(e.text)){const r=mn[e.text].className||"";if("text"===e.mode){const n=Ve.makeOrd(e,t,"textord");return n.classes.push(r),n}return Ve.makeSpan(["mspace",r],[Ve.mathsym(e.text,e.mode,t)],t)}if(cn.hasOwnProperty(e.text))return Ve.makeSpan(["mspace",cn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){let r;if(!mn.hasOwnProperty(e.text)){if(cn.hasOwnProperty(e.text))return new gt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return r=new gt.MathNode("mtext",[new gt.TextNode("\xa0")]),r}});const pn=()=>{const e=new gt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};$e({type:"tag",mathmlBuilder(e,t){const r=new gt.MathNode("mtable",[new gt.MathNode("mtr",[pn(),new gt.MathNode("mtd",[wt(e.body,t)]),pn(),new gt.MathNode("mtd",[wt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});const un={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},dn={"\\textbf":"textbf","\\textmd":"textmd"},gn={"\\textit":"textit","\\textup":"textup"},fn=(e,t)=>{const r=e.font;return r?un[r]?t.withTextFontFamily(un[r]):dn[r]?t.withTextFontWeight(dn[r]):t.withTextFontShape(gn[r]):t};je({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"text",mode:r.mode,body:Ke(o),font:n}},htmlBuilder(e,t){const r=fn(e,t),n=nt(e.body,r,!0);return Ve.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){const r=fn(e,t);return wt(e.body,r)}}),je({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ht(e.body,t),n=Ve.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Ve.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){const r=new gt.MathNode("mo",[new gt.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new gt.MathNode("munder",[vt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),je({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ht(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(r.height-n-(r.depth+n));return Ve.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new gt.MathNode("mpadded",[vt(e.body,t)],["vcenter"])}}),je({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){const r=bn(e),n=[],o=t.havingStyle(t.style.text());for(let t=0;te.body.replace(/ /g,e.star?"\u2423":"\xa0");var yn=Xe;const xn="[ \r\n\t]",wn="(\\\\[a-zA-Z@]+)"+xn+"*",vn="[\u0300-\u036f]",kn=new RegExp(vn+"+$"),Sn="("+xn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+vn+"*|[\ud800-\udbff][\udc00-\udfff]"+vn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+wn+"|\\\\[^\ud800-\udfff])";class Mn{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Sn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Nr("EOF",new Cr(this,t,t));const r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new Nr(e[t],new Cr(this,t,t+1)));const o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}return new Nr(o,new Cr(this,t,this.tokenRegex.lastIndex))}}class zn{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(let t=0;t0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{const t=this.undefStack[this.undefStack.length-1];t&&!t.hasOwnProperty(e)&&(t[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var An=Tr;Br("\\noexpand",(function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Br("\\expandafter",(function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Br("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Br("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Br("\\@ifnextchar",(function(e){const t=e.consumeArgs(3);e.consumeSpaces();const r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Br("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Br("\\TextOrMath",(function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));const Tn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Br("\\char",(function(e){let t,r=e.popToken(),o="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if(r=e.popToken(),"\\"===r.text[0])o=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");o=r.text.charCodeAt(0)}else t=10;if(t){if(o=Tn[r.text],null==o||o>=t)throw new n("Invalid base-"+t+" digit "+r.text);let s;for(;null!=(s=Tn[e.future().text])&&s{let o=e.consumeArg().tokens;if(1!==o.length)throw new n("\\newcommand's first argument must be a macro name");const s=o[0].text,i=e.isDefined(s);if(i&&!t)throw new n("\\newcommand{"+s+"} attempting to redefine "+s+"; use \\renewcommand");if(!i&&!r)throw new n("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");let a=0;if(o=e.consumeArg().tokens,1===o.length&&"["===o[0].text){let t="",r=e.expandNextToken();for(;"]"!==r.text&&"EOF"!==r.text;)t+=r.text,r=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+t);a=parseInt(t),o=e.consumeArg().tokens}return e.macros.set(s,{tokens:o,numArgs:a}),""};Br("\\newcommand",(e=>Bn(e,!1,!0))),Br("\\renewcommand",(e=>Bn(e,!0,!1))),Br("\\providecommand",(e=>Bn(e,!0,!0))),Br("\\message",(e=>{const t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Br("\\errmessage",(e=>{const t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Br("\\show",(e=>{const t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),yn[r],oe.math[r],oe.text[r]),""})),Br("\\bgroup","{"),Br("\\egroup","}"),Br("~","\\nobreakspace"),Br("\\lq","`"),Br("\\rq","'"),Br("\\aa","\\r a"),Br("\\AA","\\r A"),Br("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Br("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Br("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Br("\u212c","\\mathscr{B}"),Br("\u2130","\\mathscr{E}"),Br("\u2131","\\mathscr{F}"),Br("\u210b","\\mathscr{H}"),Br("\u2110","\\mathscr{I}"),Br("\u2112","\\mathscr{L}"),Br("\u2133","\\mathscr{M}"),Br("\u211b","\\mathscr{R}"),Br("\u212d","\\mathfrak{C}"),Br("\u210c","\\mathfrak{H}"),Br("\u2128","\\mathfrak{Z}"),Br("\\Bbbk","\\Bbb{k}"),Br("\xb7","\\cdotp"),Br("\\llap","\\mathllap{\\textrm{#1}}"),Br("\\rlap","\\mathrlap{\\textrm{#1}}"),Br("\\clap","\\mathclap{\\textrm{#1}}"),Br("\\mathstrut","\\vphantom{(}"),Br("\\underbar","\\underline{\\text{#1}}"),Br("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Br("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Br("\\ne","\\neq"),Br("\u2260","\\neq"),Br("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Br("\u2209","\\notin"),Br("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Br("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Br("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Br("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Br("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Br("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Br("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Br("\u27c2","\\perp"),Br("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Br("\u220c","\\notni"),Br("\u231c","\\ulcorner"),Br("\u231d","\\urcorner"),Br("\u231e","\\llcorner"),Br("\u231f","\\lrcorner"),Br("\xa9","\\copyright"),Br("\xae","\\textregistered"),Br("\ufe0f","\\textregistered"),Br("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Br("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Br("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Br("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Br("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Br("\u22ee","\\vdots"),Br("\\varGamma","\\mathit{\\Gamma}"),Br("\\varDelta","\\mathit{\\Delta}"),Br("\\varTheta","\\mathit{\\Theta}"),Br("\\varLambda","\\mathit{\\Lambda}"),Br("\\varXi","\\mathit{\\Xi}"),Br("\\varPi","\\mathit{\\Pi}"),Br("\\varSigma","\\mathit{\\Sigma}"),Br("\\varUpsilon","\\mathit{\\Upsilon}"),Br("\\varPhi","\\mathit{\\Phi}"),Br("\\varPsi","\\mathit{\\Psi}"),Br("\\varOmega","\\mathit{\\Omega}"),Br("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Br("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Br("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Br("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Br("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Br("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");const Cn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Br("\\dots",(function(e){let t="\\dotso";const r=e.expandAfterFuture().text;return r in Cn?t=Cn[r]:("\\not"===r.slice(0,4)||r in oe.math&&l.contains(["bin","rel"],oe.math[r].group))&&(t="\\dotsb"),t}));const Nn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Br("\\dotso",(function(e){return e.future().text in Nn?"\\ldots\\,":"\\ldots"})),Br("\\dotsc",(function(e){const t=e.future().text;return t in Nn&&","!==t?"\\ldots\\,":"\\ldots"})),Br("\\cdots",(function(e){return e.future().text in Nn?"\\@cdots\\,":"\\@cdots"})),Br("\\dotsb","\\cdots"),Br("\\dotsm","\\cdots"),Br("\\dotsi","\\!\\cdots"),Br("\\dotsx","\\ldots\\,"),Br("\\DOTSI","\\relax"),Br("\\DOTSB","\\relax"),Br("\\DOTSX","\\relax"),Br("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Br("\\,","\\tmspace+{3mu}{.1667em}"),Br("\\thinspace","\\,"),Br("\\>","\\mskip{4mu}"),Br("\\:","\\tmspace+{4mu}{.2222em}"),Br("\\medspace","\\:"),Br("\\;","\\tmspace+{5mu}{.2777em}"),Br("\\thickspace","\\;"),Br("\\!","\\tmspace-{3mu}{.1667em}"),Br("\\negthinspace","\\!"),Br("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Br("\\negthickspace","\\tmspace-{5mu}{.277em}"),Br("\\enspace","\\kern.5em "),Br("\\enskip","\\hskip.5em\\relax"),Br("\\quad","\\hskip1em\\relax"),Br("\\qquad","\\hskip2em\\relax"),Br("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Br("\\tag@paren","\\tag@literal{({#1})}"),Br("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Br("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Br("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Br("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Br("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Br("\\newline","\\\\\\relax"),Br("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const qn=F(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Br("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+qn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Br("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+qn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Br("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Br("\\@hspace","\\hskip #1\\relax"),Br("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Br("\\ordinarycolon",":"),Br("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Br("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Br("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Br("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Br("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Br("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Br("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Br("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Br("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Br("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Br("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Br("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Br("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Br("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Br("\u2237","\\dblcolon"),Br("\u2239","\\eqcolon"),Br("\u2254","\\coloneqq"),Br("\u2255","\\eqqcolon"),Br("\u2a74","\\Coloneqq"),Br("\\ratio","\\vcentcolon"),Br("\\coloncolon","\\dblcolon"),Br("\\colonequals","\\coloneqq"),Br("\\coloncolonequals","\\Coloneqq"),Br("\\equalscolon","\\eqqcolon"),Br("\\equalscoloncolon","\\Eqqcolon"),Br("\\colonminus","\\coloneq"),Br("\\coloncolonminus","\\Coloneq"),Br("\\minuscolon","\\eqcolon"),Br("\\minuscoloncolon","\\Eqcolon"),Br("\\coloncolonapprox","\\Colonapprox"),Br("\\coloncolonsim","\\Colonsim"),Br("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Br("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Br("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Br("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Br("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Br("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Br("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Br("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Br("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Br("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Br("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Br("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Br("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Br("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Br("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Br("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Br("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Br("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Br("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Br("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Br("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Br("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Br("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Br("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Br("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Br("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Br("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Br("\\imath","\\html@mathml{\\@imath}{\u0131}"),Br("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Br("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Br("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Br("\u27e6","\\llbracket"),Br("\u27e7","\\rrbracket"),Br("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Br("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Br("\u2983","\\lBrace"),Br("\u2984","\\rBrace"),Br("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Br("\u29b5","\\minuso"),Br("\\darr","\\downarrow"),Br("\\dArr","\\Downarrow"),Br("\\Darr","\\Downarrow"),Br("\\lang","\\langle"),Br("\\rang","\\rangle"),Br("\\uarr","\\uparrow"),Br("\\uArr","\\Uparrow"),Br("\\Uarr","\\Uparrow"),Br("\\N","\\mathbb{N}"),Br("\\R","\\mathbb{R}"),Br("\\Z","\\mathbb{Z}"),Br("\\alef","\\aleph"),Br("\\alefsym","\\aleph"),Br("\\Alpha","\\mathrm{A}"),Br("\\Beta","\\mathrm{B}"),Br("\\bull","\\bullet"),Br("\\Chi","\\mathrm{X}"),Br("\\clubs","\\clubsuit"),Br("\\cnums","\\mathbb{C}"),Br("\\Complex","\\mathbb{C}"),Br("\\Dagger","\\ddagger"),Br("\\diamonds","\\diamondsuit"),Br("\\empty","\\emptyset"),Br("\\Epsilon","\\mathrm{E}"),Br("\\Eta","\\mathrm{H}"),Br("\\exist","\\exists"),Br("\\harr","\\leftrightarrow"),Br("\\hArr","\\Leftrightarrow"),Br("\\Harr","\\Leftrightarrow"),Br("\\hearts","\\heartsuit"),Br("\\image","\\Im"),Br("\\infin","\\infty"),Br("\\Iota","\\mathrm{I}"),Br("\\isin","\\in"),Br("\\Kappa","\\mathrm{K}"),Br("\\larr","\\leftarrow"),Br("\\lArr","\\Leftarrow"),Br("\\Larr","\\Leftarrow"),Br("\\lrarr","\\leftrightarrow"),Br("\\lrArr","\\Leftrightarrow"),Br("\\Lrarr","\\Leftrightarrow"),Br("\\Mu","\\mathrm{M}"),Br("\\natnums","\\mathbb{N}"),Br("\\Nu","\\mathrm{N}"),Br("\\Omicron","\\mathrm{O}"),Br("\\plusmn","\\pm"),Br("\\rarr","\\rightarrow"),Br("\\rArr","\\Rightarrow"),Br("\\Rarr","\\Rightarrow"),Br("\\real","\\Re"),Br("\\reals","\\mathbb{R}"),Br("\\Reals","\\mathbb{R}"),Br("\\Rho","\\mathrm{P}"),Br("\\sdot","\\cdot"),Br("\\sect","\\S"),Br("\\spades","\\spadesuit"),Br("\\sub","\\subset"),Br("\\sube","\\subseteq"),Br("\\supe","\\supseteq"),Br("\\Tau","\\mathrm{T}"),Br("\\thetasym","\\vartheta"),Br("\\weierp","\\wp"),Br("\\Zeta","\\mathrm{Z}"),Br("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Br("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Br("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Br("\\bra","\\mathinner{\\langle{#1}|}"),Br("\\ket","\\mathinner{|{#1}\\rangle}"),Br("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Br("\\Bra","\\left\\langle#1\\right|"),Br("\\Ket","\\left|#1\\right\\rangle");const In=e=>t=>{const r=t.consumeArg().tokens,n=t.consumeArg().tokens,o=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();const l=t=>r=>{e&&(r.macros.set("|",i),o.length&&r.macros.set("\\|",a));let s=t;if(!t&&o.length){"|"===r.future().text&&(r.popToken(),s=!0)}return{tokens:s?o:n,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));const h=t.consumeArg().tokens,c=t.expandTokens([...s,...h,...r]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};Br("\\bra@ket",In(!1)),Br("\\bra@set",In(!0)),Br("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Br("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Br("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Br("\\angln","{\\angl n}"),Br("\\blue","\\textcolor{##6495ed}{#1}"),Br("\\orange","\\textcolor{##ffa500}{#1}"),Br("\\pink","\\textcolor{##ff00af}{#1}"),Br("\\red","\\textcolor{##df0030}{#1}"),Br("\\green","\\textcolor{##28ae7b}{#1}"),Br("\\gray","\\textcolor{gray}{#1}"),Br("\\purple","\\textcolor{##9d38bd}{#1}"),Br("\\blueA","\\textcolor{##ccfaff}{#1}"),Br("\\blueB","\\textcolor{##80f6ff}{#1}"),Br("\\blueC","\\textcolor{##63d9ea}{#1}"),Br("\\blueD","\\textcolor{##11accd}{#1}"),Br("\\blueE","\\textcolor{##0c7f99}{#1}"),Br("\\tealA","\\textcolor{##94fff5}{#1}"),Br("\\tealB","\\textcolor{##26edd5}{#1}"),Br("\\tealC","\\textcolor{##01d1c1}{#1}"),Br("\\tealD","\\textcolor{##01a995}{#1}"),Br("\\tealE","\\textcolor{##208170}{#1}"),Br("\\greenA","\\textcolor{##b6ffb0}{#1}"),Br("\\greenB","\\textcolor{##8af281}{#1}"),Br("\\greenC","\\textcolor{##74cf70}{#1}"),Br("\\greenD","\\textcolor{##1fab54}{#1}"),Br("\\greenE","\\textcolor{##0d923f}{#1}"),Br("\\goldA","\\textcolor{##ffd0a9}{#1}"),Br("\\goldB","\\textcolor{##ffbb71}{#1}"),Br("\\goldC","\\textcolor{##ff9c39}{#1}"),Br("\\goldD","\\textcolor{##e07d10}{#1}"),Br("\\goldE","\\textcolor{##a75a05}{#1}"),Br("\\redA","\\textcolor{##fca9a9}{#1}"),Br("\\redB","\\textcolor{##ff8482}{#1}"),Br("\\redC","\\textcolor{##f9685d}{#1}"),Br("\\redD","\\textcolor{##e84d39}{#1}"),Br("\\redE","\\textcolor{##bc2612}{#1}"),Br("\\maroonA","\\textcolor{##ffbde0}{#1}"),Br("\\maroonB","\\textcolor{##ff92c6}{#1}"),Br("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Br("\\maroonD","\\textcolor{##ca337c}{#1}"),Br("\\maroonE","\\textcolor{##9e034e}{#1}"),Br("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Br("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Br("\\purpleC","\\textcolor{##aa87ff}{#1}"),Br("\\purpleD","\\textcolor{##7854ab}{#1}"),Br("\\purpleE","\\textcolor{##543b78}{#1}"),Br("\\mintA","\\textcolor{##f5f9e8}{#1}"),Br("\\mintB","\\textcolor{##edf2df}{#1}"),Br("\\mintC","\\textcolor{##e0e5cc}{#1}"),Br("\\grayA","\\textcolor{##f6f7f7}{#1}"),Br("\\grayB","\\textcolor{##f0f1f2}{#1}"),Br("\\grayC","\\textcolor{##e3e5e6}{#1}"),Br("\\grayD","\\textcolor{##d6d8da}{#1}"),Br("\\grayE","\\textcolor{##babec2}{#1}"),Br("\\grayF","\\textcolor{##888d93}{#1}"),Br("\\grayG","\\textcolor{##626569}{#1}"),Br("\\grayH","\\textcolor{##3b3e40}{#1}"),Br("\\grayI","\\textcolor{##21242c}{#1}"),Br("\\kaBlue","\\textcolor{##314453}{#1}"),Br("\\kaGreen","\\textcolor{##71B307}{#1}");const Rn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Hn{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new zn(An,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Mn(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Nr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){const t=[],r=e&&e.length>0;r||this.consumeSpaces();const o=this.future();let s,i=0,a=0;do{if(s=this.popToken(),t.push(s),"{"===s.text)++i;else if("}"===s.text){if(--i,-1===i)throw new n("Extra }",s)}else if("EOF"===s.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[a]:"}")+"'",s);if(e&&r)if((0===i||1===i&&"{"===e[a])&&s.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(0!==i||r);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");const r=t[0];for(let e=0;ethis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){const t=this.popToken(),r=t.text,o=t.noexpand?null:this._getExpansion(r);if(null==o||e&&o.unexpandable){if(e&&null==o&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let s=o.tokens;const i=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){s=s.slice();for(let e=s.length-1;e>=0;--e){let t=s[e];if("#"===t.text){if(0===e)throw new n("Incomplete placeholder at end of macro body",t);if(t=s[--e],"#"===t.text)s.splice(e+1,1);else{if(!/^[1-9]$/.test(t.text))throw new n("Not a valid argument number",t);s.splice(e,2,...i[+t.text-1])}}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){const e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Nr(e)]):void 0}expandTokens(e){const t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){const t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){const t=this.macros.get(e);if(null==t)return t;if(1===e.length){const t=this.lexer.catcodes[e];if(null!=t&&13!==t)return}const r="function"==typeof t?t(this):t;if("string"==typeof r){let e=0;if(-1!==r.indexOf("#")){const t=r.replace(/##/g,"");for(;-1!==t.indexOf("#"+(e+1));)++e}const t=new Mn(r,this.settings),n=[];let o=t.lex();for(;"EOF"!==o.text;)n.push(o),o=t.lex();n.reverse();return{tokens:n,numArgs:e}}return r}isDefined(e){return this.macros.has(e)||yn.hasOwnProperty(e)||oe.math.hasOwnProperty(e)||oe.text.hasOwnProperty(e)||Rn.hasOwnProperty(e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:yn.hasOwnProperty(e)&&!yn[e].primitive}}const On=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,En=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),Ln={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Dn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class Vn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Hn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){const t=this.nextToken;this.consume(),this.gullet.pushToken(new Nr("}")),this.gullet.pushTokens(e);const r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){const r=[];for(;;){"math"===this.mode&&this.consumeSpaces();const n=this.fetch();if(-1!==Vn.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&yn[n.text]&&yn[n.text].infix)break;const o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){let t,r=-1;for(let o=0;o=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);const r=oe[this.mode][t].group,n=Cr.range(e);let s;if(te.hasOwnProperty(r)){const e=r;s={type:"atom",mode:this.mode,family:e,loc:n,text:t}}else s={type:r,mode:this.mode,loc:n,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:Cr.range(e),text:t}}if(this.consume(),r)for(let t=0;t=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p=(Object.defineProperty(e,"__esModule",{value:!0}),e.AssistiveMmlHandler=e.AssistiveMmlMathDocumentMixin=e.AssistiveMmlMathItemMixin=e.LimitedMmlVisitor=void 0,r(4474)),i=r(9259),h=r(7233),d=(o=i.SerializedMmlVisitor,a(f,o),f.prototype.getAttributes=function(t){return o.prototype.getAttributes.call(this,t).replace(/ ?id=".*?"/,"")},f);function f(){return null!==o&&o.apply(this,arguments)||this}function m(t){return a(e,r=t),e.prototype.assistiveMml=function(t,e){void 0===e&&(e=!1),this.state()>=p.STATE.ASSISTIVEMML||(this.isEscaped||!t.options.enableAssistiveMml&&!e||(e=t.adaptor,t=t.toMML(this.root).replace(/\n */g,"").replace(//g,""),t=e.firstChild(e.body(e.parse(t,"text/html"))),t=e.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[t]),e.setAttribute(e.firstChild(this.typesetRoot),"aria-hidden","true"),e.setStyle(this.typesetRoot,"position","relative"),e.append(this.typesetRoot,t)),this.state(p.STATE.ASSISTIVEMML))},e;function e(){return null!==r&&r.apply(this,arguments)||this}var r}function y(t){var e,i;return a(r,i=t),r.prototype.toMML=function(t){return this.visitor.visitTree(t)},r.prototype.assistiveMml=function(){var t,e;if(!this.processed.isSet("assistive-mml")){try{for(var r=u(this.math),n=r.next();!n.done;n=r.next())n.value.assistiveMml(this)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("assistive-mml")}return this},r.prototype.state=function(t,e){return i.prototype.state.call(this,t,e=void 0===e?!1:e),ts[0]&&e[1]=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLAdaptor=void 0,o=r(5009).AbstractDOMAdaptor,i(a,o),a.prototype.parse=function(t,e){return this.parser.parseFromString(t,e=void 0===e?"text/html":e)},a.prototype.create=function(t,e){return e?this.document.createElementNS(e,t):this.document.createElement(t)},a.prototype.text=function(t){return this.document.createTextNode(t)},a.prototype.head=function(t){return t.head||t},a.prototype.body=function(t){return t.body||t},a.prototype.root=function(t){return t.documentElement||t},a.prototype.doctype=function(t){return t.doctype?""):""},a.prototype.tags=function(t,e,r){r=(r=void 0===r?null:r)?t.getElementsByTagNameNS(r,e):t.getElementsByTagName(e);return Array.from(r)},a.prototype.getElements=function(t,e){var r,n,o=[];try{for(var i=l(t),a=i.next();!a.done;a=i.next()){var s=a.value;"string"==typeof s?o=o.concat(Array.from(this.document.querySelectorAll(s))):Array.isArray(s)||s instanceof this.window.NodeList||s instanceof this.window.HTMLCollection?o=o.concat(Array.from(s)):o.push(s)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},a.prototype.contains=function(t,e){return t.contains(e)},a.prototype.parent=function(t){return t.parentNode},a.prototype.append=function(t,e){return t.appendChild(e)},a.prototype.insert=function(t,e){return this.parent(e).insertBefore(t,e)},a.prototype.remove=function(t){return this.parent(t).removeChild(t)},a.prototype.replace=function(t,e){return this.parent(e).replaceChild(t,e)},a.prototype.clone=function(t){return t.cloneNode(!0)},a.prototype.split=function(t,e){return t.splitText(e)},a.prototype.next=function(t){return t.nextSibling},a.prototype.previous=function(t){return t.previousSibling},a.prototype.firstChild=function(t){return t.firstChild},a.prototype.lastChild=function(t){return t.lastChild},a.prototype.childNodes=function(t){return Array.from(t.childNodes)},a.prototype.childNode=function(t,e){return t.childNodes[e]},a.prototype.kind=function(t){var e=t.nodeType;return 1===e||3===e||8===e?t.nodeName.toLowerCase():""},a.prototype.value=function(t){return t.nodeValue||""},a.prototype.textContent=function(t){return t.textContent},a.prototype.innerHTML=function(t){return t.innerHTML},a.prototype.outerHTML=function(t){return t.outerHTML},a.prototype.serializeXML=function(t){return(new this.window.XMLSerializer).serializeToString(t)},a.prototype.setAttribute=function(t,e,r,n){return(n=void 0===n?null:n)?(e=n.replace(/.*\//,"")+":"+e.replace(/^.*:/,""),t.setAttributeNS(n,e,r)):t.setAttribute(e,r)},a.prototype.getAttribute=function(t,e){return t.getAttribute(e)},a.prototype.removeAttribute=function(t,e){return t.removeAttribute(e)},a.prototype.hasAttribute=function(t,e){return t.hasAttribute(e)},a.prototype.allAttributes=function(t){return Array.from(t.attributes).map(function(t){return{name:t.name,value:t.value}})},a.prototype.addClass=function(t,e){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim()},a.prototype.removeClass=function(t,e){t.classList?t.classList.remove(e):t.className=t.className.split(/ /).filter(function(t){return t!==e}).join(" ")},a.prototype.hasClass=function(t,e){return t.classList?t.classList.contains(e):0<=t.className.split(/ /).indexOf(e)},a.prototype.setStyle=function(t,e,r){t.style[e]=r},a.prototype.getStyle=function(t,e){return t.style[e]},a.prototype.allStyles=function(t){return t.style.cssText},a.prototype.insertRules=function(t,e){var r,n;try{for(var o=l(e.reverse()),i=o.next();!i.done;i=o.next()){var a=i.value;try{t.sheet.insertRule(a,0)}catch(t){console.warn("MathJax: can't insert css rule '".concat(a,"': ").concat(t.message))}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},a.prototype.fontSize=function(t){t=this.window.getComputedStyle(t);return parseFloat(t.fontSize)},a.prototype.fontFamily=function(t){return this.window.getComputedStyle(t).fontFamily||""},a.prototype.nodeSize=function(t,e,r){return void 0===e&&(e=1),(r=void 0===r?!1:r)&&t.getBBox?[(r=t.getBBox()).width/e,r.height/e]:[t.offsetWidth/e,t.offsetHeight/e]},a.prototype.nodeBBox=function(t){t=t.getBoundingClientRect();return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},a);function a(t){var e=o.call(this,t.document)||this;return e.window=t,e.parser=new t.DOMParser,e}e.HTMLAdaptor=r},6191:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.browserAdaptor=void 0;var n=r(444);e.browserAdaptor=function(){return new n.HTMLAdaptor(window)}},9515:function(t,e,r){var c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.MathJax=e.combineWithMathJax=e.combineDefaults=e.combineConfig=e.isObject=void 0,r(3282));function u(t){return"object"==typeof t&&null!==t}function s(t,e){var r,n;try{for(var o=c(Object.keys(e)),i=o.next();!i.done;i=o.next()){var a=i.value;"__esModule"!==a&&(!u(t[a])||!u(e[a])||e[a]instanceof Promise?null!==e[a]&&void 0!==e[a]&&(t[a]=e[a]):s(t[a],e[a]))}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return t}e.isObject=u,e.combineConfig=s,e.combineDefaults=function t(e,r,n){var o,i;e[r]||(e[r]={}),e=e[r];try{for(var a=c(Object.keys(n)),s=a.next();!s.done;s=a.next()){var l=s.value;u(e[l])&&u(n[l])?t(e,l,n[l]):null==e[l]&&null!=n[l]&&(e[l]=n[l])}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return e},e.combineWithMathJax=function(t){return s(e.MathJax,t)},void 0===r.g.MathJax&&(r.g.MathJax={}),r.g.MathJax.version||(r.g.MathJax={version:n.VERSION,_:{},config:r.g.MathJax}),e.MathJax=r.g.MathJax},235:function(t,l,e){var r,n,c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=(Object.defineProperty(l,"__esModule",{value:!0}),l.CONFIG=l.MathJax=l.Loader=l.PathFilters=l.PackageError=l.Package=void 0,e(9515)),u=e(265),i=e(265);Object.defineProperty(l,"Package",{enumerable:!0,get:function(){return i.Package}}),Object.defineProperty(l,"PackageError",{enumerable:!0,get:function(){return i.PackageError}});var a,s,p,e=e(7525);if(l.PathFilters={source:function(t){return l.CONFIG.source.hasOwnProperty(t.name)&&(t.name=l.CONFIG.source[t.name]),!0},normalize:function(t){var e=t.name;return e.match(/^(?:[a-z]+:\/)?\/|[a-z]:\\|\[/i)||(t.name="[mathjax]/"+e.replace(/^\.\//,"")),t.addExtension&&!e.match(/\.[^\/]+$/)&&(t.name+=".js"),!0},prefix:function(t){for(var e;(e=t.name.match(/^\[([^\]]*)\]/))&&l.CONFIG.paths.hasOwnProperty(e[1]);)t.name=l.CONFIG.paths[e[1]]+t.name.substr(e[0].length);return!0}},s=a=l.Loader||(l.Loader={}),p=o.MathJax.version,s.versions=new Map,s.ready=function(){for(var t,e,r=[],n=0;n=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},h=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDOMAdaptor=void 0,n.prototype.node=function(t,e,r,n){void 0===e&&(e={}),void 0===r&&(r=[]);var o,i,a=this.create(t,n);this.setAttributes(a,e);try{for(var s=m(r),l=s.next();!l.done;l=s.next()){var c=l.value;this.append(a,c)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a},n.prototype.setAttributes=function(t,e){var r,n,o,i,a,s;if(e.style&&"string"!=typeof e.style)try{for(var l=m(Object.keys(e.style)),c=l.next();!c.done;c=l.next()){var u=c.value;this.setStyle(t,u.replace(/-([a-z])/g,function(t,e){return e.toUpperCase()}),e.style[u])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(e.properties)try{for(var p=m(Object.keys(e.properties)),h=p.next();!h.done;h=p.next())t[u=h.value]=e.properties[u]}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var d=m(Object.keys(e)),f=d.next();!f.done;f=d.next())"style"===(u=f.value)&&"string"!=typeof e.style||"properties"===u||this.setAttribute(t,u,e[u])}catch(t){a={error:t}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}},n.prototype.replace=function(t,e){return this.insert(t,e),this.remove(e),e},n.prototype.childNode=function(t,e){return this.childNodes(t)[e]},n.prototype.allClasses=function(t){t=this.getAttribute(t,"class");return t?t.replace(/ +/g," ").replace(/^ /,"").replace(/ $/,"").split(/ /):[]},n);function n(t){this.document=t=void 0===t?null:t}e.AbstractDOMAdaptor=r},3494:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractFindMath=void 0;var n=r(7233);function o(t){var e=this.constructor;this.options=(0,n.userOptions)((0,n.defaultOptions)({},e.OPTIONS),t)}o.OPTIONS={},e.AbstractFindMath=o},3670:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractHandler=void 0,o=r(5722).AbstractMathDocument,i(l,o),l);function s(t,e){void 0===e&&(e=5),this.documentClass=a,this.adaptor=t,this.priority=e}function l(){return null!==o&&o.apply(this,arguments)||this}Object.defineProperty(s.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),s.prototype.handlesDocument=function(t){return!1},s.prototype.create=function(t,e){return new this.documentClass(t,this.adaptor,e)},s.NAME="generic",e.AbstractHandler=s},805:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.HandlerList=void 0,o=r(8666).PrioritizedList,i(s,o),s.prototype.register=function(t){return this.add(t,t.priority)},s.prototype.unregister=function(t){this.remove(t)},s.prototype.handlesDocument=function(t){var e,r;try{for(var n=a(this),o=n.next();!o.done;o=n.next()){var i=o.value.item;if(i.handlesDocument(t))return i}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new Error("Can't find handler for document")},s.prototype.document=function(t,e){return void 0===e&&(e=null),this.handlesDocument(t).create(t,e)},s);function s(){return null!==o&&o.apply(this,arguments)||this}e.HandlerList=r},9206:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractInputJax=void 0;var n=r(7233),o=r(7525);function i(t){void 0===t&&(t={}),this.adaptor=null,this.mmlFactory=null;var e=this.constructor;this.options=(0,n.userOptions)((0,n.defaultOptions)({},e.OPTIONS),t),this.preFilters=new o.FunctionList,this.postFilters=new o.FunctionList}Object.defineProperty(i.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),i.prototype.setAdaptor=function(t){this.adaptor=t},i.prototype.setMmlFactory=function(t){this.mmlFactory=t},i.prototype.initialize=function(){},i.prototype.reset=function(){for(var t=[],e=0;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=e&&a.item.renderDoc(t))return}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},g.prototype.renderMath=function(t,e,r){var n,o;void 0===r&&(r=h.STATE.UNPROCESSED);try{for(var i=f(this.items),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.priority>=r&&s.item.renderMath(t,e))return}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},g.prototype.renderConvert=function(t,e,r){var n,o;void 0===r&&(r=h.STATE.LAST);try{for(var i=f(this.items),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.priority>r)return;if(s.item.convert&&s.item.renderMath(t,e))return}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},g.prototype.findID=function(t){var e,r;try{for(var n=f(this.items),o=n.next();!o.done;o=n.next()){var i=o.value;if(i.item.id===t)return i.item}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return null},g);function g(){return null!==o&&o.apply(this,arguments)||this}r.RenderList=y,r.resetOptions={all:!1,processed:!1,inputJax:null,outputJax:null},r.resetAllOptions={all:!0,processed:!0,inputJax:[],outputJax:[]};S=s.AbstractInputJax,i(N,S),N.prototype.compile=function(t){return null};var b,v,_,S,O=N,M=(_=l.AbstractOutputJax,i(T,_),T.prototype.typeset=function(t,e){return null},T.prototype.escaped=function(t,e){return null},T),x=(v=c.AbstractMathList,i(C,v),C),e=(b=h.AbstractMathItem,i(A,b),A),s=(Object.defineProperty(E.prototype,"kind",{get:function(){return this.constructor.KIND},enumerable:!1,configurable:!0}),E.prototype.addRenderAction=function(t){for(var e=[],r=1;r=e&&this.state(e-1),t.renderActions.renderMath(this,t,e)},e.prototype.convert=function(t,e){void 0===e&&(e=i.STATE.LAST),t.renderActions.renderConvert(this,t,e)},e.prototype.compile=function(t){this.state()=i.STATE.INSERTED&&this.removeFromDocument(e),t=i.STATE.TYPESET&&(this.outputData={}),t=i.STATE.COMPILED&&(this.inputData={}),this._state=t),this._state},e.prototype.reset=function(t){this.state(i.STATE.UNPROCESSED,t=void 0===t?!1:t)},i.AbstractMathItem=e,i.STATE={UNPROCESSED:0,FINDMATH:10,COMPILED:20,CONVERT:100,METRICS:110,RERENDER:125,TYPESET:150,INSERTED:200,LAST:1e4},i.newState=function(t,e){if(t in i.STATE)throw Error("State "+t+" already exists");i.STATE[t]=e}},9e3:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),r=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMathList=void 0,o=r(103).LinkedList,i(a,o),a.prototype.isBefore=function(t,e){return t.start.i=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},e=(Object.defineProperty(r,"__esModule",{value:!0}),r.Attributes=r.INHERIT=void 0,r.INHERIT="_inherit_",n.prototype.set=function(t,e){this.attributes[t]=e},n.prototype.setList=function(t){Object.assign(this.attributes,t)},n.prototype.get=function(t){var e=this.attributes[t];return e=e===r.INHERIT?this.global[t]:e},n.prototype.getExplicit=function(t){if(this.attributes.hasOwnProperty(t))return this.attributes[t]},n.prototype.getList=function(){for(var t,e,r=[],n=0;n=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.MathMLVisitor=void 0,o=r(6325).MmlVisitor,i(a,o),a.prototype.visitTree=function(t,e){e=(this.document=e).createElement("top");return this.visitNode(t,e),this.document=null,e.firstChild},a.prototype.visitTextNode=function(t,e){e.appendChild(this.document.createTextNode(t.getText()))},a.prototype.visitXMLNode=function(t,e){e.appendChild(t.getXML().cloneNode(!0))},a.prototype.visitInferredMrowNode=function(t,e){var r,n;try{for(var o=c(t.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;this.visitNode(a,e)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},a.prototype.visitDefault=function(t,e){var r,n,o=this.document.createElement(t.kind);this.addAttributes(t,o);try{for(var i=c(t.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;this.visitNode(s,o)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.appendChild(o)},a.prototype.addAttributes=function(t,e){var r,n,o=t.attributes,i=o.getExplicitNames();try{for(var a=c(i),s=a.next();!s.done;s=a.next()){var l=s.value;e.setAttribute(l,o.getExplicit(l).toString())}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},a);function a(){var t=null!==o&&o.apply(this,arguments)||this;return t.document=null,t}e.MathMLVisitor=r},3909:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.MmlFactory=void 0,r(7860)),r=r(6336),a=(o=a.AbstractNodeFactory,i(s,o),Object.defineProperty(s.prototype,"MML",{get:function(){return this.node},enumerable:!1,configurable:!0}),s.defaultNodes=r.MML,s);function s(){return null!==o&&o.apply(this,arguments)||this}e.MmlFactory=a},9007:function(t,s,e){var n,l,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),d=this&&this.__assign||function(){return(d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},m=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0this.childNodes.length&&(t=1),this.attributes.set("selection",t)},s.defaults=a(a({},r.AbstractMmlNode.defaults),{actiontype:"toggle",selection:1}),s);function s(){return null!==o&&o.apply(this,arguments)||this}e.MmlMaction=i},142:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p=(Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMfenced=void 0,r(9007)),r=(c=p.AbstractMmlNode,o(a,c),Object.defineProperty(a.prototype,"kind",{get:function(){return"mfenced"},enumerable:!1,configurable:!0}),a.prototype.setTeXclass=function(t){this.getPrevClass(t),this.open&&(t=this.open.setTeXclass(t)),this.childNodes[0]&&(t=this.childNodes[0].setTeXclass(t));for(var e=1,r=this.childNodes.length;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMfrac=void 0,r(9007)),i=(o=r.AbstractMmlBaseNode,i(l,o),Object.defineProperty(l.prototype,"kind",{get:function(){return"mfrac"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"arity",{get:function(){return 2},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),l.prototype.setTeXclass=function(t){var e,r;this.getPrevClass(t);try{for(var n=s(this.childNodes),o=n.next();!o.done;o=n.next())o.value.setTeXclass(null)}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},l.prototype.setChildInheritedAttributes=function(t,e,r,n){(!e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMo=void 0,r(9007)),d=r(4082),l=r(505),r=(o=s.AbstractMmlTokenNode,i(c,o),Object.defineProperty(c.prototype,"texClass",{get:function(){var t,e,r,n,o;return null===this._texClass?(t=this.getText(),o=(r=p(this.handleExplicitForm(this.getForms()),3))[0],e=r[1],r=r[2],(o=(n=this.constructor.OPTABLE)[o][t]||n[e][t]||n[r][t])?o[2]:s.TEXCLASS.REL):this._texClass},set:function(t){this._texClass=t},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"kind",{get:function(){return"mo"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isEmbellished",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"hasNewLine",{get:function(){return"newline"===this.attributes.get("linebreak")},enumerable:!1,configurable:!0}),c.prototype.coreParent=function(){for(var t=this,e=this,r=this.factory.getNodeClass("math");e&&e.isEmbellished&&e.coreMO()===this&&!(e instanceof r);)e=(t=e).parent;return t},c.prototype.coreText=function(t){if(!t)return"";if(t.isEmbellished)return t.coreMO().getText();for(;((t.isKind("mrow")||t.isKind("TeXAtom")&&t.texClass!==s.TEXCLASS.VCENTER||t.isKind("mstyle")||t.isKind("mphantom"))&&1===t.childNodes.length||t.isKind("munderover"))&&t.childNodes[0];)t=t.childNodes[0];return t.isToken?t.getText():""},c.prototype.hasSpacingAttributes=function(){return this.attributes.isSet("lspace")||this.attributes.isSet("rspace")},Object.defineProperty(c.prototype,"isAccent",{get:function(){var t,e=!1,r=this.coreParent().parent;return e=r&&(t=r.isKind("mover")?r.childNodes[r.over].coreMO()?"accent":"":r.isKind("munder")?r.childNodes[r.under].coreMO()?"accentunder":"":r.isKind("munderover")?this===r.childNodes[r.over].coreMO()?"accent":this===r.childNodes[r.under].coreMO()?"accentunder":"":"")?void 0!==r.attributes.getExplicit(t)?e:this.attributes.get("accent"):e},enumerable:!1,configurable:!0}),c.prototype.setTeXclass=function(t){var e=this.attributes.getList("form","fence"),r=e.form,e=e.fence;return void 0===this.getProperty("texClass")&&(this.attributes.isSet("lspace")||this.attributes.isSet("rspace"))?null:(e&&this.texClass===s.TEXCLASS.REL&&("prefix"===r&&(this.texClass=s.TEXCLASS.OPEN),"postfix"===r&&(this.texClass=s.TEXCLASS.CLOSE)),this.adjustTeXclass(t))},c.prototype.adjustTeXclass=function(t){var e=this.texClass,r=this.prevClass;if(e===s.TEXCLASS.NONE)return t;if(t?(!t.getProperty("autoOP")||e!==s.TEXCLASS.BIN&&e!==s.TEXCLASS.REL||(r=t.texClass=s.TEXCLASS.ORD),r=this.prevClass=t.texClass||s.TEXCLASS.ORD,this.prevLevel=this.attributes.getInherited("scriptlevel")):r=this.prevClass=s.TEXCLASS.NONE,e!==s.TEXCLASS.BIN||r!==s.TEXCLASS.NONE&&r!==s.TEXCLASS.BIN&&r!==s.TEXCLASS.OP&&r!==s.TEXCLASS.REL&&r!==s.TEXCLASS.OPEN&&r!==s.TEXCLASS.PUNCT)if(r!==s.TEXCLASS.BIN||e!==s.TEXCLASS.REL&&e!==s.TEXCLASS.CLOSE&&e!==s.TEXCLASS.PUNCT){if(e===s.TEXCLASS.BIN){for(var n=this,o=this.parent;o&&o.parent&&o.isEmbellished&&(1===o.childNodes.length||!o.isKind("mrow")&&o.core()===n);)o=(n=o).parent;o.childNodes[o.childNodes.length-1]===n&&(this.texClass=s.TEXCLASS.ORD)}}else t.texClass=this.prevClass=s.TEXCLASS.ORD;else this.texClass=s.TEXCLASS.ORD;return this},c.prototype.setInheritedAttributes=function(t,e,r,n){o.prototype.setInheritedAttributes.call(this,t=void 0===t?{}:t,e=void 0===e?!1:e,r=void 0===r?0:r,n=void 0===n?!1:n);t=this.getText();this.checkOperatorTable(t),this.checkPseudoScripts(t),this.checkPrimes(t),this.checkMathAccent(t)},c.prototype.checkOperatorTable=function(t){var e,r,n=p(this.handleExplicitForm(this.getForms()),3),o=n[0],i=n[1],n=n[2],a=(this.attributes.setInherited("form",o),this.constructor.OPTABLE),s=a[o][t]||a[i][t]||a[n][t];if(s){void 0===this.getProperty("texClass")&&(this.texClass=s[2]);try{for(var l=h(Object.keys(s[3]||{})),c=l.next();!c.done;c=l.next()){var u=c.value;this.attributes.setInherited(u,s[3][u])}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}this.lspace=(s[0]+1)/18,this.rspace=(s[1]+1)/18}else{o=(0,d.getRange)(t);o&&(void 0===this.getProperty("texClass")&&(this.texClass=o[2]),i=this.constructor.MMLSPACING[o[2]],this.lspace=(i[0]+1)/18,this.rspace=(i[1]+1)/18)}},c.prototype.getForms=function(){for(var t=this,e=this.parent,r=this.Parent;r&&r.isEmbellished;)t=e,e=r.parent,r=r.Parent;if(e&&e.isKind("mrow")&&1!==e.nonSpaceLength()){if(e.firstNonSpace()===t)return["prefix","infix","postfix"];if(e.lastNonSpace()===t)return["postfix","infix","prefix"]}return["infix","prefix","postfix"]},c.prototype.handleExplicitForm=function(t){var e;return t=this.attributes.isSet("form")?[e=this.attributes.get("form")].concat(t.filter(function(t){return t!==e})):t},c.prototype.checkPseudoScripts=function(t){var e=this.constructor.pseudoScripts;t.match(e)&&(e=!(t=this.coreParent().Parent)||!(t.isKind("msubsup")&&!t.isKind("msub")),this.setProperty("pseudoscript",e),e&&(this.attributes.setInherited("lspace",0),this.attributes.setInherited("rspace",0)))},c.prototype.checkPrimes=function(t){var e,r=this.constructor.primes;t.match(r)&&(e=this.constructor.remapPrimes,r=(0,l.unicodeString)((0,l.unicodeChars)(t).map(function(t){return e[t]})),this.setProperty("primes",r))},c.prototype.checkMathAccent=function(t){var e=this.Parent;void 0===this.getProperty("mathaccent")&&e&&e.isKind("munderover")&&((e=e.childNodes[0]).isEmbellished&&e.coreMO()===this||(e=this.constructor.mathaccents,t.match(e)&&this.setProperty("mathaccent",!0)))},c.defaults=a(a({},s.AbstractMmlTokenNode.defaults),{form:"infix",fence:!1,separator:!1,lspace:"thickmathspace",rspace:"thickmathspace",stretchy:!1,symmetric:!1,maxsize:"infinity",minsize:"0em",largeop:!1,movablelimits:!1,accent:!1,linebreak:"auto",lineleading:"1ex",linebreakstyle:"before",indentalign:"auto",indentshift:"0",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),c.MMLSPACING=d.MMLSPACING,c.OPTABLE=d.OPTABLE,c.pseudoScripts=new RegExp(["^[\"'*`","ª","°","²-´","¹","º","‘-‟","′-‷⁗","⁰ⁱ","⁴-ⁿ","₀-₎","]+$"].join("")),c.primes=new RegExp(["^[\"'`","‘-‟","]+$"].join("")),c.remapPrimes={34:8243,39:8242,96:8245,8216:8245,8217:8242,8218:8242,8219:8245,8220:8246,8221:8243,8222:8243,8223:8246},c.mathaccents=new RegExp(["^[","´́ˊ","`̀ˋ","¨̈","~̃˜","¯̄ˉ","˘̆","ˇ̌","^̂ˆ","→⃗","˙̇","˚̊","⃛","⃜","]$"].join("")),c);function c(){var t=null!==o&&o.apply(this,arguments)||this;return t._texClass=null,t.lspace=5/18,t.rspace=5/18,t}e.MmlMo=r},7238:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=(Object.defineProperty(e,"__esModule",{value:!0}),e.MmlInferredMrow=e.MmlMrow=void 0,r(9007)),r=(o=u.AbstractMmlNode,i(s,o),Object.defineProperty(s.prototype,"kind",{get:function(){return"mrow"},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isSpacelike",{get:function(){var t,e;try{for(var r=c(this.childNodes),n=r.next();!n.done;n=r.next())if(!n.value.isSpacelike)return!1}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isEmbellished",{get:function(){var t,e,r=!1,n=0;try{for(var o=c(this.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;if(a)if(a.isEmbellished){if(r)return!1;r=!0,this._core=n}else if(!a.isSpacelike)return!1;n++}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},enumerable:!1,configurable:!0}),s.prototype.core=function(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core]:this},s.prototype.coreMO=function(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core].coreMO():this},s.prototype.nonSpaceLength=function(){var t,e,r=0;try{for(var n=c(this.childNodes),o=n.next();!o.done;o=n.next()){var i=o.value;i&&!i.isSpacelike&&r++}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},s.prototype.firstNonSpace=function(){var t,e;try{for(var r=c(this.childNodes),n=r.next();!n.done;n=r.next()){var o=n.value;if(o&&!o.isSpacelike)return o}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return null},s.prototype.lastNonSpace=function(){for(var t=this.childNodes.length;0<=--t;){var e=this.childNodes[t];if(e&&!e.isSpacelike)return e}return null},s.prototype.setTeXclass=function(t){var e,r,n,o;if(null!=this.getProperty("open")||null!=this.getProperty("close")){this.getPrevClass(t),t=null;try{for(var i=c(this.childNodes),a=i.next();!a.done;a=i.next())t=a.value.setTeXclass(t)}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}null==this.texClass&&(this.texClass=u.TEXCLASS.INNER)}else{try{for(var s=c(this.childNodes),l=s.next();!l.done;l=s.next())t=l.value.setTeXclass(t)}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}this.childNodes[0]&&this.updateTeXclass(this.childNodes[0])}return t},s.defaults=a({},u.AbstractMmlNode.defaults),s);function s(){var t=null!==o&&o.apply(this,arguments)||this;return t._core=null,t}e.MmlMrow=r;i(p,l=r),Object.defineProperty(p.prototype,"kind",{get:function(){return"inferredMrow"},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isInferred",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"notParent",{get:function(){return!0},enumerable:!1,configurable:!0}),p.prototype.toString=function(){return"["+this.childNodes.join(",")+"]"},p.defaults=r.defaults;var l,i=p;function p(){return null!==l&&l.apply(this,arguments)||this}e.MmlInferredMrow=i},7265:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=(Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMtable=void 0,r(9007)),y=r(505),r=(c=u.AbstractMmlNode,o(a,c),Object.defineProperty(a.prototype,"kind",{get:function(){return"mtable"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),a.prototype.setInheritedAttributes=function(t,e,r,n){var o,i;try{for(var a=m(u.indentAttributes),s=a.next();!s.done;s=a.next()){var l=s.value;t[l]&&this.attributes.setInherited(l,t[l][1]),void 0!==this.attributes.getExplicit(l)&&delete this.attributes.getAllAttributes()[l]}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}c.prototype.setInheritedAttributes.call(this,t,e,r,n)},a.prototype.setChildInheritedAttributes=function(t,e,r,n){var o,i,a,s;try{for(var l=m(this.childNodes),c=l.next();!c.done;c=l.next())(f=c.value).isKind("mtr")||this.replaceChild(this.factory.create("mtr"),f).appendChild(f)}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}r=this.getProperty("scriptlevel")||r,e=!(!this.attributes.getExplicit("displaystyle")&&!this.attributes.getDefault("displaystyle")),t=this.addInheritedAttributes(t,{columnalign:this.attributes.get("columnalign"),rowalign:"center"});var u=this.attributes.getExplicit("data-cramped"),p=(0,y.split)(this.attributes.get("rowalign"));try{for(var h=m(this.childNodes),d=h.next();!d.done;d=h.next()){var f=d.value;t.rowalign[1]=p.shift()||t.rowalign[1],f.setInheritedAttributes(t,e,r,!!u)}}catch(t){a={error:t}}finally{try{d&&!d.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}},a.prototype.verifyChildren=function(t){for(var e=null,r=this.factory,n=0;n=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMlabeledtr=e.MmlMtr=void 0,r(9007)),l=r(91),m=r(505),r=(a=s.AbstractMmlNode,o(c,a),Object.defineProperty(c.prototype,"kind",{get:function(){return"mtr"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),c.prototype.setChildInheritedAttributes=function(t,e,r,n){var o,i,a,s;try{for(var l=f(this.childNodes),c=l.next();!c.done;c=l.next())(d=c.value).isKind("mtd")||this.replaceChild(this.factory.create("mtd"),d).appendChild(d)}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var u=(0,m.split)(this.attributes.get("columnalign"));1===this.arity&&u.unshift(this.parent.attributes.get("side")),t=this.addInheritedAttributes(t,{rowalign:this.attributes.get("rowalign"),columnalign:"center"});try{for(var p=f(this.childNodes),h=p.next();!h.done;h=p.next()){var d=h.value;t.columnalign[1]=u.shift()||t.columnalign[1],d.setInheritedAttributes(t,e,r,n)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}},c.prototype.verifyChildren=function(t){var e,r;if(!this.parent||this.parent.isKind("mtable")){try{for(var n=f(this.childNodes),o=n.next();!o.done;o=n.next()){var i=o.value;i.isKind("mtd")||(this.replaceChild(this.factory.create("mtd"),i).appendChild(i),t.fixMtables||i.mError("Children of "+this.kind+" must be mtd",t))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}a.prototype.verifyChildren.call(this,t)}else this.mError(this.kind+" can only be a child of an mtable",t,!0)},c.prototype.setTeXclass=function(t){var e,r;this.getPrevClass(t);try{for(var n=f(this.childNodes),o=n.next();!o.done;o=n.next())o.value.setTeXclass(null)}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},c.defaults=i(i({},s.AbstractMmlNode.defaults),{rowalign:l.INHERIT,columnalign:l.INHERIT,groupalign:l.INHERIT}),c);function c(){return null!==a&&a.apply(this,arguments)||this}e.MmlMtr=r;o(p,u=r),Object.defineProperty(p.prototype,"kind",{get:function(){return"mlabeledtr"},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"arity",{get:function(){return 1},enumerable:!1,configurable:!0});var u,s=p;function p(){return null!==u&&u.apply(this,arguments)||this}e.MmlMlabeledtr=s},5184:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=(Object.defineProperty(s,"__esModule",{value:!0}),s.OPTABLE=s.MMLSPACING=s.getRange=s.RANGES=s.MO=s.OPDEF=void 0,e(9007));function r(t,e,r,n){return[t,e,r=void 0===r?o.TEXCLASS.BIN:r,n=void 0===n?null:n]}s.OPDEF=r,s.MO={ORD:r(0,0,o.TEXCLASS.ORD),ORD11:r(1,1,o.TEXCLASS.ORD),ORD21:r(2,1,o.TEXCLASS.ORD),ORD02:r(0,2,o.TEXCLASS.ORD),ORD55:r(5,5,o.TEXCLASS.ORD),NONE:r(0,0,o.TEXCLASS.NONE),OP:r(1,2,o.TEXCLASS.OP,{largeop:!0,movablelimits:!0,symmetric:!0}),OPFIXED:r(1,2,o.TEXCLASS.OP,{largeop:!0,movablelimits:!0}),INTEGRAL:r(0,1,o.TEXCLASS.OP,{largeop:!0,symmetric:!0}),INTEGRAL2:r(1,2,o.TEXCLASS.OP,{largeop:!0,symmetric:!0}),BIN3:r(3,3,o.TEXCLASS.BIN),BIN4:r(4,4,o.TEXCLASS.BIN),BIN01:r(0,1,o.TEXCLASS.BIN),BIN5:r(5,5,o.TEXCLASS.BIN),TALLBIN:r(4,4,o.TEXCLASS.BIN,{stretchy:!0}),BINOP:r(4,4,o.TEXCLASS.BIN,{largeop:!0,movablelimits:!0}),REL:r(5,5,o.TEXCLASS.REL),REL1:r(1,1,o.TEXCLASS.REL,{stretchy:!0}),REL4:r(4,4,o.TEXCLASS.REL),RELSTRETCH:r(5,5,o.TEXCLASS.REL,{stretchy:!0}),RELACCENT:r(5,5,o.TEXCLASS.REL,{accent:!0}),WIDEREL:r(5,5,o.TEXCLASS.REL,{accent:!0,stretchy:!0}),OPEN:r(0,0,o.TEXCLASS.OPEN,{fence:!0,stretchy:!0,symmetric:!0}),CLOSE:r(0,0,o.TEXCLASS.CLOSE,{fence:!0,stretchy:!0,symmetric:!0}),INNER:r(0,0,o.TEXCLASS.INNER),PUNCT:r(0,3,o.TEXCLASS.PUNCT),ACCENT:r(0,0,o.TEXCLASS.ORD,{accent:!0}),WIDEACCENT:r(0,0,o.TEXCLASS.ORD,{accent:!0,stretchy:!0})},s.RANGES=[[32,127,o.TEXCLASS.REL,"mo"],[160,191,o.TEXCLASS.ORD,"mo"],[192,591,o.TEXCLASS.ORD,"mi"],[688,879,o.TEXCLASS.ORD,"mo"],[880,6688,o.TEXCLASS.ORD,"mi"],[6832,6911,o.TEXCLASS.ORD,"mo"],[6912,7615,o.TEXCLASS.ORD,"mi"],[7616,7679,o.TEXCLASS.ORD,"mo"],[7680,8191,o.TEXCLASS.ORD,"mi"],[8192,8303,o.TEXCLASS.ORD,"mo"],[8304,8351,o.TEXCLASS.ORD,"mo"],[8448,8527,o.TEXCLASS.ORD,"mi"],[8528,8591,o.TEXCLASS.ORD,"mn"],[8592,8703,o.TEXCLASS.REL,"mo"],[8704,8959,o.TEXCLASS.BIN,"mo"],[8960,9215,o.TEXCLASS.ORD,"mo"],[9312,9471,o.TEXCLASS.ORD,"mn"],[9472,10223,o.TEXCLASS.ORD,"mo"],[10224,10239,o.TEXCLASS.REL,"mo"],[10240,10495,o.TEXCLASS.ORD,"mtext"],[10496,10623,o.TEXCLASS.REL,"mo"],[10624,10751,o.TEXCLASS.ORD,"mo"],[10752,11007,o.TEXCLASS.BIN,"mo"],[11008,11055,o.TEXCLASS.ORD,"mo"],[11056,11087,o.TEXCLASS.REL,"mo"],[11088,11263,o.TEXCLASS.ORD,"mo"],[11264,11744,o.TEXCLASS.ORD,"mi"],[11776,11903,o.TEXCLASS.ORD,"mo"],[11904,12255,o.TEXCLASS.ORD,"mi","normal"],[12272,12351,o.TEXCLASS.ORD,"mo"],[12352,42143,o.TEXCLASS.ORD,"mi","normal"],[42192,43055,o.TEXCLASS.ORD,"mi"],[43056,43071,o.TEXCLASS.ORD,"mn"],[43072,55295,o.TEXCLASS.ORD,"mi"],[63744,64255,o.TEXCLASS.ORD,"mi","normal"],[64256,65023,o.TEXCLASS.ORD,"mi"],[65024,65135,o.TEXCLASS.ORD,"mo"],[65136,65791,o.TEXCLASS.ORD,"mi"],[65792,65935,o.TEXCLASS.ORD,"mn"],[65936,74751,o.TEXCLASS.ORD,"mi","normal"],[74752,74879,o.TEXCLASS.ORD,"mn"],[74880,113823,o.TEXCLASS.ORD,"mi","normal"],[113824,119391,o.TEXCLASS.ORD,"mo"],[119648,119679,o.TEXCLASS.ORD,"mn"],[119808,120781,o.TEXCLASS.ORD,"mi"],[120782,120831,o.TEXCLASS.ORD,"mn"],[122624,129023,o.TEXCLASS.ORD,"mo"],[129024,129279,o.TEXCLASS.REL,"mo"],[129280,129535,o.TEXCLASS.ORD,"mo"],[131072,195103,o.TEXCLASS.ORD,"mi","normnal"]],s.getRange=function(t){var e,r,n=t.codePointAt(0);try{for(var o=l(s.RANGES),i=o.next();!i.done;i=o.next()){var a=i.value;if(n<=a[1]){if(n>=a[0])return a;break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return null},s.MMLSPACING=[[0,0],[1,2],[3,3],[4,4],[0,0],[0,0],[0,3]],s.OPTABLE={prefix:{"(":s.MO.OPEN,"+":s.MO.BIN01,"-":s.MO.BIN01,"[":s.MO.OPEN,"{":s.MO.OPEN,"|":s.MO.OPEN,"||":[0,0,o.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,o.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"¬":s.MO.ORD21,"±":s.MO.BIN01,"‖":[0,0,o.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"‘":[0,0,o.TEXCLASS.OPEN,{fence:!0}],"“":[0,0,o.TEXCLASS.OPEN,{fence:!0}],"ⅅ":s.MO.ORD21,"ⅆ":r(2,0,o.TEXCLASS.ORD),"∀":s.MO.ORD21,"∂":s.MO.ORD21,"∃":s.MO.ORD21,"∄":s.MO.ORD21,"∇":s.MO.ORD21,"∏":s.MO.OP,"∐":s.MO.OP,"∑":s.MO.OP,"−":s.MO.BIN01,"∓":s.MO.BIN01,"√":[1,1,o.TEXCLASS.ORD,{stretchy:!0}],"∛":s.MO.ORD11,"∜":s.MO.ORD11,"∠":s.MO.ORD,"∡":s.MO.ORD,"∢":s.MO.ORD,"∫":s.MO.INTEGRAL,"∬":s.MO.INTEGRAL,"∭":s.MO.INTEGRAL,"∮":s.MO.INTEGRAL,"∯":s.MO.INTEGRAL,"∰":s.MO.INTEGRAL,"∱":s.MO.INTEGRAL,"∲":s.MO.INTEGRAL,"∳":s.MO.INTEGRAL,"⋀":s.MO.OP,"⋁":s.MO.OP,"⋂":s.MO.OP,"⋃":s.MO.OP,"⌈":s.MO.OPEN,"⌊":s.MO.OPEN,"〈":s.MO.OPEN,"❲":s.MO.OPEN,"⟦":s.MO.OPEN,"⟨":s.MO.OPEN,"⟪":s.MO.OPEN,"⟬":s.MO.OPEN,"⟮":s.MO.OPEN,"⦀":[0,0,o.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"⦃":s.MO.OPEN,"⦅":s.MO.OPEN,"⦇":s.MO.OPEN,"⦉":s.MO.OPEN,"⦋":s.MO.OPEN,"⦍":s.MO.OPEN,"⦏":s.MO.OPEN,"⦑":s.MO.OPEN,"⦓":s.MO.OPEN,"⦕":s.MO.OPEN,"⦗":s.MO.OPEN,"⧼":s.MO.OPEN,"⨀":s.MO.OP,"⨁":s.MO.OP,"⨂":s.MO.OP,"⨃":s.MO.OP,"⨄":s.MO.OP,"⨅":s.MO.OP,"⨆":s.MO.OP,"⨇":s.MO.OP,"⨈":s.MO.OP,"⨉":s.MO.OP,"⨊":s.MO.OP,"⨋":s.MO.INTEGRAL2,"⨌":s.MO.INTEGRAL,"⨍":s.MO.INTEGRAL2,"⨎":s.MO.INTEGRAL2,"⨏":s.MO.INTEGRAL2,"⨐":s.MO.OP,"⨑":s.MO.OP,"⨒":s.MO.OP,"⨓":s.MO.OP,"⨔":s.MO.OP,"⨕":s.MO.INTEGRAL2,"⨖":s.MO.INTEGRAL2,"⨗":s.MO.INTEGRAL2,"⨘":s.MO.INTEGRAL2,"⨙":s.MO.INTEGRAL2,"⨚":s.MO.INTEGRAL2,"⨛":s.MO.INTEGRAL2,"⨜":s.MO.INTEGRAL2,"⫼":s.MO.OP,"⫿":s.MO.OP},postfix:{"!!":r(1,0),"!":[1,0,o.TEXCLASS.CLOSE,null],'"':s.MO.ACCENT,"&":s.MO.ORD,")":s.MO.CLOSE,"++":r(0,0),"--":r(0,0),"..":r(0,0),"...":s.MO.ORD,"'":s.MO.ACCENT,"]":s.MO.CLOSE,"^":s.MO.WIDEACCENT,_:s.MO.WIDEACCENT,"`":s.MO.ACCENT,"|":s.MO.CLOSE,"}":s.MO.CLOSE,"~":s.MO.WIDEACCENT,"||":[0,0,o.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,o.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"¨":s.MO.ACCENT,"ª":s.MO.ACCENT,"¯":s.MO.WIDEACCENT,"°":s.MO.ORD,"²":s.MO.ACCENT,"³":s.MO.ACCENT,"´":s.MO.ACCENT,"¸":s.MO.ACCENT,"¹":s.MO.ACCENT,"º":s.MO.ACCENT,"ˆ":s.MO.WIDEACCENT,"ˇ":s.MO.WIDEACCENT,"ˉ":s.MO.WIDEACCENT,"ˊ":s.MO.ACCENT,"ˋ":s.MO.ACCENT,"ˍ":s.MO.WIDEACCENT,"˘":s.MO.ACCENT,"˙":s.MO.ACCENT,"˚":s.MO.ACCENT,"˜":s.MO.WIDEACCENT,"˝":s.MO.ACCENT,"˷":s.MO.WIDEACCENT,"̂":s.MO.WIDEACCENT,"̑":s.MO.ACCENT,"϶":s.MO.REL,"‖":[0,0,o.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"’":[0,0,o.TEXCLASS.CLOSE,{fence:!0}],"‚":s.MO.ACCENT,"‛":s.MO.ACCENT,"”":[0,0,o.TEXCLASS.CLOSE,{fence:!0}],"„":s.MO.ACCENT,"‟":s.MO.ACCENT,"′":s.MO.ORD,"″":s.MO.ACCENT,"‴":s.MO.ACCENT,"‵":s.MO.ACCENT,"‶":s.MO.ACCENT,"‷":s.MO.ACCENT,"‾":s.MO.WIDEACCENT,"⁗":s.MO.ACCENT,"⃛":s.MO.ACCENT,"⃜":s.MO.ACCENT,"⌉":s.MO.CLOSE,"⌋":s.MO.CLOSE,"〉":s.MO.CLOSE,"⎴":s.MO.WIDEACCENT,"⎵":s.MO.WIDEACCENT,"⏜":s.MO.WIDEACCENT,"⏝":s.MO.WIDEACCENT,"⏞":s.MO.WIDEACCENT,"⏟":s.MO.WIDEACCENT,"⏠":s.MO.WIDEACCENT,"⏡":s.MO.WIDEACCENT,"■":s.MO.BIN3,"□":s.MO.BIN3,"▪":s.MO.BIN3,"▫":s.MO.BIN3,"▭":s.MO.BIN3,"▮":s.MO.BIN3,"▯":s.MO.BIN3,"▰":s.MO.BIN3,"▱":s.MO.BIN3,"▲":s.MO.BIN4,"▴":s.MO.BIN4,"▶":s.MO.BIN4,"▷":s.MO.BIN4,"▸":s.MO.BIN4,"▼":s.MO.BIN4,"▾":s.MO.BIN4,"◀":s.MO.BIN4,"◁":s.MO.BIN4,"◂":s.MO.BIN4,"◄":s.MO.BIN4,"◅":s.MO.BIN4,"◆":s.MO.BIN4,"◇":s.MO.BIN4,"◈":s.MO.BIN4,"◉":s.MO.BIN4,"◌":s.MO.BIN4,"◍":s.MO.BIN4,"◎":s.MO.BIN4,"●":s.MO.BIN4,"◖":s.MO.BIN4,"◗":s.MO.BIN4,"◦":s.MO.BIN4,"♭":s.MO.ORD02,"♮":s.MO.ORD02,"♯":s.MO.ORD02,"❳":s.MO.CLOSE,"⟧":s.MO.CLOSE,"⟩":s.MO.CLOSE,"⟫":s.MO.CLOSE,"⟭":s.MO.CLOSE,"⟯":s.MO.CLOSE,"⦀":[0,0,o.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"⦄":s.MO.CLOSE,"⦆":s.MO.CLOSE,"⦈":s.MO.CLOSE,"⦊":s.MO.CLOSE,"⦌":s.MO.CLOSE,"⦎":s.MO.CLOSE,"⦐":s.MO.CLOSE,"⦒":s.MO.CLOSE,"⦔":s.MO.CLOSE,"⦖":s.MO.CLOSE,"⦘":s.MO.CLOSE,"⧽":s.MO.CLOSE},infix:{"!=":s.MO.BIN4,"#":s.MO.ORD,$:s.MO.ORD,"%":[3,3,o.TEXCLASS.ORD,null],"&&":s.MO.BIN4,"":s.MO.ORD,"*":s.MO.BIN3,"**":r(1,1),"*=":s.MO.BIN4,"+":s.MO.BIN4,"+=":s.MO.BIN4,",":[0,3,o.TEXCLASS.PUNCT,{linebreakstyle:"after",separator:!0}],"-":s.MO.BIN4,"-=":s.MO.BIN4,"->":s.MO.BIN5,".":[0,3,o.TEXCLASS.PUNCT,{separator:!0}],"/":s.MO.ORD11,"//":r(1,1),"/=":s.MO.BIN4,":":[1,2,o.TEXCLASS.REL,null],":=":s.MO.BIN4,";":[0,3,o.TEXCLASS.PUNCT,{linebreakstyle:"after",separator:!0}],"<":s.MO.REL,"<=":s.MO.BIN5,"<>":r(1,1),"=":s.MO.REL,"==":s.MO.BIN4,">":s.MO.REL,">=":s.MO.BIN5,"?":[1,1,o.TEXCLASS.CLOSE,null],"@":s.MO.ORD11,"\\":s.MO.ORD,"^":s.MO.ORD11,_:s.MO.ORD11,"|":[2,2,o.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"||":[2,2,o.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[2,2,o.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"±":s.MO.BIN4,"·":s.MO.BIN4,"×":s.MO.BIN4,"÷":s.MO.BIN4,"ʹ":s.MO.ORD,"̀":s.MO.ACCENT,"́":s.MO.ACCENT,"̃":s.MO.WIDEACCENT,"̄":s.MO.ACCENT,"̆":s.MO.ACCENT,"̇":s.MO.ACCENT,"̈":s.MO.ACCENT,"̌":s.MO.ACCENT,"̲":s.MO.WIDEACCENT,"̸":s.MO.REL4,"―":[0,0,o.TEXCLASS.ORD,{stretchy:!0}],"‗":[0,0,o.TEXCLASS.ORD,{stretchy:!0}],"†":s.MO.BIN3,"‡":s.MO.BIN3,"•":s.MO.BIN4,"…":s.MO.INNER,"⁃":s.MO.BIN4,"⁄":s.MO.TALLBIN,"⁡":s.MO.NONE,"⁢":s.MO.NONE,"⁣":[0,0,o.TEXCLASS.NONE,{linebreakstyle:"after",separator:!0}],"⁤":s.MO.NONE,"⃗":s.MO.ACCENT,"ℑ":s.MO.ORD,"ℓ":s.MO.ORD,"℘":s.MO.ORD,"ℜ":s.MO.ORD,"←":s.MO.WIDEREL,"↑":s.MO.RELSTRETCH,"→":s.MO.WIDEREL,"↓":s.MO.RELSTRETCH,"↔":s.MO.WIDEREL,"↕":s.MO.RELSTRETCH,"↖":s.MO.RELSTRETCH,"↗":s.MO.RELSTRETCH,"↘":s.MO.RELSTRETCH,"↙":s.MO.RELSTRETCH,"↚":s.MO.RELACCENT,"↛":s.MO.RELACCENT,"↜":s.MO.WIDEREL,"↝":s.MO.WIDEREL,"↞":s.MO.WIDEREL,"↟":s.MO.WIDEREL,"↠":s.MO.WIDEREL,"↡":s.MO.RELSTRETCH,"↢":s.MO.WIDEREL,"↣":s.MO.WIDEREL,"↤":s.MO.WIDEREL,"↥":s.MO.RELSTRETCH,"↦":s.MO.WIDEREL,"↧":s.MO.RELSTRETCH,"↨":s.MO.RELSTRETCH,"↩":s.MO.WIDEREL,"↪":s.MO.WIDEREL,"↫":s.MO.WIDEREL,"↬":s.MO.WIDEREL,"↭":s.MO.WIDEREL,"↮":s.MO.RELACCENT,"↯":s.MO.RELSTRETCH,"↰":s.MO.RELSTRETCH,"↱":s.MO.RELSTRETCH,"↲":s.MO.RELSTRETCH,"↳":s.MO.RELSTRETCH,"↴":s.MO.RELSTRETCH,"↵":s.MO.RELSTRETCH,"↶":s.MO.RELACCENT,"↷":s.MO.RELACCENT,"↸":s.MO.REL,"↹":s.MO.WIDEREL,"↺":s.MO.REL,"↻":s.MO.REL,"↼":s.MO.WIDEREL,"↽":s.MO.WIDEREL,"↾":s.MO.RELSTRETCH,"↿":s.MO.RELSTRETCH,"⇀":s.MO.WIDEREL,"⇁":s.MO.WIDEREL,"⇂":s.MO.RELSTRETCH,"⇃":s.MO.RELSTRETCH,"⇄":s.MO.WIDEREL,"⇅":s.MO.RELSTRETCH,"⇆":s.MO.WIDEREL,"⇇":s.MO.WIDEREL,"⇈":s.MO.RELSTRETCH,"⇉":s.MO.WIDEREL,"⇊":s.MO.RELSTRETCH,"⇋":s.MO.WIDEREL,"⇌":s.MO.WIDEREL,"⇍":s.MO.RELACCENT,"⇎":s.MO.RELACCENT,"⇏":s.MO.RELACCENT,"⇐":s.MO.WIDEREL,"⇑":s.MO.RELSTRETCH,"⇒":s.MO.WIDEREL,"⇓":s.MO.RELSTRETCH,"⇔":s.MO.WIDEREL,"⇕":s.MO.RELSTRETCH,"⇖":s.MO.RELSTRETCH,"⇗":s.MO.RELSTRETCH,"⇘":s.MO.RELSTRETCH,"⇙":s.MO.RELSTRETCH,"⇚":s.MO.WIDEREL,"⇛":s.MO.WIDEREL,"⇜":s.MO.WIDEREL,"⇝":s.MO.WIDEREL,"⇞":s.MO.REL,"⇟":s.MO.REL,"⇠":s.MO.WIDEREL,"⇡":s.MO.RELSTRETCH,"⇢":s.MO.WIDEREL,"⇣":s.MO.RELSTRETCH,"⇤":s.MO.WIDEREL,"⇥":s.MO.WIDEREL,"⇦":s.MO.WIDEREL,"⇧":s.MO.RELSTRETCH,"⇨":s.MO.WIDEREL,"⇩":s.MO.RELSTRETCH,"⇪":s.MO.RELSTRETCH,"⇫":s.MO.RELSTRETCH,"⇬":s.MO.RELSTRETCH,"⇭":s.MO.RELSTRETCH,"⇮":s.MO.RELSTRETCH,"⇯":s.MO.RELSTRETCH,"⇰":s.MO.WIDEREL,"⇱":s.MO.REL,"⇲":s.MO.REL,"⇳":s.MO.RELSTRETCH,"⇴":s.MO.RELACCENT,"⇵":s.MO.RELSTRETCH,"⇶":s.MO.WIDEREL,"⇷":s.MO.RELACCENT,"⇸":s.MO.RELACCENT,"⇹":s.MO.RELACCENT,"⇺":s.MO.RELACCENT,"⇻":s.MO.RELACCENT,"⇼":s.MO.RELACCENT,"⇽":s.MO.WIDEREL,"⇾":s.MO.WIDEREL,"⇿":s.MO.WIDEREL,"∁":r(1,2,o.TEXCLASS.ORD),"∅":s.MO.ORD,"∆":s.MO.BIN3,"∈":s.MO.REL,"∉":s.MO.REL,"∊":s.MO.REL,"∋":s.MO.REL,"∌":s.MO.REL,"∍":s.MO.REL,"∎":s.MO.BIN3,"−":s.MO.BIN4,"∓":s.MO.BIN4,"∔":s.MO.BIN4,"∕":s.MO.TALLBIN,"∖":s.MO.BIN4,"∗":s.MO.BIN4,"∘":s.MO.BIN4,"∙":s.MO.BIN4,"∝":s.MO.REL,"∞":s.MO.ORD,"∟":s.MO.REL,"∣":s.MO.REL,"∤":s.MO.REL,"∥":s.MO.REL,"∦":s.MO.REL,"∧":s.MO.BIN4,"∨":s.MO.BIN4,"∩":s.MO.BIN4,"∪":s.MO.BIN4,"∴":s.MO.REL,"∵":s.MO.REL,"∶":s.MO.REL,"∷":s.MO.REL,"∸":s.MO.BIN4,"∹":s.MO.REL,"∺":s.MO.BIN4,"∻":s.MO.REL,"∼":s.MO.REL,"∽":s.MO.REL,"∽̱":s.MO.BIN3,"∾":s.MO.REL,"∿":s.MO.BIN3,"≀":s.MO.BIN4,"≁":s.MO.REL,"≂":s.MO.REL,"≂̸":s.MO.REL,"≃":s.MO.REL,"≄":s.MO.REL,"≅":s.MO.REL,"≆":s.MO.REL,"≇":s.MO.REL,"≈":s.MO.REL,"≉":s.MO.REL,"≊":s.MO.REL,"≋":s.MO.REL,"≌":s.MO.REL,"≍":s.MO.REL,"≎":s.MO.REL,"≎̸":s.MO.REL,"≏":s.MO.REL,"≏̸":s.MO.REL,"≐":s.MO.REL,"≑":s.MO.REL,"≒":s.MO.REL,"≓":s.MO.REL,"≔":s.MO.REL,"≕":s.MO.REL,"≖":s.MO.REL,"≗":s.MO.REL,"≘":s.MO.REL,"≙":s.MO.REL,"≚":s.MO.REL,"≛":s.MO.REL,"≜":s.MO.REL,"≝":s.MO.REL,"≞":s.MO.REL,"≟":s.MO.REL,"≠":s.MO.REL,"≡":s.MO.REL,"≢":s.MO.REL,"≣":s.MO.REL,"≤":s.MO.REL,"≥":s.MO.REL,"≦":s.MO.REL,"≦̸":s.MO.REL,"≧":s.MO.REL,"≨":s.MO.REL,"≩":s.MO.REL,"≪":s.MO.REL,"≪̸":s.MO.REL,"≫":s.MO.REL,"≫̸":s.MO.REL,"≬":s.MO.REL,"≭":s.MO.REL,"≮":s.MO.REL,"≯":s.MO.REL,"≰":s.MO.REL,"≱":s.MO.REL,"≲":s.MO.REL,"≳":s.MO.REL,"≴":s.MO.REL,"≵":s.MO.REL,"≶":s.MO.REL,"≷":s.MO.REL,"≸":s.MO.REL,"≹":s.MO.REL,"≺":s.MO.REL,"≻":s.MO.REL,"≼":s.MO.REL,"≽":s.MO.REL,"≾":s.MO.REL,"≿":s.MO.REL,"≿̸":s.MO.REL,"⊀":s.MO.REL,"⊁":s.MO.REL,"⊂":s.MO.REL,"⊂⃒":s.MO.REL,"⊃":s.MO.REL,"⊃⃒":s.MO.REL,"⊄":s.MO.REL,"⊅":s.MO.REL,"⊆":s.MO.REL,"⊇":s.MO.REL,"⊈":s.MO.REL,"⊉":s.MO.REL,"⊊":s.MO.REL,"⊋":s.MO.REL,"⊌":s.MO.BIN4,"⊍":s.MO.BIN4,"⊎":s.MO.BIN4,"⊏":s.MO.REL,"⊏̸":s.MO.REL,"⊐":s.MO.REL,"⊐̸":s.MO.REL,"⊑":s.MO.REL,"⊒":s.MO.REL,"⊓":s.MO.BIN4,"⊔":s.MO.BIN4,"⊕":s.MO.BIN4,"⊖":s.MO.BIN4,"⊗":s.MO.BIN4,"⊘":s.MO.BIN4,"⊙":s.MO.BIN4,"⊚":s.MO.BIN4,"⊛":s.MO.BIN4,"⊜":s.MO.BIN4,"⊝":s.MO.BIN4,"⊞":s.MO.BIN4,"⊟":s.MO.BIN4,"⊠":s.MO.BIN4,"⊡":s.MO.BIN4,"⊢":s.MO.REL,"⊣":s.MO.REL,"⊤":s.MO.ORD55,"⊥":s.MO.REL,"⊦":s.MO.REL,"⊧":s.MO.REL,"⊨":s.MO.REL,"⊩":s.MO.REL,"⊪":s.MO.REL,"⊫":s.MO.REL,"⊬":s.MO.REL,"⊭":s.MO.REL,"⊮":s.MO.REL,"⊯":s.MO.REL,"⊰":s.MO.REL,"⊱":s.MO.REL,"⊲":s.MO.REL,"⊳":s.MO.REL,"⊴":s.MO.REL,"⊵":s.MO.REL,"⊶":s.MO.REL,"⊷":s.MO.REL,"⊸":s.MO.REL,"⊹":s.MO.REL,"⊺":s.MO.BIN4,"⊻":s.MO.BIN4,"⊼":s.MO.BIN4,"⊽":s.MO.BIN4,"⊾":s.MO.BIN3,"⊿":s.MO.BIN3,"⋄":s.MO.BIN4,"⋅":s.MO.BIN4,"⋆":s.MO.BIN4,"⋇":s.MO.BIN4,"⋈":s.MO.REL,"⋉":s.MO.BIN4,"⋊":s.MO.BIN4,"⋋":s.MO.BIN4,"⋌":s.MO.BIN4,"⋍":s.MO.REL,"⋎":s.MO.BIN4,"⋏":s.MO.BIN4,"⋐":s.MO.REL,"⋑":s.MO.REL,"⋒":s.MO.BIN4,"⋓":s.MO.BIN4,"⋔":s.MO.REL,"⋕":s.MO.REL,"⋖":s.MO.REL,"⋗":s.MO.REL,"⋘":s.MO.REL,"⋙":s.MO.REL,"⋚":s.MO.REL,"⋛":s.MO.REL,"⋜":s.MO.REL,"⋝":s.MO.REL,"⋞":s.MO.REL,"⋟":s.MO.REL,"⋠":s.MO.REL,"⋡":s.MO.REL,"⋢":s.MO.REL,"⋣":s.MO.REL,"⋤":s.MO.REL,"⋥":s.MO.REL,"⋦":s.MO.REL,"⋧":s.MO.REL,"⋨":s.MO.REL,"⋩":s.MO.REL,"⋪":s.MO.REL,"⋫":s.MO.REL,"⋬":s.MO.REL,"⋭":s.MO.REL,"⋮":s.MO.ORD55,"⋯":s.MO.INNER,"⋰":s.MO.REL,"⋱":[5,5,o.TEXCLASS.INNER,null],"⋲":s.MO.REL,"⋳":s.MO.REL,"⋴":s.MO.REL,"⋵":s.MO.REL,"⋶":s.MO.REL,"⋷":s.MO.REL,"⋸":s.MO.REL,"⋹":s.MO.REL,"⋺":s.MO.REL,"⋻":s.MO.REL,"⋼":s.MO.REL,"⋽":s.MO.REL,"⋾":s.MO.REL,"⋿":s.MO.REL,"⌅":s.MO.BIN3,"⌆":s.MO.BIN3,"⌢":s.MO.REL4,"⌣":s.MO.REL4,"〈":s.MO.OPEN,"〉":s.MO.CLOSE,"⎪":s.MO.ORD,"⎯":[0,0,o.TEXCLASS.ORD,{stretchy:!0}],"⎰":s.MO.OPEN,"⎱":s.MO.CLOSE,"─":s.MO.ORD,"△":s.MO.BIN4,"▵":s.MO.BIN4,"▹":s.MO.BIN4,"▽":s.MO.BIN4,"▿":s.MO.BIN4,"◃":s.MO.BIN4,"◯":s.MO.BIN3,"♠":s.MO.ORD,"♡":s.MO.ORD,"♢":s.MO.ORD,"♣":s.MO.ORD,"❘":s.MO.REL,"⟰":s.MO.RELSTRETCH,"⟱":s.MO.RELSTRETCH,"⟵":s.MO.WIDEREL,"⟶":s.MO.WIDEREL,"⟷":s.MO.WIDEREL,"⟸":s.MO.WIDEREL,"⟹":s.MO.WIDEREL,"⟺":s.MO.WIDEREL,"⟻":s.MO.WIDEREL,"⟼":s.MO.WIDEREL,"⟽":s.MO.WIDEREL,"⟾":s.MO.WIDEREL,"⟿":s.MO.WIDEREL,"⤀":s.MO.RELACCENT,"⤁":s.MO.RELACCENT,"⤂":s.MO.RELACCENT,"⤃":s.MO.RELACCENT,"⤄":s.MO.RELACCENT,"⤅":s.MO.RELACCENT,"⤆":s.MO.RELACCENT,"⤇":s.MO.RELACCENT,"⤈":s.MO.REL,"⤉":s.MO.REL,"⤊":s.MO.RELSTRETCH,"⤋":s.MO.RELSTRETCH,"⤌":s.MO.WIDEREL,"⤍":s.MO.WIDEREL,"⤎":s.MO.WIDEREL,"⤏":s.MO.WIDEREL,"⤐":s.MO.WIDEREL,"⤑":s.MO.RELACCENT,"⤒":s.MO.RELSTRETCH,"⤓":s.MO.RELSTRETCH,"⤔":s.MO.RELACCENT,"⤕":s.MO.RELACCENT,"⤖":s.MO.RELACCENT,"⤗":s.MO.RELACCENT,"⤘":s.MO.RELACCENT,"⤙":s.MO.RELACCENT,"⤚":s.MO.RELACCENT,"⤛":s.MO.RELACCENT,"⤜":s.MO.RELACCENT,"⤝":s.MO.RELACCENT,"⤞":s.MO.RELACCENT,"⤟":s.MO.RELACCENT,"⤠":s.MO.RELACCENT,"⤡":s.MO.RELSTRETCH,"⤢":s.MO.RELSTRETCH,"⤣":s.MO.REL,"⤤":s.MO.REL,"⤥":s.MO.REL,"⤦":s.MO.REL,"⤧":s.MO.REL,"⤨":s.MO.REL,"⤩":s.MO.REL,"⤪":s.MO.REL,"⤫":s.MO.REL,"⤬":s.MO.REL,"⤭":s.MO.REL,"⤮":s.MO.REL,"⤯":s.MO.REL,"⤰":s.MO.REL,"⤱":s.MO.REL,"⤲":s.MO.REL,"⤳":s.MO.RELACCENT,"⤴":s.MO.REL,"⤵":s.MO.REL,"⤶":s.MO.REL,"⤷":s.MO.REL,"⤸":s.MO.REL,"⤹":s.MO.REL,"⤺":s.MO.RELACCENT,"⤻":s.MO.RELACCENT,"⤼":s.MO.RELACCENT,"⤽":s.MO.RELACCENT,"⤾":s.MO.REL,"⤿":s.MO.REL,"⥀":s.MO.REL,"⥁":s.MO.REL,"⥂":s.MO.RELACCENT,"⥃":s.MO.RELACCENT,"⥄":s.MO.RELACCENT,"⥅":s.MO.RELACCENT,"⥆":s.MO.RELACCENT,"⥇":s.MO.RELACCENT,"⥈":s.MO.RELACCENT,"⥉":s.MO.REL,"⥊":s.MO.RELACCENT,"⥋":s.MO.RELACCENT,"⥌":s.MO.REL,"⥍":s.MO.REL,"⥎":s.MO.WIDEREL,"⥏":s.MO.RELSTRETCH,"⥐":s.MO.WIDEREL,"⥑":s.MO.RELSTRETCH,"⥒":s.MO.WIDEREL,"⥓":s.MO.WIDEREL,"⥔":s.MO.RELSTRETCH,"⥕":s.MO.RELSTRETCH,"⥖":s.MO.RELSTRETCH,"⥗":s.MO.RELSTRETCH,"⥘":s.MO.RELSTRETCH,"⥙":s.MO.RELSTRETCH,"⥚":s.MO.WIDEREL,"⥛":s.MO.WIDEREL,"⥜":s.MO.RELSTRETCH,"⥝":s.MO.RELSTRETCH,"⥞":s.MO.WIDEREL,"⥟":s.MO.WIDEREL,"⥠":s.MO.RELSTRETCH,"⥡":s.MO.RELSTRETCH,"⥢":s.MO.RELACCENT,"⥣":s.MO.REL,"⥤":s.MO.RELACCENT,"⥥":s.MO.REL,"⥦":s.MO.RELACCENT,"⥧":s.MO.RELACCENT,"⥨":s.MO.RELACCENT,"⥩":s.MO.RELACCENT,"⥪":s.MO.RELACCENT,"⥫":s.MO.RELACCENT,"⥬":s.MO.RELACCENT,"⥭":s.MO.RELACCENT,"⥮":s.MO.RELSTRETCH,"⥯":s.MO.RELSTRETCH,"⥰":s.MO.RELACCENT,"⥱":s.MO.RELACCENT,"⥲":s.MO.RELACCENT,"⥳":s.MO.RELACCENT,"⥴":s.MO.RELACCENT,"⥵":s.MO.RELACCENT,"⥶":s.MO.RELACCENT,"⥷":s.MO.RELACCENT,"⥸":s.MO.RELACCENT,"⥹":s.MO.RELACCENT,"⥺":s.MO.RELACCENT,"⥻":s.MO.RELACCENT,"⥼":s.MO.RELACCENT,"⥽":s.MO.RELACCENT,"⥾":s.MO.REL,"⥿":s.MO.REL,"⦁":s.MO.BIN3,"⦂":s.MO.BIN3,"⦙":s.MO.BIN3,"⦚":s.MO.BIN3,"⦛":s.MO.BIN3,"⦜":s.MO.BIN3,"⦝":s.MO.BIN3,"⦞":s.MO.BIN3,"⦟":s.MO.BIN3,"⦠":s.MO.BIN3,"⦡":s.MO.BIN3,"⦢":s.MO.BIN3,"⦣":s.MO.BIN3,"⦤":s.MO.BIN3,"⦥":s.MO.BIN3,"⦦":s.MO.BIN3,"⦧":s.MO.BIN3,"⦨":s.MO.BIN3,"⦩":s.MO.BIN3,"⦪":s.MO.BIN3,"⦫":s.MO.BIN3,"⦬":s.MO.BIN3,"⦭":s.MO.BIN3,"⦮":s.MO.BIN3,"⦯":s.MO.BIN3,"⦰":s.MO.BIN3,"⦱":s.MO.BIN3,"⦲":s.MO.BIN3,"⦳":s.MO.BIN3,"⦴":s.MO.BIN3,"⦵":s.MO.BIN3,"⦶":s.MO.BIN4,"⦷":s.MO.BIN4,"⦸":s.MO.BIN4,"⦹":s.MO.BIN4,"⦺":s.MO.BIN4,"⦻":s.MO.BIN4,"⦼":s.MO.BIN4,"⦽":s.MO.BIN4,"⦾":s.MO.BIN4,"⦿":s.MO.BIN4,"⧀":s.MO.REL,"⧁":s.MO.REL,"⧂":s.MO.BIN3,"⧃":s.MO.BIN3,"⧄":s.MO.BIN4,"⧅":s.MO.BIN4,"⧆":s.MO.BIN4,"⧇":s.MO.BIN4,"⧈":s.MO.BIN4,"⧉":s.MO.BIN3,"⧊":s.MO.BIN3,"⧋":s.MO.BIN3,"⧌":s.MO.BIN3,"⧍":s.MO.BIN3,"⧎":s.MO.REL,"⧏":s.MO.REL,"⧏̸":s.MO.REL,"⧐":s.MO.REL,"⧐̸":s.MO.REL,"⧑":s.MO.REL,"⧒":s.MO.REL,"⧓":s.MO.REL,"⧔":s.MO.REL,"⧕":s.MO.REL,"⧖":s.MO.BIN4,"⧗":s.MO.BIN4,"⧘":s.MO.BIN3,"⧙":s.MO.BIN3,"⧛":s.MO.BIN3,"⧜":s.MO.BIN3,"⧝":s.MO.BIN3,"⧞":s.MO.REL,"⧟":s.MO.BIN3,"⧠":s.MO.BIN3,"⧡":s.MO.REL,"⧢":s.MO.BIN4,"⧣":s.MO.REL,"⧤":s.MO.REL,"⧥":s.MO.REL,"⧦":s.MO.REL,"⧧":s.MO.BIN3,"⧨":s.MO.BIN3,"⧩":s.MO.BIN3,"⧪":s.MO.BIN3,"⧫":s.MO.BIN3,"⧬":s.MO.BIN3,"⧭":s.MO.BIN3,"⧮":s.MO.BIN3,"⧯":s.MO.BIN3,"⧰":s.MO.BIN3,"⧱":s.MO.BIN3,"⧲":s.MO.BIN3,"⧳":s.MO.BIN3,"⧴":s.MO.REL,"⧵":s.MO.BIN4,"⧶":s.MO.BIN4,"⧷":s.MO.BIN4,"⧸":s.MO.BIN3,"⧹":s.MO.BIN3,"⧺":s.MO.BIN3,"⧻":s.MO.BIN3,"⧾":s.MO.BIN4,"⧿":s.MO.BIN4,"⨝":s.MO.BIN3,"⨞":s.MO.BIN3,"⨟":s.MO.BIN3,"⨠":s.MO.BIN3,"⨡":s.MO.BIN3,"⨢":s.MO.BIN4,"⨣":s.MO.BIN4,"⨤":s.MO.BIN4,"⨥":s.MO.BIN4,"⨦":s.MO.BIN4,"⨧":s.MO.BIN4,"⨨":s.MO.BIN4,"⨩":s.MO.BIN4,"⨪":s.MO.BIN4,"⨫":s.MO.BIN4,"⨬":s.MO.BIN4,"⨭":s.MO.BIN4,"⨮":s.MO.BIN4,"⨯":s.MO.BIN4,"⨰":s.MO.BIN4,"⨱":s.MO.BIN4,"⨲":s.MO.BIN4,"⨳":s.MO.BIN4,"⨴":s.MO.BIN4,"⨵":s.MO.BIN4,"⨶":s.MO.BIN4,"⨷":s.MO.BIN4,"⨸":s.MO.BIN4,"⨹":s.MO.BIN4,"⨺":s.MO.BIN4,"⨻":s.MO.BIN4,"⨼":s.MO.BIN4,"⨽":s.MO.BIN4,"⨾":s.MO.BIN4,"⨿":s.MO.BIN4,"⩀":s.MO.BIN4,"⩁":s.MO.BIN4,"⩂":s.MO.BIN4,"⩃":s.MO.BIN4,"⩄":s.MO.BIN4,"⩅":s.MO.BIN4,"⩆":s.MO.BIN4,"⩇":s.MO.BIN4,"⩈":s.MO.BIN4,"⩉":s.MO.BIN4,"⩊":s.MO.BIN4,"⩋":s.MO.BIN4,"⩌":s.MO.BIN4,"⩍":s.MO.BIN4,"⩎":s.MO.BIN4,"⩏":s.MO.BIN4,"⩐":s.MO.BIN4,"⩑":s.MO.BIN4,"⩒":s.MO.BIN4,"⩓":s.MO.BIN4,"⩔":s.MO.BIN4,"⩕":s.MO.BIN4,"⩖":s.MO.BIN4,"⩗":s.MO.BIN4,"⩘":s.MO.BIN4,"⩙":s.MO.REL,"⩚":s.MO.BIN4,"⩛":s.MO.BIN4,"⩜":s.MO.BIN4,"⩝":s.MO.BIN4,"⩞":s.MO.BIN4,"⩟":s.MO.BIN4,"⩠":s.MO.BIN4,"⩡":s.MO.BIN4,"⩢":s.MO.BIN4,"⩣":s.MO.BIN4,"⩤":s.MO.BIN4,"⩥":s.MO.BIN4,"⩦":s.MO.REL,"⩧":s.MO.REL,"⩨":s.MO.REL,"⩩":s.MO.REL,"⩪":s.MO.REL,"⩫":s.MO.REL,"⩬":s.MO.REL,"⩭":s.MO.REL,"⩮":s.MO.REL,"⩯":s.MO.REL,"⩰":s.MO.REL,"⩱":s.MO.BIN4,"⩲":s.MO.BIN4,"⩳":s.MO.REL,"⩴":s.MO.REL,"⩵":s.MO.REL,"⩶":s.MO.REL,"⩷":s.MO.REL,"⩸":s.MO.REL,"⩹":s.MO.REL,"⩺":s.MO.REL,"⩻":s.MO.REL,"⩼":s.MO.REL,"⩽":s.MO.REL,"⩽̸":s.MO.REL,"⩾":s.MO.REL,"⩾̸":s.MO.REL,"⩿":s.MO.REL,"⪀":s.MO.REL,"⪁":s.MO.REL,"⪂":s.MO.REL,"⪃":s.MO.REL,"⪄":s.MO.REL,"⪅":s.MO.REL,"⪆":s.MO.REL,"⪇":s.MO.REL,"⪈":s.MO.REL,"⪉":s.MO.REL,"⪊":s.MO.REL,"⪋":s.MO.REL,"⪌":s.MO.REL,"⪍":s.MO.REL,"⪎":s.MO.REL,"⪏":s.MO.REL,"⪐":s.MO.REL,"⪑":s.MO.REL,"⪒":s.MO.REL,"⪓":s.MO.REL,"⪔":s.MO.REL,"⪕":s.MO.REL,"⪖":s.MO.REL,"⪗":s.MO.REL,"⪘":s.MO.REL,"⪙":s.MO.REL,"⪚":s.MO.REL,"⪛":s.MO.REL,"⪜":s.MO.REL,"⪝":s.MO.REL,"⪞":s.MO.REL,"⪟":s.MO.REL,"⪠":s.MO.REL,"⪡":s.MO.REL,"⪡̸":s.MO.REL,"⪢":s.MO.REL,"⪢̸":s.MO.REL,"⪣":s.MO.REL,"⪤":s.MO.REL,"⪥":s.MO.REL,"⪦":s.MO.REL,"⪧":s.MO.REL,"⪨":s.MO.REL,"⪩":s.MO.REL,"⪪":s.MO.REL,"⪫":s.MO.REL,"⪬":s.MO.REL,"⪭":s.MO.REL,"⪮":s.MO.REL,"⪯":s.MO.REL,"⪯̸":s.MO.REL,"⪰":s.MO.REL,"⪰̸":s.MO.REL,"⪱":s.MO.REL,"⪲":s.MO.REL,"⪳":s.MO.REL,"⪴":s.MO.REL,"⪵":s.MO.REL,"⪶":s.MO.REL,"⪷":s.MO.REL,"⪸":s.MO.REL,"⪹":s.MO.REL,"⪺":s.MO.REL,"⪻":s.MO.REL,"⪼":s.MO.REL,"⪽":s.MO.REL,"⪾":s.MO.REL,"⪿":s.MO.REL,"⫀":s.MO.REL,"⫁":s.MO.REL,"⫂":s.MO.REL,"⫃":s.MO.REL,"⫄":s.MO.REL,"⫅":s.MO.REL,"⫆":s.MO.REL,"⫇":s.MO.REL,"⫈":s.MO.REL,"⫉":s.MO.REL,"⫊":s.MO.REL,"⫋":s.MO.REL,"⫌":s.MO.REL,"⫍":s.MO.REL,"⫎":s.MO.REL,"⫏":s.MO.REL,"⫐":s.MO.REL,"⫑":s.MO.REL,"⫒":s.MO.REL,"⫓":s.MO.REL,"⫔":s.MO.REL,"⫕":s.MO.REL,"⫖":s.MO.REL,"⫗":s.MO.REL,"⫘":s.MO.REL,"⫙":s.MO.REL,"⫚":s.MO.REL,"⫛":s.MO.REL,"⫝":s.MO.REL,"⫝̸":s.MO.REL,"⫞":s.MO.REL,"⫟":s.MO.REL,"⫠":s.MO.REL,"⫡":s.MO.REL,"⫢":s.MO.REL,"⫣":s.MO.REL,"⫤":s.MO.REL,"⫥":s.MO.REL,"⫦":s.MO.REL,"⫧":s.MO.REL,"⫨":s.MO.REL,"⫩":s.MO.REL,"⫪":s.MO.REL,"⫫":s.MO.REL,"⫬":s.MO.REL,"⫭":s.MO.REL,"⫮":s.MO.REL,"⫯":s.MO.REL,"⫰":s.MO.REL,"⫱":s.MO.REL,"⫲":s.MO.REL,"⫳":s.MO.REL,"⫴":s.MO.BIN4,"⫵":s.MO.BIN4,"⫶":s.MO.BIN4,"⫷":s.MO.REL,"⫸":s.MO.REL,"⫹":s.MO.REL,"⫺":s.MO.REL,"⫻":s.MO.BIN4,"⫽":s.MO.BIN4,"⫾":s.MO.BIN3,"⭅":s.MO.RELSTRETCH,"⭆":s.MO.RELSTRETCH,"〈":s.MO.OPEN,"〉":s.MO.CLOSE,"︷":s.MO.WIDEACCENT,"︸":s.MO.WIDEACCENT}},s.OPTABLE.infix["^"]=s.MO.WIDEREL,s.OPTABLE.infix._=s.MO.WIDEREL,s.OPTABLE.infix["⫝̸"]=s.MO.REL},9259:function(t,n,e){var o,r,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0"+(r.match(/\S/)?"\n"+r+e:"")+""},p.prototype.visitAnnotationNode=function(t,e){return e+""+this.childNodeMml(t,"","")+""},p.prototype.visitDefault=function(t,e){var r=t.kind,n=a(t.isToken||0===t.childNodes.length?["",""]:["\n",e],2),o=n[0],n=n[1],i=this.childNodeMml(t,e+" ",o);return e+"<"+r+this.getAttributes(t)+">"+(i.match(/\S/)?o+i+n:"")+""},p.prototype.childNodeMml=function(t,e,r){var n,o,i="";try{for(var a=u(t.childNodes),s=a.next();!s.done;s=a.next()){var l=s.value;i+=this.visitNode(l,e)+r}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i},p.prototype.getAttributes=function(t){var e,r,n=[],o=this.constructor.defaultAttributes[t.kind]||{},i=Object.assign({},o,this.getDataAttributes(t),t.attributes.getAllAttributes()),o=this.constructor.variants;i.hasOwnProperty("mathvariant")&&o.hasOwnProperty(i.mathvariant)&&(i.mathvariant=o[i.mathvariant]);try{for(var a=u(Object.keys(i)),s=a.next();!s.done;s=a.next()){var l=s.value,c=String(i[l]);void 0!==c&&n.push(l+'="'+this.quoteHTML(c)+'"')}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n.length?" "+n.join(" "):""},p.prototype.getDataAttributes=function(t){var e,r={},n=t.attributes.getExplicit("mathvariant"),o=this.constructor.variants,o=(n&&o.hasOwnProperty(n)&&this.setDataAttribute(r,"variant",n),t.getProperty("variantForm")&&this.setDataAttribute(r,"alternate","1"),t.getProperty("pseudoscript")&&this.setDataAttribute(r,"pseudoscript","true"),!1===t.getProperty("autoOP")&&this.setDataAttribute(r,"auto-op","false"),t.getProperty("scriptalign")),n=(o&&this.setDataAttribute(r,"script-align",o),t.getProperty("texClass"));return void 0!==n&&(o=!0,(o=n===l.TEXCLASS.OP&&t.isKind("mi")?!(1<(e=t.getText()).length&&e.match(c.MmlMi.operatorName)):o)&&this.setDataAttribute(r,"texclass",n<0?"NONE":l.TEXCLASSNAMES[n])),t.getProperty("scriptlevel")&&!1===t.getProperty("useHeight")&&this.setDataAttribute(r,"smallmatrix","true"),r},p.prototype.setDataAttribute=function(t,e,r){t[n.DATAMJX+e]=r},p.prototype.quoteHTML=function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""").replace(/[\uD800-\uDBFF]./g,n.toEntity).replace(/[\u0080-\uD7FF\uE000-\uFFFF]/g,n.toEntity)},p.variants={"-tex-calligraphic":"script","-tex-bold-calligraphic":"bold-script","-tex-oldstyle":"normal","-tex-bold-oldstyle":"bold","-tex-mathit":"italic"},p.defaultAttributes={math:{xmlns:"http://www.w3.org/1998/Math/MathML"}},p);function p(){return null!==r&&r.apply(this,arguments)||this}n.SerializedMmlVisitor=e},2975:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractOutputJax=void 0;var n=r(7233),o=r(7525);function i(t){void 0===t&&(t={}),this.adaptor=null;var e=this.constructor;this.options=(0,n.userOptions)((0,n.defaultOptions)({},e.OPTIONS),t),this.postFilters=new o.FunctionList}Object.defineProperty(i.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),i.prototype.setAdaptor=function(t){this.adaptor=t},i.prototype.initialize=function(){},i.prototype.reset=function(){for(var t=[],e=0;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEmptyNode=e.AbstractNode=void 0,Object.defineProperty(i.prototype,"kind",{get:function(){return"unknown"},enumerable:!1,configurable:!0}),i.prototype.setProperty=function(t,e){this.properties[t]=e},i.prototype.getProperty=function(t){return this.properties[t]},i.prototype.getPropertyNames=function(){return Object.keys(this.properties)},i.prototype.getAllProperties=function(){return this.properties},i.prototype.removeProperty=function(){for(var t,e,r=[],n=0;n=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},c=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLDocument=void 0,r(5722)),T=r(7233),l=r(3363),c=r(3335),u=r(5138),p=r(4474),r=(i=s.AbstractMathDocument,o(h,i),h.prototype.findPosition=function(t,e,r,n){var o,i,a=this.adaptor;try{for(var s=C(n[t]),l=s.next();!l.done;l=s.next()){var c=l.value,u=A(c,2),p=u[0],h=u[1];if(e<=h&&"#text"===a.kind(p))return{node:p,n:Math.max(e,0),delim:r};e-=h}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return{node:null,n:0,delim:r}},h.prototype.mathItem=function(t,e,r){var n=t.math,o=this.findPosition(t.n,t.start.n,t.open,r),r=this.findPosition(t.n,t.end.n,t.close,r);return new this.options.MathItem(n,e,t.display,o,r)},h.prototype.findMath=function(t){var e,r,n,o,i,a,s,l,c;if(!this.processed.isSet("findMath")){this.adaptor.document=this.document,t=(0,T.userOptions)({elements:this.options.elements||[this.adaptor.body(this.document)]},t);try{for(var u=C(this.adaptor.getElements(t.elements,this.document)),p=u.next();!p.done;p=u.next()){var h=p.value,d=A([null,null],2),f=d[0],m=d[1];try{n=void 0;for(var y=C(this.inputJax),g=y.next();!g.done;g=y.next()){var b=g.value,v=new this.options.MathList;if(b.processStrings){null===f&&(f=(i=A(this.domStrings.find(h),2))[0],m=i[1]);try{a=void 0;for(var _=C(b.findMath(f)),S=_.next();!S.done;S=_.next()){var O=S.value;v.push(this.mathItem(O,b,m))}}catch(t){a={error:t}}finally{try{S&&!S.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}}else try{l=void 0;for(var M=C(b.findMath(h)),x=M.next();!x.done;x=M.next()){var O=x.value,E=new this.options.MathItem(O.math,b,O.display,O.start,O.end);v.push(E)}}catch(t){l={error:t}}finally{try{x&&!x.done&&(c=M.return)&&c.call(M)}finally{if(l)throw l.error}}this.math.merge(v)}}catch(t){n={error:t}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}this.processed.set("findMath")}return this},h.prototype.updateDocument=function(){return this.processed.isSet("updateDocument")||(this.addPageElements(),this.addStyleSheet(),i.prototype.updateDocument.call(this),this.processed.set("updateDocument")),this},h.prototype.addPageElements=function(){var t=this.adaptor.body(this.document),e=this.documentPageElements();e&&this.adaptor.append(t,e)},h.prototype.addStyleSheet=function(){var t,e,r=this.documentStyleSheet(),n=this.adaptor;r&&!n.parent(r)&&(t=n.head(this.document),(e=this.findSheet(t,n.getAttribute(r,"id")))?n.replace(r,e):n.append(t,r))},h.prototype.findSheet=function(t,e){var r,n;if(e)try{for(var o=C(this.adaptor.tags(t,"style")),i=o.next();!i.done;i=o.next()){var a=i.value;if(this.adaptor.getAttribute(a,"id")===e)return a}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null},h.prototype.removeFromDocument=function(t){var e,r;if(void 0===t&&(t=!1),this.processed.isSet("updateDocument"))try{for(var n=C(this.math),o=n.next();!o.done;o=n.next()){var i=o.value;i.state()>=p.STATE.INSERTED&&i.state(p.STATE.TYPESET,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this.processed.clear("updateDocument"),this},h.prototype.documentStyleSheet=function(){return this.outputJax.styleSheet(this)},h.prototype.documentPageElements=function(){return this.outputJax.pageElements(this)},h.prototype.addStyles=function(t){this.styles.push(t)},h.prototype.getStyles=function(){return this.styles},h.KIND="HTML",h.OPTIONS=a(a({},s.AbstractMathDocument.OPTIONS),{renderActions:(0,T.expandable)(a(a({},s.AbstractMathDocument.OPTIONS.renderActions),{styles:[p.STATE.INSERTED+1,"","updateStyleSheet",!1]})),MathList:c.HTMLMathList,MathItem:l.HTMLMathItem,DomStrings:null}),h);function h(t,e,r){var n=this,r=A((0,T.separateOptions)(r,u.HTMLDomStrings.OPTIONS),2),o=r[0],r=r[1];return(n=i.call(this,t,e,o)||this).domStrings=n.options.DomStrings||new u.HTMLDomStrings(r),n.domStrings.adaptor=e,n.styles=[],n}e.HTMLDocument=r},5138:function(t,e,r){var a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=a.STATE.TYPESET&&(e=this.adaptor,r=this.start.node,n=e.text(""),t&&(t=this.start.delim+this.math+this.end.delim,n=this.inputJax.processStrings?e.text(t):(t=e.parse(t,"text/html"),e.firstChild(e.body(t)))),e.parent(r)&&e.replace(n,r),this.start.node=this.end.node=n,this.start.n=this.end.n=0)},s);function s(t,e,r,n,o){return i.call(this,t,e,r=void 0===r?!0:r,n=void 0===n?{node:null,n:0,delim:""}:n,o=void 0===o?{node:null,n:0,delim:""}:o)||this}e.HTMLMathItem=r},3335:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),r=(Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLMathList=void 0,o=r(9e3).AbstractMathList,i(a,o),a);function a(){return null!==o&&o.apply(this,arguments)||this}e.HTMLMathList=r},8462:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},y=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,b=r(9007),v=n(r(1256)),n=o=o||{};function i(t,e,r){var n,o,i=[];try{for(var a=g(t.getList("m"+e+r)),s=a.next();!s.done;s=a.next()){var l,c,u=s.value,p=u.childNodes;p[u[e]]&&p[u[r]]||(l=u.parent,c=p[u[e]]?t.nodeFactory.create("node","m"+e,[p[u.base],p[u[e]]]):t.nodeFactory.create("node","m"+r,[p[u.base],p[u[r]]]),v.default.copyAttributes(u,c),l?l.replaceChild(c,u):t.root=c,i.push(u))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}t.removeFromList("m"+e+r,i)}function a(t,e,r){var n,o,i=[];try{for(var a=g(t.getList(e)),s=a.next();!s.done;s=a.next()){var l,c,u,p=s.value;p.attributes.get("displaystyle")||(c=(l=p.childNodes[p.base]).coreMO(),l.getProperty("movablelimits")&&!c.attributes.getExplicit("movablelimits")&&(u=t.nodeFactory.create("node",r,p.childNodes),v.default.copyAttributes(p,u),p.parent?p.parent.replaceChild(u,p):t.root=u,i.push(p)))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}t.removeFromList(e,i)}n.cleanStretchy=function(t){var e,r,n=t.data;try{for(var o=g(n.getList("fixStretchy")),i=o.next();!i.done;i=o.next()){var a,s,l,c=i.value;v.default.getProperty(c,"fixStretchy")&&((a=v.default.getForm(c))&&a[3]&&a[3].stretchy&&v.default.setAttribute(c,"stretchy",!1),s=c.parent,v.default.getTexClass(c)||a&&a[2]||(l=n.nodeFactory.create("node","TeXAtom",[c]),s.replaceChild(l,c),l.inheritAttributesFrom(c)),v.default.removeProperties(c,"fixStretchy"))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},n.cleanAttributes=function(t){t.data.root.walkTree(function(t,e){var r,n,o=t.attributes;if(o){var i=new Set((o.get("mjx-keep-attrs")||"").split(/ /));delete o.getAllAttributes()["mjx-keep-attrs"];try{for(var a=g(o.getExplicitNames()),s=a.next();!s.done;s=a.next()){var l=s.value;i.has(l)||o.attributes[l]!==t.attributes.getInherited(l)||delete o.attributes[l]}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}},{})},n.combineRelations=function(t){var e,r,n,o,i=[];try{for(var a=g(t.data.getList("mo")),s=a.next();!s.done;s=a.next()){var l=s.value;if(!l.getProperty("relationsCombined")&&l.parent&&(!l.parent||v.default.isType(l.parent,"mrow"))&&v.default.getTexClass(l)===b.TEXCLASS.REL){for(var c=l.parent,u=void 0,p=c.childNodes,h=p.indexOf(l)+1,d=v.default.getProperty(l,"variantForm");h=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},a=(Object.defineProperty(e,"__esModule",{value:!0}),i(r(5453))),s=r(8929),l=i(r(1256)),u=r(7233);function p(t,e){void 0===e&&(e=[]),this.options={},this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new s.NodeFactory,(this.nodeFactory.configuration=this).nodeFactory.setCreators(t.nodes),this.itemFactory=new a.default(t.items),this.itemFactory.configuration=this,u.defaultOptions.apply(void 0,o([this.options],n(e),!1)),(0,u.defaultOptions)(this.options,t.options)}p.prototype.pushParser=function(t){this.parsers.unshift(t)},p.prototype.popParser=function(){this.parsers.shift()},Object.defineProperty(p.prototype,"parser",{get:function(){return this.parsers[0]},enumerable:!1,configurable:!0}),p.prototype.clear=function(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()},p.prototype.addNode=function(t,e){var r;(this.nodeLists[t]||(this.nodeLists[t]=[])).push(e),e.kind!==t&&(r=((r=l.default.getProperty(e,"in-lists")||"")?r.split(/,/):[]).concat(t).join(","),l.default.setProperty(e,"in-lists",r))},p.prototype.getList=function(t){var e,r,n=this.nodeLists[t]||[],o=[];try{for(var i=c(n),a=i.next();!a.done;a=i.next()){var s=a.value;this.inTree(s)&&o.push(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return this.nodeLists[t]=o},p.prototype.removeFromList=function(t,e){var r,n,o=this.nodeLists[t]||[];try{for(var i=c(e),a=i.next();!a.done;a=i.next()){var s=a.value,l=o.indexOf(s);0<=l&&o.splice(l,1)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},p.prototype.inTree=function(t){for(;t&&t!==this.root;)t=t.parent;return!!t},e.default=p},1130:function(t,e,r){var c=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,a,i,s,l,p=r(9007),h=n(r(1256)),d=n(r(8417)),f=n(r(3971)),m=r(5368);function y(t,e){var r,t=t.match((e=void 0===e?!1:e)?l:s);return t?(e=[t[1].replace(/,/,"."),t[4],t[0].length],e=c(e,3),t=e[0],r=e[1],e=e[2],"mu"!==r?[t,r,e]:[g(i[r](parseFloat(t||"1"))).slice(0,-2),"em",e]):[null,null,0]}function g(t){return Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em"}function b(t,e,r){var n="{\\big"+r+" "+(e="{"!==e&&"}"!==e?e:"\\"+e)+"}";return new d.default("\\mathchoice"+("{\\bigg"+r+" "+e+"}")+n+n+n,{},t).mml()}function v(t,e,r){e=e.replace(/^\s+/,m.entities.nbsp).replace(/\s+$/,m.entities.nbsp);e=t.create("text",e);return t.create("node","mtext",[],r,e)}function _(t,e,r){if(r.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+r.length>t.configuration.options.maxBuffer)throw new f.default("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+r}function S(t,e){for(;0e.length)throw new f.default("IllegalMacroParam","Illegal macro parameter reference");o=_(t,_(t,o,n),e[parseInt(a,10)-1]),n=""}else n+=a}return _(t,o,n)},a.addArgs=_,a.checkMaxMacros=function(t,e){if(void 0===e&&(e=!0),!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new f.default("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new f.default("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},a.checkEqnEnv=function(t){if(t.stack.global.eqnenv)throw new f.default("ErroneousNestingEq","Erroneous nesting of equation structures");t.stack.global.eqnenv=!0},a.copyNode=function(t,e){var t=t.copy(),s=e.configuration;return t.walkTree(function(t){s.addNode(t.kind,t);var e,r,n=(t.getProperty("in-lists")||"").split(/,/);try{for(var o=u(n),i=o.next();!i.done;i=o.next()){var a=i.value;a&&s.addNode(a,t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}),t},a.MmlFilterAttribute=function(t,e,r){return r},a.getFontDef=function(t){t=t.stack.env.font;return t?{mathvariant:t}:{}},a.keyvalOptions=function(i,t,e){void 0===t&&(t=null),void 0===e&&(e=!1);var r,n,o=function(){for(var t,e,r,n={},o=i;o;)e=(t=c(O(o,["=",","]),3))[0],r=t[1],o=t[2],"="===r?(r=(t=c(O(o,[","]),3))[0],t[1],o=t[2],r="false"===r||"true"===r?JSON.parse(r):r,n[e]=r):e&&(n[e]=!0);return n}();if(t)try{for(var a=u(Object.keys(o)),s=a.next();!s.done;s=a.next()){var l=s.value;if(!t.hasOwnProperty(l)){if(e)throw new f.default("InvalidOption","Invalid option: %1",l);delete o[l]}}}catch(i){r={error:i}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},e.default=o},9497:function(t,e,r){var u=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},c=(Object.defineProperty(e,"__esModule",{value:!0}),e.BaseItem=e.MmlStack=void 0,l(r(3971))),l=(Object.defineProperty(u.prototype,"nodes",{get:function(){return this._nodes},enumerable:!1,configurable:!0}),u.prototype.Push=function(){for(var t,e=[],r=0;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},c=(Object.defineProperty(e,"__esModule",{value:!0}),e.TagsFactory=e.AllTags=e.NoTags=e.AbstractTags=e.TagInfo=e.Label=void 0,l(r(8417))),l=(e.Label=n,e.TagInfo=o,u.prototype.start=function(t,e,r){this.currentTag&&this.stack.push(this.currentTag),this.currentTag=new o(t,e,r)},Object.defineProperty(u.prototype,"env",{get:function(){return this.currentTag.env},enumerable:!1,configurable:!0}),u.prototype.end=function(){this.history.push(this.currentTag),this.currentTag=this.stack.pop()},u.prototype.tag=function(t,e){this.currentTag.tag=t,this.currentTag.tagFormat=e?t:this.formatTag(t),this.currentTag.noTag=!1},u.prototype.notag=function(){this.tag("",!0),this.currentTag.noTag=!0},Object.defineProperty(u.prototype,"noTag",{get:function(){return this.currentTag.noTag},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"label",{get:function(){return this.currentTag.labelId},set:function(t){this.currentTag.labelId=t},enumerable:!1,configurable:!0}),u.prototype.formatUrl=function(t,e){return e+"#"+encodeURIComponent(t)},u.prototype.formatTag=function(t){return"("+t+")"},u.prototype.formatId=function(t){return"mjx-eqn:"+t.replace(/\s/g,"_")},u.prototype.formatNumber=function(t){return t.toString()},u.prototype.autoTag=function(){null==this.currentTag.tag&&(this.counter++,this.tag(this.formatNumber(this.counter),!1))},u.prototype.clearTag=function(){this.label="",this.tag(null,!0),this.currentTag.tagId=""},u.prototype.getTag=function(t){if(t=void 0===t?!1:t)return this.autoTag(),this.makeTag();t=this.currentTag;return t.taggable&&!t.noTag&&(t.defaultTags&&this.autoTag(),t.tag)?this.makeTag():null},u.prototype.resetTag=function(){this.history=[],this.redo=!1,this.refUpdate=!1,this.clearTag()},u.prototype.reset=function(t){void 0===t&&(t=0),this.resetTag(),this.counter=this.allCounter=t,this.allLabels={},this.allIds={}},u.prototype.startEquation=function(t){this.history=[],this.stack=[],this.clearTag(),this.currentTag=new o("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;t=t.inputData.recompile;t&&(this.refUpdate=!0,this.counter=t.counter)},u.prototype.finishEquation=function(t){this.redo&&(t.inputData.recompile={state:t.state(),counter:this.allCounter}),this.refUpdate||(this.allCounter=this.counter),Object.assign(this.allIds,this.ids),Object.assign(this.allLabels,this.labels)},u.prototype.finalize=function(t,e){if(!e.display||this.currentTag.env||null==this.currentTag.tag)return t;e=this.makeTag();return this.enTag(t,e)},u.prototype.makeId=function(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds&&this.label||this.currentTag.tag)},u.prototype.makeTag=function(){this.makeId(),this.label&&(this.labels[this.label]=new n(this.currentTag.tag,this.currentTag.tagId));var t=new c.default("\\text{"+this.currentTag.tagFormat+"}",{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[t],{id:this.currentTag.tagId})},u);function u(){this.counter=0,this.allCounter=0,this.configuration=null,this.ids={},this.allIds={},this.labels={},this.allLabels={},this.redo=!1,this.refUpdate=!1,this.currentTag=new o,this.history=[],this.stack=[],this.enTag=function(t,e){var r=this.configuration.nodeFactory,t=r.create("node","mtd",[t]),e=r.create("node","mlabeledtr",[e,t]);return r.create("node","mtable",[e],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0})}}e.AbstractTags=l;a(h,p=l),h.prototype.autoTag=function(){},h.prototype.getTag=function(){return this.currentTag.tag?p.prototype.getTag.call(this):null};var p,r=h;function h(){return null!==p&&p.apply(this,arguments)||this}e.NoTags=r;a(g,d=l),g.prototype.finalize=function(t,e){if(!e.display||this.history.find(function(t){return t.taggable}))return t;e=this.getTag(!0);return this.enTag(t,e)};var d,f,m,y,a=g;function g(){return null!==d&&d.apply(this,arguments)||this}e.AllTags=a,f=e.TagsFactory||(e.TagsFactory={}),m=new Map([["none",r],["all",a]]),y="none",f.OPTIONS={tags:y,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1},f.add=function(t,e){m.set(t,e)},f.addTags=function(t){var e,r;try{for(var n=s(Object.keys(t)),o=n.next();!o.done;o=n.next()){var i=o.value;f.add(i,t[i])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},f.create=function(t){t=m.get(t)||m.get(y);if(t)return new t;throw Error("Unknown tags class")},f.setDefault=function(t){y=t},f.getDefault=function(){return f.create(y)}},8317:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TexConstant=void 0,(e=e.TexConstant||(e.TexConstant={})).Variant={NORMAL:"normal",BOLD:"bold",ITALIC:"italic",BOLDITALIC:"bold-italic",DOUBLESTRUCK:"double-struck",FRAKTUR:"fraktur",BOLDFRAKTUR:"bold-fraktur",SCRIPT:"script",BOLDSCRIPT:"bold-script",SANSSERIF:"sans-serif",BOLDSANSSERIF:"bold-sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",MONOSPACE:"monospace",INITIAL:"inital",TAILED:"tailed",LOOPED:"looped",STRETCHED:"stretched",CALLIGRAPHIC:"-tex-calligraphic",BOLDCALLIGRAPHIC:"-tex-bold-calligraphic",OLDSTYLE:"-tex-oldstyle",BOLDOLDSTYLE:"-tex-bold-oldstyle",MATHITALIC:"-tex-mathit"},e.Form={PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},e.LineBreak={AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},e.LineBreakStyle={BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},e.IndentAlign={LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},e.IndentShift={INDENTSHIFT:"indentshift"},e.LineThickness={THIN:"thin",MEDIUM:"medium",THICK:"thick"},e.Notation={LONGDIV:"longdiv",ACTUARIAL:"actuarial",PHASORANGLE:"phasorangle",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",NORTHEASTARROW:"northeastarrow",MADRUWB:"madruwb",UPDIAGONALARROW:"updiagonalarrow"},e.Align={TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},e.Lines={NONE:"none",SOLID:"solid",DASHED:"dashed"},e.Side={LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},e.Width={AUTO:"auto",FIT:"fit"},e.Actiontype={TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},e.Overflow={LINBREAK:"linebreak",SCROLL:"scroll",ELIDE:"elide",TRUNCATE:"truncate",SCALE:"scale"},e.Unit={EM:"em",EX:"ex",PX:"px",IN:"in",CM:"cm",MM:"mm",PT:"pt",PC:"pc"}},3971:function(t,e){function a(t,e){for(var r=[],n=2;n=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0t)throw new p.default("XalignOverflow","Extra %1 in row of %2","&",this.name)},m.prototype.EndRow=function(){for(var t,e=this.row,r=this.getProperty("xalignat");e.lengththis.maxrow&&(this.maxrow=this.row.length),f.prototype.EndRow.call(this);var n,o=this.table[this.table.length-1];this.getProperty("zeroWidthLabel")&&o.isKind("mlabeledtr")&&(o=u.default.getChildren(o)[0],n=this.factory.configuration.options.tagSide,n=a({width:0},"right"===n?{lspace:"-1width"}:{}),n=this.create("node","mpadded",u.default.getChildren(o),n),o.setChildren([n]))},m.prototype.EndTable=function(){f.prototype.EndTable.call(this),this.center&&this.maxrow<=2&&(delete this.arraydef.width,delete this.global.indentalign)};var f,r=m;function m(t,e,r,n,o){t=f.call(this,t)||this;return t.name=e,t.numbered=r,t.padded=n,t.center=o,t.factory.configuration.tags.start(e,r,r),t}e.FlalignItem=r},7379:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},e=(Object.defineProperty(e,"__esModule",{value:!0}),r(4387)),i=i(r(9140)),s=r(8317),l=a(r(5450)),a=a(r(1130)),c=r(9007),r=r(6010);new i.CharacterMap("AMSmath-mathchar0mo",l.default.mathchar0mo,{iiiint:["⨌",{texClass:c.TEXCLASS.OP}]}),new i.RegExpMap("AMSmath-operatorLetter",e.AmsMethods.operatorLetter,/[-*]/i),new i.CommandMap("AMSmath-macros",{mathring:["Accent","02DA"],nobreakspace:"Tilde",negmedspace:["Spacer",r.MATHSPACE.negativemediummathspace],negthickspace:["Spacer",r.MATHSPACE.negativethickmathspace],idotsint:["MultiIntegral","\\int\\cdots\\int"],dddot:["Accent","20DB"],ddddot:["Accent","20DC"],sideset:"SideSet",boxed:["Macro","\\fbox{$\\displaystyle{#1}$}",1],tag:"HandleTag",notag:"HandleNoTag",eqref:["HandleRef",!0],substack:["Macro","\\begin{subarray}{c}#1\\end{subarray}",1],injlim:["NamedOp","inj lim"],projlim:["NamedOp","proj lim"],varliminf:["Macro","\\mathop{\\underline{\\mmlToken{mi}{lim}}}"],varlimsup:["Macro","\\mathop{\\overline{\\mmlToken{mi}{lim}}}"],varinjlim:["Macro","\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}"],varprojlim:["Macro","\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}"],DeclareMathOperator:"HandleDeclareOp",operatorname:"HandleOperatorName",genfrac:"Genfrac",frac:["Genfrac","","","",""],tfrac:["Genfrac","","","","1"],dfrac:["Genfrac","","","","0"],binom:["Genfrac","(",")","0",""],tbinom:["Genfrac","(",")","0","1"],dbinom:["Genfrac","(",")","0","0"],cfrac:"CFrac",shoveleft:["HandleShove",s.TexConstant.Align.LEFT],shoveright:["HandleShove",s.TexConstant.Align.RIGHT],xrightarrow:["xArrow",8594,5,10],xleftarrow:["xArrow",8592,10,5]},e.AmsMethods),new i.EnvironmentMap("AMSmath-environment",l.default.environment,{"equation*":["Equation",null,!1],"eqnarray*":["EqnArray",null,!1,!0,"rcl",a.default.cols(0,r.MATHSPACE.thickmathspace),".5em"],align:["EqnArray",null,!0,!0,"rl",a.default.cols(0,2)],"align*":["EqnArray",null,!1,!0,"rl",a.default.cols(0,2)],multline:["Multline",null,!0],"multline*":["Multline",null,!1],split:["EqnArray",null,!1,!1,"rl",a.default.cols(0)],gather:["EqnArray",null,!0,!0,"c"],"gather*":["EqnArray",null,!1,!0,"c"],alignat:["AlignAt",null,!0,!0],"alignat*":["AlignAt",null,!1,!0],alignedat:["AlignAt",null,!1,!1],aligned:["AmsEqnArray",null,null,null,"rl",a.default.cols(0,2),".5em","D"],gathered:["AmsEqnArray",null,null,null,"c",null,".5em","D"],xalignat:["XalignAt",null,!0,!0],"xalignat*":["XalignAt",null,!1,!0],xxalignat:["XalignAt",null,!1,!1],flalign:["FlalignArray",null,!0,!1,!0,"rlc","auto auto fit"],"flalign*":["FlalignArray",null,!1,!1,!0,"rlc","auto auto fit"],subarray:["Array",null,null,null,null,a.default.cols(0),"0.1em","S",1],smallmatrix:["Array",null,null,null,"c",a.default.cols(1/3),".2em","S",1],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"]},e.AmsMethods),new i.DelimiterMap("AMSmath-delimiter",l.default.delimiter,{"\\lvert":["|",{texClass:c.TEXCLASS.OPEN}],"\\rvert":["|",{texClass:c.TEXCLASS.CLOSE}],"\\lVert":["‖",{texClass:c.TEXCLASS.OPEN}],"\\rVert":["‖",{texClass:c.TEXCLASS.CLOSE}]}),new i.CharacterMap("AMSsymbols-mathchar0mi",l.default.mathchar0mi,{digamma:"ϝ",varkappa:"ϰ",varGamma:["Γ",{mathvariant:s.TexConstant.Variant.ITALIC}],varDelta:["Δ",{mathvariant:s.TexConstant.Variant.ITALIC}],varTheta:["Θ",{mathvariant:s.TexConstant.Variant.ITALIC}],varLambda:["Λ",{mathvariant:s.TexConstant.Variant.ITALIC}],varXi:["Ξ",{mathvariant:s.TexConstant.Variant.ITALIC}],varPi:["Π",{mathvariant:s.TexConstant.Variant.ITALIC}],varSigma:["Σ",{mathvariant:s.TexConstant.Variant.ITALIC}],varUpsilon:["Υ",{mathvariant:s.TexConstant.Variant.ITALIC}],varPhi:["Φ",{mathvariant:s.TexConstant.Variant.ITALIC}],varPsi:["Ψ",{mathvariant:s.TexConstant.Variant.ITALIC}],varOmega:["Ω",{mathvariant:s.TexConstant.Variant.ITALIC}],beth:"ℶ",gimel:"ℷ",daleth:"ℸ",backprime:["‵",{variantForm:!0}],hslash:"ℏ",varnothing:["∅",{variantForm:!0}],blacktriangle:"▴",triangledown:["▽",{variantForm:!0}],blacktriangledown:"▾",square:"◻",Box:"◻",blacksquare:"◼",lozenge:"◊",Diamond:"◊",blacklozenge:"⧫",circledS:["Ⓢ",{mathvariant:s.TexConstant.Variant.NORMAL}],bigstar:"★",sphericalangle:"∢",measuredangle:"∡",nexists:"∄",complement:"∁",mho:"℧",eth:["ð",{mathvariant:s.TexConstant.Variant.NORMAL}],Finv:"Ⅎ",diagup:"╱",Game:"⅁",diagdown:"╲",Bbbk:["k",{mathvariant:s.TexConstant.Variant.DOUBLESTRUCK}],yen:"¥",circledR:"®",checkmark:"✓",maltese:"✠"}),new i.CharacterMap("AMSsymbols-mathchar0mo",l.default.mathchar0mo,{dotplus:"∔",ltimes:"⋉",smallsetminus:["∖",{variantForm:!0}],rtimes:"⋊",Cap:"⋒",doublecap:"⋒",leftthreetimes:"⋋",Cup:"⋓",doublecup:"⋓",rightthreetimes:"⋌",barwedge:"⊼",curlywedge:"⋏",veebar:"⊻",curlyvee:"⋎",doublebarwedge:"⩞",boxminus:"⊟",circleddash:"⊝",boxtimes:"⊠",circledast:"⊛",boxdot:"⊡",circledcirc:"⊚",boxplus:"⊞",centerdot:["⋅",{variantForm:!0}],divideontimes:"⋇",intercal:"⊺",leqq:"≦",geqq:"≧",leqslant:"⩽",geqslant:"⩾",eqslantless:"⪕",eqslantgtr:"⪖",lesssim:"≲",gtrsim:"≳",lessapprox:"⪅",gtrapprox:"⪆",approxeq:"≊",lessdot:"⋖",gtrdot:"⋗",lll:"⋘",llless:"⋘",ggg:"⋙",gggtr:"⋙",lessgtr:"≶",gtrless:"≷",lesseqgtr:"⋚",gtreqless:"⋛",lesseqqgtr:"⪋",gtreqqless:"⪌",doteqdot:"≑",Doteq:"≑",eqcirc:"≖",risingdotseq:"≓",circeq:"≗",fallingdotseq:"≒",triangleq:"≜",backsim:"∽",thicksim:["∼",{variantForm:!0}],backsimeq:"⋍",thickapprox:["≈",{variantForm:!0}],subseteqq:"⫅",supseteqq:"⫆",Subset:"⋐",Supset:"⋑",sqsubset:"⊏",sqsupset:"⊐",preccurlyeq:"≼",succcurlyeq:"≽",curlyeqprec:"⋞",curlyeqsucc:"⋟",precsim:"≾",succsim:"≿",precapprox:"⪷",succapprox:"⪸",vartriangleleft:"⊲",lhd:"⊲",vartriangleright:"⊳",rhd:"⊳",trianglelefteq:"⊴",unlhd:"⊴",trianglerighteq:"⊵",unrhd:"⊵",vDash:["⊨",{variantForm:!0}],Vdash:"⊩",Vvdash:"⊪",smallsmile:["⌣",{variantForm:!0}],shortmid:["∣",{variantForm:!0}],smallfrown:["⌢",{variantForm:!0}],shortparallel:["∥",{variantForm:!0}],bumpeq:"≏",between:"≬",Bumpeq:"≎",pitchfork:"⋔",varpropto:["∝",{variantForm:!0}],backepsilon:"∍",blacktriangleleft:"◂",blacktriangleright:"▸",therefore:"∴",because:"∵",eqsim:"≂",vartriangle:["△",{variantForm:!0}],Join:"⋈",nless:"≮",ngtr:"≯",nleq:"≰",ngeq:"≱",nleqslant:["⪇",{variantForm:!0}],ngeqslant:["⪈",{variantForm:!0}],nleqq:["≰",{variantForm:!0}],ngeqq:["≱",{variantForm:!0}],lneq:"⪇",gneq:"⪈",lneqq:"≨",gneqq:"≩",lvertneqq:["≨",{variantForm:!0}],gvertneqq:["≩",{variantForm:!0}],lnsim:"⋦",gnsim:"⋧",lnapprox:"⪉",gnapprox:"⪊",nprec:"⊀",nsucc:"⊁",npreceq:["⋠",{variantForm:!0}],nsucceq:["⋡",{variantForm:!0}],precneqq:"⪵",succneqq:"⪶",precnsim:"⋨",succnsim:"⋩",precnapprox:"⪹",succnapprox:"⪺",nsim:"≁",ncong:"≇",nshortmid:["∤",{variantForm:!0}],nshortparallel:["∦",{variantForm:!0}],nmid:"∤",nparallel:"∦",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",ntriangleleft:"⋪",ntriangleright:"⋫",ntrianglelefteq:"⋬",ntrianglerighteq:"⋭",nsubseteq:"⊈",nsupseteq:"⊉",nsubseteqq:["⊈",{variantForm:!0}],nsupseteqq:["⊉",{variantForm:!0}],subsetneq:"⊊",supsetneq:"⊋",varsubsetneq:["⊊",{variantForm:!0}],varsupsetneq:["⊋",{variantForm:!0}],subsetneqq:"⫋",supsetneqq:"⫌",varsubsetneqq:["⫋",{variantForm:!0}],varsupsetneqq:["⫌",{variantForm:!0}],leftleftarrows:"⇇",rightrightarrows:"⇉",leftrightarrows:"⇆",rightleftarrows:"⇄",Lleftarrow:"⇚",Rrightarrow:"⇛",twoheadleftarrow:"↞",twoheadrightarrow:"↠",leftarrowtail:"↢",rightarrowtail:"↣",looparrowleft:"↫",looparrowright:"↬",leftrightharpoons:"⇋",rightleftharpoons:["⇌",{variantForm:!0}],curvearrowleft:"↶",curvearrowright:"↷",circlearrowleft:"↺",circlearrowright:"↻",Lsh:"↰",Rsh:"↱",upuparrows:"⇈",downdownarrows:"⇊",upharpoonleft:"↿",upharpoonright:"↾",downharpoonleft:"⇃",restriction:"↾",multimap:"⊸",downharpoonright:"⇂",leftrightsquigarrow:"↭",rightsquigarrow:"⇝",leadsto:"⇝",dashrightarrow:"⇢",dashleftarrow:"⇠",nleftarrow:"↚",nrightarrow:"↛",nLeftarrow:"⇍",nRightarrow:"⇏",nleftrightarrow:"↮",nLeftrightarrow:"⇎"}),new i.DelimiterMap("AMSsymbols-delimiter",l.default.delimiter,{"\\ulcorner":"⌜","\\urcorner":"⌝","\\llcorner":"⌞","\\lrcorner":"⌟"}),new i.CommandMap("AMSsymbols-macros",{implies:["Macro","\\;\\Longrightarrow\\;"],impliedby:["Macro","\\;\\Longleftarrow\\;"]},e.AmsMethods)},4387:function(t,u,e){var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.AutoloadConfiguration=void 0,r(9899)),o=r(9140),C=r(8803),T=r(7741),y=r(265),i=r(7233);function N(t,e,r,n){var o,i,a,s;if(y.Package.packages.has(t.options.require.prefix+r)){var l=t.options.autoload[r],l=E(2===l.length&&Array.isArray(l[0])?l:[l,[]],2),c=l[0],l=l[1];try{for(var u=A(c),p=u.next();!p.done;p=u.next()){var h=p.value;w.remove(h)}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}try{for(var d=A(l),f=d.next();!f.done;f=d.next()){var m=f.value;L.remove(m)}}catch(t){a={error:t}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}t.string=(n?e+" ":"\\begin{"+e.slice(1)+"}")+t.string.slice(t.i),t.i=0}(0,T.RequireLoad)(t,r)}var w=new o.CommandMap("autoload-macros",{},{}),L=new o.CommandMap("autoload-environments",{},{});e.AutoloadConfiguration=n.Configuration.create("autoload",{handler:{macro:["autoload-macros"],environment:["autoload-environments"]},options:{autoload:(0,i.expandable)({action:["toggle","mathtip","texttip"],amscd:[[],["CD"]],bbox:["bbox"],boldsymbol:["boldsymbol"],braket:["bra","ket","braket","set","Bra","Ket","Braket","Set","ketbra","Ketbra"],bussproofs:[[],["prooftree"]],cancel:["cancel","bcancel","xcancel","cancelto"],color:["color","definecolor","textcolor","colorbox","fcolorbox"],enclose:["enclose"],extpfeil:["xtwoheadrightarrow","xtwoheadleftarrow","xmapsto","xlongequal","xtofrom","Newextarrow"],html:["href","class","style","cssId"],mhchem:["ce","pu"],newcommand:["newcommand","renewcommand","newenvironment","renewenvironment","def","let"],unicode:["unicode"],verb:["verb"]})},config:function(t,e){var r,n,o,i,a,s,l=e.parseOptions,c=l.handlers.get("macro"),u=l.handlers.get("environment"),p=l.options.autoload;l.packageData.set("autoload",{Autoload:N});try{for(var h=A(Object.keys(p)),d=h.next();!d.done;d=h.next()){var f=d.value,m=p[f],y=E(2===m.length&&Array.isArray(m[0])?m:[m,[]],2),g=y[0],b=y[1];try{o=void 0;for(var v=A(g),_=v.next();!_.done;_=v.next()){var S=_.value;c.lookup(S)&&"color"!==S||w.add(S,new C.Macro(S,N,[f,!0]))}}catch(t){o={error:t}}finally{try{_&&!_.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{a=void 0;for(var O=A(b),M=O.next();!M.done;M=O.next()){var x=M.value;u.lookup(x)||L.add(x,new C.Macro(x,N,[f,!1]))}}catch(t){a={error:t}}finally{try{M&&!M.done&&(s=O.return)&&s.call(O)}finally{if(a)throw a.error}}}}catch(t){r={error:t}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}l.packageData.get("require")||T.RequireConfiguration.config(t,e)},init:function(t){t.options.require||(0,i.defaultOptions)(t.options,T.RequireConfiguration.options)},priority:10})},2942:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return a(e,t),e},c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},u=(Object.defineProperty(e,"__esModule",{value:!0}),e.BaseConfiguration=e.BaseTags=e.Other=void 0,r(9899)),p=r(2947),h=l(r(3971)),d=l(r(1256)),l=r(9140),s=s(r(1181)),f=r(6521),m=(r(1267),r(4082));function y(t,e){var r=t.stack.env.font?{mathvariant:t.stack.env.font}:{},n=p.MapHandler.getMap("remap").lookup(e),o=(0,m.getRange)(e),i=o?o[3]:"mo",r=t.create("token",i,r,n?n.char:e);o[4]&&r.attributes.set("mathvariant",o[4]),"mo"===i&&(d.default.setProperty(r,"fixStretchy",!0),t.configuration.addNode("fixStretchy",r)),t.Push(r)}new l.CharacterMap("remap",null,{"-":"−","*":"∗","`":"‘"}),e.Other=y;g=f.AbstractTags,o(b,g);var g,r=b;function b(){return null!==g&&g.apply(this,arguments)||this}e.BaseTags=r,e.BaseConfiguration=u.Configuration.create("base",{handler:{character:["command","special","letter","digit"],delimiter:["delimiter"],macro:["delimiter","macros","mathchar0mi","mathchar0mo","mathchar7"],environment:["environment"]},fallback:{character:y,macro:function(t,e){throw new h.default("UndefinedControlSequence","Undefined control sequence %1","\\"+e)},environment:function(t,e){throw new h.default("UnknownEnv","Unknown environment '%1'",e)}},items:((l={})[s.StartItem.prototype.kind]=s.StartItem,l[s.StopItem.prototype.kind]=s.StopItem,l[s.OpenItem.prototype.kind]=s.OpenItem,l[s.CloseItem.prototype.kind]=s.CloseItem,l[s.PrimeItem.prototype.kind]=s.PrimeItem,l[s.SubsupItem.prototype.kind]=s.SubsupItem,l[s.OverItem.prototype.kind]=s.OverItem,l[s.LeftItem.prototype.kind]=s.LeftItem,l[s.Middle.prototype.kind]=s.Middle,l[s.RightItem.prototype.kind]=s.RightItem,l[s.BeginItem.prototype.kind]=s.BeginItem,l[s.EndItem.prototype.kind]=s.EndItem,l[s.StyleItem.prototype.kind]=s.StyleItem,l[s.PositionItem.prototype.kind]=s.PositionItem,l[s.CellItem.prototype.kind]=s.CellItem,l[s.MmlItem.prototype.kind]=s.MmlItem,l[s.FnItem.prototype.kind]=s.FnItem,l[s.NotItem.prototype.kind]=s.NotItem,l[s.NonscriptItem.prototype.kind]=s.NonscriptItem,l[s.DotsItem.prototype.kind]=s.DotsItem,l[s.ArrayItem.prototype.kind]=s.ArrayItem,l[s.EqnArrayItem.prototype.kind]=s.EqnArrayItem,l[s.EquationItem.prototype.kind]=s.EquationItem,l),options:{maxMacros:1e3,baseURL:"undefined"==typeof document||0===document.getElementsByTagName("base").length?"":String(document.location).replace(/#.*$/,"")},tags:{base:r},postprocessors:[[function(t){var e,r,n=t.data;try{for(var o=c(n.getList("nonscript")),i=o.next();!i.done;i=o.next()){var a,s,l=i.value;0this.maxrow&&(this.maxrow=this.row.length);var t="mtr",e=this.factory.configuration.tags.getTag(),e=(e&&(this.row=[e].concat(this.row),t="mlabeledtr"),this.factory.configuration.tags.clearTag(),this.create("node",t,this.row));this.table.push(e),this.row=[]},R.prototype.EndTable=function(){it.prototype.EndTable.call(this),this.factory.configuration.tags.end(),this.extendArray("columnalign",this.maxrow),this.extendArray("columnwidth",this.maxrow),this.extendArray("columnspacing",this.maxrow-1)},R.prototype.extendArray=function(t,e){if(this.arraydef[t]){var r=this.arraydef[t].split(/ /),n=D([],o(r),!1);if(1",succ:"≻",prec:"≺",approx:"≈",succeq:"⪰",preceq:"⪯",supset:"⊃",subset:"⊂",supseteq:"⊇",subseteq:"⊆",in:"∈",ni:"∋",notin:"∉",owns:"∋",gg:"≫",ll:"≪",sim:"∼",simeq:"≃",perp:"⊥",equiv:"≡",asymp:"≍",smile:"⌣",frown:"⌢",ne:"≠",neq:"≠",cong:"≅",doteq:"≐",bowtie:"⋈",models:"⊨",notChar:"⧸",Leftrightarrow:"⇔",Leftarrow:"⇐",Rightarrow:"⇒",leftrightarrow:"↔",leftarrow:"←",gets:"←",rightarrow:"→",to:["→",{accent:!1}],mapsto:"↦",leftharpoonup:"↼",leftharpoondown:"↽",rightharpoonup:"⇀",rightharpoondown:"⇁",nearrow:"↗",searrow:"↘",nwarrow:"↖",swarrow:"↙",rightleftharpoons:"⇌",hookrightarrow:"↪",hookleftarrow:"↩",longleftarrow:"⟵",Longleftarrow:"⟸",longrightarrow:"⟶",Longrightarrow:"⟹",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",ldots:"…",cdots:"⋯",vdots:"⋮",ddots:"⋱",dotsc:"…",dotsb:"⋯",dotsm:"⋯",dotsi:"⋯",dotso:"…",ldotp:[".",{texClass:c.TEXCLASS.PUNCT}],cdotp:["⋅",{texClass:c.TEXCLASS.PUNCT}],colon:[":",{texClass:c.TEXCLASS.PUNCT}]}),new e.CharacterMap("mathchar7",l.default.mathchar7,{Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Upsilon:"Υ",Phi:"Φ",Psi:"Ψ",Omega:"Ω",_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new e.DelimiterMap("delimiter",l.default.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"⟨",">":"⟩","\\lt":"⟨","\\gt":"⟩","/":"/","|":["|",{texClass:c.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"⎰","\\rmoustache":"⎱","\\lgroup":"⟮","\\rgroup":"⟯","\\arrowvert":"⏐","\\Arrowvert":"‖","\\bracevert":"⎪","\\Vert":["‖",{texClass:c.TEXCLASS.ORD}],"\\|":["‖",{texClass:c.TEXCLASS.ORD}],"\\vert":["|",{texClass:c.TEXCLASS.ORD}],"\\uparrow":"↑","\\downarrow":"↓","\\updownarrow":"↕","\\Uparrow":"⇑","\\Downarrow":"⇓","\\Updownarrow":"⇕","\\backslash":"\\","\\rangle":"⟩","\\langle":"⟨","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"⌉","\\lceil":"⌈","\\rfloor":"⌋","\\lfloor":"⌊","\\lbrack":"[","\\rbrack":"]"}),new e.CommandMap("macros",{displaystyle:["SetStyle","D",!0,0],textstyle:["SetStyle","T",!1,0],scriptstyle:["SetStyle","S",!1,1],scriptscriptstyle:["SetStyle","SS",!1,2],rm:["SetFont",i.TexConstant.Variant.NORMAL],mit:["SetFont",i.TexConstant.Variant.ITALIC],oldstyle:["SetFont",i.TexConstant.Variant.OLDSTYLE],cal:["SetFont",i.TexConstant.Variant.CALLIGRAPHIC],it:["SetFont",i.TexConstant.Variant.MATHITALIC],bf:["SetFont",i.TexConstant.Variant.BOLD],bbFont:["SetFont",i.TexConstant.Variant.DOUBLESTRUCK],scr:["SetFont",i.TexConstant.Variant.SCRIPT],frak:["SetFont",i.TexConstant.Variant.FRAKTUR],sf:["SetFont",i.TexConstant.Variant.SANSSERIF],tt:["SetFont",i.TexConstant.Variant.MONOSPACE],mathrm:["MathFont",i.TexConstant.Variant.NORMAL],mathup:["MathFont",i.TexConstant.Variant.NORMAL],mathnormal:["MathFont",""],mathbf:["MathFont",i.TexConstant.Variant.BOLD],mathbfup:["MathFont",i.TexConstant.Variant.BOLD],mathit:["MathFont",i.TexConstant.Variant.MATHITALIC],mathbfit:["MathFont",i.TexConstant.Variant.BOLDITALIC],mathbb:["MathFont",i.TexConstant.Variant.DOUBLESTRUCK],Bbb:["MathFont",i.TexConstant.Variant.DOUBLESTRUCK],mathfrak:["MathFont",i.TexConstant.Variant.FRAKTUR],mathbffrak:["MathFont",i.TexConstant.Variant.BOLDFRAKTUR],mathscr:["MathFont",i.TexConstant.Variant.SCRIPT],mathbfscr:["MathFont",i.TexConstant.Variant.BOLDSCRIPT],mathsf:["MathFont",i.TexConstant.Variant.SANSSERIF],mathsfup:["MathFont",i.TexConstant.Variant.SANSSERIF],mathbfsf:["MathFont",i.TexConstant.Variant.BOLDSANSSERIF],mathbfsfup:["MathFont",i.TexConstant.Variant.BOLDSANSSERIF],mathsfit:["MathFont",i.TexConstant.Variant.SANSSERIFITALIC],mathbfsfit:["MathFont",i.TexConstant.Variant.SANSSERIFBOLDITALIC],mathtt:["MathFont",i.TexConstant.Variant.MONOSPACE],mathcal:["MathFont",i.TexConstant.Variant.CALLIGRAPHIC],mathbfcal:["MathFont",i.TexConstant.Variant.BOLDCALLIGRAPHIC],symrm:["MathFont",i.TexConstant.Variant.NORMAL],symup:["MathFont",i.TexConstant.Variant.NORMAL],symnormal:["MathFont",""],symbf:["MathFont",i.TexConstant.Variant.BOLD],symbfup:["MathFont",i.TexConstant.Variant.BOLD],symit:["MathFont",i.TexConstant.Variant.ITALIC],symbfit:["MathFont",i.TexConstant.Variant.BOLDITALIC],symbb:["MathFont",i.TexConstant.Variant.DOUBLESTRUCK],symfrak:["MathFont",i.TexConstant.Variant.FRAKTUR],symbffrak:["MathFont",i.TexConstant.Variant.BOLDFRAKTUR],symscr:["MathFont",i.TexConstant.Variant.SCRIPT],symbfscr:["MathFont",i.TexConstant.Variant.BOLDSCRIPT],symsf:["MathFont",i.TexConstant.Variant.SANSSERIF],symsfup:["MathFont",i.TexConstant.Variant.SANSSERIF],symbfsf:["MathFont",i.TexConstant.Variant.BOLDSANSSERIF],symbfsfup:["MathFont",i.TexConstant.Variant.BOLDSANSSERIF],symsfit:["MathFont",i.TexConstant.Variant.SANSSERIFITALIC],symbfsfit:["MathFont",i.TexConstant.Variant.SANSSERIFBOLDITALIC],symtt:["MathFont",i.TexConstant.Variant.MONOSPACE],symcal:["MathFont",i.TexConstant.Variant.CALLIGRAPHIC],symbfcal:["MathFont",i.TexConstant.Variant.BOLDCALLIGRAPHIC],textrm:["HBox",null,i.TexConstant.Variant.NORMAL],textup:["HBox",null,i.TexConstant.Variant.NORMAL],textnormal:["HBox"],textit:["HBox",null,i.TexConstant.Variant.ITALIC],textbf:["HBox",null,i.TexConstant.Variant.BOLD],textsf:["HBox",null,i.TexConstant.Variant.SANSSERIF],texttt:["HBox",null,i.TexConstant.Variant.MONOSPACE],tiny:["SetSize",.5],Tiny:["SetSize",.6],scriptsize:["SetSize",.7],small:["SetSize",.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:"NamedFn",arccos:"NamedFn",arctan:"NamedFn",arg:"NamedFn",cos:"NamedFn",cosh:"NamedFn",cot:"NamedFn",coth:"NamedFn",csc:"NamedFn",deg:"NamedFn",det:"NamedOp",dim:"NamedFn",exp:"NamedFn",gcd:"NamedOp",hom:"NamedFn",inf:"NamedOp",ker:"NamedFn",lg:"NamedFn",lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:"NamedFn",log:"NamedFn",max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:"NamedFn",sin:"NamedFn",sinh:"NamedFn",sup:"NamedOp",tan:"NamedFn",tanh:"NamedFn",limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","2015"],underline:["UnderOver","2015"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",overunderset:"Overunderset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:["Macro","\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"LeftRight",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",r.MATHSPACE.thinmathspace],":":["Spacer",r.MATHSPACE.mediummathspace],">":["Spacer",r.MATHSPACE.mediummathspace],";":["Spacer",r.MATHSPACE.thickmathspace],"!":["Spacer",r.MATHSPACE.negativethinmathspace],enspace:["Spacer",.5],quad:["Spacer",1],qquad:["Spacer",2],thinspace:["Spacer",r.MATHSPACE.thinmathspace],negthinspace:["Spacer",r.MATHSPACE.negativethinmathspace],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],nonscript:"Nonscript",big:["MakeBig",c.TEXCLASS.ORD,.85],Big:["MakeBig",c.TEXCLASS.ORD,1.15],bigg:["MakeBig",c.TEXCLASS.ORD,1.45],Bigg:["MakeBig",c.TEXCLASS.ORD,1.75],bigl:["MakeBig",c.TEXCLASS.OPEN,.85],Bigl:["MakeBig",c.TEXCLASS.OPEN,1.15],biggl:["MakeBig",c.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",c.TEXCLASS.OPEN,1.75],bigr:["MakeBig",c.TEXCLASS.CLOSE,.85],Bigr:["MakeBig",c.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",c.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",c.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",c.TEXCLASS.REL,.85],Bigm:["MakeBig",c.TEXCLASS.REL,1.15],biggm:["MakeBig",c.TEXCLASS.REL,1.45],Biggm:["MakeBig",c.TEXCLASS.REL,1.75],mathord:["TeXAtom",c.TEXCLASS.ORD],mathop:["TeXAtom",c.TEXCLASS.OP],mathopen:["TeXAtom",c.TEXCLASS.OPEN],mathclose:["TeXAtom",c.TEXCLASS.CLOSE],mathbin:["TeXAtom",c.TEXCLASS.BIN],mathrel:["TeXAtom",c.TEXCLASS.REL],mathpunct:["TeXAtom",c.TEXCLASS.PUNCT],mathinner:["TeXAtom",c.TEXCLASS.INNER],vcenter:["TeXAtom",c.TEXCLASS.VCENTER],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",boxed:["Macro","\\fbox{$\\displaystyle{#1}$}",1],framebox:"FrameBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,!0],eqalign:["Matrix",null,null,"right left",(0,r.em)(r.MATHSPACE.thickmathspace),".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:["CrLaTeX",!0],hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",(0,r.em)(r.MATHSPACE.thickmathspace),".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",(0,r.em)(r.MATHSPACE.thickmathspace),".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde"," ":"Tilde",begin:"BeginEnd",end:"BeginEnd",label:"HandleLabel",ref:"HandleRef",nonumber:"HandleNoTag",mathchoice:"MathChoice",mmlToken:"MmlToken"},s.default),new e.EnvironmentMap("environment",l.default.environment,{array:["AlignedArray"],equation:["Equation",null,!0],eqnarray:["EqnArray",null,!0,!0,"rcl",a.default.cols(0,r.MATHSPACE.thickmathspace),".5em"]},s.default),new e.CharacterMap("not_remap",null,{"←":"↚","→":"↛","↔":"↮","⇐":"⇍","⇒":"⇏","⇔":"⇎","∈":"∉","∋":"∌","∣":"∤","∥":"∦","∼":"≁","~":"≁","≃":"≄","≅":"≇","≈":"≉","≍":"≭","=":"≠","≡":"≢","<":"≮",">":"≯","≤":"≰","≥":"≱","≲":"≴","≳":"≵","≶":"≸","≷":"≹","≺":"⊀","≻":"⊁","⊂":"⊄","⊃":"⊅","⊆":"⊈","⊇":"⊉","⊢":"⊬","⊨":"⊭","⊩":"⊮","⊫":"⊯","≼":"⋠","≽":"⋡","⊑":"⋢","⊒":"⋣","⊲":"⋪","⊳":"⋫","⊴":"⋬","⊵":"⋭","∃":"∄"})},7693:function(t,e,r){var i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigMacrosConfiguration=void 0,r(9899)),i=r(7233),a=r(9140),s=n(r(5450)),S=r(8803),O=n(r(1110)),n=r(6793),M="configmacros-map",x="configmacros-env-map";e.ConfigMacrosConfiguration=o.Configuration.create("configmacros",{init:function(t){new a.CommandMap(M,{},{}),new a.EnvironmentMap(x,s.default.environment,{},{}),t.append(o.Configuration.local({handler:{macro:[M],environment:[x]},priority:3}))},config:function(t,e){var r,n,o=e,i=o.parseOptions.handlers.retrieve(M),a=o.parseOptions.options.macros;try{for(var s=_(Object.keys(a)),l=s.next();!l.done;l=s.next()){var c=l.value,u="string"==typeof a[c]?[a[c]]:a[c],p=Array.isArray(u[2])?new S.Macro(c,O.default.MacroWithTemplate,u.slice(0,2).concat(u[2])):new S.Macro(c,O.default.Macro,u);i.add(c,p)}}catch(o){r={error:o}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}var h,d,f=e,m=f.parseOptions.handlers.retrieve(x),y=f.parseOptions.options.environments;try{for(var g=_(Object.keys(y)),b=g.next();!b.done;b=g.next()){var v=b.value;m.add(v,new S.Macro(v,O.default.BeginEnv,[!0].concat(y[v])))}}catch(f){h={error:f}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(h)throw h.error}}},items:((r={})[n.BeginEnvItem.prototype.kind]=n.BeginEnvItem,r),options:{macros:(0,i.expandable)({}),environments:(0,i.expandable)({})}})},1496:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.NewcommandConfiguration=void 0,r(9899)),l=r(6793),c=a(r(5579)),u=(r(5117),a(r(5450))),p=i(r(9140));e.NewcommandConfiguration=s.Configuration.create("newcommand",{handler:{macro:["Newcommand-macros"]},items:((a={})[l.BeginEnvItem.prototype.kind]=l.BeginEnvItem,a),options:{maxMacros:1e3},init:function(t){new p.DelimiterMap(c.default.NEW_DELIMITER,u.default.delimiter,{}),new p.CommandMap(c.default.NEW_COMMAND,{},{}),new p.EnvironmentMap(c.default.NEW_ENVIRONMENT,u.default.environment,{},{}),t.append(s.Configuration.local({handler:{character:[],delimiter:[c.default.NEW_DELIMITER],macro:[c.default.NEW_DELIMITER,c.default.NEW_COMMAND],environment:[c.default.NEW_ENVIRONMENT]},priority:-1}))}})},6793:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.BeginEnvItem=void 0,a(r(3971))),a=(o=r(8292).BaseItem,i(l,o),Object.defineProperty(l.prototype,"kind",{get:function(){return"beginEnv"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),l.prototype.checkItem=function(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new s.default("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());return[[this.factory.create("mml",this.toMml())],!0]}if(t.isKind("stop"))throw new s.default("EnvMissingEnd","Missing \\end{%1}",this.getName());return o.prototype.checkItem.call(this,t)},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.BeginEnvItem=a},5117:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},e=(Object.defineProperty(e,"__esModule",{value:!0}),n(r(1110)));new(r(9140).CommandMap)("Newcommand-macros",{newcommand:"NewCommand",renewcommand:"NewCommand",newenvironment:"NewEnvironment",renewenvironment:"NewEnvironment",def:"MacroDef",let:"Let"},e.default)},1110:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},c=(Object.defineProperty(e,"__esModule",{value:!0}),a(r(3971))),s=i(r(9140)),i=a(r(7693)),u=a(r(1130)),p=a(r(5579)),l={NewCommand:function(t,e){var r=p.default.GetCsNameArgument(t,e),n=p.default.GetArgCount(t,e),o=t.GetBrackets(e),e=t.GetArgument(e);p.default.addMacro(t,r,l.Macro,[e,n,o])},NewEnvironment:function(t,e){var r=u.default.trimSpaces(t.GetArgument(e)),n=p.default.GetArgCount(t,e),o=t.GetBrackets(e),i=t.GetArgument(e),e=t.GetArgument(e);p.default.addEnvironment(t,r,l.BeginEnv,[!0,i,e,n,o])},MacroDef:function(t,e){var r=p.default.GetCSname(t,e),n=p.default.GetTemplate(t,e,"\\"+r),e=t.GetArgument(e);n instanceof Array?p.default.addMacro(t,r,l.MacroWithTemplate,[e].concat(n)):p.default.addMacro(t,r,l.Macro,[e,n])},Let:function(t,e){var r=p.default.GetCSname(t,e),n=t.GetNext(),o=("="===n&&(t.i++,n=t.GetNext()),t.configuration.handlers);if("\\"!==n){t.i++;var i=o.get("delimiter").lookup(n);i?p.default.addDelimiter(t,"\\"+r,i.char,i.attributes):p.default.addMacro(t,r,l.Macro,[n])}else if(e=p.default.GetCSname(t,e),i=o.get("delimiter").lookup("\\"+e))p.default.addDelimiter(t,"\\"+r,i.char,i.attributes);else{var a=o.get("macro").applicable(e);if(a){if(a instanceof s.MacroMap)return n=a.lookup(e),void p.default.addMacro(t,r,n.func,n.args,n.symbol);i=a.lookup(e),o=p.default.disassembleSymbol(r,i);p.default.addMacro(t,r,function(t,e){for(var r=[],n=2;n=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.NoUndefinedConfiguration=void 0,r(9899));e.NoUndefinedConfiguration=r.Configuration.create("noundefined",{fallback:{macro:function(t,e){var r,n,e=t.create("text","\\"+e),o=t.options.noundefined||{},i={};try{for(var a=c(["color","background","size"]),s=a.next();!s.done;s=a.next()){var l=s.value;o[l]&&(i["math"+l]=o[l])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}t.Push(t.create("node","mtext",[],i,e))}},options:{noundefined:{color:"red",background:"",size:""}},priority:3})},7741:function(t,e,r){var h=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTML=void 0,r(3055)),h=r(4139),d=r(9261),f=r(6797),m=r(2760),y=c(r(6010)),g=r(505),c=(s=p.CommonOutputJax,o(b,s),b.prototype.escaped=function(t,e){return this.setDocument(e),this.html("span",{},[this.text(t.math)])},b.prototype.styleSheet=function(t){if(this.chtmlStyles)return this.options.adaptiveCSS&&(e=new h.CssStyles,this.addWrapperStyles(e),this.updateFontStyles(e),this.adaptor.insertRules(this.chtmlStyles,e.getStyleRules())),this.chtmlStyles;var e=this.chtmlStyles=s.prototype.styleSheet.call(this,t);return this.adaptor.setAttribute(e,"id",b.STYLESHEETID),this.wrapperUsage.update(),e},b.prototype.updateFontStyles=function(t){t.addStyles(this.font.updateStyles({}))},b.prototype.addWrapperStyles=function(t){var e,r;if(this.options.adaptiveCSS)try{for(var n=u(this.wrapperUsage.update()),o=n.next();!o.done;o=n.next()){var i=o.value,a=this.factory.getNodeClass(i);a&&this.addClassStyles(a,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}else s.prototype.addWrapperStyles.call(this,t)},b.prototype.addClassStyles=function(t,e){var r,n=t;n.autoStyle&&"unknown"!==n.kind&&e.addStyles(((r={})["mjx-"+n.kind]={display:"inline-block","text-align":"left"},r)),this.wrapperUsage.add(n.kind),s.prototype.addClassStyles.call(this,t,e)},b.prototype.processMath=function(t,e){this.factory.wrap(t).toCHTML(e)},b.prototype.clearCache=function(){this.cssStyles.clear(),this.font.clearCache(),this.wrapperUsage.clear(),this.chtmlStyles=null},b.prototype.reset=function(){this.clearCache()},b.prototype.unknownText=function(t,e,r){void 0===r&&(r=null);var n={},o=100/this.math.metrics.scale;return 100!=o&&(n["font-size"]=this.fixed(o,1)+"%",n.padding=y.em(75/o)+" 0 "+y.em(20/o)+" 0"),"-explicitFont"!==e&&(1!==(o=(0,g.unicodeChars)(t)).length||o[0]<119808||120831 *":{display:"table-cell"},"mjx-mtext":{display:"inline-block"},"mjx-mstyle":{display:"inline-block"},"mjx-merror":{display:"inline-block",color:"red","background-color":"yellow"},"mjx-mphantom":{visibility:"hidden"},"_::-webkit-full-page-media, _:future, :root mjx-container":{"will-change":"opacity"}},b.STYLESHEETID="MJX-CHTML-styles",b);function b(t){t=s.call(this,t=void 0===t?null:t,d.CHTMLWrapperFactory,m.TeXFont)||this;return t.chtmlStyles=null,t.font.adaptiveCSS(t.options.adaptiveCSS),t.wrapperUsage=new f.Usage,t}e.CHTML=c},8042:function(t,e,r){var n,c,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=this&&this.__assign||function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},d=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0 mjx-mid"]={"margin-top":this.em(-r/2),"margin-bottom":this.em(-r/2)}),o&&(a["border-top-width"]=this.em0(o-.03)),i&&(a["border-bottom-width"]=this.em0(i-.03),t["mjx-stretchy-v"+e+" > mjx-end"]={"margin-top":this.em(-i)}),Object.keys(a).length&&(t["mjx-stretchy-v"+e+" > mjx-ext"]=a)},h.prototype.addDelimiterVPart=function(t,e,r,n,o){if(!n)return 0;var i=this.getDelimiterData(n),a=(o[2]-i[2])/2,n={content:this.charContent(n)};return"ext"!==r?n.padding=this.padding(i,a):(n.width=this.em0(o[2]),a&&(n["padding-left"]=this.em0(a))),t["mjx-stretchy-v"+e+" mjx-"+r+" mjx-c::before"]=n,i[0]+i[1]},h.prototype.addDelimiterHStyles=function(t,e,r){var n=d(r.stretch,4),o=n[0],i=n[1],a=n[2],n=n[3],r=r.HDW;this.addDelimiterHPart(t,e,"beg",o,r),this.addDelimiterHPart(t,e,"ext",i,r),this.addDelimiterHPart(t,e,"end",a,r),n&&(this.addDelimiterHPart(t,e,"mid",n,r),t["mjx-stretchy-h"+e+" > mjx-ext"]={width:"50%"})},h.prototype.addDelimiterHPart=function(t,e,r,n,o){var i;n&&((i={content:(i=this.getDelimiterData(n)[3])&&i.c?'"'+i.c+'"':this.charContent(n)}).padding=this.padding(o,0,-o[2]),t["mjx-stretchy-h"+e+" mjx-"+r+" mjx-c::before"]=i)},h.prototype.addCharStyles=function(t,e,r,n){var o=n[3],e=void 0!==o.f?o.f:e;t["mjx-c"+this.charSelector(r)+(e?".TEX-"+e:"")+"::before"]={padding:this.padding(n,0,o.ic||0),content:null!=o.c?'"'+o.c+'"':this.charContent(r)}},h.prototype.getDelimiterData=function(t){return this.getChar("-smallop",t)},h.prototype.em=function(t){return(0,p.em)(t)},h.prototype.em0=function(t){return(0,p.em)(Math.max(0,t))},h.prototype.padding=function(t,e,r){var t=d(t,3),n=t[0],o=t[1];return[n,t[2]+(r=void 0===r?0:r),o,e=void 0===e?0:e].map(this.em0).join(" ")},h.prototype.charContent=function(t){return'"'+(32<=t&&t<=126&&34!==t&&39!==t&&92!==t?String.fromCharCode(t):"\\"+t.toString(16).toUpperCase())+'"'},h.prototype.charSelector=function(t){return".mjx-c"+t.toString(16).toUpperCase()},h.OPTIONS=u(u({},l.FontData.OPTIONS),{fontURL:"js/output/chtml/fonts/tex-woff-v2"}),h.JAX="CHTML",h.defaultVariantClasses={},h.defaultVariantLetters={},h.defaultStyles={"mjx-c::before":{display:"block",width:0}},h.defaultFonts={"@font-face /* 0 */":{"font-family":"MJXZERO",src:'url("%%URL%%/MathJax_Zero.woff") format("woff")'}},h);function h(){var t=null!==c&&c.apply(this,arguments)||this;return t.charUsage=new s.Usage,t.delimUsage=new s.Usage,t}e.CHTMLFontData=a,e.AddCSS=function(t,e){var r,n;try{for(var o=v(Object.keys(e)),i=o.next();!i.done;i=o.next()){var a=i.value,s=parseInt(a);Object.assign(l.FontData.charOptions(t,s),e[s])}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return t}},8270:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLTextNode=void 0,r(9007)),s=r(5355),r=(o=(0,r(1160).CommonTextNodeMixin)(s.CHTMLWrapper),i(l,o),l.prototype.toCHTML=function(t){this.markUsed();var e,r,n=this.adaptor,o=this.parent.variant,i=this.node.getText();if(0!==i.length)if("-explicitFont"===o)n.append(t,this.jax.unknownText(i,o,this.getBBox().w));else{i=this.remappedText(i,o);try{for(var a=h(i),s=a.next();!s.done;s=a.next()){var l=s.value,c=this.getVariantChar(o,l)[3],u=c.f?" TEX-"+c.f:"",p=c.unknown?this.jax.unknownText(String.fromCodePoint(l),o):this.html("mjx-c",{class:this.char(l)+u});n.append(t,p),c.unknown||this.font.charUsage.add([o,l])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}}},l.kind=a.TextNode.prototype.kind,l.autoStyle=!1,l.styles={"mjx-c":{display:"inline-block"},"mjx-utext":{display:"inline-block",padding:".75em 0 .2em 0"}},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLTextNode=r},8102:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmaction=void 0,r(5355)),s=r(1956),l=r(1956),r=r(9145),s=(o=(0,s.CommonMactionMixin)(a.CHTMLWrapper),i(c,o),c.prototype.toCHTML=function(t){t=this.standardCHTMLnode(t);this.selected.toCHTML(t),this.action(this,this.data)},c.prototype.setEventHandler=function(t,e){this.chtml.addEventListener(t,e)},c.kind=r.MmlMaction.prototype.kind,c.styles={"mjx-maction":{position:"relative"},"mjx-maction > mjx-tool":{display:"none",position:"absolute",bottom:0,right:0,width:0,height:0,"z-index":500},"mjx-tool > mjx-tip":{display:"inline-block",padding:".2em",border:"1px solid #888","font-size":"70%","background-color":"#F8F8F8",color:"black","box-shadow":"2px 2px 5px #AAAAAA"},"mjx-maction[toggle]":{cursor:"pointer"},"mjx-status":{display:"block",position:"fixed",left:"1em",bottom:"1em","min-width":"25%",padding:".2em .4em",border:"1px solid #888","font-size":"90%","background-color":"#F8F8F8",color:"black"}},c.actions=new Map([["toggle",[function(t,e){t.adaptor.setAttribute(t.chtml,"toggle",t.node.attributes.get("selection"));var r=t.factory.jax.math,n=t.factory.jax.document,o=t.node;t.setEventHandler("click",function(t){r.end.node||(r.start.node=r.end.node=r.typesetRoot,r.start.n=r.end.n=0),o.nextToggleSelection(),r.rerender(n),t.stopPropagation()})},{}]],["tooltip",[function(r,n){var t,o,i,e=r.childNodes[1];e&&(e.node.isKind("mtext")?(t=e.node.getText(),r.adaptor.setAttribute(r.chtml,"title",t)):(o=r.adaptor,i=o.append(r.chtml,r.html("mjx-tool",{style:{bottom:r.em(-r.dy),right:r.em(-r.dx)}},[r.html("mjx-tip")])),e.toCHTML(o.firstChild(i)),r.setEventHandler("mouseover",function(t){n.stopTimers(r,n);var e=setTimeout(function(){return o.setStyle(i,"display","block")},n.postDelay);n.hoverTimer.set(r,e),t.stopPropagation()}),r.setEventHandler("mouseout",function(t){n.stopTimers(r,n);var e=setTimeout(function(){return o.setStyle(i,"display","")},n.clearDelay);n.clearTimer.set(r,e),t.stopPropagation()})))},l.TooltipData]],["statusline",[function(r,n){var o,i,t=r.childNodes[1];t&&t.node.isKind("mtext")&&(o=r.adaptor,i=t.node.getText(),o.setAttribute(r.chtml,"statusline",i),r.setEventHandler("mouseover",function(t){var e;null===n.status&&(e=o.body(o.document),n.status=o.append(e,r.html("mjx-status",{},[r.text(i)]))),t.stopPropagation()}),r.setEventHandler("mouseout",function(t){n.status&&(o.remove(n.status),n.status=null),t.stopPropagation()}))},{status:null}]]]),c);function c(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmaction=s},804:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},h=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0 mjx-dstrike":{display:"inline-block",left:0,top:0,position:"absolute","border-top":b.SOLID,"transform-origin":"top left"},"mjx-menclose > mjx-ustrike":{display:"inline-block",left:0,bottom:0,position:"absolute","border-top":b.SOLID,"transform-origin":"bottom left"},"mjx-menclose > mjx-hstrike":{"border-top":b.SOLID,position:"absolute",left:0,right:0,bottom:"50%",transform:"translateY("+(0,r.em)(b.THICKNESS/2)+")"},"mjx-menclose > mjx-vstrike":{"border-left":b.SOLID,position:"absolute",top:0,bottom:0,right:"50%",transform:"translateX("+(0,r.em)(b.THICKNESS/2)+")"},"mjx-menclose > mjx-rbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:b.SOLID,"border-radius":(0,r.em)(b.THICKNESS+b.PADDING)},"mjx-menclose > mjx-cbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:b.SOLID,"border-radius":"50%"},"mjx-menclose > mjx-arrow":{position:"absolute",left:0,bottom:"50%",height:0,width:0},"mjx-menclose > mjx-arrow > *":{display:"block",position:"absolute","transform-origin":"bottom","border-left":(0,r.em)(b.THICKNESS*b.ARROWX)+" solid","border-right":0,"box-sizing":"border-box"},"mjx-menclose > mjx-arrow > mjx-aline":{left:0,top:(0,r.em)(-b.THICKNESS/2),right:(0,r.em)(b.THICKNESS*(b.ARROWX-1)),height:0,"border-top":(0,r.em)(b.THICKNESS)+" solid","border-left":0},"mjx-menclose > mjx-arrow[double] > mjx-aline":{left:(0,r.em)(b.THICKNESS*(b.ARROWX-1)),height:0},"mjx-menclose > mjx-arrow > mjx-rthead":{transform:"skewX("+p+"rad)",right:0,bottom:"-1px","border-bottom":"1px solid transparent","border-top":(0,r.em)(b.THICKNESS*b.ARROWY)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-rbhead":{transform:"skewX(-"+p+"rad)","transform-origin":"top",right:0,top:"-1px","border-top":"1px solid transparent","border-bottom":(0,r.em)(b.THICKNESS*b.ARROWY)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lthead":{transform:"skewX(-"+p+"rad)",left:0,bottom:"-1px","border-left":0,"border-right":(0,r.em)(b.THICKNESS*b.ARROWX)+" solid","border-bottom":"1px solid transparent","border-top":(0,r.em)(b.THICKNESS*b.ARROWY)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lbhead":{transform:"skewX("+p+"rad)","transform-origin":"top",left:0,top:"-1px","border-left":0,"border-right":(0,r.em)(b.THICKNESS*b.ARROWX)+" solid","border-top":"1px solid transparent","border-bottom":(0,r.em)(b.THICKNESS*b.ARROWY)+" solid transparent"},"mjx-menclose > dbox":{position:"absolute",top:0,bottom:0,left:(0,r.em)(-1.5*b.PADDING),width:(0,r.em)(3*b.PADDING),border:(0,r.em)(b.THICKNESS)+" solid","border-radius":"50%","clip-path":"inset(0 0 0 "+(0,r.em)(1.5*b.PADDING)+")","box-sizing":"border-box"}},f.notations=new Map([b.Border("top"),b.Border("right"),b.Border("bottom"),b.Border("left"),b.Border2("actuarial","top","right"),b.Border2("madruwb","bottom","right"),b.DiagonalStrike("up",1),b.DiagonalStrike("down",-1),["horizontalstrike",{renderer:b.RenderElement("hstrike","Y"),bbox:function(t){return[0,t.padding,0,t.padding]}}],["verticalstrike",{renderer:b.RenderElement("vstrike","X"),bbox:function(t){return[t.padding,0,t.padding,0]}}],["box",{renderer:function(t,e){t.adaptor.setStyle(e,"border",t.em(t.thickness)+" solid")},bbox:b.fullBBox,border:b.fullBorder,remove:"left right top bottom"}],["roundedbox",{renderer:b.RenderElement("rbox"),bbox:b.fullBBox}],["circle",{renderer:b.RenderElement("cbox"),bbox:b.fullBBox}],["phasorangle",{renderer:function(t,e){var r=t.getBBox(),n=r.h,r=r.d,n=h(t.getArgMod(1.75*t.padding,n+r),2),r=n[0],n=n[1],o=t.thickness*Math.sin(r)*.9,e=(t.adaptor.setStyle(e,"border-bottom",t.em(t.thickness)+" solid"),t.adjustBorder(t.html("mjx-ustrike",{style:{width:t.em(n),transform:"translateX("+t.em(o)+") rotate("+t.fixed(-r)+"rad)"}})));t.adaptor.append(t.chtml,e)},bbox:function(t){var e=t.padding/2,t=t.thickness;return[2*e,e,e+t,3*e+t]},border:function(t){return[0,0,t.thickness,0]},remove:"bottom"}],b.Arrow("up"),b.Arrow("down"),b.Arrow("left"),b.Arrow("right"),b.Arrow("updown"),b.Arrow("leftright"),b.DiagonalArrow("updiagonal"),b.DiagonalArrow("northeast"),b.DiagonalArrow("southeast"),b.DiagonalArrow("northwest"),b.DiagonalArrow("southwest"),b.DiagonalArrow("northeastsouthwest"),b.DiagonalArrow("northwestsoutheast"),["longdiv",{renderer:function(t,e){var r=t.adaptor,e=(r.setStyle(e,"border-top",t.em(t.thickness)+" solid"),r.append(t.chtml,t.html("dbox"))),n=t.thickness,o=t.padding;n!==b.THICKNESS&&r.setStyle(e,"border-width",t.em(n)),o!==b.PADDING&&(r.setStyle(e,"left",t.em(-1.5*o)),r.setStyle(e,"width",t.em(3*o)),r.setStyle(e,"clip-path","inset(0 0 0 "+t.em(1.5*o)+")"))},bbox:function(t){var e=t.padding,t=t.thickness;return[e+t,e,e,2*e+t/2]}}],["radical",{renderer:function(e,t){e.msqrt.toCHTML(t);t=e.sqrtTRBL();e.adaptor.setStyle(e.msqrt.chtml,"margin",t.map(function(t){return e.em(-t)}).join(" "))},init:function(t){t.msqrt=t.createMsqrt(t.childNodes[0])},bbox:function(t){return t.sqrtTRBL()},renderChild:!0}]]),f);function f(){return null!==u&&u.apply(this,arguments)||this}e.CHTMLmenclose=c},2275:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmfenced=void 0,r(5355)),s=r(7555),r=r(5410),s=(o=(0,s.CommonMfencedMixin)(a.CHTMLWrapper),i(l,o),l.prototype.toCHTML=function(t){t=this.standardCHTMLnode(t);this.mrow.toCHTML(t)},l.kind=r.MmlMfenced.prototype.kind,l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmfenced=s},9063:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),d=this&&this.__assign||function(){return(d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r *":{"font-size":"2000%"},"mjx-dbox":{display:"block","font-size":"5%"},"mjx-num":{display:"block","text-align":"center"},"mjx-den":{display:"block","text-align":"center"},"mjx-mfrac[bevelled] > mjx-num":{display:"inline-block"},"mjx-mfrac[bevelled] > mjx-den":{display:"inline-block"},'mjx-den[align="right"], mjx-num[align="right"]':{"text-align":"right"},'mjx-den[align="left"], mjx-num[align="left"]':{"text-align":"left"},"mjx-nstrut":{display:"inline-block",height:".054em",width:0,"vertical-align":"-.054em"},'mjx-nstrut[type="d"]':{height:".217em","vertical-align":"-.217em"},"mjx-dstrut":{display:"inline-block",height:".505em",width:0},'mjx-dstrut[type="d"]':{height:".726em"},"mjx-line":{display:"block","box-sizing":"border-box","min-height":"1px",height:".06em","border-top":".06em solid",margin:".06em -.1em",overflow:"hidden"},'mjx-line[type="d"]':{margin:".18em -.1em"}},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmfrac=s},6911:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmglyph=void 0,r(5355)),s=r(5636),r=r(3985),s=(o=(0,s.CommonMglyphMixin)(a.CHTMLWrapper),i(l,o),l.prototype.toCHTML=function(t){var e,r,n,t=this.standardCHTMLnode(t);this.charWrapper?this.charWrapper.toCHTML(t):(n=(e=this.node.attributes.getList("src","alt")).src,e=e.alt,r={width:this.em(this.width),height:this.em(this.height)},this.valign&&(r.verticalAlign=this.em(this.valign)),n=this.html("img",{src:n,style:r,alt:e,title:e}),this.adaptor.append(t,n))},l.kind=r.MmlMglyph.prototype.kind,l.styles={"mjx-mglyph > img":{display:"inline-block",border:0,padding:0}},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmglyph=s},1653:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmi=void 0,r(5355)),s=r(5723),r=r(450),s=(o=(0,s.CommonMiMixin)(a.CHTMLWrapper),i(l,o),l.kind=r.MmlMi.prototype.kind,l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmi=s},6781:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0 mjx-row > mjx-cell":{"text-align":"right"},'[script-align="left"] > mjx-row > mjx-cell':{"text-align":"left"},'[script-align="center"] > mjx-row > mjx-cell':{"text-align":"center"},'[script-align="right"] > mjx-row > mjx-cell':{"text-align":"right"}},p);function p(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmmultiscripts=r},6460:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmn=void 0,r(5355)),s=r(5023),r=r(3050),s=(o=(0,s.CommonMnMixin)(a.CHTMLWrapper),i(l,o),l.kind=r.MmlMn.prototype.kind,l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmn=s},6287:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmo=void 0,r(5355)),l=r(7096),r=r(2756),a=(o=(0,l.CommonMoMixin)(a.CHTMLWrapper),i(s,o),s.prototype.toCHTML=function(t){var e,r,n=this.node.attributes,o=n.get("symmetric")&&2!==this.stretch.dir,i=0!==this.stretch.dir,a=(i&&null===this.size&&this.getStretchedVariant([]),this.standardCHTMLnode(t));if(i&&this.size<0)this.stretchHTML(a);else{!o&&!n.get("largeop")||"0"!==(i=this.em(this.getCenterOffset()))&&this.adaptor.setStyle(a,"verticalAlign",i),this.node.getProperty("mathaccent")&&(this.adaptor.setStyle(a,"width","0"),this.adaptor.setStyle(a,"margin-left",this.em(this.getAccentOffset())));try{for(var s=c(this.childNodes),l=s.next();!l.done;l=s.next())l.value.toCHTML(a)}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}},s.prototype.stretchHTML=function(t){var e=this.getText().codePointAt(0),r=(this.font.delimUsage.add(e),this.childNodes[0].markUsed(),this.stretch),n=r.stretch,o=[],n=(n[0]&&o.push(this.html("mjx-beg",{},[this.html("mjx-c")])),o.push(this.html("mjx-ext",{},[this.html("mjx-c")])),4===n.length&&o.push(this.html("mjx-mid",{},[this.html("mjx-c")]),this.html("mjx-ext",{},[this.html("mjx-c")])),n[2]&&o.push(this.html("mjx-end",{},[this.html("mjx-c")])),{}),i=this.bbox,a=i.h,s=i.d,i=i.w,a=(1===r.dir?(o.push(this.html("mjx-mark")),n.height=this.em(a+s),n.verticalAlign=this.em(-s)):n.width=this.em(i),l.DirectionVH[r.dir]),s={class:this.char(r.c||e),style:n},i=this.html("mjx-stretchy-"+a,s,o);this.adaptor.append(t,i)},s.kind=r.MmlMo.prototype.kind,s.styles={"mjx-stretchy-h":{display:"inline-table",width:"100%"},"mjx-stretchy-h > *":{display:"table-cell",width:0},"mjx-stretchy-h > * > mjx-c":{display:"inline-block",transform:"scalex(1.0000001)"},"mjx-stretchy-h > * > mjx-c::before":{display:"inline-block",width:"initial"},"mjx-stretchy-h > mjx-ext":{"/* IE */ overflow":"hidden","/* others */ overflow":"clip visible",width:"100%"},"mjx-stretchy-h > mjx-ext > mjx-c::before":{transform:"scalex(500)"},"mjx-stretchy-h > mjx-ext > mjx-c":{width:0},"mjx-stretchy-h > mjx-beg > mjx-c":{"margin-right":"-.1em"},"mjx-stretchy-h > mjx-end > mjx-c":{"margin-left":"-.1em"},"mjx-stretchy-v":{display:"inline-block"},"mjx-stretchy-v > *":{display:"block"},"mjx-stretchy-v > mjx-beg":{height:0},"mjx-stretchy-v > mjx-end > mjx-c":{display:"block"},"mjx-stretchy-v > * > mjx-c":{transform:"scaley(1.0000001)","transform-origin":"left center",overflow:"hidden"},"mjx-stretchy-v > mjx-ext":{display:"block",height:"100%","box-sizing":"border-box",border:"0px solid transparent","/* IE */ overflow":"hidden","/* others */ overflow":"visible clip"},"mjx-stretchy-v > mjx-ext > mjx-c::before":{width:"initial","box-sizing":"border-box"},"mjx-stretchy-v > mjx-ext > mjx-c":{transform:"scaleY(500) translateY(.075em)",overflow:"visible"},"mjx-mark":{display:"inline-block",height:"0px"}},s);function s(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmo=a},5964:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),m=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmpadded=void 0,r(5355)),s=r(6898),r=r(7238),s=(o=(0,s.CommonMpaddedMixin)(a.CHTMLWrapper),i(l,o),l.prototype.toCHTML=function(t){var e,r,n=this.standardCHTMLnode(t),o=[],i={},a=m(this.getDimens(),9),s=a[2],l=a[3],c=a[4],u=a[5],p=a[6],h=a[7],a=a[8];u&&(i.width=this.em(s+u)),(l||c)&&(i.margin=this.em(l)+" 0 "+this.em(c)),(p+a||h)&&(i.position="relative",s=this.html("mjx-rbox",{style:{left:this.em(p+a),top:this.em(-h),"max-width":i.width}}),p+a&&this.childNodes[0].getBBox().pwidth&&(this.adaptor.setAttribute(s,"width","full"),this.adaptor.setStyle(s,"left",this.em(p))),o.push(s)),n=this.adaptor.append(n,this.html("mjx-block",{style:i},o));try{for(var d=y(this.childNodes),f=d.next();!f.done;f=d.next())f.value.toCHTML(o[0]||n)}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(e)throw e.error}}},l.kind=r.MmlMpadded.prototype.kind,l.styles={"mjx-mpadded":{display:"inline-block"},"mjx-rbox":{display:"inline-block",position:"relative"}},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmpadded=s},8776:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLinferredMrow=e.CHTMLmrow=void 0,r(5355)),s=r(8411),c=r(8411),r=r(9878),s=(o=(0,s.CommonMrowMixin)(a.CHTMLWrapper),i(u,o),u.prototype.toCHTML=function(t){var e,r,n=this.node.isInferred?this.chtml=t:this.standardCHTMLnode(t),o=!1;try{for(var i=l(this.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;s.toCHTML(n),s.bbox.w<0&&(o=!0)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}o&&(r=this.getBBox().w)&&(this.adaptor.setStyle(n,"width",this.em(Math.max(0,r))),r<0&&this.adaptor.setStyle(n,"marginRight",this.em(r)))},u.kind=r.MmlMrow.prototype.kind,u);function u(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmrow=s;p=(0,c.CommonInferredMrowMixin)(s),i(h,p),h.kind=r.MmlInferredMrow.prototype.kind;var p,a=h;function h(){return null!==p&&p.apply(this,arguments)||this}e.CHTMLinferredMrow=a},4597:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLms=void 0,r(5355)),s=r(4126),r=r(7265),s=(o=(0,s.CommonMsMixin)(a.CHTMLWrapper),i(l,o),l.kind=r.MmlMs.prototype.kind,l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLms=s},2970:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmspace=void 0,r(5355)),s=r(258),r=r(6030),s=(o=(0,s.CommonMspaceMixin)(a.CHTMLWrapper),i(l,o),l.prototype.toCHTML=function(t){var t=this.standardCHTMLnode(t),e=this.getBBox(),r=e.w,n=e.h,e=e.d;r<0&&(this.adaptor.setStyle(t,"marginRight",this.em(r)),r=0),r&&this.adaptor.setStyle(t,"width",this.em(r)),(n=Math.max(0,n+e))&&this.adaptor.setStyle(t,"height",this.em(Math.max(0,n))),e&&this.adaptor.setStyle(t,"verticalAlign",this.em(-e))},l.kind=r.MmlMspace.prototype.kind,l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmspace=s},5610:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),c=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0 mjx-box":{"border-top":".07em solid"},"mjx-sqrt.mjx-tall > mjx-box":{"padding-left":".3em","margin-left":"-.3em"}},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmsqrt=s},4300:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0 mjx-spacer":{display:"block"}};var f,c=m;function m(){return null!==f&&f.apply(this,arguments)||this}e.CHTMLmsubsup=c},8002:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),g=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0 mjx-itable":{"vertical-align":"middle","text-align":"left","box-sizing":"border-box"},"mjx-labels > mjx-itable":{position:"absolute",top:0},'mjx-mtable[justify="left"]':{"text-align":"left"},'mjx-mtable[justify="right"]':{"text-align":"right"},'mjx-mtable[justify="left"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="left"][side="right"]':{"padding-left":"0 ! important"},'mjx-mtable[justify="right"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="right"][side="right"]':{"padding-left":"0 ! important"},"mjx-mtable[align]":{"vertical-align":"baseline"},'mjx-mtable[align="top"] > mjx-table':{"vertical-align":"top"},'mjx-mtable[align="bottom"] > mjx-table':{"vertical-align":"bottom"},'mjx-mtable[side="right"] mjx-labels':{"min-width":"100%"}},p);function p(t,e,r){t=o.call(this,t,e,r=void 0===r?null:r)||this;return t.itable=t.html("mjx-itable"),t.labels=t.html("mjx-itable"),t}e.CHTMLmtable=r},7056:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmtd=void 0,r(5355)),s=r(5164),r=r(4359),s=(o=(0,s.CommonMtdMixin)(a.CHTMLWrapper),i(l,o),l.prototype.toCHTML=function(t){o.prototype.toCHTML.call(this,t);var t=this.node.attributes.get("rowalign"),e=this.node.attributes.get("columnalign");t!==this.parent.node.attributes.get("rowalign")&&this.adaptor.setAttribute(this.chtml,"rowalign",t),"center"===e||"mlabeledtr"===this.parent.kind&&this===this.parent.childNodes[0]&&e===this.parent.parent.node.attributes.get("side")||this.adaptor.setStyle(this.chtml,"textAlign",e),this.parent.parent.node.getProperty("useHeight")&&this.adaptor.append(this.chtml,this.html("mjx-tstrut"))},l.kind=r.MmlMtd.prototype.kind,l.styles={"mjx-mtd":{display:"table-cell","text-align":"center",padding:".215em .4em"},"mjx-mtd:first-child":{"padding-left":0},"mjx-mtd:last-child":{"padding-right":0},"mjx-mtable > * > mjx-itable > *:first-child > mjx-mtd":{"padding-top":0},"mjx-mtable > * > mjx-itable > *:last-child > mjx-mtd":{"padding-bottom":0},"mjx-tstrut":{display:"inline-block",height:"1em","vertical-align":"-.25em"},'mjx-labels[align="left"] > mjx-mtr > mjx-mtd':{"text-align":"left"},'mjx-labels[align="right"] > mjx-mtr > mjx-mtd':{"text-align":"right"},"mjx-mtd[extra]":{padding:0},'mjx-mtd[rowalign="top"]':{"vertical-align":"top"},'mjx-mtd[rowalign="center"]':{"vertical-align":"middle"},'mjx-mtd[rowalign="bottom"]':{"vertical-align":"bottom"},'mjx-mtd[rowalign="baseline"]':{"vertical-align":"baseline"},'mjx-mtd[rowalign="axis"]':{"vertical-align":".25em"}},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmtd=s},1259:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmtext=void 0,r(5355)),s=r(6319),r=r(4770),s=(o=(0,s.CommonMtextMixin)(a.CHTMLWrapper),i(l,o),l.kind=r.MmlMtext.prototype.kind,l);function l(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmtext=s},3571:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmlabeledtr=e.CHTMLmtr=void 0,r(5355)),s=r(5766),l=r(5766),r=r(5022),c=(o=(0,s.CommonMtrMixin)(a.CHTMLWrapper),i(u,o),u.prototype.toCHTML=function(t){o.prototype.toCHTML.call(this,t);t=this.node.attributes.get("rowalign");"baseline"!==t&&this.adaptor.setAttribute(this.chtml,"rowalign",t)},u.kind=r.MmlMtr.prototype.kind,u.styles={"mjx-mtr":{display:"table-row"},'mjx-mtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}},u);function u(){return null!==o&&o.apply(this,arguments)||this}e.CHTMLmtr=c;p=(0,l.CommonMlabeledtrMixin)(c),i(h,p),h.prototype.toCHTML=function(t){p.prototype.toCHTML.call(this,t);var e,t=this.adaptor.firstChild(this.chtml);t&&(this.adaptor.remove(t),e=this.node.attributes.get("rowalign"),e=this.html("mjx-mtr","baseline"!==e&&"axis"!==e?{rowalign:e}:{},[t]),this.adaptor.append(this.parent.labels,e))},h.prototype.markUsed=function(){p.prototype.markUsed.call(this),this.jax.wrapperUsage.add(c.kind)},h.kind=r.MmlMlabeledtr.prototype.kind,h.styles={"mjx-mlabeledtr":{display:"table-row"},'mjx-mlabeledtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mlabeledtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mlabeledtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mlabeledtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mlabeledtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}};var p,s=h;function h(){return null!==p&&p.apply(this,arguments)||this}e.CHTMLmlabeledtr=s},6590:function(t,e,r){var n,a,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLmunderover=e.CHTMLmover=e.CHTMLmunder=void 0,r(4300)),s=r(1971),l=r(1971),c=r(1971),r=r(5184),s=(a=(0,s.CommonMunderMixin)(i.CHTMLmsub),o(u,a),u.prototype.toCHTML=function(t){if(this.hasMovableLimits())return a.prototype.toCHTML.call(this,t),void this.adaptor.setAttribute(this.chtml,"limits","false");this.chtml=this.standardCHTMLnode(t);var t=this.adaptor.append(this.adaptor.append(this.chtml,this.html("mjx-row")),this.html("mjx-base")),e=this.adaptor.append(this.adaptor.append(this.chtml,this.html("mjx-row")),this.html("mjx-under")),r=(this.baseChild.toCHTML(t),this.scriptChild.toCHTML(e),this.baseChild.getOuterBBox()),n=this.scriptChild.getOuterBBox(),o=this.getUnderKV(r,n)[0],i=this.isLineBelow?0:this.getDelta(!0);this.adaptor.setStyle(e,"paddingTop",this.em(o)),this.setDeltaW([t,e],this.getDeltaW([r,n],[0,-i])),this.adjustUnderDepth(e,n)},u.kind=r.MmlMunder.prototype.kind,u.styles={"mjx-over":{"text-align":"left"},'mjx-munder:not([limits="false"])':{display:"inline-table"},"mjx-munder > mjx-row":{"text-align":"left"},"mjx-under":{"padding-bottom":".1em"}},u);function u(){return null!==a&&a.apply(this,arguments)||this}e.CHTMLmunder=s;p=(0,l.CommonMoverMixin)(i.CHTMLmsup),o(h,p),h.prototype.toCHTML=function(t){if(this.hasMovableLimits())return p.prototype.toCHTML.call(this,t),void this.adaptor.setAttribute(this.chtml,"limits","false");this.chtml=this.standardCHTMLnode(t);var t=this.adaptor.append(this.chtml,this.html("mjx-over")),e=this.adaptor.append(this.chtml,this.html("mjx-base")),r=(this.scriptChild.toCHTML(t),this.baseChild.toCHTML(e),this.scriptChild.getOuterBBox()),n=this.baseChild.getOuterBBox(),o=(this.adjustBaseHeight(e,n),this.getOverKU(n,r)[0]),i=this.isLineAbove?0:this.getDelta();this.adaptor.setStyle(t,"paddingBottom",this.em(o)),this.setDeltaW([e,t],this.getDeltaW([n,r],[0,i])),this.adjustOverDepth(t,r)},h.kind=r.MmlMover.prototype.kind,h.styles={'mjx-mover:not([limits="false"])':{"padding-top":".1em"},'mjx-mover:not([limits="false"]) > *':{display:"block","text-align":"left"}};var p,s=h;function h(){return null!==p&&p.apply(this,arguments)||this}e.CHTMLmover=s;d=(0,c.CommonMunderoverMixin)(i.CHTMLmsubsup),o(f,d),f.prototype.toCHTML=function(t){if(this.hasMovableLimits())return d.prototype.toCHTML.call(this,t),void this.adaptor.setAttribute(this.chtml,"limits","false");this.chtml=this.standardCHTMLnode(t);var t=this.adaptor.append(this.chtml,this.html("mjx-over")),e=this.adaptor.append(this.adaptor.append(this.chtml,this.html("mjx-box")),this.html("mjx-munder")),r=this.adaptor.append(this.adaptor.append(e,this.html("mjx-row")),this.html("mjx-base")),e=this.adaptor.append(this.adaptor.append(e,this.html("mjx-row")),this.html("mjx-under")),n=(this.overChild.toCHTML(t),this.baseChild.toCHTML(r),this.underChild.toCHTML(e),this.overChild.getOuterBBox()),o=this.baseChild.getOuterBBox(),i=this.underChild.getOuterBBox(),a=(this.adjustBaseHeight(r,o),this.getOverKU(o,n)[0]),s=this.getUnderKV(o,i)[0],l=this.getDelta();this.adaptor.setStyle(t,"paddingBottom",this.em(a)),this.adaptor.setStyle(e,"paddingTop",this.em(s)),this.setDeltaW([r,e,t],this.getDeltaW([o,i,n],[0,this.isLineBelow?0:-l,this.isLineAbove?0:l])),this.adjustOverDepth(t,n),this.adjustUnderDepth(e,i)},f.prototype.markUsed=function(){d.prototype.markUsed.call(this),this.jax.wrapperUsage.add(i.CHTMLmsubsup.kind)},f.kind=r.MmlMunderover.prototype.kind,f.styles={'mjx-munderover:not([limits="false"])':{"padding-top":".1em"},'mjx-munderover:not([limits="false"]) > *':{display:"block"}};var d,l=f;function f(){return null!==d&&d.apply(this,arguments)||this}e.CHTMLmunderover=l},8650:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.CHTMLscriptbase=void 0,r(5355)),r=(o=(0,r(167).CommonScriptbaseMixin)(s.CHTMLWrapper),i(l,o),l.prototype.toCHTML=function(t){this.chtml=this.standardCHTMLnode(t);var t=a(this.getOffset(),2),e=t[0],t=t[1],e=e-(this.baseRemoveIc?this.baseIc:0),t={"vertical-align":this.em(t)};e&&(t["margin-left"]=this.em(e)),this.baseChild.toCHTML(this.chtml),this.scriptChild.toCHTML(this.adaptor.append(this.chtml,this.html("mjx-script",{style:t})))},l.prototype.setDeltaW=function(t,e){for(var r=0;r\\338"},8816:{c:"\\2264\\338"},8817:{c:"\\2265\\338"},8832:{c:"\\227A\\338"},8833:{c:"\\227B\\338"},8836:{c:"\\2282\\338"},8837:{c:"\\2283\\338"},8840:{c:"\\2286\\338"},8841:{c:"\\2287\\338"},8876:{c:"\\22A2\\338"},8877:{c:"\\22A8\\338"},8930:{c:"\\2291\\338"},8931:{c:"\\2292\\338"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},9653:{c:"\\25B3"},9663:{c:"\\25BD"},10072:{c:"\\2223"},10744:{c:"/",f:"BI"},10799:{c:"\\D7"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}})},4515:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.doubleStruck=void 0;var n=r(6001);Object.defineProperty(e,"doubleStruck",{enumerable:!0,get:function(){return n.doubleStruck}})},6555:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.frakturBold=void 0;var n=r(8042),r=r(3696);e.frakturBold=(0,n.AddCSS)(r.frakturBold,{8260:{c:"/"}})},2183:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.fraktur=void 0;var n=r(8042),r=r(9587);e.fraktur=(0,n.AddCSS)(r.fraktur,{8260:{c:"/"}})},3490:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.italic=void 0;var n=r(8042),r=r(8348);e.italic=(0,n.AddCSS)(r.italic,{47:{f:"I"},989:{c:"\\E008",f:"A"},8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/",f:"I"},8710:{c:"\\394",f:"I"},10744:{c:"/",f:"I"}})},9056:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.largeop=void 0;var n=r(8042),r=r(1376);e.largeop=(0,n.AddCSS)(r.largeop,{8214:{f:"S1"},8260:{c:"/"},8593:{f:"S1"},8595:{f:"S1"},8657:{f:"S1"},8659:{f:"S1"},8739:{f:"S1"},8741:{f:"S1"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},9168:{f:"S1"},10072:{c:"\\2223",f:"S1"},10764:{c:"\\222C\\222C"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}})},3019:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.monospace=void 0;var n=r(8042),r=r(1439);e.monospace=(0,n.AddCSS)(r.monospace,{697:{c:"\\2032"},913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8215:{c:"_"},8243:{c:"\\2032\\2032"},8244:{c:"\\2032\\2032\\2032"},8260:{c:"/"},8279:{c:"\\2032\\2032\\2032\\2032"},8710:{c:"\\394"}})},2713:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.normal=void 0;var n=r(8042),r=r(331);e.normal=(0,n.AddCSS)(r.normal,{163:{f:"MI"},165:{f:"A"},174:{f:"A"},183:{c:"\\22C5"},240:{f:"A"},697:{c:"\\2032"},913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8192:{c:""},8193:{c:""},8194:{c:""},8195:{c:""},8196:{c:""},8197:{c:""},8198:{c:""},8201:{c:""},8202:{c:""},8203:{c:""},8204:{c:""},8213:{c:"\\2014"},8214:{c:"\\2225"},8215:{c:"_"},8226:{c:"\\2219"},8243:{c:"\\2032\\2032"},8244:{c:"\\2032\\2032\\2032"},8245:{f:"A"},8246:{c:"\\2035\\2035",f:"A"},8247:{c:"\\2035\\2035\\2035",f:"A"},8254:{c:"\\2C9"},8260:{c:"/"},8279:{c:"\\2032\\2032\\2032\\2032"},8288:{c:""},8289:{c:""},8290:{c:""},8291:{c:""},8292:{c:""},8407:{c:"\\2192",f:"V"},8450:{c:"C",f:"A"},8459:{c:"H",f:"SC"},8460:{c:"H",f:"FR"},8461:{c:"H",f:"A"},8462:{c:"h",f:"I"},8463:{f:"A"},8464:{c:"I",f:"SC"},8465:{c:"I",f:"FR"},8466:{c:"L",f:"SC"},8469:{c:"N",f:"A"},8473:{c:"P",f:"A"},8474:{c:"Q",f:"A"},8475:{c:"R",f:"SC"},8476:{c:"R",f:"FR"},8477:{c:"R",f:"A"},8484:{c:"Z",f:"A"},8486:{c:"\\3A9"},8487:{f:"A"},8488:{c:"Z",f:"FR"},8492:{c:"B",f:"SC"},8493:{c:"C",f:"FR"},8496:{c:"E",f:"SC"},8497:{c:"F",f:"SC"},8498:{f:"A"},8499:{c:"M",f:"SC"},8502:{f:"A"},8503:{f:"A"},8504:{f:"A"},8513:{f:"A"},8602:{f:"A"},8603:{f:"A"},8606:{f:"A"},8608:{f:"A"},8610:{f:"A"},8611:{f:"A"},8619:{f:"A"},8620:{f:"A"},8621:{f:"A"},8622:{f:"A"},8624:{f:"A"},8625:{f:"A"},8630:{f:"A"},8631:{f:"A"},8634:{f:"A"},8635:{f:"A"},8638:{f:"A"},8639:{f:"A"},8642:{f:"A"},8643:{f:"A"},8644:{f:"A"},8646:{f:"A"},8647:{f:"A"},8648:{f:"A"},8649:{f:"A"},8650:{f:"A"},8651:{f:"A"},8653:{f:"A"},8654:{f:"A"},8655:{f:"A"},8666:{f:"A"},8667:{f:"A"},8669:{f:"A"},8672:{f:"A"},8674:{f:"A"},8705:{f:"A"},8708:{c:"\\2203\\338"},8710:{c:"\\394"},8716:{c:"\\220B\\338"},8717:{f:"A"},8719:{f:"S1"},8720:{f:"S1"},8721:{f:"S1"},8724:{f:"A"},8737:{f:"A"},8738:{f:"A"},8740:{f:"A"},8742:{f:"A"},8748:{f:"S1"},8749:{f:"S1"},8750:{f:"S1"},8756:{f:"A"},8757:{f:"A"},8765:{f:"A"},8769:{f:"A"},8770:{f:"A"},8772:{c:"\\2243\\338"},8775:{c:"\\2246",f:"A"},8777:{c:"\\2248\\338"},8778:{f:"A"},8782:{f:"A"},8783:{f:"A"},8785:{f:"A"},8786:{f:"A"},8787:{f:"A"},8790:{f:"A"},8791:{f:"A"},8796:{f:"A"},8802:{c:"\\2261\\338"},8806:{f:"A"},8807:{f:"A"},8808:{f:"A"},8809:{f:"A"},8812:{f:"A"},8813:{c:"\\224D\\338"},8814:{f:"A"},8815:{f:"A"},8816:{f:"A"},8817:{f:"A"},8818:{f:"A"},8819:{f:"A"},8820:{c:"\\2272\\338"},8821:{c:"\\2273\\338"},8822:{f:"A"},8823:{f:"A"},8824:{c:"\\2276\\338"},8825:{c:"\\2277\\338"},8828:{f:"A"},8829:{f:"A"},8830:{f:"A"},8831:{f:"A"},8832:{f:"A"},8833:{f:"A"},8836:{c:"\\2282\\338"},8837:{c:"\\2283\\338"},8840:{f:"A"},8841:{f:"A"},8842:{f:"A"},8843:{f:"A"},8847:{f:"A"},8848:{f:"A"},8858:{f:"A"},8859:{f:"A"},8861:{f:"A"},8862:{f:"A"},8863:{f:"A"},8864:{f:"A"},8865:{f:"A"},8873:{f:"A"},8874:{f:"A"},8876:{f:"A"},8877:{f:"A"},8878:{f:"A"},8879:{f:"A"},8882:{f:"A"},8883:{f:"A"},8884:{f:"A"},8885:{f:"A"},8888:{f:"A"},8890:{f:"A"},8891:{f:"A"},8892:{f:"A"},8896:{f:"S1"},8897:{f:"S1"},8898:{f:"S1"},8899:{f:"S1"},8903:{f:"A"},8905:{f:"A"},8906:{f:"A"},8907:{f:"A"},8908:{f:"A"},8909:{f:"A"},8910:{f:"A"},8911:{f:"A"},8912:{f:"A"},8913:{f:"A"},8914:{f:"A"},8915:{f:"A"},8916:{f:"A"},8918:{f:"A"},8919:{f:"A"},8920:{f:"A"},8921:{f:"A"},8922:{f:"A"},8923:{f:"A"},8926:{f:"A"},8927:{f:"A"},8928:{f:"A"},8929:{f:"A"},8930:{c:"\\2291\\338"},8931:{c:"\\2292\\338"},8934:{f:"A"},8935:{f:"A"},8936:{f:"A"},8937:{f:"A"},8938:{f:"A"},8939:{f:"A"},8940:{f:"A"},8941:{f:"A"},8965:{c:"\\22BC",f:"A"},8966:{c:"\\2A5E",f:"A"},8988:{c:"\\250C",f:"A"},8989:{c:"\\2510",f:"A"},8990:{c:"\\2514",f:"A"},8991:{c:"\\2518",f:"A"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},9168:{f:"S1"},9416:{f:"A"},9484:{f:"A"},9488:{f:"A"},9492:{f:"A"},9496:{f:"A"},9585:{f:"A"},9586:{f:"A"},9632:{f:"A"},9633:{f:"A"},9642:{c:"\\25A0",f:"A"},9650:{f:"A"},9652:{c:"\\25B2",f:"A"},9653:{c:"\\25B3"},9654:{f:"A"},9656:{c:"\\25B6",f:"A"},9660:{f:"A"},9662:{c:"\\25BC",f:"A"},9663:{c:"\\25BD"},9664:{f:"A"},9666:{c:"\\25C0",f:"A"},9674:{f:"A"},9723:{c:"\\25A1",f:"A"},9724:{c:"\\25A0",f:"A"},9733:{f:"A"},10003:{f:"A"},10016:{f:"A"},10072:{c:"\\2223"},10731:{f:"A"},10744:{c:"/",f:"I"},10752:{f:"S1"},10753:{f:"S1"},10754:{f:"S1"},10756:{f:"S1"},10758:{f:"S1"},10764:{c:"\\222C\\222C",f:"S1"},10799:{c:"\\D7"},10846:{f:"A"},10877:{f:"A"},10878:{f:"A"},10885:{f:"A"},10886:{f:"A"},10887:{f:"A"},10888:{f:"A"},10889:{f:"A"},10890:{f:"A"},10891:{f:"A"},10892:{f:"A"},10901:{f:"A"},10902:{f:"A"},10933:{f:"A"},10934:{f:"A"},10935:{f:"A"},10936:{f:"A"},10937:{f:"A"},10938:{f:"A"},10949:{f:"A"},10950:{f:"A"},10955:{f:"A"},10956:{f:"A"},12296:{c:"\\27E8"},12297:{c:"\\27E9"},57350:{f:"A"},57351:{f:"A"},57352:{f:"A"},57353:{f:"A"},57356:{f:"A"},57357:{f:"A"},57358:{f:"A"},57359:{f:"A"},57360:{f:"A"},57361:{f:"A"},57366:{f:"A"},57367:{f:"A"},57368:{f:"A"},57369:{f:"A"},57370:{f:"A"},57371:{f:"A"},119808:{c:"A",f:"B"},119809:{c:"B",f:"B"},119810:{c:"C",f:"B"},119811:{c:"D",f:"B"},119812:{c:"E",f:"B"},119813:{c:"F",f:"B"},119814:{c:"G",f:"B"},119815:{c:"H",f:"B"},119816:{c:"I",f:"B"},119817:{c:"J",f:"B"},119818:{c:"K",f:"B"},119819:{c:"L",f:"B"},119820:{c:"M",f:"B"},119821:{c:"N",f:"B"},119822:{c:"O",f:"B"},119823:{c:"P",f:"B"},119824:{c:"Q",f:"B"},119825:{c:"R",f:"B"},119826:{c:"S",f:"B"},119827:{c:"T",f:"B"},119828:{c:"U",f:"B"},119829:{c:"V",f:"B"},119830:{c:"W",f:"B"},119831:{c:"X",f:"B"},119832:{c:"Y",f:"B"},119833:{c:"Z",f:"B"},119834:{c:"a",f:"B"},119835:{c:"b",f:"B"},119836:{c:"c",f:"B"},119837:{c:"d",f:"B"},119838:{c:"e",f:"B"},119839:{c:"f",f:"B"},119840:{c:"g",f:"B"},119841:{c:"h",f:"B"},119842:{c:"i",f:"B"},119843:{c:"j",f:"B"},119844:{c:"k",f:"B"},119845:{c:"l",f:"B"},119846:{c:"m",f:"B"},119847:{c:"n",f:"B"},119848:{c:"o",f:"B"},119849:{c:"p",f:"B"},119850:{c:"q",f:"B"},119851:{c:"r",f:"B"},119852:{c:"s",f:"B"},119853:{c:"t",f:"B"},119854:{c:"u",f:"B"},119855:{c:"v",f:"B"},119856:{c:"w",f:"B"},119857:{c:"x",f:"B"},119858:{c:"y",f:"B"},119859:{c:"z",f:"B"},119860:{c:"A",f:"I"},119861:{c:"B",f:"I"},119862:{c:"C",f:"I"},119863:{c:"D",f:"I"},119864:{c:"E",f:"I"},119865:{c:"F",f:"I"},119866:{c:"G",f:"I"},119867:{c:"H",f:"I"},119868:{c:"I",f:"I"},119869:{c:"J",f:"I"},119870:{c:"K",f:"I"},119871:{c:"L",f:"I"},119872:{c:"M",f:"I"},119873:{c:"N",f:"I"},119874:{c:"O",f:"I"},119875:{c:"P",f:"I"},119876:{c:"Q",f:"I"},119877:{c:"R",f:"I"},119878:{c:"S",f:"I"},119879:{c:"T",f:"I"},119880:{c:"U",f:"I"},119881:{c:"V",f:"I"},119882:{c:"W",f:"I"},119883:{c:"X",f:"I"},119884:{c:"Y",f:"I"},119885:{c:"Z",f:"I"},119886:{c:"a",f:"I"},119887:{c:"b",f:"I"},119888:{c:"c",f:"I"},119889:{c:"d",f:"I"},119890:{c:"e",f:"I"},119891:{c:"f",f:"I"},119892:{c:"g",f:"I"},119894:{c:"i",f:"I"},119895:{c:"j",f:"I"},119896:{c:"k",f:"I"},119897:{c:"l",f:"I"},119898:{c:"m",f:"I"},119899:{c:"n",f:"I"},119900:{c:"o",f:"I"},119901:{c:"p",f:"I"},119902:{c:"q",f:"I"},119903:{c:"r",f:"I"},119904:{c:"s",f:"I"},119905:{c:"t",f:"I"},119906:{c:"u",f:"I"},119907:{c:"v",f:"I"},119908:{c:"w",f:"I"},119909:{c:"x",f:"I"},119910:{c:"y",f:"I"},119911:{c:"z",f:"I"},119912:{c:"A",f:"BI"},119913:{c:"B",f:"BI"},119914:{c:"C",f:"BI"},119915:{c:"D",f:"BI"},119916:{c:"E",f:"BI"},119917:{c:"F",f:"BI"},119918:{c:"G",f:"BI"},119919:{c:"H",f:"BI"},119920:{c:"I",f:"BI"},119921:{c:"J",f:"BI"},119922:{c:"K",f:"BI"},119923:{c:"L",f:"BI"},119924:{c:"M",f:"BI"},119925:{c:"N",f:"BI"},119926:{c:"O",f:"BI"},119927:{c:"P",f:"BI"},119928:{c:"Q",f:"BI"},119929:{c:"R",f:"BI"},119930:{c:"S",f:"BI"},119931:{c:"T",f:"BI"},119932:{c:"U",f:"BI"},119933:{c:"V",f:"BI"},119934:{c:"W",f:"BI"},119935:{c:"X",f:"BI"},119936:{c:"Y",f:"BI"},119937:{c:"Z",f:"BI"},119938:{c:"a",f:"BI"},119939:{c:"b",f:"BI"},119940:{c:"c",f:"BI"},119941:{c:"d",f:"BI"},119942:{c:"e",f:"BI"},119943:{c:"f",f:"BI"},119944:{c:"g",f:"BI"},119945:{c:"h",f:"BI"},119946:{c:"i",f:"BI"},119947:{c:"j",f:"BI"},119948:{c:"k",f:"BI"},119949:{c:"l",f:"BI"},119950:{c:"m",f:"BI"},119951:{c:"n",f:"BI"},119952:{c:"o",f:"BI"},119953:{c:"p",f:"BI"},119954:{c:"q",f:"BI"},119955:{c:"r",f:"BI"},119956:{c:"s",f:"BI"},119957:{c:"t",f:"BI"},119958:{c:"u",f:"BI"},119959:{c:"v",f:"BI"},119960:{c:"w",f:"BI"},119961:{c:"x",f:"BI"},119962:{c:"y",f:"BI"},119963:{c:"z",f:"BI"},119964:{c:"A",f:"SC"},119966:{c:"C",f:"SC"},119967:{c:"D",f:"SC"},119970:{c:"G",f:"SC"},119973:{c:"J",f:"SC"},119974:{c:"K",f:"SC"},119977:{c:"N",f:"SC"},119978:{c:"O",f:"SC"},119979:{c:"P",f:"SC"},119980:{c:"Q",f:"SC"},119982:{c:"S",f:"SC"},119983:{c:"T",f:"SC"},119984:{c:"U",f:"SC"},119985:{c:"V",f:"SC"},119986:{c:"W",f:"SC"},119987:{c:"X",f:"SC"},119988:{c:"Y",f:"SC"},119989:{c:"Z",f:"SC"},120068:{c:"A",f:"FR"},120069:{c:"B",f:"FR"},120071:{c:"D",f:"FR"},120072:{c:"E",f:"FR"},120073:{c:"F",f:"FR"},120074:{c:"G",f:"FR"},120077:{c:"J",f:"FR"},120078:{c:"K",f:"FR"},120079:{c:"L",f:"FR"},120080:{c:"M",f:"FR"},120081:{c:"N",f:"FR"},120082:{c:"O",f:"FR"},120083:{c:"P",f:"FR"},120084:{c:"Q",f:"FR"},120086:{c:"S",f:"FR"},120087:{c:"T",f:"FR"},120088:{c:"U",f:"FR"},120089:{c:"V",f:"FR"},120090:{c:"W",f:"FR"},120091:{c:"X",f:"FR"},120092:{c:"Y",f:"FR"},120094:{c:"a",f:"FR"},120095:{c:"b",f:"FR"},120096:{c:"c",f:"FR"},120097:{c:"d",f:"FR"},120098:{c:"e",f:"FR"},120099:{c:"f",f:"FR"},120100:{c:"g",f:"FR"},120101:{c:"h",f:"FR"},120102:{c:"i",f:"FR"},120103:{c:"j",f:"FR"},120104:{c:"k",f:"FR"},120105:{c:"l",f:"FR"},120106:{c:"m",f:"FR"},120107:{c:"n",f:"FR"},120108:{c:"o",f:"FR"},120109:{c:"p",f:"FR"},120110:{c:"q",f:"FR"},120111:{c:"r",f:"FR"},120112:{c:"s",f:"FR"},120113:{c:"t",f:"FR"},120114:{c:"u",f:"FR"},120115:{c:"v",f:"FR"},120116:{c:"w",f:"FR"},120117:{c:"x",f:"FR"},120118:{c:"y",f:"FR"},120119:{c:"z",f:"FR"},120120:{c:"A",f:"A"},120121:{c:"B",f:"A"},120123:{c:"D",f:"A"},120124:{c:"E",f:"A"},120125:{c:"F",f:"A"},120126:{c:"G",f:"A"},120128:{c:"I",f:"A"},120129:{c:"J",f:"A"},120130:{c:"K",f:"A"},120131:{c:"L",f:"A"},120132:{c:"M",f:"A"},120134:{c:"O",f:"A"},120138:{c:"S",f:"A"},120139:{c:"T",f:"A"},120140:{c:"U",f:"A"},120141:{c:"V",f:"A"},120142:{c:"W",f:"A"},120143:{c:"X",f:"A"},120144:{c:"Y",f:"A"},120172:{c:"A",f:"FRB"},120173:{c:"B",f:"FRB"},120174:{c:"C",f:"FRB"},120175:{c:"D",f:"FRB"},120176:{c:"E",f:"FRB"},120177:{c:"F",f:"FRB"},120178:{c:"G",f:"FRB"},120179:{c:"H",f:"FRB"},120180:{c:"I",f:"FRB"},120181:{c:"J",f:"FRB"},120182:{c:"K",f:"FRB"},120183:{c:"L",f:"FRB"},120184:{c:"M",f:"FRB"},120185:{c:"N",f:"FRB"},120186:{c:"O",f:"FRB"},120187:{c:"P",f:"FRB"},120188:{c:"Q",f:"FRB"},120189:{c:"R",f:"FRB"},120190:{c:"S",f:"FRB"},120191:{c:"T",f:"FRB"},120192:{c:"U",f:"FRB"},120193:{c:"V",f:"FRB"},120194:{c:"W",f:"FRB"},120195:{c:"X",f:"FRB"},120196:{c:"Y",f:"FRB"},120197:{c:"Z",f:"FRB"},120198:{c:"a",f:"FRB"},120199:{c:"b",f:"FRB"},120200:{c:"c",f:"FRB"},120201:{c:"d",f:"FRB"},120202:{c:"e",f:"FRB"},120203:{c:"f",f:"FRB"},120204:{c:"g",f:"FRB"},120205:{c:"h",f:"FRB"},120206:{c:"i",f:"FRB"},120207:{c:"j",f:"FRB"},120208:{c:"k",f:"FRB"},120209:{c:"l",f:"FRB"},120210:{c:"m",f:"FRB"},120211:{c:"n",f:"FRB"},120212:{c:"o",f:"FRB"},120213:{c:"p",f:"FRB"},120214:{c:"q",f:"FRB"},120215:{c:"r",f:"FRB"},120216:{c:"s",f:"FRB"},120217:{c:"t",f:"FRB"},120218:{c:"u",f:"FRB"},120219:{c:"v",f:"FRB"},120220:{c:"w",f:"FRB"},120221:{c:"x",f:"FRB"},120222:{c:"y",f:"FRB"},120223:{c:"z",f:"FRB"},120224:{c:"A",f:"SS"},120225:{c:"B",f:"SS"},120226:{c:"C",f:"SS"},120227:{c:"D",f:"SS"},120228:{c:"E",f:"SS"},120229:{c:"F",f:"SS"},120230:{c:"G",f:"SS"},120231:{c:"H",f:"SS"},120232:{c:"I",f:"SS"},120233:{c:"J",f:"SS"},120234:{c:"K",f:"SS"},120235:{c:"L",f:"SS"},120236:{c:"M",f:"SS"},120237:{c:"N",f:"SS"},120238:{c:"O",f:"SS"},120239:{c:"P",f:"SS"},120240:{c:"Q",f:"SS"},120241:{c:"R",f:"SS"},120242:{c:"S",f:"SS"},120243:{c:"T",f:"SS"},120244:{c:"U",f:"SS"},120245:{c:"V",f:"SS"},120246:{c:"W",f:"SS"},120247:{c:"X",f:"SS"},120248:{c:"Y",f:"SS"},120249:{c:"Z",f:"SS"},120250:{c:"a",f:"SS"},120251:{c:"b",f:"SS"},120252:{c:"c",f:"SS"},120253:{c:"d",f:"SS"},120254:{c:"e",f:"SS"},120255:{c:"f",f:"SS"},120256:{c:"g",f:"SS"},120257:{c:"h",f:"SS"},120258:{c:"i",f:"SS"},120259:{c:"j",f:"SS"},120260:{c:"k",f:"SS"},120261:{c:"l",f:"SS"},120262:{c:"m",f:"SS"},120263:{c:"n",f:"SS"},120264:{c:"o",f:"SS"},120265:{c:"p",f:"SS"},120266:{c:"q",f:"SS"},120267:{c:"r",f:"SS"},120268:{c:"s",f:"SS"},120269:{c:"t",f:"SS"},120270:{c:"u",f:"SS"},120271:{c:"v",f:"SS"},120272:{c:"w",f:"SS"},120273:{c:"x",f:"SS"},120274:{c:"y",f:"SS"},120275:{c:"z",f:"SS"},120276:{c:"A",f:"SSB"},120277:{c:"B",f:"SSB"},120278:{c:"C",f:"SSB"},120279:{c:"D",f:"SSB"},120280:{c:"E",f:"SSB"},120281:{c:"F",f:"SSB"},120282:{c:"G",f:"SSB"},120283:{c:"H",f:"SSB"},120284:{c:"I",f:"SSB"},120285:{c:"J",f:"SSB"},120286:{c:"K",f:"SSB"},120287:{c:"L",f:"SSB"},120288:{c:"M",f:"SSB"},120289:{c:"N",f:"SSB"},120290:{c:"O",f:"SSB"},120291:{c:"P",f:"SSB"},120292:{c:"Q",f:"SSB"},120293:{c:"R",f:"SSB"},120294:{c:"S",f:"SSB"},120295:{c:"T",f:"SSB"},120296:{c:"U",f:"SSB"},120297:{c:"V",f:"SSB"},120298:{c:"W",f:"SSB"},120299:{c:"X",f:"SSB"},120300:{c:"Y",f:"SSB"},120301:{c:"Z",f:"SSB"},120302:{c:"a",f:"SSB"},120303:{c:"b",f:"SSB"},120304:{c:"c",f:"SSB"},120305:{c:"d",f:"SSB"},120306:{c:"e",f:"SSB"},120307:{c:"f",f:"SSB"},120308:{c:"g",f:"SSB"},120309:{c:"h",f:"SSB"},120310:{c:"i",f:"SSB"},120311:{c:"j",f:"SSB"},120312:{c:"k",f:"SSB"},120313:{c:"l",f:"SSB"},120314:{c:"m",f:"SSB"},120315:{c:"n",f:"SSB"},120316:{c:"o",f:"SSB"},120317:{c:"p",f:"SSB"},120318:{c:"q",f:"SSB"},120319:{c:"r",f:"SSB"},120320:{c:"s",f:"SSB"},120321:{c:"t",f:"SSB"},120322:{c:"u",f:"SSB"},120323:{c:"v",f:"SSB"},120324:{c:"w",f:"SSB"},120325:{c:"x",f:"SSB"},120326:{c:"y",f:"SSB"},120327:{c:"z",f:"SSB"},120328:{c:"A",f:"SSI"},120329:{c:"B",f:"SSI"},120330:{c:"C",f:"SSI"},120331:{c:"D",f:"SSI"},120332:{c:"E",f:"SSI"},120333:{c:"F",f:"SSI"},120334:{c:"G",f:"SSI"},120335:{c:"H",f:"SSI"},120336:{c:"I",f:"SSI"},120337:{c:"J",f:"SSI"},120338:{c:"K",f:"SSI"},120339:{c:"L",f:"SSI"},120340:{c:"M",f:"SSI"},120341:{c:"N",f:"SSI"},120342:{c:"O",f:"SSI"},120343:{c:"P",f:"SSI"},120344:{c:"Q",f:"SSI"},120345:{c:"R",f:"SSI"},120346:{c:"S",f:"SSI"},120347:{c:"T",f:"SSI"},120348:{c:"U",f:"SSI"},120349:{c:"V",f:"SSI"},120350:{c:"W",f:"SSI"},120351:{c:"X",f:"SSI"},120352:{c:"Y",f:"SSI"},120353:{c:"Z",f:"SSI"},120354:{c:"a",f:"SSI"},120355:{c:"b",f:"SSI"},120356:{c:"c",f:"SSI"},120357:{c:"d",f:"SSI"},120358:{c:"e",f:"SSI"},120359:{c:"f",f:"SSI"},120360:{c:"g",f:"SSI"},120361:{c:"h",f:"SSI"},120362:{c:"i",f:"SSI"},120363:{c:"j",f:"SSI"},120364:{c:"k",f:"SSI"},120365:{c:"l",f:"SSI"},120366:{c:"m",f:"SSI"},120367:{c:"n",f:"SSI"},120368:{c:"o",f:"SSI"},120369:{c:"p",f:"SSI"},120370:{c:"q",f:"SSI"},120371:{c:"r",f:"SSI"},120372:{c:"s",f:"SSI"},120373:{c:"t",f:"SSI"},120374:{c:"u",f:"SSI"},120375:{c:"v",f:"SSI"},120376:{c:"w",f:"SSI"},120377:{c:"x",f:"SSI"},120378:{c:"y",f:"SSI"},120379:{c:"z",f:"SSI"},120432:{c:"A",f:"T"},120433:{c:"B",f:"T"},120434:{c:"C",f:"T"},120435:{c:"D",f:"T"},120436:{c:"E",f:"T"},120437:{c:"F",f:"T"},120438:{c:"G",f:"T"},120439:{c:"H",f:"T"},120440:{c:"I",f:"T"},120441:{c:"J",f:"T"},120442:{c:"K",f:"T"},120443:{c:"L",f:"T"},120444:{c:"M",f:"T"},120445:{c:"N",f:"T"},120446:{c:"O",f:"T"},120447:{c:"P",f:"T"},120448:{c:"Q",f:"T"},120449:{c:"R",f:"T"},120450:{c:"S",f:"T"},120451:{c:"T",f:"T"},120452:{c:"U",f:"T"},120453:{c:"V",f:"T"},120454:{c:"W",f:"T"},120455:{c:"X",f:"T"},120456:{c:"Y",f:"T"},120457:{c:"Z",f:"T"},120458:{c:"a",f:"T"},120459:{c:"b",f:"T"},120460:{c:"c",f:"T"},120461:{c:"d",f:"T"},120462:{c:"e",f:"T"},120463:{c:"f",f:"T"},120464:{c:"g",f:"T"},120465:{c:"h",f:"T"},120466:{c:"i",f:"T"},120467:{c:"j",f:"T"},120468:{c:"k",f:"T"},120469:{c:"l",f:"T"},120470:{c:"m",f:"T"},120471:{c:"n",f:"T"},120472:{c:"o",f:"T"},120473:{c:"p",f:"T"},120474:{c:"q",f:"T"},120475:{c:"r",f:"T"},120476:{c:"s",f:"T"},120477:{c:"t",f:"T"},120478:{c:"u",f:"T"},120479:{c:"v",f:"T"},120480:{c:"w",f:"T"},120481:{c:"x",f:"T"},120482:{c:"y",f:"T"},120483:{c:"z",f:"T"},120488:{c:"A",f:"B"},120489:{c:"B",f:"B"},120490:{c:"\\393",f:"B"},120491:{c:"\\394",f:"B"},120492:{c:"E",f:"B"},120493:{c:"Z",f:"B"},120494:{c:"H",f:"B"},120495:{c:"\\398",f:"B"},120496:{c:"I",f:"B"},120497:{c:"K",f:"B"},120498:{c:"\\39B",f:"B"},120499:{c:"M",f:"B"},120500:{c:"N",f:"B"},120501:{c:"\\39E",f:"B"},120502:{c:"O",f:"B"},120503:{c:"\\3A0",f:"B"},120504:{c:"P",f:"B"},120506:{c:"\\3A3",f:"B"},120507:{c:"T",f:"B"},120508:{c:"\\3A5",f:"B"},120509:{c:"\\3A6",f:"B"},120510:{c:"X",f:"B"},120511:{c:"\\3A8",f:"B"},120512:{c:"\\3A9",f:"B"},120513:{c:"\\2207",f:"B"},120546:{c:"A",f:"I"},120547:{c:"B",f:"I"},120548:{c:"\\393",f:"I"},120549:{c:"\\394",f:"I"},120550:{c:"E",f:"I"},120551:{c:"Z",f:"I"},120552:{c:"H",f:"I"},120553:{c:"\\398",f:"I"},120554:{c:"I",f:"I"},120555:{c:"K",f:"I"},120556:{c:"\\39B",f:"I"},120557:{c:"M",f:"I"},120558:{c:"N",f:"I"},120559:{c:"\\39E",f:"I"},120560:{c:"O",f:"I"},120561:{c:"\\3A0",f:"I"},120562:{c:"P",f:"I"},120564:{c:"\\3A3",f:"I"},120565:{c:"T",f:"I"},120566:{c:"\\3A5",f:"I"},120567:{c:"\\3A6",f:"I"},120568:{c:"X",f:"I"},120569:{c:"\\3A8",f:"I"},120570:{c:"\\3A9",f:"I"},120572:{c:"\\3B1",f:"I"},120573:{c:"\\3B2",f:"I"},120574:{c:"\\3B3",f:"I"},120575:{c:"\\3B4",f:"I"},120576:{c:"\\3B5",f:"I"},120577:{c:"\\3B6",f:"I"},120578:{c:"\\3B7",f:"I"},120579:{c:"\\3B8",f:"I"},120580:{c:"\\3B9",f:"I"},120581:{c:"\\3BA",f:"I"},120582:{c:"\\3BB",f:"I"},120583:{c:"\\3BC",f:"I"},120584:{c:"\\3BD",f:"I"},120585:{c:"\\3BE",f:"I"},120586:{c:"\\3BF",f:"I"},120587:{c:"\\3C0",f:"I"},120588:{c:"\\3C1",f:"I"},120589:{c:"\\3C2",f:"I"},120590:{c:"\\3C3",f:"I"},120591:{c:"\\3C4",f:"I"},120592:{c:"\\3C5",f:"I"},120593:{c:"\\3C6",f:"I"},120594:{c:"\\3C7",f:"I"},120595:{c:"\\3C8",f:"I"},120596:{c:"\\3C9",f:"I"},120597:{c:"\\2202"},120598:{c:"\\3F5",f:"I"},120599:{c:"\\3D1",f:"I"},120600:{c:"\\E009",f:"A"},120601:{c:"\\3D5",f:"I"},120602:{c:"\\3F1",f:"I"},120603:{c:"\\3D6",f:"I"},120604:{c:"A",f:"BI"},120605:{c:"B",f:"BI"},120606:{c:"\\393",f:"BI"},120607:{c:"\\394",f:"BI"},120608:{c:"E",f:"BI"},120609:{c:"Z",f:"BI"},120610:{c:"H",f:"BI"},120611:{c:"\\398",f:"BI"},120612:{c:"I",f:"BI"},120613:{c:"K",f:"BI"},120614:{c:"\\39B",f:"BI"},120615:{c:"M",f:"BI"},120616:{c:"N",f:"BI"},120617:{c:"\\39E",f:"BI"},120618:{c:"O",f:"BI"},120619:{c:"\\3A0",f:"BI"},120620:{c:"P",f:"BI"},120622:{c:"\\3A3",f:"BI"},120623:{c:"T",f:"BI"},120624:{c:"\\3A5",f:"BI"},120625:{c:"\\3A6",f:"BI"},120626:{c:"X",f:"BI"},120627:{c:"\\3A8",f:"BI"},120628:{c:"\\3A9",f:"BI"},120630:{c:"\\3B1",f:"BI"},120631:{c:"\\3B2",f:"BI"},120632:{c:"\\3B3",f:"BI"},120633:{c:"\\3B4",f:"BI"},120634:{c:"\\3B5",f:"BI"},120635:{c:"\\3B6",f:"BI"},120636:{c:"\\3B7",f:"BI"},120637:{c:"\\3B8",f:"BI"},120638:{c:"\\3B9",f:"BI"},120639:{c:"\\3BA",f:"BI"},120640:{c:"\\3BB",f:"BI"},120641:{c:"\\3BC",f:"BI"},120642:{c:"\\3BD",f:"BI"},120643:{c:"\\3BE",f:"BI"},120644:{c:"\\3BF",f:"BI"},120645:{c:"\\3C0",f:"BI"},120646:{c:"\\3C1",f:"BI"},120647:{c:"\\3C2",f:"BI"},120648:{c:"\\3C3",f:"BI"},120649:{c:"\\3C4",f:"BI"},120650:{c:"\\3C5",f:"BI"},120651:{c:"\\3C6",f:"BI"},120652:{c:"\\3C7",f:"BI"},120653:{c:"\\3C8",f:"BI"},120654:{c:"\\3C9",f:"BI"},120655:{c:"\\2202",f:"B"},120656:{c:"\\3F5",f:"BI"},120657:{c:"\\3D1",f:"BI"},120658:{c:"\\E009",f:"A"},120659:{c:"\\3D5",f:"BI"},120660:{c:"\\3F1",f:"BI"},120661:{c:"\\3D6",f:"BI"},120662:{c:"A",f:"SSB"},120663:{c:"B",f:"SSB"},120664:{c:"\\393",f:"SSB"},120665:{c:"\\394",f:"SSB"},120666:{c:"E",f:"SSB"},120667:{c:"Z",f:"SSB"},120668:{c:"H",f:"SSB"},120669:{c:"\\398",f:"SSB"},120670:{c:"I",f:"SSB"},120671:{c:"K",f:"SSB"},120672:{c:"\\39B",f:"SSB"},120673:{c:"M",f:"SSB"},120674:{c:"N",f:"SSB"},120675:{c:"\\39E",f:"SSB"},120676:{c:"O",f:"SSB"},120677:{c:"\\3A0",f:"SSB"},120678:{c:"P",f:"SSB"},120680:{c:"\\3A3",f:"SSB"},120681:{c:"T",f:"SSB"},120682:{c:"\\3A5",f:"SSB"},120683:{c:"\\3A6",f:"SSB"},120684:{c:"X",f:"SSB"},120685:{c:"\\3A8",f:"SSB"},120686:{c:"\\3A9",f:"SSB"},120782:{c:"0",f:"B"},120783:{c:"1",f:"B"},120784:{c:"2",f:"B"},120785:{c:"3",f:"B"},120786:{c:"4",f:"B"},120787:{c:"5",f:"B"},120788:{c:"6",f:"B"},120789:{c:"7",f:"B"},120790:{c:"8",f:"B"},120791:{c:"9",f:"B"},120802:{c:"0",f:"SS"},120803:{c:"1",f:"SS"},120804:{c:"2",f:"SS"},120805:{c:"3",f:"SS"},120806:{c:"4",f:"SS"},120807:{c:"5",f:"SS"},120808:{c:"6",f:"SS"},120809:{c:"7",f:"SS"},120810:{c:"8",f:"SS"},120811:{c:"9",f:"SS"},120812:{c:"0",f:"SSB"},120813:{c:"1",f:"SSB"},120814:{c:"2",f:"SSB"},120815:{c:"3",f:"SSB"},120816:{c:"4",f:"SSB"},120817:{c:"5",f:"SSB"},120818:{c:"6",f:"SSB"},120819:{c:"7",f:"SSB"},120820:{c:"8",f:"SSB"},120821:{c:"9",f:"SSB"},120822:{c:"0",f:"T"},120823:{c:"1",f:"T"},120824:{c:"2",f:"T"},120825:{c:"3",f:"T"},120826:{c:"4",f:"T"},120827:{c:"5",f:"T"},120828:{c:"6",f:"T"},120829:{c:"7",f:"T"},120830:{c:"8",f:"T"},120831:{c:"9",f:"T"}})},7517:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.sansSerifBoldItalic=void 0;var n=r(8042),r=r(4886);e.sansSerifBoldItalic=(0,n.AddCSS)(r.sansSerifBoldItalic,{305:{f:"SSB"},567:{f:"SSB"}})},4182:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.sansSerifBold=void 0;var n=r(8042),r=r(4471);e.sansSerifBold=(0,n.AddCSS)(r.sansSerifBold,{8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/"},8710:{c:"\\394"}})},2679:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.sansSerifItalic=void 0;var n=r(8042),r=r(5181);e.sansSerifItalic=(0,n.AddCSS)(r.sansSerifItalic,{913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/"},8710:{c:"\\394"}})},5469:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.sansSerif=void 0;var n=r(8042),r=r(3526);e.sansSerif=(0,n.AddCSS)(r.sansSerif,{913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/"},8710:{c:"\\394"}})},7563:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.scriptBold=void 0;var n=r(5649);Object.defineProperty(e,"scriptBold",{enumerable:!0,get:function(){return n.scriptBold}})},9409:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.script=void 0;var n=r(7153);Object.defineProperty(e,"script",{enumerable:!0,get:function(){return n.script}})},775:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.smallop=void 0;var n=r(8042),r=r(5745);e.smallop=(0,n.AddCSS)(r.smallop,{8260:{c:"/"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},10072:{c:"\\2223"},10764:{c:"\\222C\\222C"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}})},9551:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texCalligraphicBold=void 0;var n=r(8042),r=r(1411);e.texCalligraphicBold=(0,n.AddCSS)(r.texCalligraphicBold,{305:{f:"B"},567:{f:"B"}})},7907:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texCalligraphic=void 0;var n=r(6384);Object.defineProperty(e,"texCalligraphic",{enumerable:!0,get:function(){return n.texCalligraphic}})},9659:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texMathit=void 0;var n=r(6041);Object.defineProperty(e,"texMathit",{enumerable:!0,get:function(){return n.texMathit}})},98:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texOldstyleBold=void 0;var n=r(8199);Object.defineProperty(e,"texOldstyleBold",{enumerable:!0,get:function(){return n.texOldstyleBold}})},6275:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texOldstyle=void 0;var n=r(9848);Object.defineProperty(e,"texOldstyle",{enumerable:!0,get:function(){return n.texOldstyle}})},6530:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texSize3=void 0;var n=r(8042),r=r(7906);e.texSize3=(0,n.AddCSS)(r.texSize3,{8260:{c:"/"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}})},4409:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texSize4=void 0;var n=r(8042),r=r(2644);e.texSize4=(0,n.AddCSS)(r.texSize4,{8260:{c:"/"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},12296:{c:"\\27E8"},12297:{c:"\\27E9"},57685:{c:"\\E153\\E152"},57686:{c:"\\E151\\E150"}})},5292:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.texVariant=void 0;var n=r(8042),r=r(4926);e.texVariant=(0,n.AddCSS)(r.texVariant,{1008:{c:"\\E009"},8463:{f:""},8740:{c:"\\E006"},8742:{c:"\\E007"},8808:{c:"\\E00C"},8809:{c:"\\E00D"},8816:{c:"\\E011"},8817:{c:"\\E00E"},8840:{c:"\\E016"},8841:{c:"\\E018"},8842:{c:"\\E01A"},8843:{c:"\\E01B"},10887:{c:"\\E010"},10888:{c:"\\E00F"},10955:{c:"\\E017"},10956:{c:"\\E019"}})},5884:function(t,e,r){var h=this&&this.__assign||function(){return(h=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},f=(Object.defineProperty(e,"__esModule",{value:!0}),e.FontData=e.NOSTRETCH=e.H=e.V=void 0,r(7233)),r=(e.V=1,e.H=2,e.NOSTRETCH={dir:0},n.charOptions=function(t,e){t=t[e];return 3===t.length&&(t[3]={}),t[3]},Object.defineProperty(n.prototype,"styles",{get:function(){return this._styles},set:function(t){this._styles=t},enumerable:!1,configurable:!0}),n.prototype.createVariant=function(t,e,r){void 0===r&&(r=null);e={linked:[],chars:(e=void 0===e?null:e)?Object.create(this.variant[e].chars):{}};r&&this.variant[r]&&(Object.assign(e.chars,this.variant[r].chars),this.variant[r].linked.push(e.chars),e.chars=Object.create(e.chars)),this.remapSmpChars(e.chars,t),this.variant[t]=e},n.prototype.remapSmpChars=function(t,e){var r,n,o,i,a=this.constructor;if(a.VariantSmp[e]){var s=a.SmpRemap,l=[null,null,a.SmpRemapGreekU,a.SmpRemapGreekL];try{for(var c=S(a.SmpRanges),u=c.next();!u.done;u=c.next()){var p=_(u.value,3),h=p[0],d=p[1],f=p[2],m=a.VariantSmp[e][h];if(m){for(var y,g=d;g<=f;g++)930!==g&&(y=m+g-d,t[g]=this.smpChar(s[y]||y));if(l[h])try{o=void 0;for(var b=S(Object.keys(l[h]).map(function(t){return parseInt(t)})),v=b.next();!v.done;v=b.next())t[g=v.value]=this.smpChar(m+l[h][g])}catch(t){o={error:t}}finally{try{v&&!v.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}"bold"===e&&(t[988]=this.smpChar(120778),t[989]=this.smpChar(120779))},n.prototype.smpChar=function(t){return[,,,{smp:t}]},n.prototype.createVariants=function(t){var e,r;try{for(var n=S(t),o=n.next();!o.done;o=n.next()){var i=o.value;this.createVariant(i[0],i[1],i[2])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},n.prototype.defineChars=function(t,e){var r,n,o=this.variant[t];Object.assign(o.chars,e);try{for(var i=S(o.linked),a=i.next();!a.done;a=i.next()){var s=a.value;Object.assign(s,e)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},n.prototype.defineDelimiters=function(t){Object.assign(this.delimiters,t)},n.prototype.defineRemap=function(t,e){this.remapChars.hasOwnProperty(t)||(this.remapChars[t]={}),Object.assign(this.remapChars[t],e)},n.prototype.getDelimiter=function(t){return this.delimiters[t]},n.prototype.getSizeVariant=function(t,e){return this.delimiters[t].variants&&(e=this.delimiters[t].variants[e]),this.sizeVariants[e]},n.prototype.getStretchVariant=function(t,e){return this.stretchVariants[this.delimiters[t].stretchv?this.delimiters[t].stretchv[e]:0]},n.prototype.getChar=function(t,e){return this.variant[t].chars[e]},n.prototype.getVariant=function(t){return this.variant[t]},n.prototype.getCssFont=function(t){return this.cssFontMap[t]||["serif",!1,!1]},n.prototype.getFamily=function(t){return this.cssFamilyPrefix?this.cssFamilyPrefix+", "+t:t},n.prototype.getRemappedChar=function(t,e){return(this.remapChars[t]||{})[e]},n.OPTIONS={unknownFamily:"serif"},n.JAX="common",n.NAME="",n.defaultVariants=[["normal"],["bold","normal"],["italic","normal"],["bold-italic","italic","bold"],["double-struck","bold"],["fraktur","normal"],["bold-fraktur","bold","fraktur"],["script","italic"],["bold-script","bold-italic","script"],["sans-serif","normal"],["bold-sans-serif","bold","sans-serif"],["sans-serif-italic","italic","sans-serif"],["sans-serif-bold-italic","bold-italic","bold-sans-serif"],["monospace","normal"]],n.defaultCssFonts={normal:["unknown",!1,!1],bold:["unknown",!1,!0],italic:["unknown",!0,!1],"bold-italic":["unknown",!0,!0],"double-struck":["unknown",!1,!0],fraktur:["unknown",!1,!1],"bold-fraktur":["unknown",!1,!0],script:["cursive",!1,!1],"bold-script":["cursive",!1,!0],"sans-serif":["sans-serif",!1,!1],"bold-sans-serif":["sans-serif",!1,!0],"sans-serif-italic":["sans-serif",!0,!1],"sans-serif-bold-italic":["sans-serif",!0,!0],monospace:["monospace",!1,!1]},n.defaultCssFamilyPrefix="",n.VariantSmp={bold:[119808,119834,120488,120514,120782],italic:[119860,119886,120546,120572],"bold-italic":[119912,119938,120604,120630],script:[119964,119990],"bold-script":[120016,120042],fraktur:[120068,120094],"double-struck":[120120,120146,,,120792],"bold-fraktur":[120172,120198],"sans-serif":[120224,120250,,,120802],"bold-sans-serif":[120276,120302,120662,120688,120812],"sans-serif-italic":[120328,120354],"sans-serif-bold-italic":[120380,120406,120720,120746],monospace:[120432,120458,,,120822]},n.SmpRanges=[[0,65,90],[1,97,122],[2,913,937],[3,945,969],[4,48,57]],n.SmpRemap={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},n.SmpRemapGreekU={8711:25,1012:17},n.SmpRemapGreekL={977:27,981:29,982:31,1008:28,1009:30,1013:26,8706:25},n.defaultAccentMap={768:"ˋ",769:"ˊ",770:"ˆ",771:"˜",772:"ˉ",774:"˘",775:"˙",776:"¨",778:"˚",780:"ˇ",8594:"⃗",8242:"'",8243:"''",8244:"'''",8245:"`",8246:"``",8247:"```",8279:"''''",8400:"↼",8401:"⇀",8406:"←",8417:"↔",8432:"*",8411:"...",8412:"....",8428:"⇁",8429:"↽",8430:"←",8431:"→"},n.defaultMoMap={45:"−"},n.defaultMnMap={45:"−"},n.defaultParams={x_height:.442,quad:1,num1:.676,num2:.394,num3:.444,denom1:.686,denom2:.345,sup1:.413,sup2:.363,sup3:.289,sub1:.15,sub2:.247,sup_drop:.386,sub_drop:.05,delim1:2.39,delim2:1,axis_height:.25,rule_thickness:.06,big_op_spacing1:.111,big_op_spacing2:.167,big_op_spacing3:.2,big_op_spacing4:.6,big_op_spacing5:.1,surd_height:.075,scriptspace:.05,nulldelimiterspace:.12,delimiterfactor:901,delimitershortfall:.3,min_rule_thickness:1.25,separation_factor:1.75,extra_ic:.033},n.defaultDelimiters={},n.defaultChars={},n.defaultSizeVariants=[],n.defaultStretchVariants=[],n);function n(t){void 0===t&&(t=null),this.variant={},this.delimiters={},this.cssFontMap={},this.remapChars={},this.skewIcFactor=.75;var e,r,n,o,i=this.constructor;this.options=(0,f.userOptions)((0,f.defaultOptions)({},i.OPTIONS),t),this.params=h({},i.defaultParams),this.sizeVariants=d([],_(i.defaultSizeVariants),!1),this.stretchVariants=d([],_(i.defaultStretchVariants),!1),this.cssFontMap=h({},i.defaultCssFonts);try{for(var a=S(Object.keys(this.cssFontMap)),s=a.next();!s.done;s=a.next()){var l=s.value;"unknown"===this.cssFontMap[l][0]&&(this.cssFontMap[l][0]=this.options.unknownFamily)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}this.cssFamilyPrefix=i.defaultCssFamilyPrefix,this.createVariants(i.defaultVariants),this.defineDelimiters(i.defaultDelimiters);try{for(var c=S(Object.keys(i.defaultChars)),u=c.next();!u.done;u=c.next()){var p=u.value;this.defineChars(p,i.defaultChars[p])}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.defineRemap("accent",i.defaultAccentMap),this.defineRemap("mo",i.defaultMoMap),this.defineRemap("mn",i.defaultMnMap)}e.FontData=r},5552:function(t,c){var u=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0Math.PI/2-r?t.thickness*a*Math.sin(o+r-Math.PI/2):0);return[i,e,i,e]},remove:e[3]}]}},c.CommonArrow=function(l){return function(t){var e=u(c.arrowDef[t],4),i=e[0],a=e[1],s=e[2],e=e[3];return[t+"arrow",{renderer:function(t,e){var r=t.getBBox(),n=r.w,o=r.h,r=r.d,o=u(s?[o+r,"X"]:[n,"Y"],2),r=o[0],n=o[1],o=t.getOffset(n),r=t.arrow(r,i,a,n,o);l(t,r)},bbox:c.arrowBBox[t],remove:e}]}}},3055:function(t,e,r){var n,i,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=(Object.defineProperty(e,"__esModule",{value:!0}),e.CommonOutputJax=void 0,r(2975)),w=r(4474),c=r(7233),u=r(6010),p=r(8054),h=r(4139),r=(i=l.AbstractOutputJax,o(d,i),d.prototype.typeset=function(t,e){this.setDocument(e);var r=this.createNode();return this.toDOM(t,r,e),r},d.prototype.createNode=function(){var t=this.constructor.NAME;return this.html("mjx-container",{class:"MathJax",jax:t})},d.prototype.setScale=function(t){var e=this.math.metrics.scale*this.options.scale;1!=e&&this.adaptor.setStyle(t,"fontSize",(0,u.percent)(e))},d.prototype.toDOM=function(t,e,r){this.setDocument(r=void 0===r?null:r),this.math=t,this.pxPerEm=t.metrics.ex/this.font.params.x_height,t.root.setTeXclass(null),this.setScale(e),this.nodeMap=new Map,this.container=e,this.processMath(t.root,e),this.nodeMap=null,this.executeFilters(this.postFilters,t,r,e)},d.prototype.getBBox=function(t,e){this.setDocument(e),(this.math=t).root.setTeXclass(null),this.nodeMap=new Map;e=this.factory.wrap(t.root).getOuterBBox();return this.nodeMap=null,e},d.prototype.getMetrics=function(t){this.setDocument(t);var e,r,n=this.adaptor,o=this.getMetricMaps(t);try{for(var i=N(t.math),a=i.next();!a.done;a=i.next()){var s,l,c,u,p,h,d,f=a.value,m=n.parent(f.start.node);f.state()=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},h=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},y=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0t.h&&(t.h=s),l>t.d&&(t.d=l),t.ic=f.ic||0,t.sk=f.sk||0,t.dx=f.dx||0}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}1=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=(Object.defineProperty(e,"__esModule",{value:!0}),e.CommonMencloseMixin=void 0,s(r(5552))),h=r(505);e.CommonMencloseMixin=function(t){return o(e,n=t),e.prototype.getParameters=function(){var t,e=this.node.attributes,r=e.get("data-padding"),r=(void 0!==r&&(this.padding=this.length2em(r,u.PADDING)),e.get("data-thickness")),r=(void 0!==r&&(this.thickness=this.length2em(r,u.THICKNESS)),e.get("data-arrowhead"));void 0!==r&&(r=(e=l((0,h.split)(r),3))[0],t=e[1],e=e[2],this.arrowhead={x:r?parseFloat(r):u.ARROWX,y:t?parseFloat(t):u.ARROWY,dx:e?parseFloat(e):u.ARROWDX})},e.prototype.getNotations=function(){var t,e,r=this.constructor.notations;try{for(var n=p((0,h.split)(this.node.attributes.get("notation"))),o=n.next();!o.done;o=n.next()){var i=o.value,a=r.get(i);a&&((this.notations[i]=a).renderChild&&(this.renderChild=a.renderer))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.removeRedundantNotations=function(){var t,e,r,n;try{for(var o=p(Object.keys(this.notations)),i=o.next();!i.done;i=o.next()){var a=i.value;if(this.notations[a]){var s=this.notations[a].remove||"";try{r=void 0;for(var l=p(s.split(/ /)),c=l.next();!c.done;c=l.next()){var u=c.value;delete this.notations[u]}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.initializeNotations=function(){var t,e;try{for(var r=p(Object.keys(this.notations)),n=r.next();!n.done;n=r.next()){var o=n.value,i=this.notations[o].init;i&&i(this)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r=l(this.TRBL,4),n=r[0],o=r[1],i=r[2],r=r[3],a=this.childNodes[0].getBBox();t.combine(a,r,0),t.h+=n,t.d+=i,t.w+=o,this.setChildPWidths(e)},e.prototype.getBBoxExtenders=function(){var t,e,r=[0,0,0,0];try{for(var n=p(Object.keys(this.notations)),o=n.next();!o.done;o=n.next()){var i=o.value;this.maximizeEntries(r,this.notations[i].bbox(this))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},e.prototype.getPadding=function(){var t,e,r=this,n=[0,0,0,0];try{for(var o=p(Object.keys(this.notations)),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.notations[a].border;s&&this.maximizeEntries(n,s(this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return[0,1,2,3].map(function(t){return r.TRBL[t]-n[t]})},e.prototype.maximizeEntries=function(t,e){for(var r=0;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.CommonMfencedMixin=void 0,e.CommonMfencedMixin=function(t){return r(e,n=t),e.prototype.createMrow=function(){var t=this.node.factory.create("inferredMrow");t.inheritAttributesFrom(this.node),this.mrow=this.wrap(t),this.mrow.parent=this},e.prototype.addMrowChildren=function(){var t,e,r=this.node,n=this.mrow,o=(this.addMo(r.open),this.childNodes.length&&n.childNodes.push(this.childNodes[0]),0);try{for(var i=l(this.childNodes.slice(1)),a=i.next();!a.done;a=i.next()){var s=a.value;this.addMo(r.separators[o++]),n.childNodes.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.addMo(r.close),n.stretchChildren()},e.prototype.addMo=function(t){t&&(t=this.wrap(t),this.mrow.childNodes.push(t),t.parent=this.mrow)},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1),t.updateFrom(this.mrow.getOuterBBox()),this.setChildPWidths(e)},e;function e(){for(var t=[],e=0;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(s,"__esModule",{value:!0}),s.CommonMmultiscriptsMixin=s.ScriptNames=s.NextScript=void 0,e(6469));s.NextScript={base:"subList",subList:"supList",supList:"subList",psubList:"psupList",psupList:"psubList"},s.ScriptNames=["sup","sup","psup","psub"],s.CommonMmultiscriptsMixin=function(t){return r(e,i=t),e.prototype.combinePrePost=function(t,e){t=new a.BBox(t);return t.combine(e,0,0),t},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r,n=this.font.params.scriptspace,o=this.scriptData,i=this.combinePrePost(o.sub,o.psub),a=this.combinePrePost(o.sup,o.psup),i=p(this.getUVQ(i,a),2),a=i[0],i=i[1];t.empty(),o.numPrescripts&&(t.combine(o.psup,n,a),t.combine(o.psub,n,i)),t.append(o.base),o.numScripts&&(r=t.w,t.combine(o.sup,r,a),t.combine(o.sub,r,i),t.w+=n),t.clean(),this.setChildPWidths(e)},e.prototype.getScriptData=function(){var t=this.scriptData={base:null,sub:a.BBox.empty(),sup:a.BBox.empty(),psub:a.BBox.empty(),psup:a.BBox.empty(),numPrescripts:0,numScripts:0},e=this.getScriptBBoxLists();this.combineBBoxLists(t.sub,t.sup,e.subList,e.supList),this.combineBBoxLists(t.psub,t.psup,e.psubList,e.psupList),t.base=e.base[0],t.numPrescripts=e.psubList.length,t.numScripts=e.subList.length},e.prototype.getScriptBBoxLists=function(){var e,t,r={base:[],subList:[],supList:[],psubList:[],psupList:[]},n="base";try{for(var o=l(this.childNodes),i=o.next();!i.done;i=o.next())var a=i.value,n=a.node.isKind("mprescripts")?"psubList":(r[n].push(a.getOuterBBox()),s.NextScript[n])}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return this.firstPrescript=r.subList.length+r.supList.length+2,this.padLists(r.subList,r.supList),this.padLists(r.psubList,r.psupList),r},e.prototype.padLists=function(t,e){t.length>e.length&&e.push(a.BBox.empty())},e.prototype.combineBBoxLists=function(t,e,r,n){for(var o=0;ot.h&&(t.h=s),i>t.d&&(t.d=i),u>e.h&&(e.h=u),l>e.d&&(e.d=l)}},e.prototype.getScaledWHD=function(t){var e=t.w,r=t.h,n=t.d,t=t.rscale;return[e*t,r*t,n*t]},e.prototype.getUVQ=function(t,e){var r,n,o;return this.UVQ||(r=(o=p([0,0,0],3))[0],n=o[1],o=o[2],0===t.h&&0===t.d?r=this.getU():0===e.h&&0===e.d?r=-this.getV():(r=(t=p(i.prototype.getUVQ.call(this,t,e),3))[0],n=t[1],o=t[2]),this.UVQ=[r,n,o]),this.UVQ},e;function e(){for(var t=[],e=0;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CommonMoMixin=e.DirectionVH=void 0,r(6469)),l=r(505),c=r(5884);e.DirectionVH=((r={})[1]="v",r[2]="h",r),e.CommonMoMixin=function(t){return o(e,n=t),e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1),this.protoBBox(t),this.node.attributes.get("symmetric")&&2!==this.stretch.dir&&(e=this.getCenterOffset(t),t.h+=e,t.d-=e),this.node.getProperty("mathaccent")&&(0===this.stretch.dir||0<=this.size)&&(t.w=0)},e.prototype.protoBBox=function(t){var e=0!==this.stretch.dir;e&&null===this.size&&this.getStretchedVariant([0]),e&&this.size<0||(n.prototype.computeBBox.call(this,t),this.copySkewIC(t))},e.prototype.getAccentOffset=function(){var t=a.BBox.empty();return this.protoBBox(t),-t.w/2},e.prototype.getCenterOffset=function(t){return(t=void 0===t?null:t)||(t=a.BBox.empty(),n.prototype.computeBBox.call(this,t)),(t.h+t.d)/2+this.font.params.axis_height-t.h},e.prototype.getVariant=function(){this.node.attributes.get("largeop")?this.variant=this.node.attributes.get("displaystyle")?"-largeop":"-smallop":this.node.attributes.getExplicit("mathvariant")||!1!==this.node.getProperty("pseudoscript")?n.prototype.getVariant.call(this):this.variant="-tex-variant"},e.prototype.canStretch=function(t){if(0!==this.stretch.dir)return this.stretch.dir===t;if(!this.node.attributes.get("stretchy"))return!1;var e=this.getText();if(1!==Array.from(e).length)return!1;e=this.font.getDelimiter(e.codePointAt(0));return this.stretch=e&&e.dir===t?e:c.NOSTRETCH,0!==this.stretch.dir},e.prototype.getStretchedVariant=function(t,e){var r,n;if(void 0===e&&(e=!1),0!==this.stretch.dir){var o=this.getWH(t),i=this.getSize("minsize",0),a=this.getSize("maxsize",1/0),s=this.node.getProperty("mathaccent"),o=Math.max(i,Math.min(a,o)),a=this.font.params.delimiterfactor/1e3,l=this.font.params.delimitershortfall,c=i||e?o:s?Math.min(o/a,o+l):Math.max(o*a,o-l),u=this.stretch,p=u.c||this.getText().codePointAt(0),h=0;if(u.sizes)try{for(var d=y(u.sizes),f=d.next();!f.done;f=d.next()){if(f.value>=c)return s&&h&&h--,this.variant=this.font.getSizeVariant(p,h),this.size=h,void(u.schar&&u.schar[h]&&(this.stretch=m(m({},this.stretch),{c:u.schar[h]})));h++}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}u.stretch?(this.size=-1,this.invalidateBBox(),this.getStretchBBox(t,this.checkExtendedHeight(o,u),u)):(this.variant=this.font.getSizeVariant(p,h-1),this.size=h-1)}},e.prototype.getSize=function(t,e){var r=this.node.attributes;return e=r.isSet(t)?this.length2em(r.get(t),1,1):e},e.prototype.getWH=function(t){if(0===t.length)return 0;if(1===t.length)return t[0];var t=s(t,2),e=t[0],t=t[1],r=this.font.params.axis_height;return this.node.attributes.get("symmetric")?2*Math.max(e-r,t+r):e+t},e.prototype.getStretchBBox=function(t,e,r){r.hasOwnProperty("min")&&r.min>e&&(e=r.min);var n=s(r.HDW,3),o=n[0],i=n[1],n=n[2];1===this.stretch.dir?(o=(t=s(this.getBaseline(t,e,r),2))[0],i=t[1]):n=e,this.bbox.h=o,this.bbox.d=i,this.bbox.w=n},e.prototype.getBaseline=function(t,e,r){var n=2===t.length&&t[0]+t[1]===e,o=this.node.attributes.get("symmetric"),t=s(n?t:[e,0],2),e=t[0],t=t[1],i=s([e+t,0],2),a=i[0],i=i[1];return i=o?(o=this.font.params.axis_height,(a=n?2*Math.max(e-o,t+o):a)/2-o):n?t:(o=(e=s(r.HDW||[.75,.25],2))[0],(n=e[1])*(a/(o+n))),[a-i,i]},e.prototype.checkExtendedHeight=function(t,e){var r;return e.fullExt&&(r=(e=s(e.fullExt,2))[0],t=(e=e[1])+Math.ceil(Math.max(0,t-e)/r)*r),t},e.prototype.remapChars=function(t){var e=this.node.getProperty("primes");return e?(0,l.unicodeChars)(e):(1===t.length&&(e=this.node.coreParent().parent,e=this.isAccent&&!e.isKind("mrow")?"accent":"mo",(e=this.font.getRemappedChar(e,t[0]))&&(t=this.unicodeChars(e,this.variant))),t)},e;function e(){for(var t=[],e=0;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=(Object.defineProperty(e,"__esModule",{value:!0}),e.CommonInferredMrowMixin=e.CommonMrowMixin=void 0,r(6469));e.CommonMrowMixin=function(t){return o(e,s=t),Object.defineProperty(e.prototype,"fixesPWidth",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.stretchChildren=function(){var t,e,r,n,o,i,a=[];try{for(var s=x(this.childNodes),l=s.next();!l.done;l=s.next())(S=l.value).canStretch(1)&&a.push(S)}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}var c=a.length,u=this.childNodes.length;if(c&&1p&&(p=g),(b*=v)>h&&(h=b))}}catch(t){r={error:t}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}try{for(var S,O=x(a),M=O.next();!M.done;M=O.next())(S=M.value).coreMO().getStretchedVariant([p,h])}catch(t){o={error:t}}finally{try{M&&!M.done&&(i=O.return)&&i.call(O)}finally{if(o)throw o.error}}}},e;function e(){for(var e,t,r=[],n=0;nthis.surdH?(t.h+t.d-(this.surdH-2*e-r/2))/2:e+r/4]},e.prototype.getRootDimens=function(t,e){return[0,0,0,0]},e;function e(){for(var t=[],e=0;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.CommonMtableMixin=void 0,r(6469)),l=r(505),u=r(7875);e.CommonMtableMixin=function(t){return i(e,o=t),Object.defineProperty(e.prototype,"tableRows",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),e.prototype.findContainer=function(){for(var t=this,e=t.parent;e&&(e.node.notParent||e.node.isKind("mrow"));)e=(t=e).parent;this.container=e,this.containerI=t.node.childPosition()},e.prototype.getPercentageWidth=function(){var t;this.hasLabels?this.bbox.pwidth=s.BBox.fullWidth:(t=this.node.attributes.get("width"),(0,l.isPercent)(t)&&(this.bbox.pwidth=t))},e.prototype.stretchRows=function(){for(var t=this.node.attributes.get("equalrows"),e=t?this.getEqualRowHeight():0,r=t?this.getTableData():{H:[0],D:[0]},n=r.H,o=r.D,i=this.tableRows,a=0;ao[r]&&(o[r]=c),u>i[r]&&(i[r]=u),sa[e]&&(a[e]=l),s},e.prototype.extendHD=function(t,e,r,n){n=(n-(e[t]+r[t]))/2;n<1e-5||(e[t]+=n,r[t]+=n)},e.prototype.recordPWidthCell=function(t,e){t.childNodes[0]&&t.childNodes[0].getBBox().pwidth&&this.pwidthCells.push([t,e])},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var e=this.getTableData(),r=e.H,e=e.D,r=(n=this.node.attributes.get("equalrows")?(n=this.getEqualRowHeight(),(0,u.sum)([].concat(this.rLines,this.rSpace))+n*this.numRows):(0,u.sum)(r.concat(e,this.rLines,this.rSpace)),n+=2*(this.fLine+this.fSpace[1]),this.getComputedWidths()),e=(0,u.sum)(r.concat(this.cLines,this.cSpace))+2*(this.fLine+this.fSpace[0]),r=this.node.attributes.get("width"),n=("auto"!==r&&(e=Math.max(this.length2em(r,0)+2*this.fLine,e)),p(this.getBBoxHD(n),2)),o=n[0],n=n[1],o=(t.h=o,t.d=n,t.w=e,p(this.getBBoxLR(),2)),n=o[0],e=o[1];t.L=n,t.R=e,(0,l.isPercent)(r)||this.setColumnPWidths()},e.prototype.setChildPWidths=function(t,e,r){var n=this.node.attributes.get("width");if(!(0,l.isPercent)(n))return!1;this.hasLabels||(this.bbox.pwidth="",this.container.bbox.pwidth="");var o=this.bbox,i=o.w,a=o.L,o=o.R,s=this.node.attributes.get("data-width-includes-label"),n=Math.max(i,this.length2em(n,Math.max(e,a+i+o)))-(s?a+o:0),e=this.node.attributes.get("equalcolumns")?Array(this.numCols).fill(this.percent(1/Math.max(1,this.numCols))):this.getColumnAttributes("columnwidth",0),s=(this.cWidths=this.getColumnWidthsFixed(e,n),this.getComputedWidths());return this.pWidth=(0,u.sum)(s.concat(this.cLines,this.cSpace))+2*(this.fLine+this.fSpace[0]),this.isTop&&(this.bbox.w=this.pWidth),this.setColumnPWidths(),this.pWidth!==i&&this.parent.invalidateBBox(),this.pWidth!==i},e.prototype.setColumnPWidths=function(){var t,e,r=this.cWidths;try{for(var n=_(this.pwidthCells),o=n.next();!o.done;o=n.next()){var i=p(o.value,2),a=i[0],s=i[1];a.setChildPWidths(!1,r[s])&&(a.invalidateBBox(),a.getBBox())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.getBBoxHD=function(t){var e,r=p(this.getAlignmentRow(),2),n=r[0],r=r[1];if(null===r)return{top:[0,t],center:[e=t/2,e],bottom:[t,0],baseline:[e,e],axis:[e+(o=this.font.params.axis_height),e-o]}[n]||[e,e];var o=this.getVerticalPosition(r,n);return[o,t-o]},e.prototype.getBBoxLR=function(){var t,e,r,n;return this.hasLabels?(t=(n=this.node.attributes).get("side"),e=(r=p(this.getPadAlignShift(t),2))[0],r=r[1],(n=this.hasLabels&&!!n.get("data-width-includes-label"))&&this.frame&&this.fSpace[0]&&(e-=this.fSpace[0]),"center"!==r||n?"left"===t?[e,0]:[0,e]:[e,e]):[0,0]},e.prototype.getPadAlignShift=function(t){var e=this.getTableData().L+this.length2em(this.node.attributes.get("minlabelspacing")),r=p(null==this.styles?["",""]:[this.styles.get("padding-left"),this.styles.get("padding-right")],2),n=r[0],r=r[1],n=((n||r)&&(e=Math.max(e,this.length2em(n||"0"),this.length2em(r||"0"))),p(this.getAlignShift(),2)),r=n[0],n=n[1];return[e,r,n=r===t?"left"===t?Math.max(e,n)-e:Math.min(-e,n)+e:n]},e.prototype.getAlignShift=function(){return this.isTop?o.prototype.getAlignShift.call(this):[this.container.getChildAlign(this.containerI),0]},e.prototype.getWidth=function(){return this.pWidth||this.getBBox().w},e.prototype.getEqualRowHeight=function(){var t=this.getTableData(),e=t.H,r=t.D,t=Array.from(e.keys()).map(function(t){return e[t]+r[t]});return Math.max.apply(Math,t)},e.prototype.getComputedWidths=function(){var e=this,r=this.getTableData().W,t=Array.from(r.keys()).map(function(t){return("number"==typeof e.cWidths[t]?e.cWidths:r)[t]});return t=this.node.attributes.get("equalcolumns")?Array(t.length).fill((0,u.max)(t)):t},e.prototype.getColumnWidths=function(){var t=this.node.attributes.get("width");if(this.node.attributes.get("equalcolumns"))return this.getEqualColumns(t);var e=this.getColumnAttributes("columnwidth",0);return"auto"===t?this.getColumnWidthsAuto(e):(0,l.isPercent)(t)?this.getColumnWidthsPercent(e):this.getColumnWidthsFixed(e,this.length2em(t))},e.prototype.getEqualColumns=function(t){var e,r=Math.max(1,this.numCols);return t="auto"===t?(e=this.getTableData().W,(0,u.max)(e)):(0,l.isPercent)(t)?this.percent(1/r):(e=(0,u.sum)([].concat(this.cLines,this.cSpace))+2*this.fSpace[0],Math.max(0,this.length2em(t)-e)/r),Array(this.numCols).fill(t)},e.prototype.getColumnWidthsAuto=function(t){var e=this;return t.map(function(t){return"auto"===t||"fit"===t?null:(0,l.isPercent)(t)?t:e.length2em(t)})},e.prototype.getColumnWidthsPercent=function(r){var n=this,o=0<=r.indexOf("fit"),i=(o?this.getTableData():{W:null}).W;return Array.from(r.keys()).map(function(t){var e=r[t];return"fit"===e?null:"auto"===e?o?i[t]:null:(0,l.isPercent)(e)?e:n.length2em(e)})},e.prototype.getColumnWidthsFixed=function(r,t){var n=this,e=Array.from(r.keys()),o=e.filter(function(t){return"fit"===r[t]}),i=e.filter(function(t){return"auto"===r[t]}),i=o.length||i.length,a=(i?this.getTableData():{W:null}).W,s=t-(0,u.sum)([].concat(this.cLines,this.cSpace))-2*this.fSpace[0],l=s,c=(e.forEach(function(t){var e=r[t];l-="fit"===e||"auto"===e?a[t]:n.length2em(e,s)}),i&&0this.numRows?null:t-1]},e.prototype.getColumnAttributes=function(t,e){var r=this.numCols-(e=void 0===e?1:e),n=this.getAttributeArray(t);if(0===n.length)return null;for(;n.lengthr&&n.splice(r),n},e.prototype.getRowAttributes=function(t,e){var r=this.numRows-(e=void 0===e?1:e),n=this.getAttributeArray(t);if(0===n.length)return null;for(;n.lengthr&&n.splice(r),n},e.prototype.getAttributeArray=function(t){var e=this.node.attributes.get(t);return e?(0,l.split)(e):[this.node.attributes.getDefault(t)]},e.prototype.addEm=function(t,e){var r=this;return void 0===e&&(e=1),t?t.map(function(t){return r.em(t/e)}):null},e.prototype.convertLengths=function(t){var e=this;return t?t.map(function(t){return e.length2em(t)}):null},e;function e(){for(var t=[],e=0;e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.CommonMlabeledtrMixin=e.CommonMtrMixin=void 0,e.CommonMtrMixin=function(t){return o(e,r=t),Object.defineProperty(e.prototype,"fixesPWidth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numCells",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labeled",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableCells",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),e.prototype.getChild=function(t){return this.childNodes[t]},e.prototype.getChildBBoxes=function(){return this.childNodes.map(function(t){return t.getBBox()})},e.prototype.stretchChildren=function(t){void 0===t&&(t=null);var e,r,n,o,i=[],a=this.labeled?this.childNodes.slice(1):this.childNodes;try{for(var s=M(a),l=s.next();!l.done;l=s.next())(_=l.value.childNodes[0]).canStretch(1)&&i.push(_)}catch(t){u={error:t}}finally{try{l&&!l.done&&(c=s.return)&&c.call(s)}finally{if(u)throw u.error}}var c=i.length,u=this.childNodes.length;if(c&&1=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CommonScriptbaseMixin=void 0,r(9007));e.CommonScriptbaseMixin=function(t){var o;return i(e,o=t),Object.defineProperty(e.prototype,"baseChild",{get:function(){return this.childNodes[this.node.base]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scriptChild",{get:function(){return this.childNodes[1]},enumerable:!1,configurable:!0}),e.prototype.getBaseCore=function(){for(var t=this.getSemanticBase()||this.childNodes[0];t&&(1===t.childNodes.length&&(t.node.isKind("mrow")||t.node.isKind("TeXAtom")&&t.node.texClass!==a.TEXCLASS.VCENTER||t.node.isKind("mstyle")||t.node.isKind("mpadded")||t.node.isKind("mphantom")||t.node.isKind("semantics"))||t.node.isKind("munderover")&&t.isMathAccent);)this.setBaseAccentsFor(t),t=t.childNodes[0];return t||(this.baseHasAccentOver=this.baseHasAccentUnder=!1),t||this.childNodes[0]},e.prototype.setBaseAccentsFor=function(t){t.node.isKind("munderover")&&(null===this.baseHasAccentOver&&(this.baseHasAccentOver=!!t.node.attributes.get("accent")),null===this.baseHasAccentUnder&&(this.baseHasAccentUnder=!!t.node.attributes.get("accentunder")))},e.prototype.getSemanticBase=function(){var t=this.node.attributes.getExplicit("data-semantic-fencepointer");return this.getBaseFence(this.baseChild,t)},e.prototype.getBaseFence=function(t,e){var r,n;if(!t||!t.node.attributes||!e)return null;if(t.node.attributes.getExplicit("data-semantic-id")===e)return t;try{for(var o=O(t.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.getBaseFence(a,e);if(s)return s}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null},e.prototype.getBaseScale=function(){for(var t=this.baseCore,e=1;t&&t!==this;)e*=t.getOuterBBox().rscale,t=t.parent;return e},e.prototype.getBaseIc=function(){return this.baseCore.getOuterBBox().ic*this.baseScale},e.prototype.getAdjustedIc=function(){var t=this.baseCore.getOuterBBox();return(t.ic?1.05*t.ic+.05:0)*this.baseScale},e.prototype.isCharBase=function(){var t=this.baseCore;return(t.node.isKind("mo")&&null===t.size||t.node.isKind("mi")||t.node.isKind("mn"))&&1===t.bbox.rscale&&1===Array.from(t.getText()).length},e.prototype.checkLineAccents=function(){this.node.isKind("munderover")&&(this.node.isKind("mover")?this.isLineAbove=this.isLineAccent(this.scriptChild):this.node.isKind("munder")?this.isLineBelow=this.isLineAccent(this.scriptChild):(this.isLineAbove=this.isLineAccent(this.overChild),this.isLineBelow=this.isLineAccent(this.underChild)))},e.prototype.isLineAccent=function(t){t=t.coreMO().node;return t.isToken&&"―"===t.getText()},e.prototype.getBaseWidth=function(){var t=this.baseChild.getOuterBBox();return t.w*t.rscale-(this.baseRemoveIc?this.baseIc:0)+this.font.params.extra_ic},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r=this.getBaseWidth(),n=y(this.getOffset(),2),o=n[0],n=n[1];t.append(this.baseChild.getOuterBBox()),t.combine(this.scriptChild.getOuterBBox(),r+o,n),t.w+=this.font.params.scriptspace,t.clean(),this.setChildPWidths(e)},e.prototype.getOffset=function(){return[0,0]},e.prototype.baseCharZero=function(t){var e=!!this.baseCore.node.attributes.get("largeop"),r=this.baseScale;return this.baseIsChar&&!e&&1===r?0:t},e.prototype.getV=function(){var t=this.baseCore.getOuterBBox(),e=this.scriptChild.getOuterBBox(),r=this.font.params,n=this.length2em(this.node.attributes.get("subscriptshift"),r.sub1);return Math.max(this.baseCharZero(t.d*this.baseScale+r.sub_drop*e.rscale),n,e.h*e.rscale-.8*r.x_height)},e.prototype.getU=function(){var t=this.baseCore.getOuterBBox(),e=this.scriptChild.getOuterBBox(),r=this.font.params,n=this.node.attributes.getList("displaystyle","superscriptshift"),o=this.node.getProperty("texprimestyle")?r.sup3:n.displaystyle?r.sup1:r.sup2,n=this.length2em(n.superscriptshift,o);return Math.max(this.baseCharZero(t.h*this.baseScale-r.sup_drop*e.rscale),n,e.d*e.rscale+.25*r.x_height)},e.prototype.hasMovableLimits=function(){var t=this.node.attributes.get("displaystyle"),e=this.baseChild.coreMO().node;return!t&&!!e.attributes.get("movablelimits")},e.prototype.getOverKU=function(t,e){var r=this.node.attributes.get("accent"),n=this.font.params,e=e.d*e.rscale,o=n.rule_thickness*n.separation_factor,i=this.baseHasAccentOver?o:0,o=this.isLineAbove?3*n.rule_thickness:o,r=(r?o:Math.max(n.big_op_spacing1,n.big_op_spacing3-Math.max(0,e)))-i;return[r,t.h*t.rscale+r+e]},e.prototype.getUnderKV=function(t,e){var r=this.node.attributes.get("accentunder"),n=this.font.params,e=e.h*e.rscale,o=n.rule_thickness*n.separation_factor,i=this.baseHasAccentUnder?o:0,o=this.isLineBelow?3*n.rule_thickness:o,r=(r?o:Math.max(n.big_op_spacing2,n.big_op_spacing4-e))-i;return[r,-(t.d*t.rscale+r+e)]},e.prototype.getDeltaW=function(e,t){void 0===t&&(t=[0,0,0]);var r,n,o,i,a=this.node.attributes.get("align"),s=e.map(function(t){return t.w*t.rscale}),l=(s[0]-=this.baseRemoveIc&&!this.baseCore.node.attributes.get("largeop")?this.baseIc:0,Math.max.apply(Math,g([],y(s),!1))),c=[],u=0;try{for(var p=O(s.keys()),h=p.next();!h.done;h=p.next()){var d=h.value;c[d]=("center"===a?(l-s[d])/2:"right"===a?l-s[d]:0)+t[d],c[d]=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Menu=void 0,r(5713)),c=r(4474),a=r(9515),s=r(7233),l=r(5865),p=r(473),h=r(4414),d=r(4922),f=r(6914),m=r(3463),y=r(7309),g=o(r(5445)),b=a.MathJax,v="undefined"!=typeof window&&window.navigator&&"Mac"===window.navigator.platform.substr(0,3);function _(t,e){void 0===e&&(e={});var r=this;this.settings=null,this.defaultSettings=null,this.menu=null,this.MmlVisitor=new p.MmlVisitor,this.jax={CHTML:null,SVG:null},this.rerenderStart=c.STATE.LAST,this.about=new d.Info('MathJax v'+i.mathjax.version,function(){var t=[];return t.push("Input Jax: "+r.document.inputJax.map(function(t){return t.name}).join(", ")),t.push("Output Jax: "+r.document.outputJax.name),t.push("Document Type: "+r.document.kind),t.join("
          ")},'www.mathjax.org'),this.help=new d.Info("MathJax Help",function(){return["

          MathJax is a JavaScript library that allows page"," authors to include mathematics within their web pages."," As a reader, you don't need to do anything to make that happen.

          ","

          Browsers: MathJax works with all modern browsers including"," Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.

          ","

          Math Menu: MathJax adds a contextual menu to equations."," Right-click or CTRL-click on any mathematics to access the menu.

          ",'
          ',"

          Show Math As: These options allow you to view the formula's"," source markup (as MathML or in its original format).

          ","

          Copy to Clipboard: These options copy the formula's source markup,"," as MathML or in its original format, to the clipboard"," (in browsers that support that).

          ","

          Math Settings: These give you control over features of MathJax,"," such the size of the mathematics, and the mechanism used"," to display equations.

          ","

          Accessibility: MathJax can work with screen"," readers to make mathematics accessible to the visually impaired."," Turn on the explorer to enable generation of speech strings"," and the ability to investigate expressions interactively.

          ","

          Language: This menu lets you select the language used by MathJax"," for its menus and warning messages. (Not yet implemented in version 3.)

          ","
          ","

          Math Zoom: If you are having difficulty reading an"," equation, MathJax can enlarge it to help you see it better, or"," you can scall all the math on the page to make it larger."," Turn these features on in the Math Settings menu.

          ","

          Preferences: MathJax uses your browser's localStorage database"," to save the preferences set via this menu locally in your browser. These"," are not used to track you, and are not transferred or used remotely by"," MathJax in any way.

          "].join("\n")},'www.mathjax.org'),this.mathmlCode=new h.SelectableInfo("MathJax MathML Expression",function(){if(!r.menu.mathItem)return"";var t=r.toMML(r.menu.mathItem);return"
          "+r.formatSource(t)+"
          "},""),this.originalText=new h.SelectableInfo("MathJax Original Source",function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.math;return'
          '+r.formatSource(t)+"
          "},""),this.annotationText=new h.SelectableInfo("MathJax Annotation Text",function(){if(!r.menu.mathItem)return"";var t=r.menu.annotation;return'
          '+r.formatSource(t)+"
          "},""),this.zoomBox=new d.Info("MathJax Zoomed Expression",function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.typesetRoot.cloneNode(!0);return t.style.margin="0",'
          '+t.outerHTML+"
          "},""),this.document=t,this.options=(0,s.userOptions)((0,s.defaultOptions)({},this.constructor.OPTIONS),e),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings()}Object.defineProperty(_.prototype,"isLoading",{get:function(){return 0<_.loading},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"loadingPromise",{get:function(){return this.isLoading?_._loadingPromise=_._loadingPromise?_._loadingPromise:new Promise(function(t,e){_._loadingOK=t,_._loadingFailed=e}):Promise.resolve()},enumerable:!1,configurable:!0}),_.prototype.initSettings=function(){this.settings=this.options.settings,this.jax=this.options.jax;var t=this.document.outputJax;this.jax[t.name]=t,this.settings.renderer=t.name,b._.a11y&&b._.a11y.explorer&&Object.assign(this.settings,this.document.options.a11y),this.settings.scale=t.options.scale,this.defaultSettings=Object.assign({},this.settings)},_.prototype.initMenu=function(){var r=this,t=new f.Parser([["contextMenu",l.MJContextMenu.fromJson.bind(l.MJContextMenu)]]),t=(this.menu=t.parse({type:"contextMenu",id:"MathJax_Menu",pool:[this.variable("texHints"),this.variable("semantics"),this.variable("zoom"),this.variable("zscale"),this.variable("renderer",function(t){return r.setRenderer(t)}),this.variable("alt"),this.variable("cmd"),this.variable("ctrl"),this.variable("shift"),this.variable("scale",function(t){return r.setScale(t)}),this.variable("explorer",function(t){return r.setExplorer(t)}),this.a11yVar("highlight"),this.a11yVar("backgroundColor"),this.a11yVar("backgroundOpacity"),this.a11yVar("foregroundColor"),this.a11yVar("foregroundOpacity"),this.a11yVar("speech"),this.a11yVar("subtitles"),this.a11yVar("braille"),this.a11yVar("viewBraille"),this.a11yVar("locale",function(t){return g.default.setupEngine({locale:t})}),this.a11yVar("speechRules",function(t){var t=n(t.split("-"),2),e=t[0],t=t[1];r.document.options.sre.domain=e,r.document.options.sre.style=t}),this.a11yVar("magnification"),this.a11yVar("magnify"),this.a11yVar("treeColoring"),this.a11yVar("infoType"),this.a11yVar("infoRole"),this.a11yVar("infoPrefix"),this.variable("autocollapse"),this.variable("collapsible",function(t){return r.setCollapsible(t)}),this.variable("inTabOrder",function(t){return r.setTabOrder(t)}),this.variable("assistiveMml",function(t){return r.setAssistiveMml(t)})],items:[this.submenu("Show","Show Math As",[this.command("MathMLcode","MathML Code",function(){return r.mathmlCode.post()}),this.command("Original","Original Form",function(){return r.originalText.post()}),this.submenu("Annotation","Annotation")]),this.submenu("Copy","Copy to Clipboard",[this.command("MathMLcode","MathML Code",function(){return r.copyMathML()}),this.command("Original","Original Form",function(){return r.copyOriginal()}),this.submenu("Annotation","Annotation")]),this.rule(),this.submenu("Settings","Math Settings",[this.submenu("Renderer","Math Renderer",this.radioGroup("renderer",[["CHTML"],["SVG"]])),this.rule(),this.submenu("ZoomTrigger","Zoom Trigger",[this.command("ZoomNow","Zoom Once Now",function(){return r.zoom(null,"",r.menu.mathItem)}),this.rule(),this.radioGroup("zoom",[["Click"],["DoubleClick","Double-Click"],["NoZoom","No Zoom"]]),this.rule(),this.label("TriggerRequires","Trigger Requires:"),this.checkbox(v?"Option":"Alt",v?"Option":"Alt","alt"),this.checkbox("Command","Command","cmd",{hidden:!v}),this.checkbox("Control","Control","ctrl",{hiddne:v}),this.checkbox("Shift","Shift","shift")]),this.submenu("ZoomFactor","Zoom Factor",this.radioGroup("zscale",[["150%"],["175%"],["200%"],["250%"],["300%"],["400%"]])),this.rule(),this.command("Scale","Scale All Math...",function(){return r.scaleAllMath()}),this.rule(),this.checkbox("texHints","Add TeX hints to MathML","texHints"),this.checkbox("semantics","Add original as annotation","semantics"),this.rule(),this.command("Reset","Reset to defaults",function(){return r.resetDefaults()})]),this.submenu("Accessibility","Accessibility",[this.checkbox("Activate","Activate","explorer"),this.submenu("Speech","Speech",[this.checkbox("Speech","Speech Output","speech"),this.checkbox("Subtitles","Speech Subtitles","subtitles"),this.checkbox("Braille","Braille Output","braille"),this.checkbox("View Braille","Braille Subtitles","viewBraille"),this.rule(),this.submenu("A11yLanguage","Language"),this.rule(),this.submenu("Mathspeak","Mathspeak Rules",this.radioGroup("speechRules",[["mathspeak-default","Verbose"],["mathspeak-brief","Brief"],["mathspeak-sbrief","Superbrief"]])),this.submenu("Clearspeak","Clearspeak Rules",this.radioGroup("speechRules",[["clearspeak-default","Auto"]])),this.submenu("ChromeVox","ChromeVox Rules",this.radioGroup("speechRules",[["chromevox-default","Standard"],["chromevox-alternative","Alternative"]]))]),this.submenu("Highlight","Highlight",[this.submenu("Background","Background",this.radioGroup("backgroundColor",[["Blue"],["Red"],["Green"],["Yellow"],["Cyan"],["Magenta"],["White"],["Black"]])),{type:"slider",variable:"backgroundOpacity",content:" "},this.submenu("Foreground","Foreground",this.radioGroup("foregroundColor",[["Black"],["White"],["Magenta"],["Cyan"],["Yellow"],["Green"],["Red"],["Blue"]])),{type:"slider",variable:"foregroundOpacity",content:" "},this.rule(),this.radioGroup("highlight",[["None"],["Hover"],["Flame"]]),this.rule(),this.checkbox("TreeColoring","Tree Coloring","treeColoring")]),this.submenu("Magnification","Magnification",[this.radioGroup("magnification",[["None"],["Keyboard"],["Mouse"]]),this.rule(),this.radioGroup("magnify",[["200%"],["300%"],["400%"],["500%"]])]),this.submenu("Semantic Info","Semantic Info",[this.checkbox("Type","Type","infoType"),this.checkbox("Role","Role","infoRole"),this.checkbox("Prefix","Prefix","infoPrefix")],!0),this.rule(),this.checkbox("Collapsible","Collapsible Math","collapsible"),this.checkbox("AutoCollapse","Auto Collapse","autocollapse",{disabled:!0}),this.rule(),this.checkbox("InTabOrder","Include in Tab Order","inTabOrder"),this.checkbox("AssistiveMml","Include Hidden MathML","assistiveMml")]),this.submenu("Language","Language"),this.rule(),this.command("About","About MathJax",function(){return r.about.post()}),this.command("Help","MathJax Help",function(){return r.help.post()})]}),this.menu);this.about.attachMenu(t),this.help.attachMenu(t),this.originalText.attachMenu(t),this.annotationText.attachMenu(t),this.mathmlCode.attachMenu(t),this.zoomBox.attachMenu(t),this.checkLoadableItems(),this.enableExplorerItems(this.settings.explorer),t.showAnnotation=this.annotationText,t.copyAnnotation=this.copyAnnotation.bind(this),t.annotationTypes=this.options.annotationTypes,y.CssStyles.addInfoStyles(this.document.document),y.CssStyles.addMenuStyles(this.document.document)},_.prototype.checkLoadableItems=function(){var t,e;if(b&&b._&&b.loader&&b.startup)!this.settings.collapsible||b._.a11y&&b._.a11y.complexity||this.loadA11y("complexity"),!this.settings.explorer||b._.a11y&&b._.a11y.explorer||this.loadA11y("explorer"),!this.settings.assistiveMml||b._.a11y&&b._.a11y["assistive-mml"]||this.loadA11y("assistive-mml");else{var r=this.menu;try{for(var n=u(Object.keys(this.jax)),o=n.next();!o.done;o=n.next()){var i=o.value;this.jax[i]||r.findID("Settings","Renderer",i).disable()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}r.findID("Accessibility","Activate").disable(),r.findID("Accessibility","AutoCollapse").disable(),r.findID("Accessibility","Collapsible").disable()}},_.prototype.enableExplorerItems=function(t){var e,r,n=this.menu.findID("Accessibility","Activate").menu;try{for(var o=u(n.items.slice(1)),i=o.next();!i.done;i=o.next()){var a=i.value;if(a instanceof m.Rule)break;t?a.enable():a.disable()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},_.prototype.mergeUserSettings=function(){try{var t=localStorage.getItem(_.MENU_STORAGE);if(!t)return;Object.assign(this.settings,JSON.parse(t)),this.setA11y(this.settings)}catch(t){console.log("MathJax localStorage error: "+t.message)}},_.prototype.saveUserSettings=function(){var e,t,r={};try{for(var n=u(Object.keys(this.settings)),o=n.next();!o.done;o=n.next()){var i=o.value;this.settings[i]!==this.defaultSettings[i]&&(r[i]=this.settings[i])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}try{Object.keys(r).length?localStorage.setItem(_.MENU_STORAGE,JSON.stringify(r)):localStorage.removeItem(_.MENU_STORAGE)}catch(t){console.log("MathJax localStorage error: "+t.message)}},_.prototype.setA11y=function(t){b._.a11y&&b._.a11y.explorer&&b._.a11y.explorer_ts.setA11yOptions(this.document,t)},_.prototype.getA11y=function(t){if(b._.a11y&&b._.a11y.explorer)return(void 0!==this.document.options.a11y[t]?this.document.options.a11y:this.document.options.sre)[t]},_.prototype.applySettings=function(){this.setTabOrder(this.settings.inTabOrder),this.document.options.enableAssistiveMml=this.settings.assistiveMml,this.document.outputJax.options.scale=parseFloat(this.settings.scale),this.settings.renderer!==this.defaultSettings.renderer&&this.setRenderer(this.settings.renderer)},_.prototype.setScale=function(t){this.document.outputJax.options.scale=parseFloat(t),this.document.rerender()},_.prototype.setRenderer=function(e){var r,n=this;this.jax[e]?this.setOutputJax(e):(r=e.toLowerCase(),this.loadComponent("output/"+r,function(){var t=b.startup;r in t.constructors&&(t.useOutput(r,!0),t.output=t.getOutputJax(),n.jax[e]=t.output,n.setOutputJax(e))}))},_.prototype.setOutputJax=function(t){this.jax[t].setAdaptor(this.document.adaptor),this.document.outputJax=this.jax[t],this.rerender()},_.prototype.setTabOrder=function(t){this.menu.store.inTaborder(t)},_.prototype.setAssistiveMml=function(t){!(this.document.options.enableAssistiveMml=t)||b._.a11y&&b._.a11y["assistive-mml"]?this.rerender():this.loadA11y("assistive-mml")},_.prototype.setExplorer=function(t){this.enableExplorerItems(t),!(this.document.options.enableExplorer=t)||b._.a11y&&b._.a11y.explorer?this.rerender(this.settings.collapsible?c.STATE.RERENDER:c.STATE.COMPILED):this.loadA11y("explorer")},_.prototype.setCollapsible=function(t){!(this.document.options.enableComplexity=t)||b._.a11y&&b._.a11y.complexity?this.rerender(c.STATE.COMPILED):this.loadA11y("complexity")},_.prototype.scaleAllMath=function(){var t=(100*parseFloat(this.settings.scale)).toFixed(1).replace(/.0$/,""),t=prompt("Scale all mathematics (compared to surrounding text) by",t+"%");t&&(t.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)?(t=parseFloat(t)/100)?this.menu.pool.lookup("scale").setValue(String(t)):alert("The scale should not be zero"):alert("The scale should be a percentage (e.g., 120%)"))},_.prototype.resetDefaults=function(){_.loading++;var e,t,r=this.menu.pool,n=this.defaultSettings;try{for(var o=u(Object.keys(this.settings)),i=o.next();!i.done;i=o.next()){var a,s=i.value,l=r.lookup(s);l?(l.setValue(n[s]),(a=l.items[0])&&a.executeCallbacks_()):this.settings[s]=n[s]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}_.loading--,this.rerender(c.STATE.COMPILED)},_.prototype.checkComponent=function(t){t=_.loadingPromises.get(t);t&&i.mathjax.retryAfter(t)},_.prototype.loadComponent=function(t,e){var r;_.loadingPromises.has(t)||(r=b.loader)&&(_.loading++,r=r.load(t).then(function(){_.loading--,_.loadingPromises.delete(t),e(),0===_.loading&&_._loadingPromise&&(_._loadingPromise=null,_._loadingOK())}).catch(function(t){_._loadingPromise?(_._loadingPromise=null,_._loadingFailed(t)):console.log(t)}),_.loadingPromises.set(t,r))},_.prototype.loadA11y=function(r){var n=this,o=!c.STATE.ENRICHED;this.loadComponent("a11y/"+r,function(){var t=b.startup,e=(i.mathjax.handlers.unregister(t.handler),t.handler=t.getHandler(),i.mathjax.handlers.register(t.handler),n.document);n.document=t.document=t.getDocument(),(n.document.menu=n).document.outputJax.reset(),n.transferMathList(e),n.document.processed=e.processed,_._loadingPromise||(n.document.outputJax.reset(),n.rerender("complexity"===r||o?c.STATE.COMPILED:c.STATE.TYPESET))})},_.prototype.transferMathList=function(t){var e,r,n=this.document.options.MathItem;try{for(var o=u(t.math),i=o.next();!i.done;i=o.next()){var a=i.value,s=new n;Object.assign(s,a),this.document.math.push(s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},_.prototype.formatSource=function(t){return t.trim().replace(/&/g,"&").replace(//g,">")},_.prototype.toMML=function(t){return this.MmlVisitor.visitTree(t.root,t,{texHints:this.settings.texHints,semantics:this.settings.semantics&&"MathML"!==t.inputJax.name})},_.prototype.zoom=function(t,e,r){t&&!this.isZoomEvent(t,e)||(this.menu.mathItem=r,t&&this.menu.post(t),this.zoomBox.post())},_.prototype.isZoomEvent=function(t,e){return this.settings.zoom===e&&(!this.settings.alt||t.altKey)&&(!this.settings.ctrl||t.ctrlKey)&&(!this.settings.cmd||t.metaKey)&&(!this.settings.shift||t.shiftKey)},_.prototype.rerender=function(t){void 0===t&&(t=c.STATE.TYPESET),this.rerenderStart=Math.min(t,this.rerenderStart),_.loading||(this.rerenderStart<=c.STATE.COMPILED&&this.document.reset({inputJax:[]}),this.document.rerender(this.rerenderStart),this.rerenderStart=c.STATE.LAST)},_.prototype.copyMathML=function(){this.copyToClipboard(this.toMML(this.menu.mathItem))},_.prototype.copyOriginal=function(){this.copyToClipboard(this.menu.mathItem.math.trim())},_.prototype.copyAnnotation=function(){this.copyToClipboard(this.menu.annotation.trim())},_.prototype.copyToClipboard=function(t){var e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.cssText="height: 1px; width: 1px; padding: 1px; position: absolute; left: -10px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(t){alert("Can't copy to clipboard: "+t.message)}document.body.removeChild(e)},_.prototype.addMenu=function(e){var r=this,t=e.typesetRoot;t.addEventListener("contextmenu",function(){return r.menu.mathItem=e},!0),t.addEventListener("keydown",function(){return r.menu.mathItem=e},!0),t.addEventListener("click",function(t){return r.zoom(t,"Click",e)},!0),t.addEventListener("dblclick",function(t){return r.zoom(t,"DoubleClick",e)},!0),this.menu.store.insert(t)},_.prototype.clear=function(){this.menu.store.clear()},_.prototype.variable=function(e,r){var n=this;return{name:e,getter:function(){return n.settings[e]},setter:function(t){n.settings[e]=t,r&&r(t),n.saveUserSettings()}}},_.prototype.a11yVar=function(r,n){var o=this;return{name:r,getter:function(){return o.getA11y(r)},setter:function(t){o.settings[r]=t;var e={};e[r]=t,o.setA11y(e),n&&n(t),o.saveUserSettings()}}},_.prototype.submenu=function(t,e,r,n){void 0===r&&(r=[]),void 0===n&&(n=!1);var o,i,a=[];try{for(var s=u(r),l=s.next();!l.done;l=s.next()){var c=l.value;Array.isArray(c)?a=a.concat(c):a.push(c)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return{type:"submenu",id:t,content:e,menu:{items:a},disabled:0===a.length||n}},_.prototype.command=function(t,e,r,n){return void 0===n&&(n={}),Object.assign({type:"command",id:t,content:e,action:r},n)},_.prototype.checkbox=function(t,e,r,n){return void 0===n&&(n={}),Object.assign({type:"checkbox",id:t,content:e,variable:r},n)},_.prototype.radioGroup=function(e,t){var r=this;return t.map(function(t){return r.radio(t[0],t[1]||t[0],e)})},_.prototype.radio=function(t,e,r,n){return void 0===n&&(n={}),Object.assign({type:"radio",id:t,content:e,variable:r},n)},_.prototype.label=function(t,e){return{type:"label",id:t,content:e}},_.prototype.rule=function(){return{type:"rule"}},_.MENU_STORAGE="MathJax-Menu-Settings",_.OPTIONS={settings:{texHints:!0,semantics:!1,zoom:"NoZoom",zscale:"200%",renderer:"CHTML",alt:!1,cmd:!1,ctrl:!1,shift:!1,scale:1,autocollapse:!1,collapsible:!1,inTabOrder:!0,assistiveMml:!0,explorer:!1},jax:{CHTML:null,SVG:null},annotationTypes:(0,s.expandable)({TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]})},_.loading=0,_.loadingPromises=new Map,_._loadingPromise=null,_._loadingOK=null,_._loadingFailed=null,e.Menu=_},4001:function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=(Object.defineProperty(e,"__esModule",{value:!0}),e.MenuHandler=e.MenuMathDocumentMixin=e.MenuMathItemMixin=void 0,r(5713)),p=r(4474),h=r(7233),d=r(8310);function f(t){return i(e,r=t),e.prototype.addMenu=function(t,e){void 0===e&&(e=!1),this.state()>=p.STATE.CONTEXT_MENU||(this.isEscaped||!t.options.enableMenu&&!e||t.menu.addMenu(this),this.state(p.STATE.CONTEXT_MENU))},e.prototype.checkLoading=function(t){t.checkLoading()},e;function e(){return null!==r&&r.apply(this,arguments)||this}var r}function o(t){var e,o;return i(r,o=t),r.prototype.addMenu=function(){var t,e;if(!this.processed.isSet("context-menu")){try{for(var r=c(this.math),n=r.next();!n.done;n=r.next())n.value.addMenu(this)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("context-menu")}return this},r.prototype.checkLoading=function(){this.menu.isLoading&&u.mathjax.retryAfter(this.menu.loadingPromise.catch(function(t){return console.log(t)}));var t=this.menu.settings;return t.collapsible&&(this.options.enableComplexity=!0,this.menu.checkComponent("a11y/complexity")),t.explorer&&(this.options.enableEnrichment=!0,this.options.enableExplorer=!0,this.menu.checkComponent("a11y/explorer")),this},r.prototype.state=function(t,e){return o.prototype.state.call(this,t,e=void 0===e?!1:e),t\n"+this.childNodeMml(t,e+" ","\n")+e+""},l.prototype.visitMathNode=function(t,e){if(!this.options.semantics||"TeX"!==this.mathItem.inputJax.name)return o.prototype.visitDefault.call(this,t,e);var r=t.childNodes.length&&1\n"+e+" \n"+(r?e+" \n":"")+this.childNodeMml(t,e+(r?" ":" "),"\n")+(r?e+" \n":"")+e+' '+this.mathItem.math+"\n"+e+" \n"+e+""},l);function l(){var t=null!==o&&o.apply(this,arguments)||this;return t.options={texHints:!0,semantics:!1},t.mathItem=null,t}e.MmlVisitor=r},4414:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.SelectableInfo=void 0,r(4922)),s=r(2165),r=(o=a.Info,i(l,o),l.prototype.addEvents=function(t){var e=this;t.addEventListener("keypress",function(t){"a"===t.key&&(t.ctrlKey||t.metaKey)&&(e.selectAll(),e.stop(t))})},l.prototype.selectAll=function(){document.getSelection().selectAllChildren(this.html.querySelector("pre"))},l.prototype.copyToClipboard=function(){this.selectAll();try{document.execCommand("copy")}catch(t){alert("Can't copy to clipboard: "+t.message)}document.getSelection().removeAllRanges()},l.prototype.generateHtml=function(){var e=this,t=(o.prototype.generateHtml.call(this),this.html.querySelector("span."+s.HtmlClasses.INFOSIGNATURE).appendChild(document.createElement("input")));t.type="button",t.value="Copy to Clipboard",t.addEventListener("click",function(t){return e.copyToClipboard()})},l);function l(){return null!==o&&o.apply(this,arguments)||this}e.SelectableInfo=r},9923:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncLoad=void 0;var o=r(5713);e.asyncLoad=function(n){return o.mathjax.asyncLoad?new Promise(function(e,r){var t=o.mathjax.asyncLoad(n);t instanceof Promise?t.then(function(t){return e(t)}).catch(function(t){return r(t)}):e(t)}):Promise.reject("Can't load '".concat(n,"': No asyncLoad method specified"))}},6469:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.BBox=void 0;var n=r(6010);function o(t){void 0===t&&(t={w:0,h:-n.BIGDIMEN,d:-n.BIGDIMEN}),this.w=t.w||0,this.h="h"in t?t.h:-n.BIGDIMEN,this.d="d"in t?t.d:-n.BIGDIMEN,this.L=this.R=this.ic=this.sk=this.dx=0,this.scale=this.rscale=1,this.pwidth=""}o.zero=function(){return new o({h:0,d:0,w:0})},o.empty=function(){return new o},o.prototype.empty=function(){return this.w=0,this.h=this.d=-n.BIGDIMEN,this},o.prototype.clean=function(){this.w===-n.BIGDIMEN&&(this.w=0),this.h===-n.BIGDIMEN&&(this.h=0),this.d===-n.BIGDIMEN&&(this.d=0)},o.prototype.rescale=function(t){this.w*=t,this.h*=t,this.d*=t},o.prototype.combine=function(t,e,r){var n=t.rscale,e=(e=void 0===e?0:e)+n*(t.w+t.L+t.R),o=(r=void 0===r?0:r)+n*t.h,n=n*t.d-r;e>this.w&&(this.w=e),o>this.h&&(this.h=o),n>this.d&&(this.d=n)},o.prototype.append=function(t){var e=t.rscale;this.w+=e*(t.w+t.L+t.R),e*t.h>this.h&&(this.h=e*t.h),e*t.d>this.d&&(this.d=e*t.d)},o.prototype.updateFrom=function(t){this.h=t.h,this.d=t.d,this.w=t.w,t.pwidth&&(this.pwidth=t.pwidth)},o.fullWidth="100%",o.StyleAdjust=[["borderTopWidth","h"],["borderRightWidth","w"],["borderBottomWidth","d"],["borderLeftWidth","w",0],["paddingTop","h"],["paddingRight","w"],["paddingBottom","d"],["paddingLeft","w",0]],e.BBox=o},6751:function(t,e){var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0",gtdot:"⋗",harrw:"↭",hbar:"ℏ",hellip:"…",hookleftarrow:"↩",hookrightarrow:"↪",imath:"ı",infin:"∞",intcal:"⊺",iota:"ι",jmath:"ȷ",kappa:"κ",kappav:"ϰ",lEg:"⪋",lambda:"λ",lap:"⪅",larrlp:"↫",larrtl:"↢",lbrace:"{",lbrack:"[",le:"≤",leftleftarrows:"⇇",leftthreetimes:"⋋",lessdot:"⋖",lmoust:"⎰",lnE:"≨",lnap:"⪉",lne:"⪇",lnsim:"⋦",longmapsto:"⟼",looparrowright:"↬",lowast:"∗",loz:"◊",lt:"<",ltimes:"⋉",ltri:"◃",macr:"¯",malt:"✠",mho:"℧",mu:"μ",multimap:"⊸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",natur:"♮",nearr:"↗",nharr:"↮",nlarr:"↚",not:"¬",nrarr:"↛",nu:"ν",nvDash:"⊭",nvdash:"⊬",nwarr:"↖",omega:"ω",omicron:"ο",or:"∨",osol:"⊘",period:".",phi:"φ",phiv:"ϕ",pi:"π",piv:"ϖ",prap:"⪷",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",prime:"′",psi:"ψ",quot:'"',rarrtl:"↣",rbrace:"}",rbrack:"]",rho:"ρ",rhov:"ϱ",rightrightarrows:"⇉",rightthreetimes:"⋌",ring:"˚",rmoust:"⎱",rtimes:"⋊",rtri:"▹",scap:"⪸",scnE:"⪶",scnap:"⪺",scnsim:"⋩",sdot:"⋅",searr:"↘",sect:"§",sharp:"♯",sigma:"σ",sigmav:"ς",simne:"≆",smile:"⌣",spades:"♠",sub:"⊂",subE:"⫅",subnE:"⫋",subne:"⊊",supE:"⫆",supnE:"⫌",supne:"⊋",swarr:"↙",tau:"τ",theta:"θ",thetav:"ϑ",tilde:"˜",times:"×",triangle:"▵",triangleq:"≜",upsi:"υ",upuparrows:"⇈",veebar:"⊻",vellip:"⋮",weierp:"℘",xi:"ξ",yen:"¥",zeta:"ζ",zigrarr:"⇝",nbsp:" ",rsquo:"’",lsquo:"‘"},{});function a(t,e){return"#"===e.charAt(0)?s(e.slice(1)):r.entities[e]||(r.options.loadMissingEntities&&(e=e.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:e.charAt(0).toLowerCase(),i[e]||(i[e]=!0,(0,n.retryAfter)((0,o.asyncLoad)("./util/entities/"+e+".js")))),t)}function s(t){t="x"===t.charAt(0)?parseInt(t.slice(1),16):parseInt(t);return String.fromCodePoint(t)}r.add=function(t,e){Object.assign(r.entities,t),i[e]=!0},r.remove=function(t){delete r.entities[t]},r.translate=function(t){return t.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,a)},r.numeric=s},7525:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0s[0]&&e[1]=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},e=(Object.defineProperty(u,"__esModule",{value:!0}),u.LinkedList=u.ListItem=u.END=void 0,u.END=Symbol(),u.ListItem=l,c.prototype.isBefore=function(t,e){return t=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0e.length}}}},n.prototype.add=function(t,e){void 0===e&&(e=n.DEFAULTPRIORITY);for(var r=this.items.length;0<=--r&&e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.CssStyles=void 0,Object.defineProperty(n.prototype,"cssText",{get:function(){return this.getStyleString()},enumerable:!1,configurable:!0}),n.prototype.addStyles=function(t){var e,r;if(t)try{for(var n=c(Object.keys(t)),o=n.next();!o.done;o=n.next()){var i=o.value;this.styles[i]||(this.styles[i]={}),Object.assign(this.styles[i],t[i])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},n.prototype.removeStyles=function(){for(var t,e,r=[],n=0;n=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},g=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractItem=void 0,r(9329)),l=r(2556),c=r(2165),r=(o=s.AbstractEntry,i(u,o),Object.defineProperty(u.prototype,"content",{get:function(){return this._content},set:function(t){this._content=t,this.generateHtml(),this.menu&&this.menu.generateHtml()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),u.prototype.press=function(){this.disabled||(this.executeAction(),this.executeCallbacks_())},u.prototype.executeAction=function(){},u.prototype.registerCallback=function(t){-1===this.callbacks.indexOf(t)&&this.callbacks.push(t)},u.prototype.unregisterCallback=function(t){t=this.callbacks.indexOf(t);-1!==t&&this.callbacks.splice(t,1)},u.prototype.mousedown=function(t){this.press(),this.stop(t)},u.prototype.mouseover=function(t){this.focus(),this.stop(t)},u.prototype.mouseout=function(t){this.deactivate(),this.stop(t)},u.prototype.generateHtml=function(){o.prototype.generateHtml.call(this);var t=this.html;t.setAttribute("aria-disabled","false"),t.textContent=this.content},u.prototype.activate=function(){this.disabled||this.html.classList.add(c.HtmlClasses.MENUACTIVE)},u.prototype.deactivate=function(){this.html.classList.remove(c.HtmlClasses.MENUACTIVE)},u.prototype.focus=function(){this.menu.focused=this,o.prototype.focus.call(this),this.activate()},u.prototype.unfocus=function(){this.deactivate(),o.prototype.unfocus.call(this)},u.prototype.escape=function(t){l.MenuUtil.close(this)},u.prototype.up=function(t){this.menu.up(t)},u.prototype.down=function(t){this.menu.down(t)},u.prototype.left=function(t){this.menu.left(t)},u.prototype.right=function(t){this.menu.right(t)},u.prototype.space=function(t){this.press()},u.prototype.disable=function(){this.disabled=!0;var t=this.html;t.classList.add(c.HtmlClasses.MENUDISABLED),t.setAttribute("aria-disabled","true")},u.prototype.enable=function(){this.disabled=!1;var t=this.html;t.classList.remove(c.HtmlClasses.MENUDISABLED),t.removeAttribute("aria-disabled")},u.prototype.executeCallbacks_=function(){var t,e;try{for(var r=a(this.callbacks),n=r.next();!n.done;n=r.next()){var o=n.value;try{o(this)}catch(t){l.MenuUtil.error(t,"Callback for menu entry "+this.id+" failed.")}}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},u);function u(t,e,r,n){t=o.call(this,t,e)||this;return t._content=r,t.disabled=!1,t.callbacks=[],t._id=n||r,t}e.AbstractItem=r},1484:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMenu=void 0,r(8372)),l=r(1340),c=r(2165),u=r(6186),r=(o=a.AbstractPostable,i(p,o),Object.defineProperty(p.prototype,"baseMenu",{get:function(){return this._baseMenu},set:function(t){this._baseMenu=t},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"items",{get:function(){return this._items},set:function(t){this._items=t},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"pool",{get:function(){return this.variablePool},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"focused",{get:function(){return this._focused},set:function(t){var e;this._focused!==t&&(this._focused||this.unfocus(),e=this._focused,this._focused=t,e&&e.unfocus())},enumerable:!1,configurable:!0}),p.prototype.up=function(t){var e,r=this.items.filter(function(t){return t instanceof l.AbstractItem&&!t.isHidden()});0!==r.length&&(this.focused?-1!==(e=r.indexOf(this.focused))&&r[e=e?--e:r.length-1].focus():r[r.length-1].focus())},p.prototype.down=function(t){var e,r=this.items.filter(function(t){return t instanceof l.AbstractItem&&!t.isHidden()});0!==r.length&&(this.focused?-1!==(e=r.indexOf(this.focused))&&r[e=++e===r.length?0:e].focus():r[0].focus())},p.prototype.generateHtml=function(){o.prototype.generateHtml.call(this),this.generateMenu()},p.prototype.generateMenu=function(){var t,e,r=this.html;r.classList.add(c.HtmlClasses.MENU);try{for(var n=s(this.items),o=n.next();!o.done;o=n.next()){var i,a=o.value;a.isHidden()?(i=a.html).parentNode&&i.parentNode.removeChild(i):r.appendChild(a.html)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},p.prototype.post=function(t,e){this.variablePool.update(),o.prototype.post.call(this,t,e)},p.prototype.unpostSubmenus=function(){var t,e,r=this.items.filter(function(t){return t instanceof u.Submenu});try{for(var n=s(r),o=n.next();!o.done;o=n.next()){var i=o.value;i.submenu.unpost(),i!==this.focused&&i.unfocus()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},p.prototype.unpost=function(){o.prototype.unpost.call(this),this.unpostSubmenus(),this.focused=null},p.prototype.find=function(t){var e,r;try{for(var n=s(this.items),o=n.next();!o.done;o=n.next()){var i=o.value;if("rule"!==i.type){if(i.id===t)return i;if("submenu"===i.type){var a=i.submenu.find(t);if(a)return a}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return null},p);function p(){var t=null!==o&&o.apply(this,arguments)||this;return t.className=c.HtmlClasses.CONTEXTMENU,t.role="menu",t._items=[],t._baseMenu=null,t}e.AbstractMenu=r},2868:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractNavigatable=void 0;var n=r(3205),o=r(8853);function i(){this.bubble=!1}i.prototype.bubbleKey=function(){this.bubble=!0},i.prototype.keydown=function(t){switch(t.keyCode){case n.KEY.ESCAPE:this.escape(t);break;case n.KEY.RIGHT:this.right(t);break;case n.KEY.LEFT:this.left(t);break;case n.KEY.UP:this.up(t);break;case n.KEY.DOWN:this.down(t);break;case n.KEY.RETURN:case n.KEY.SPACE:this.space(t);break;default:return}this.bubble?this.bubble=!1:this.stop(t)},i.prototype.escape=function(t){},i.prototype.space=function(t){},i.prototype.left=function(t){},i.prototype.right=function(t){},i.prototype.up=function(t){},i.prototype.down=function(t){},i.prototype.stop=function(t){t&&(t.stopPropagation(),t.preventDefault(),t.cancelBubble=!0)},i.prototype.mousedown=function(t){return this.stop(t)},i.prototype.mouseup=function(t){return this.stop(t)},i.prototype.mouseover=function(t){return this.stop(t)},i.prototype.mouseout=function(t){return this.stop(t)},i.prototype.click=function(t){return this.stop(t)},i.prototype.addEvents=function(t){t.addEventListener(o.MOUSE.DOWN,this.mousedown.bind(this)),t.addEventListener(o.MOUSE.UP,this.mouseup.bind(this)),t.addEventListener(o.MOUSE.OVER,this.mouseover.bind(this)),t.addEventListener(o.MOUSE.OUT,this.mouseout.bind(this)),t.addEventListener(o.MOUSE.CLICK,this.click.bind(this)),t.addEventListener("keydown",this.keydown.bind(this)),t.addEventListener("dragstart",this.stop.bind(this)),t.addEventListener(o.MOUSE.SELECTSTART,this.stop.bind(this)),t.addEventListener("contextmenu",this.stop.bind(this)),t.addEventListener(o.MOUSE.DBLCLICK,this.stop.bind(this))},e.AbstractNavigatable=i},8372:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),r=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractPostable=void 0,o=r(9328).MenuElement,i(a,o),a.prototype.isPosted=function(){return this.posted},a.prototype.post=function(t,e){this.posted||(void 0!==t&&void 0!==e&&this.html.setAttribute("style","left: "+t+"px; top: "+e+"px;"),this.display(),this.posted=!0)},a.prototype.unpost=function(){var t;this.posted&&((t=this.html).parentNode&&t.parentNode.removeChild(t),this.posted=!1)},a);function a(){var t=null!==o&&o.apply(this,arguments)||this;return t.posted=!1,t}e.AbstractPostable=r},6765:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),r=(Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractVariableItem=void 0,o=r(1340).AbstractItem,i(a,o),a.prototype.generateHtml=function(){o.prototype.generateHtml.call(this);var t=this.html;this.span||this.generateSpan(),t.appendChild(this.span),this.update()},a.prototype.register=function(){this.variable.register(this)},a.prototype.unregister=function(){this.variable.unregister(this)},a.prototype.update=function(){this.updateAria(),this.span&&this.updateSpan()},a);function a(){return null!==o&&o.apply(this,arguments)||this}e.AbstractVariableItem=r},5179:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.CloseButton=void 0,r(8372)),s=r(2165),r=(o=a.AbstractPostable,i(l,o),l.prototype.generateHtml=function(){var t=document.createElement("span"),e=(t.classList.add(this.className),t.setAttribute("role",this.role),t.setAttribute("tabindex","0"),document.createElement("span"));e.textContent="×",t.appendChild(e),this.html=t},l.prototype.display=function(){},l.prototype.unpost=function(){o.prototype.unpost.call(this),this.element.unpost()},l.prototype.keydown=function(t){this.bubbleKey(),o.prototype.keydown.call(this,t)},l.prototype.space=function(t){this.unpost(),this.stop(t)},l.prototype.mousedown=function(t){this.unpost(),this.stop(t)},l);function l(t){var e=o.call(this)||this;return e.element=t,e.className=s.HtmlClasses.MENUCLOSE,e.role="button",e}e.CloseButton=r},5073:function(t,e,r){var n,a,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenu=void 0,r(1484)),s=r(2165),l=r(1932),c=r(2358),r=(a=i.AbstractMenu,o(u,a),u.fromJson=function(e,t){var r=t.pool,n=t.items,t=t.id,t=void 0===t?"":t,o=new this(e),i=(o.id=t,e.get("variable")),t=(r.forEach(function(t){return i(e,t,o.pool)}),e.get("items")(e,n,o));return o.items=t,o},u.prototype.generateHtml=function(){this.isPosted()&&this.unpost(),a.prototype.generateHtml.call(this),this._frame=document.createElement("div"),this._frame.classList.add(s.HtmlClasses.MENUFRAME);var t="left: 0px; top: 0px; z-index: 200; width: 100%; height: 100%; border: 0px; padding: 0px; margin: 0px;",e=(this._frame.setAttribute("style","position: absolute; "+t),document.createElement("div"));e.setAttribute("style","position: fixed; "+t),this._frame.appendChild(e),e.addEventListener("mousedown",function(t){this.unpost(),this.unpostWidgets(),this.stop(t)}.bind(this))},u.prototype.display=function(){document.body.appendChild(this.frame),this.frame.appendChild(this.html),this.focus()},u.prototype.escape=function(t){this.unpost(),this.unpostWidgets()},u.prototype.unpost=function(){var t;a.prototype.unpost.call(this),0document.body.offsetWidth-5&&(o=document.body.offsetWidth-t.offsetWidth-5),this.post(o,i)},u.prototype.registerWidget=function(t){this.widgets.push(t)},u.prototype.unregisterWidget=function(t){t=this.widgets.indexOf(t);-1=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.MenuStore=void 0,r(2556)),o=r(2165),i=r(3205),r=(Object.defineProperty(a.prototype,"active",{get:function(){return this._active},set:function(t){do{if(-1!==this.store.indexOf(t)){this._active=t;break}}while(t=t.parentNode)},enumerable:!1,configurable:!0}),a.prototype.next=function(){var t=this.store.length;if(0===t)return this.active=null;var e=-1!==(e=this.store.indexOf(this.active))&&e=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__spread||function(){for(var t=[],e=0;edocument.body.offsetWidth-5&&(o=Math.max(5,o-n-e.offsetWidth+6)),a.prototype.post.call(this,o,i)}},i.prototype.display=function(){this.baseMenu.frame.appendChild(this.html)},i.prototype.setBaseMenu=function(){for(var t=this;(t=t.anchor.menu)instanceof i;);this.baseMenu=t},i.prototype.left=function(t){this.focused=null,this.anchor.focus()},i.prototype.toJson=function(){return{type:""}},i);function i(t){var e=a.call(this)||this;return e._anchor=t,e.variablePool=e.anchor.menu.pool,e.setBaseMenu(),e}e.SubMenu=r},3737:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Variable=void 0;var n=r(2556);function o(t,e,r){this._name=t,this.getter=e,this.setter=r,this.items=[]}o.fromJson=function(t,e,r){e=new this(e.name,e.getter,e.setter);r.insert(e)},Object.defineProperty(o.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),o.prototype.getValue=function(t){try{return this.getter(t)}catch(t){return n.MenuUtil.error(t,"Command of variable "+this.name+" failed."),null}},o.prototype.setValue=function(t,e){try{this.setter(t,e)}catch(t){n.MenuUtil.error(t,"Command of variable "+this.name+" failed.")}this.update()},o.prototype.register=function(t){-1===this.items.indexOf(t)&&this.items.push(t)},o.prototype.unregister=function(t){t=this.items.indexOf(t);-1!==t&&this.items.splice(t,1)},o.prototype.update=function(){this.items.forEach(function(t){return t.update()})},o.prototype.registerCallback=function(e){this.items.forEach(function(t){return t.registerCallback(e)})},o.prototype.unregisterCallback=function(e){this.items.forEach(function(t){return t.unregisterCallback(e)})},o.prototype.toJson=function(){return{type:"variable",name:this.name,getter:this.getter.toString(),setter:this.setter.toString()}},e.Variable=o},2358:function(t,e){function r(){this.pool={}}Object.defineProperty(e,"__esModule",{value:!0}),e.VariablePool=void 0,r.prototype.insert=function(t){this.pool[t.name]=t},r.prototype.lookup=function(t){return this.pool[t]},r.prototype.remove=function(t){delete this.pool[t]},r.prototype.update=function(){for(var t in this.pool)this.pool[t].update()},e.VariablePool=r},3921:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractAudioRenderer=void 0;const n=r(5897);e.AbstractAudioRenderer=class{constructor(){this.separator_=" "}setSeparator(t){this.separator_=t}getSeparator(){return"braille"===n.default.getInstance().modality?"":this.separator_}error(t){return null}merge(r){let n="";var o=r.length-1;for(let t,e=0;t=r[e];e++)if(n+=t.speech,edelete e[t]),r.open.forEach(t=>e[t]=r[t]);var t=Object.keys(e);e.open=t},e.sortClose=function(r,n){if(r.length<=1)return r;const o=[];for(let t,e=0;t=n[e],r.length;e++)t.close&&t.close.length&&t.close.forEach(function(t){var e=r.indexOf(t);-1!==e&&(o.unshift(t),r.splice(e,1))});return o};let y={},g=[];function b(t,e){const r=t[t.length-1];if(r){if(O(e)&&O(r)){if(void 0===r.join)return r.span=r.span.concat(e.span);const t=r.span.pop(),n=e.span.shift();return r.span.push(t+r.join+n),r.span=r.span.concat(e.span),r.join=e.join}S(e)&&S(r)?r.pause=m(r.pause,e.pause):t.push(e)}else t.push(e)}function v(t,e){t.rate&&(e.rate=t.rate),t.pitch&&(e.pitch=t.pitch),t.volume&&(e.volume=t.volume)}function _(t){return"object"==typeof t&&t.open}function S(t){return"object"==typeof t&&1===Object.keys(t).length&&Object.keys(t)[0]===d.personalityProps.PAUSE}function O(t){var e=Object.keys(t);return"object"==typeof t&&(1===e.length&&"span"===e[0]||2===e.length&&("span"===e[0]&&"join"===e[1]||"span"===e[1]&&"join"===e[0]))}function M(t,r){if(!r)return t;const n={};for(const s of d.personalityPropList){const d=t[s],a=r[s];var e;!d&&!a||d&&a&&d===a||(e=d||0,_(n)||(n.open=[],n.close=[]),d||n.close.push(s),a||n.open.push(s),a&&d&&(n.close.push(s),n.open.push(s)),r[s]=e,n[s]=e,y[s]?y[s].push(e):y[s]=[e])}if(_(n)){let t=n.close.slice();for(;0"string"==typeof t?new c.Span(t,{}):t),r=m.get(n.default.getInstance().markup);return r?r.merge(e):t.join()},e.finalize=function(t){const e=m.get(n.default.getInstance().markup);return e?e.finalize(t):t},e.error=function(t){const e=m.get(n.default.getInstance().markup);return e?e.error(t):""},e.registerRenderer=function(t,e){m.set(t,e)},e.isXml=function(){return m.get(n.default.getInstance().markup)instanceof d.XmlRenderer}},8639:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.LayoutRenderer=void 0;const n=r(2057),a=r(5740),o=r(4440),i=r(3706),s=r(2456);class l extends s.XmlRenderer{finalize(t){{c="";const e=a.parseInput(`${t}`);return n.Debugger.getInstance().output(a.formatXml(e.toString())),c=d(e)}}pause(t){return""}prosodyElement(t,e){return t===o.personalityProps.LAYOUT?`<${e}>`:""}closeTag(t){return``}markup(t){const e=[];let r=[];for(const n of t)if(n.layout){e.push(this.processContent(r)),r=[];const t=n.layout;t.match(/^begin/)?e.push("<"+t.replace(/^begin/,"")+">"):t.match(/^end/)?e.push(""):console.warn("Something went wrong with layout markup: "+t)}else r.push(n);return e.push(this.processContent(r)),e.join("")}processContent(t){const r=[],n=i.personalityMarkup(t);for(let t,e=0;t=n[e];e++)t.span?r.push(this.merge(t.span)):i.isPauseElement(t);return r.join("")}}e.LayoutRenderer=l;let c="";const u={TABLE:function(t){let e=g(t);e.forEach(t=>{t.cells=t.cells.slice(1).slice(0,-1),t.width=t.width.slice(1).slice(0,-1)});var[t,r]=b(e);return _(e=v(e,r),t)},CASES:function(t){let e=g(t);e.forEach(t=>{t.cells=t.cells.slice(0,-1),t.width=t.width.slice(0,-1)});var[t,r]=b(e);return _(e=v(e,r),t)},CAYLEY:function(t){let e=g(t);e.forEach(t=>{t.cells=t.cells.slice(1).slice(0,-1),t.width=t.width.slice(1).slice(0,-1),t.sep=t.sep+t.sep});const[r,n]=b(e),o={lfence:"",rfence:"",cells:n.map(t=>"⠐"+new Array(t).join("⠒")),width:n,height:1,sep:e[0].sep};return e.splice(1,0,o),_(e=v(e,n),r)},MATRIX:function(t){var t=g(t),[e,r]=b(t);return _(v(t,r),e)},CELL:d,FENCE:d,ROW:d,FRACTION:function(t){var[t,e,,r,n]=Array.from(t.childNodes),e=p(e),r=p(r),o=m(e),i=m(r),o=Math.max(o,i),i=t+new Array(o+1).join("⠒")+n;return M(e,o=i.length)+` +${i} +`+M(r,o)},NUMERATOR:x,DENOMINATOR:x};function p(t){const e=a.tagName(t),r=u[e];return r?r(t):t.textContent}function h(t,e){if(!t||!e)return t+e;var r=f(t),n=f(e),o=r-n;t=o<0?y(t,n,m(t)):t,e=0Math.max(e.length,t),0)}function y(t,e,r){i=e-f(e=t),t=e+(0Math.max(f(e),t),0),width:i.map(m)}}(t));return r}function b(t){const e=t.reduce((t,e)=>Math.max(e.height,t),0),r=[];for(let e=0;et.width[e]).reduce((t,e)=>Math.max(t,e),0));return[e,r]}function v(e,r){const t=[];for(const n of e)if(0!==n.height){const e=[];for(let t=0;tt.lfence+t.cells.join(t.sep)+t.rfence).join("\n");const n=[];for(const r of e){const e=S(r.sep,r.height);let t=r.cells.shift();for(;r.cells.length;)t=h(t,e),t=h(t,r.cells.shift());t=h(S(r.lfence,r.height),t),t=h(t,S(r.rfence,r.height)),n.push(t),n.push(r.lfence+new Array(m(t)-3).join(r.sep)+r.rfence)}return n.slice(0,-1).join("\n")}function S(t,e){let r="";for(;e;)r+=t+"\n",e--;return r.slice(0,-1)}function O(t){return t.nodeType===a.NodeType.ELEMENT_NODE&&"FENCE"===a.tagName(t)?p(t):""}function M(t,e){const r=(e-m(t))/2,[n,o]=Math.floor(r)===r?[r,r]:[Math.floor(r),Math.ceil(r)],i=t.split(/\r\n|\r|\n/),a=[],[s,l]=[new Array(n+1).join("⠀"),new Array(o+1).join("⠀")];for(const t of i)a.push(s+t+l);return a.join("\n")}function x(t){var e=t.firstChild,t=d(t);if(e&&e.nodeType===a.NodeType.ELEMENT_NODE){if("ENGLISH"===a.tagName(e))return"⠰"+t;if("NUMBER"===a.tagName(e))return"⠼"+t}return t}},182:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MarkupRenderer=void 0;const n=r(4440),o=r(3921);class i extends o.AbstractAudioRenderer{constructor(){super(...arguments),this.ignoreElements=[n.personalityProps.LAYOUT],this.scaleFunction=null}setScaleFunction(e,r,n,o,i=0){this.scaleFunction=t=>{t=(t-e)/(r-e);return+(Math.round(n*(1-t)+o*t+"e+"+i)+"e-"+i)}}applyScaleFunction(t){return this.scaleFunction?this.scaleFunction(t):t}ignoreElement(t){return-1!==this.ignoreElements.indexOf(t)}}e.MarkupRenderer=i},8990:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.PunctuationRenderer=void 0;const a=r(4440),n=r(3921),s=r(3706);class o extends n.AbstractAudioRenderer{markup(t){var r=s.personalityMarkup(t);let n="",o=null,i=!1;for(let t,e=0;t=r[e];e++)s.isMarkupElement(t)||(s.isPauseElement(t)?i&&(o=s.mergePause(o,t,Math.max)):(o&&(n+=this.pause(o[a.personalityProps.PAUSE]),o=null),n+=(i?this.getSeparator():"")+this.merge(t.span),i=!0));return n}pause(t){t="number"==typeof t?t<=250?"short":t<=500?"medium":"long":t;return o.PAUSE_PUNCTUATION.get(t)||""}}(e.PunctuationRenderer=o).PAUSE_PUNCTUATION=new Map([["short",","],["medium",";"],["long","."]])},6660:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SableRenderer=void 0;const n=r(4440),o=r(2456);class i extends o.XmlRenderer{finalize(t){return''+this.getSeparator()+t+this.getSeparator()+""}pause(t){return''}prosodyElement(t,e){switch(e=this.applyScaleFunction(e),t){case n.personalityProps.PITCH:return'';case n.personalityProps.RATE:return'';case n.personalityProps.VOLUME:return'';default:return"<"+t.toUpperCase()+' VALUE="'+e+'">'}}closeTag(t){return""}}e.SableRenderer=i},9536:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0,e.Span=class{constructor(t,e){this.speech=t,this.attributes=e}}},7504:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SsmlRenderer=void 0;const n=r(5897),o=r(4440),i=r(2456);class a extends i.XmlRenderer{finalize(t){return''+this.getSeparator()+t+this.getSeparator()+""}pause(t){return''}prosodyElement(t,e){e=(e=Math.floor(this.applyScaleFunction(e)))<0?e.toString():"+"+e.toString();return"":'%">')}closeTag(t){return""}}e.SsmlRenderer=a},3757:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SsmlStepRenderer=void 0;class i extends r(7504).SsmlRenderer{markup(t){return i.MARKS={},super.markup(t)}merge(e){const r=[];for(let t=0;t'),i.MARKS[o]=!0),1===n.speech.length&&n.speech.match(/[a-zA-Z]/)?r.push(''+n.speech+""):r.push(n.speech)}return r.join(this.getSeparator())}}(e.SsmlStepRenderer=i).CHARACTER_ATTR="character",i.MARKS={}},4032:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.StringRenderer=void 0;const n=r(3921),i=r(3706);class o extends n.AbstractAudioRenderer{markup(t){let r="";const n=(0,i.personalityMarkup)(t).filter(t=>t.span);if(!n.length)return r;var o=n.length-1;for(let t,e=0;t=n[e];e++)if(t.span&&(r+=this.merge(t.span)),!(e>=o)){const n=t.join;r+=void 0===n?this.getSeparator():n}return r}}e.StringRenderer=o},2456:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.XmlRenderer=void 0;const i=r(5897),a=r(3706),n=r(182);class o extends n.MarkupRenderer{markup(t){this.setScaleFunction(-2,2,-100,100,2);const r=a.personalityMarkup(t),n=[],o=[];for(let e,t=0;e=r[t];t++)if(e.span)n.push(this.merge(e.span));else if(a.isPauseElement(e))n.push(this.pause(e));else{if(e.close.length)for(let t=0;t{n.push(this.prosodyElement(t,e[t])),o.push(t)})}return n.join(" ")}}e.XmlRenderer=o},707:function(t,e){function r(t,e){return t?e?t.filter(t=>e.indexOf(t)<0):t:[]}Object.defineProperty(e,"__esModule",{value:!0}),e.union=e.setdifference=e.interleaveLists=e.removeEmpty=void 0,e.removeEmpty=function(t){return t.filter(t=>t)},e.interleaveLists=function(t,e){const r=[];for(;t.length||e.length;)t.length&&r.push(t.shift()),e.length&&r.push(e.shift());return r},e.setdifference=r,e.union=function(t,e){return t&&e?t.concat(r(e,t)):t||e||[]}},2139:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.loadScript=e.loadMapsForIE_=e.installWGXpath_=e.loadWGXpath_=e.mapsForIE=e.detectEdge=e.detectIE=void 0;const n=r(2315),o=r(5274);function i(t){l(n.default.WGXpath),a(t)}function a(t,e){let r=e||1;"undefined"==typeof wgxpath&&r<10?setTimeout(function(){a(t,r++)},200):10<=r||(n.default.wgxpath=wgxpath,t?n.default.wgxpath.install({document:document}):n.default.wgxpath.install(),o.xpath.evaluate=document.evaluate,o.xpath.result=XPathResult,o.xpath.createNSResolver=document.createNSResolver)}function s(){l(n.default.mathmapsIePath)}function l(t){const e=n.default.document.createElement("script");e.type="text/javascript",e.src=t,(n.default.document.head||n.default.document.body).appendChild(e)}e.detectIE=function(){return"undefined"!=typeof window&&"ActiveXObject"in window&&"clipboardData"in window&&(s(),i(),!0)},e.detectEdge=function(){var t;return"undefined"!=typeof window&&"MSGestureEvent"in window&&null===(null==(t=window.chrome)?void 0:t.loadTimes)&&(i(!(document.evaluate=null)),!0)},e.mapsForIE=null,e.loadWGXpath_=i,e.installWGXpath_=a,e.loadMapsForIE_=s,e.loadScript=l},2057:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Debugger=void 0;const n=r(2315);class o{constructor(){this.isActive_=!1,this.outputFunction_=console.info,this.stream_=null}static getInstance(){return o.instance=o.instance||new o,o.instance}init(t){t&&this.startDebugFile_(t),this.isActive_=!0}output(...t){this.isActive_&&this.output_(t)}generateOutput(t){this.isActive_&&this.output_(t.apply(t,[]))}exit(t=()=>{}){this.isActive_&&this.stream_&&this.stream_.end("","",t)}startDebugFile_(t){this.stream_=n.default.fs.createWriteStream(t),this.outputFunction_=function(...t){this.stream_.write(t.join(" ")),this.stream_.write("\n")}.bind(this),this.stream_.on("error",function(t){console.info("Invalid log file. Debug information sent to console."),this.outputFunction_=console.info}.bind(this)),this.stream_.on("finish",function(){console.info("Finalizing debug file.")})}output_(t){this.outputFunction_.apply(console.info===this.outputFunction_?console:this.outputFunction_,["Speech Rule Engine Debugger:"].concat(t))}}e.Debugger=o},5740:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeXml=e.cloneNode=e.tagName=e.querySelectorAll=e.querySelectorAllByAttrValue=e.querySelectorAllByAttr=e.formatXml=e.createTextNode=e.createElementNS=e.createElement=e.replaceNode=e.NodeType=e.parseInput=e.XML_ENTITIES=e.trimInput_=e.toArray=void 0;const o=r(5897),i=r(4440),a=r(2315),s=r(5274);function n(r){const n=[];for(let t=0,e=r.length;t[ \f\n\r\t\v\u200b]+<").trim()}e.toArray=n,e.trimInput_=l,e.XML_ENTITIES={"<":!0,">":!0,"&":!0,""":!0,"'":!0},e.parseInput=function(t){const e=new a.default.xmldom.DOMParser,r=l(t),n=!!r.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!r)throw new Error("Empty input!");try{const t=e.parseFromString(r,n?"text/html":"text/xml");return o.default.getInstance().mode===i.Mode.HTTP?(s.xpath.currentDocument=t,n?t.body.childNodes[0]:t.documentElement):t.documentElement}catch(t){throw new o.SREError("Illegal input: "+t.message)}},(r=e.NodeType||(e.NodeType={}))[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",r[r.ENTITY_NODE=6]="ENTITY_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",r[r.NOTATION_NODE=12]="NOTATION_NODE",e.replaceNode=function(t,e){t.parentNode&&(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t))},e.createElement=function(t){return a.default.document.createElement(t)},e.createElementNS=function(t,e){return a.default.document.createElementNS(t,e)},e.createTextNode=function(t){return a.default.document.createTextNode(t)},e.formatXml=function(t){let r="",e=/(>)(<)(\/*)/g,n=0,o=(t=t.replace(e,"$1\r\n$2$3")).split("\r\n");for(e=/(\.)*(<)(\/*)/g,o=o.map(t=>t.replace(e,"$1\r\n$2$3").split("\r\n")).reduce((t,e)=>t.concat(e),[]);o.length;){let e=o.shift();if(e){let t=0;if(e.match(/^<\w[^>/]*>[^>]+$/)){i=e;const r=(a=o[0])?(i=i.match(/^<([^> ]+).*>/),a=a.match(/^<\/([^>]+)>(.*)/),i&&a&&i[1]===a[1]?[!0,a[2]]:[!1,""]):[!1,""];r[0]?r[1]?(e+=o.shift().slice(0,-r[1].length),r[1].trim()&&o.unshift(r[1])):e+=o.shift():t=1}else if(e.match(/^<\/\w/))0!==n&&--n;else if(e.match(/^<\w[^>]*[^/]>.*$/))t=1;else if(e.match(/^<\w[^>]*\/>.+$/)){const r=e.indexOf(">")+1;e.slice(r).trim()&&o.unshift(),e=e.slice(0,r)}else t=0;r+=new Array(n+1).join(" ")+e+"\r\n",n+=t}}var i,a;return r},e.querySelectorAllByAttr=function(t,e){return t.querySelectorAll?n(t.querySelectorAll(`[${e}]`)):s.evalXPath(`.//*[@${e}]`,t)},e.querySelectorAllByAttrValue=function(t,e,r){return t.querySelectorAll?n(t.querySelectorAll(`[${e}="${r}"]`)):s.evalXPath(`.//*[@${e}="${r}"]`,t)},e.querySelectorAll=function(t,e){return t.querySelectorAll?n(t.querySelectorAll(e)):s.evalXPath(".//"+e,t)},e.tagName=function(t){return t.tagName.toUpperCase()},e.cloneNode=function(t){return t.cloneNode(!0)},e.serializeXml=function(t){return(new a.default.xmldom.XMLSerializer).serializeToString(t)}},5897:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.EnginePromise=e.SREError=void 0;const i=r(1676),s=r(4440),l=r(2057),n=r(1377);class o extends Error{constructor(t=""){super(),this.message=t,this.name="SRE Error"}}e.SREError=o;class a{constructor(){this.customLoader=null,this.parsers={},this.comparator=null,this.mode=s.Mode.SYNC,this.init=!0,this.delay=!1,this.comparators={},this.domain="mathspeak",this.style=i.DynamicCstr.DEFAULT_VALUES[i.Axis.STYLE],this._defaultLocale=i.DynamicCstr.DEFAULT_VALUES[i.Axis.LOCALE],this.locale=this.defaultLocale,this.subiso="",this.modality=i.DynamicCstr.DEFAULT_VALUES[i.Axis.MODALITY],this.speech=s.Speech.NONE,this.markup=s.Markup.NONE,this.walker="Table",this.structure=!1,this.ruleSets=[],this.strict=!1,this.isIE=!1,this.isEdge=!1,this.rate="100",this.pprint=!1,this.config=!1,this.rules="",this.prune="",this.evaluator=a.defaultEvaluator,this.defaultParser=new i.DynamicCstrParser(i.DynamicCstr.DEFAULT_ORDER),this.parser=this.defaultParser,this.dynamicCstr=i.DynamicCstr.defaultCstr()}set defaultLocale(t){this._defaultLocale=n.Variables.ensureLocale(t,this._defaultLocale)}get defaultLocale(){return this._defaultLocale}static getInstance(){return a.instance=a.instance||new a,a.instance}static defaultEvaluator(t,e){return t}static evaluateNode(t){return a.nodeEvaluator(t)}getRate(){var t=parseInt(this.rate,10);return isNaN(t)?100:t}setDynamicCstr(e){if(this.defaultLocale&&(i.DynamicCstr.DEFAULT_VALUES[i.Axis.LOCALE]=this.defaultLocale),e){const r=Object.keys(e);for(let t=0;t{void 0!==r[t]&&(e[t]=r[t])};return t("mode"),e.configurate(r),s.default.BINARY_FEATURES.forEach(t=>{void 0!==r[t]&&(e[t]=!!r[t])}),s.default.STRING_FEATURES.forEach(t),r.json&&(c.default.jsonPath=l.makePath(r.json)),r.xpath&&(c.default.WGXpath=r.xpath),e.setCustomLoader(r.custom),(t=e).isIE=a.detectIE(),t.isEdge=a.detectEdge(),o.setLocale(),e.setDynamicCstr(),e.init?(s.EnginePromise.promises.init=new Promise((t,e)=>{setTimeout(()=>{t("init")},10)}),e.init=!1,s.EnginePromise.get()):e.delay?(e.delay=!1,s.EnginePromise.get()):i.loadLocale()})}},8496:function(t,e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Event=e.EventType=e.Move=e.KeyCode=void 0,(r=e.KeyCode||(e.KeyCode={}))[r.ENTER=13]="ENTER",r[r.ESC=27]="ESC",r[r.SPACE=32]="SPACE",r[r.PAGE_UP=33]="PAGE_UP",r[r.PAGE_DOWN=34]="PAGE_DOWN",r[r.END=35]="END",r[r.HOME=36]="HOME",r[r.LEFT=37]="LEFT",r[r.UP=38]="UP",r[r.RIGHT=39]="RIGHT",r[r.DOWN=40]="DOWN",r[r.TAB=9]="TAB",r[r.LESS=188]="LESS",r[r.GREATER=190]="GREATER",r[r.DASH=189]="DASH",r[r.ZERO=48]="ZERO",r[r.ONE=49]="ONE",r[r.TWO=50]="TWO",r[r.THREE=51]="THREE",r[r.FOUR=52]="FOUR",r[r.FIVE=53]="FIVE",r[r.SIX=54]="SIX",r[r.SEVEN=55]="SEVEN",r[r.EIGHT=56]="EIGHT",r[r.NINE=57]="NINE",r[r.A=65]="A",r[r.B=66]="B",r[r.C=67]="C",r[r.D=68]="D",r[r.E=69]="E",r[r.F=70]="F",r[r.G=71]="G",r[r.H=72]="H",r[r.I=73]="I",r[r.J=74]="J",r[r.K=75]="K",r[r.L=76]="L",r[r.M=77]="M",r[r.N=78]="N",r[r.O=79]="O",r[r.P=80]="P",r[r.Q=81]="Q",r[r.R=82]="R",r[r.S=83]="S",r[r.T=84]="T",r[r.U=85]="U",r[r.V=86]="V",r[r.W=87]="W",r[r.X=88]="X",r[r.Y=89]="Y",r[r.Z=90]="Z",e.Move=new Map([[13,"ENTER"],[27,"ESC"],[32,"SPACE"],[33,"PAGE_UP"],[34,"PAGE_DOWN"],[35,"END"],[36,"HOME"],[37,"LEFT"],[38,"UP"],[39,"RIGHT"],[40,"DOWN"],[9,"TAB"],[188,"LESS"],[190,"GREATER"],[189,"DASH"],[48,"ZERO"],[49,"ONE"],[50,"TWO"],[51,"THREE"],[52,"FOUR"],[53,"FIVE"],[54,"SIX"],[55,"SEVEN"],[56,"EIGHT"],[57,"NINE"],[65,"A"],[66,"B"],[67,"C"],[68,"D"],[69,"E"],[70,"F"],[71,"G"],[72,"H"],[73,"I"],[74,"J"],[75,"K"],[76,"L"],[77,"M"],[78,"N"],[79,"O"],[80,"P"],[81,"Q"],[82,"R"],[83,"S"],[84,"T"],[85,"U"],[86,"V"],[87,"W"],[88,"X"],[89,"Y"],[90,"Z"]]),(r=e.EventType||(e.EventType={})).CLICK="click",r.DBLCLICK="dblclick",r.MOUSEDOWN="mousedown",r.MOUSEUP="mouseup",r.MOUSEOVER="mouseover",r.MOUSEOUT="mouseout",r.MOUSEMOVE="mousemove",r.SELECTSTART="selectstart",r.KEYPRESS="keypress",r.KEYDOWN="keydown",r.KEYUP="keyup",r.TOUCHSTART="touchstart",r.TOUCHMOVE="touchmove",r.TOUCHEND="touchend",r.TOUCHCANCEL="touchcancel",e.Event=class{constructor(t,e,r){this.src=t,this.type=e,this.callback=r}add(){this.src.addEventListener(this.type,this.callback)}remove(){this.src.removeEventListener(this.type,this.callback)}}},7248:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.localePath=e.makePath=void 0;const n=r(2315);function o(t){return t.match("/$")?t:t+"/"}e.makePath=o,e.localePath=function(t,e="json"){return o(n.default.jsonPath)+t+(e.match(/^\./)?e:"."+e)}},3769:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyProcessor=e.Processor=void 0;const n=r(8496);class o{constructor(t,e){this.name=t,this.process=e.processor,this.postprocess=e.postprocessor||((t,e)=>t),this.processor=this.postprocess?function(t){return this.postprocess(this.process(t),t)}:this.process,this.print=e.print||o.stringify_,this.pprint=e.pprint||this.print}static stringify_(t){return t&&t.toString()}}(e.Processor=o).LocalState={walker:null,speechGenerator:null,highlighter:null};o;e.KeyProcessor=class i extends o{constructor(t,e){super(t,e),this.key=e.key||i.getKey_}static getKey_(t){return"string"==typeof t?n.KeyCode[t.toUpperCase()]:t}}},6499:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.keypress=e.output=e.print=e.process=e.set=void 0;const s=r(8290),n=r(5714),o=r(3090),i=r(4356),l=r(1414),a=r(9552),c=r(9543),u=r(3362),p=r(1204),h=r(5740),d=r(5897),f=r(4440),m=r(3769),y=r(5274),g=new Map;function b(t){g.set(t.name,t)}function v(t){var e=g.get(t);if(e)return e;throw new d.SREError("Unknown processor "+t)}function _(t,e){const r=v(t);try{return r.processor(e)}catch(t){throw new d.SREError("Processing error for expression "+e)}}function S(t,e){const r=v(t);return d.default.getInstance().pprint?r.pprint(e):r.print(e)}e.set=b,e.process=_,e.print=S,e.output=function(t,e){const r=v(t);try{const t=r.processor(e);return d.default.getInstance().pprint?r.pprint(t):r.print(t)}catch(t){throw new d.SREError("Processing error for expression "+e)}},e.keypress=function(t,e){const r=v(t),n=r instanceof m.KeyProcessor?r.key(e):e,o=r.processor(n);return d.default.getInstance().pprint?r.pprint(o):r.print(o)},b(new m.Processor("semantic",{processor:function(t){t=h.parseInput(t);return l.xmlTree(t)},postprocessor:function(t,e){var r=d.default.getInstance().speech;if(r===f.Speech.NONE)return t;var n=h.cloneNode(t);let o=c.computeMarkup(n);if(r===f.Speech.SHALLOW)return t.setAttribute("speech",s.finalize(o)),t;var i=y.evalXPath(".//*[@id]",t),a=y.evalXPath(".//*[@id]",n);for(let t,e,r=0;t=i[r],e=a[r];r++)o=c.computeMarkup(e),t.setAttribute("speech",s.finalize(o));return t},pprint:function(t){return h.formatXml(t.toString())}})),b(new m.Processor("speech",{processor:function(t){t=h.parseInput(t),t=l.xmlTree(t),t=c.computeSpeech(t);return s.finalize(s.markup(t))},pprint:function(t){t=t.toString();return s.isXml()?h.formatXml(t):t}})),b(new m.Processor("json",{processor:function(t){t=h.parseInput(t);return l.getTree(t).toJson()},postprocessor:function(t,e){var r=d.default.getInstance().speech;if(r===f.Speech.NONE)return t;const n=h.parseInput(e),o=l.xmlTree(n),i=c.computeMarkup(o);if(r===f.Speech.SHALLOW)return t.stree.speech=s.finalize(i),t;const a=t=>{var e=y.evalXPath(`.//*[@id=${t.id}]`,o)[0],e=c.computeMarkup(e);t.speech=s.finalize(e),t.children&&t.children.forEach(a)};return a(t.stree),t},print:function(t){return JSON.stringify(t)},pprint:function(t){return JSON.stringify(t,null,2)}})),b(new m.Processor("description",{processor:function(t){t=h.parseInput(t),t=l.xmlTree(t);return c.computeSpeech(t)},print:function(t){return JSON.stringify(t)},pprint:function(t){return JSON.stringify(t,null,2)}})),b(new m.Processor("enriched",{processor:function(t){return n.semanticMathmlSync(t)},postprocessor:function(t,e){var r=p.getSemanticRoot(t);let n;switch(d.default.getInstance().speech){case f.Speech.NONE:break;case f.Speech.SHALLOW:(n=a.generator("Adhoc")).getSpeech(r,t);break;case f.Speech.DEEP:(n=a.generator("Tree")).getSpeech(t,t)}return t},pprint:function(t){return h.formatXml(t.toString())}})),b(new m.Processor("walker",{processor:function(t){const e=a.generator("Node");(m.Processor.LocalState.speechGenerator=e).setOptions({modality:d.default.getInstance().modality,locale:d.default.getInstance().locale,domain:d.default.getInstance().domain,style:d.default.getInstance().style}),m.Processor.LocalState.highlighter=o.highlighter({color:"black"},{color:"white"},{renderer:"NativeMML"});var t=_("enriched",t),r=S("enriched",t);return m.Processor.LocalState.walker=u.walker(d.default.getInstance().walker,t,e,m.Processor.LocalState.highlighter,r),m.Processor.LocalState.walker},print:function(t){return m.Processor.LocalState.walker.speech()}})),b(new m.KeyProcessor("move",{processor:function(t){return m.Processor.LocalState.walker?!1===m.Processor.LocalState.walker.move(t)?s.error(t):m.Processor.LocalState.walker.speech():null}})),b(new m.Processor("number",{processor:function(t){t=parseInt(t,10);return isNaN(t)?"":i.LOCALE.NUMBERS.numberToWords(t)}})),b(new m.Processor("ordinal",{processor:function(t){t=parseInt(t,10);return isNaN(t)?"":i.LOCALE.NUMBERS.wordOrdinal(t)}})),b(new m.Processor("numericOrdinal",{processor:function(t){t=parseInt(t,10);return isNaN(t)?"":i.LOCALE.NUMBERS.numericOrdinal(t)}})),b(new m.Processor("vulgar",{processor:function(t){var[t,e]=t.split("/").map(t=>parseInt(t,10));return isNaN(t)||isNaN(e)?"":_("speech",`${t}${e}`)}}))},2998:function(t,e,r){var a=this&&this.__awaiter||function(t,a,s,l){return new(s=s||Promise)(function(r,e){function n(t){try{i(l.next(t))}catch(t){e(t)}}function o(t){try{i(l.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?r(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(n,o)}i((l=l.apply(t,a||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.localePath=e.exit=e.move=e.walk=e.processFile=e.file=e.vulgar=e.numericOrdinal=e.ordinal=e.number=e.toEnriched=e.toDescription=e.toJson=e.toSemantic=e.toSpeech=e.localeLoader=e.engineReady=e.engineSetup=e.setupEngine=e.version=void 0;const s=r(5897),n=r(6828),l=r(4440),o=r(7248),c=r(6499),u=r(2315),i=r(1377),p=r(6141);function h(t){return a(this,void 0,void 0,function*(){return(0,n.setup)(t)})}function d(t,e){return c.process(t,e)}function f(t,e,r){switch(s.default.getInstance().mode){case l.Mode.ASYNC:return function(e,r,n){return a(this,void 0,void 0,function*(){var t=yield u.default.fs.promises.readFile(r,{encoding:"utf8"}),t=c.output(e,t);if(n)try{u.default.fs.promises.writeFile(n,t)}catch(t){throw new s.SREError("Can not write to file: "+n)}return t})}(t,e,r);case l.Mode.SYNC:var n=t,o=r,i=function(t){let e;try{e=u.default.fs.readFileSync(t,{encoding:"utf8"})}catch(e){throw new s.SREError("Can not open file: "+t)}return e}(e),i=c.output(n,i);if(o)try{u.default.fs.writeFileSync(o,i)}catch(n){throw new s.SREError("Can not write to file: "+o)}return i;default:throw new s.SREError(`Can process files in ${s.default.getInstance().mode} mode`)}}e.version=i.Variables.VERSION,e.setupEngine=h,e.engineSetup=function(){const t=["mode"].concat(s.default.STRING_FEATURES,s.default.BINARY_FEATURES),e=s.default.getInstance(),r={};return t.forEach(function(t){r[t]=e[t]}),r.json=u.default.jsonPath,r.xpath=u.default.WGXpath,r.rules=e.ruleSets.slice(),r},e.engineReady=function(){return a(this,void 0,void 0,function*(){return h({}).then(()=>s.EnginePromise.getall())})},e.localeLoader=p.standardLoader,e.toSpeech=function(t){return d("speech",t)},e.toSemantic=function(t){return d("semantic",t)},e.toJson=function(t){return d("json",t)},e.toDescription=function(t){return d("description",t)},e.toEnriched=function(t){return d("enriched",t)},e.number=function(t){return d("number",t)},e.ordinal=function(t){return d("ordinal",t)},e.numericOrdinal=function(t){return d("numericOrdinal",t)},e.vulgar=function(t){return d("vulgar",t)},e.file={},e.file.toSpeech=function(t,e){return f("speech",t,e)},e.file.toSemantic=function(t,e){return f("semantic",t,e)},e.file.toJson=function(t,e){return f("json",t,e)},e.file.toDescription=function(t,e){return f("description",t,e)},e.file.toEnriched=function(t,e){return f("enriched",t,e)},e.processFile=f,e.walk=function(t){return c.output("walker",t)},e.move=function(t){return c.keypress("move",t)},e.exit=function(t){const e=t||0;s.EnginePromise.getall().then(()=>process.exit(e))},e.localePath=o.localePath,u.default.documentSupported?h({mode:l.Mode.HTTP}).then(()=>h({})):h({mode:l.Mode.SYNC}).then(()=>h({mode:l.Mode.ASYNC}))},2315:function(__unused_webpack_module,exports,__webpack_require__){var __dirname="/";Object.defineProperty(exports,"__esModule",{value:!0});const variables_1=__webpack_require__(1377);class SystemExternal{static extRequire(library){if("undefined"==typeof process)return null;{const nodeRequire=eval("require");return nodeRequire(library)}}}exports.default=SystemExternal,SystemExternal.windowSupported=!("undefined"==typeof window),SystemExternal.documentSupported=SystemExternal.windowSupported&&!(void 0===window.document),SystemExternal.xmldom=SystemExternal.documentSupported?window:SystemExternal.extRequire("xmldom-sre"),SystemExternal.document=SystemExternal.documentSupported?window.document:(new SystemExternal.xmldom.DOMImplementation).createDocument("","",0),SystemExternal.xpath=SystemExternal.documentSupported?document:function(){const t={document:{},XPathResult:{}};return SystemExternal.extRequire("wicked-good-xpath").install(t),t.document.XPathResult=t.XPathResult,t.document}(),SystemExternal.mathmapsIePath="https://cdn.jsdelivr.net/npm/sre-mathmaps-ie@"+variables_1.Variables.VERSION+"mathmaps_ie.js",SystemExternal.commander=SystemExternal.documentSupported?null:SystemExternal.extRequire("commander"),SystemExternal.fs=SystemExternal.documentSupported?null:SystemExternal.extRequire("fs"),SystemExternal.url=variables_1.Variables.url,SystemExternal.jsonPath=(SystemExternal.documentSupported?SystemExternal.url:process.env.SRE_JSON_PATH||__webpack_require__.g.SRE_JSON_PATH||__dirname+"/mathmaps")+"/",SystemExternal.WGXpath=variables_1.Variables.WGXpath,SystemExternal.wgxpath=null},1377:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Variables=void 0;class r{static ensureLocale(t,e){return r.LOCALES.get(t)?t:(console.error(`Locale ${t} does not exist! Using ${r.LOCALES.get(e)} instead.`),e)}}(e.Variables=r).VERSION="4.0.6",r.LOCALES=new Map([["ca","Catalan"],["da","Danish"],["de","German"],["en","English"],["es","Spanish"],["fr","French"],["hi","Hindi"],["it","Italian"],["nb","Bokmål"],["nn","Nynorsk"],["sv","Swedish"],["nemeth","Nemeth"]]),r.mathjaxVersion="3.2.1",r.url="https://cdn.jsdelivr.net/npm/speech-rule-engine@"+r.VERSION+"/lib/mathmaps",r.WGXpath="https://cdn.jsdelivr.net/npm/wicked-good-xpath@1.3.0/dist/wgxpath.install.js"},5274:function(t,o,e){Object.defineProperty(o,"__esModule",{value:!0}),o.updateEvaluator=o.evaluateString=o.evaluateBoolean=o.getLeafNodes=o.evalXPath=o.resolveNameSpace=o.xpath=void 0;const n=e(5897),i=e(4440),r=e(2315);function a(){return"undefined"!=typeof XPathResult}o.xpath={currentDocument:null,evaluate:(a()?document:r.default.xpath).evaluate,result:a()?XPathResult:r.default.xpath.XPathResult,createNSResolver:(a()?document:r.default.xpath).createNSResolver};const s={xhtml:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",mml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function l(t){return s[t]||null}o.resolveNameSpace=l;class c{constructor(){this.lookupNamespaceURI=l}}function u(t,e,r){return n.default.getInstance().mode!==i.Mode.HTTP||n.default.getInstance().isIE||n.default.getInstance().isEdge?o.xpath.evaluate(t,e,new c,r,null):o.xpath.currentDocument.evaluate(t,e,l,r,null)}function p(t,e){let r;try{r=u(t,e,o.xpath.result.ORDERED_NODE_ITERATOR_TYPE)}catch(t){return[]}const n=[];for(let t=r.iterateNext();t;t=r.iterateNext())n.push(t);return n}o.evalXPath=p,o.getLeafNodes=function(t){return p(".//*[count(*)=0]",t)},o.evaluateBoolean=function(t,e){let r;try{r=u(t,e,o.xpath.result.BOOLEAN_TYPE)}catch(t){return!1}return r.booleanValue},o.evaluateString=function(t,e){let r;try{r=u(t,e,o.xpath.result.STRING_TYPE)}catch(t){return""}return r.stringValue},o.updateEvaluator=function(e){if(n.default.getInstance().mode===i.Mode.HTTP){let t=e;for(;t&&!t.evaluate;)t=t.parentNode;t&&t.evaluate?o.xpath.currentDocument=t:e.ownerDocument&&(o.xpath.currentDocument=e.ownerDocument)}}},9268:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEnrichCase=void 0,e.AbstractEnrichCase=class{constructor(t){this.semantic=t}}},6061:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseBinomial=void 0;const n=r(5740),o=r(9268),i=r(5452),a=r(2298);class s extends o.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return!t.mathmlTree&&"line"===t.type&&"binomial"===t.role}getMathml(){if(!this.semantic.childNodes.length)return this.mml;const t=this.semantic.childNodes[0];if(this.mml=(0,i.walkTree)(t),this.mml.hasAttribute(a.Attribute.TYPE)){const t=n.createElement("mrow");t.setAttribute(a.Attribute.ADDED,"true"),n.replaceNode(this.mml,t),t.appendChild(this.mml),this.mml=t}return(0,a.setAttributes)(this.mml,this.semantic),this.mml}}e.CaseBinomial=s},5765:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseDoubleScript=void 0;const n=r(5740),o=r(9268),s=r(5452),l=r(2298);class i extends o.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;var e=n.tagName(t.mathmlTree),t=t.childNodes[0].role;return"MSUBSUP"===e&&"subsup"===t||"MUNDEROVER"===e&&"underover"===t}getMathml(){const t=this.semantic.childNodes[0],e=t.childNodes[0],r=this.semantic.childNodes[1],n=t.childNodes[1],o=s.walkTree(r),i=s.walkTree(e),a=s.walkTree(n);return(0,l.setAttributes)(this.mml,this.semantic),this.mml.setAttribute(l.Attribute.CHILDREN,(0,l.makeIdList)([e,n,r])),[i,a,o].forEach(t=>s.getInnerNode(t).setAttribute(l.Attribute.PARENT,this.mml.getAttribute(l.Attribute.ID))),this.mml.setAttribute(l.Attribute.TYPE,t.role),s.addCollapsedAttribute(this.mml,[this.semantic.id,[t.id,e.id,n.id],r.id]),this.mml}}e.CaseDoubleScript=i},7251:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseEmbellished=void 0;const a=r(5740),n=r(5952),o=r(9268),s=r(5765),l=r(7014),c=r(6887),u=r(5452),p=r(2298);class h extends o.AbstractEnrichCase{constructor(t){super(t),this.fenced=null,this.fencedMml=null,this.fencedMmlNodes=[],this.ofence=null,this.ofenceMml=null,this.ofenceMap={},this.cfence=null,this.cfenceMml=null,this.cfenceMap={},this.parentCleanup=[]}static test(t){return!(!t.mathmlTree||!t.fencePointer||t.mathmlTree.getAttribute("data-semantic-type"))}static makeEmptyNode_(t){const e=a.createElement("mrow"),r=new n.SemanticNode(t);return r.type="empty",r.mathmlTree=e,r}static fencedMap_(t,e){e[t.id]=t.mathmlTree,t.embellished&&h.fencedMap_(t.childNodes[0],e)}getMathml(){return this.getFenced_(),this.fencedMml=u.walkTree(this.fenced),this.getFencesMml_(),"empty"!==this.fenced.type||this.fencedMml.parentNode||(this.fencedMml.setAttribute(p.Attribute.ADDED,"true"),this.cfenceMml.parentNode.insertBefore(this.fencedMml,this.cfenceMml)),this.getFencedMml_(),this.rewrite_()}fencedElement(t){return"fenced"===t.type||"matrix"===t.type||"vector"===t.type}getFenced_(){let t=this.semantic;for(;!this.fencedElement(t);)t=t.childNodes[0];this.fenced=t.childNodes[0],this.ofence=t.contentNodes[0],this.cfence=t.contentNodes[1],h.fencedMap_(this.ofence,this.ofenceMap),h.fencedMap_(this.cfence,this.cfenceMap)}getFencedMml_(){let t=this.ofenceMml.nextSibling;for(t=t===this.fencedMml?t:this.fencedMml;t&&t!==this.cfenceMml;)this.fencedMmlNodes.push(t),t=t.nextSibling}getFencesMml_(){let t=this.semantic;const e=Object.keys(this.ofenceMap),r=Object.keys(this.cfenceMap);for(;!(this.ofenceMml&&this.cfenceMml||t===this.fenced);)-1===e.indexOf(t.fencePointer)||this.ofenceMml||(this.ofenceMml=t.mathmlTree),-1===r.indexOf(t.fencePointer)||this.cfenceMml||(this.cfenceMml=t.mathmlTree),t=t.childNodes[0];this.ofenceMml||(this.ofenceMml=this.ofence.mathmlTree),this.cfenceMml||(this.cfenceMml=this.cfence.mathmlTree),this.ofenceMml&&(this.ofenceMml=u.ascendNewNode(this.ofenceMml)),this.cfenceMml&&(this.cfenceMml=u.ascendNewNode(this.cfenceMml))}rewrite_(){let r=this.semantic,n=null;var t=this.introduceNewLayer_();for((0,p.setAttributes)(t,this.fenced.parent);!this.fencedElement(r);){var e=r.mathmlTree,o=this.specialCase_(r,e);if(o)r=o;else{(0,p.setAttributes)(e,r);const n=[];for(let t,e=1;t=r.childNodes[e];e++)n.push(u.walkTree(t));r=r.childNodes[0]}var o=a.createElement("dummy"),i=e.childNodes[0];a.replaceNode(e,o),a.replaceNode(t,e),a.replaceNode(e.childNodes[0],t),a.replaceNode(o,i),n=n||e}return u.walkTree(this.ofence),u.walkTree(this.cfence),this.cleanupParents_(),n||t}specialCase_(t,e){var r=a.tagName(e);let n,o=null;if("MSUBSUP"===r?(o=t.childNodes[0],n=s.CaseDoubleScript):"MMULTISCRIPTS"===r&&("superscript"===t.type||"subscript"===t.type?n=l.CaseMultiscripts:"tensor"===t.type&&(n=c.CaseTensor),o=n&&t.childNodes[0]&&"subsup"===t.childNodes[0].role?t.childNodes[0]:t),!o)return null;var r=o.childNodes[0],i=h.makeEmptyNode_(r.id);return o.childNodes[0]=i,e=new n(t).getMathml(),o.childNodes[0]=r,this.parentCleanup.push(e),o.childNodes[0]}introduceNewLayer_(){const t=this.fullFence(this.ofenceMml),e=this.fullFence(this.cfenceMml);let r=a.createElement("mrow");if(a.replaceNode(this.fencedMml,r),this.fencedMmlNodes.forEach(t=>r.appendChild(t)),r.insertBefore(t,this.fencedMml),r.appendChild(e),!r.parentNode){const t=a.createElement("mrow");for(;0{for(let e,t=0;e=r[t];t++){const r=n[o];if(r&&e===parseInt(a.getInnerNode(r).getAttribute(s.Attribute.ID)))a.getInnerNode(r).setAttribute(s.Attribute.PARENT,this.semantic.id.toString()),o++;else{const n=this.semantic.querySelectorAll(t=>t.id===e);this.mml.insertBefore(l.createNone_(n[0]),r||null)}}};r(t),n[o]&&"MPRESCRIPTS"!==i.tagName(n[o])?this.mml.insertBefore(n[o],i.createElement("mprescripts")):o++,r(e)}}e.CaseMultiindex=l},7014:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseMultiscripts=void 0;const n=r(5740),i=r(5656),a=r(6839),s=r(5452),l=r(2298);class o extends a.CaseMultiindex{static test(t){return!!t.mathmlTree&&("MMULTISCRIPTS"===n.tagName(t.mathmlTree)&&("superscript"===t.type||"subscript"===t.type))}constructor(t){super(t)}getMathml(){let t,e,r;if((0,l.setAttributes)(this.mml,this.semantic),this.semantic.childNodes[0]&&"subsup"===this.semantic.childNodes[0].role){const n=this.semantic.childNodes[0],o=(t=n.childNodes[0],e=a.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),r=a.CaseMultiindex.multiscriptIndex(n.childNodes[1]),[this.semantic.id,[n.id,t.id,r],e]);s.addCollapsedAttribute(this.mml,o),this.mml.setAttribute(l.Attribute.TYPE,n.role),this.completeMultiscript(i.SemanticSkeleton.interleaveIds(r,e),[])}else{t=this.semantic.childNodes[0],e=a.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);const r=[this.semantic.id,t.id,e];s.addCollapsedAttribute(this.mml,r)}const n=i.SemanticSkeleton.collapsedLeafs(r||[],e),o=s.walkTree(t);return s.getInnerNode(o).setAttribute(l.Attribute.PARENT,this.semantic.id.toString()),n.unshift(t.id),this.mml.setAttribute(l.Attribute.CHILDREN,n.join(",")),this.mml}}e.CaseMultiscripts=o},3416:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseProof=void 0;const n=r(9268),o=r(5452),i=r(2298);class a extends n.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return!!t.mathmlTree&&("inference"===t.type||"premises"===t.type)}getMathml(){return this.semantic.childNodes.length&&(this.semantic.contentNodes.forEach(function(t){o.walkTree(t),(0,i.setAttributes)(t.mathmlTree,t)}),this.semantic.childNodes.forEach(function(t){o.walkTree(t)}),(0,i.setAttributes)(this.mml,this.semantic),this.mml.getAttribute("data-semantic-id")===this.mml.getAttribute("data-semantic-parent")&&this.mml.removeAttribute("data-semantic-parent")),this.mml}}e.CaseProof=a},5699:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseTable=void 0;const o=r(5740),n=r(9268),i=r(5452),a=r(2298);class s extends n.AbstractEnrichCase{constructor(t){super(t),this.inner=[],this.mml=t.mathmlTree}static test(t){return"matrix"===t.type||"vector"===t.type||"cases"===t.type}getMathml(){const t=i.cloneContentNode(this.semantic.contentNodes[0]),e=this.semantic.contentNodes[1]?i.cloneContentNode(this.semantic.contentNodes[1]):null;if(this.inner=this.semantic.childNodes.map(i.walkTree),this.mml)if("MFENCED"===o.tagName(this.mml)){var r=this.mml.childNodes;this.mml.insertBefore(t,r[0]||null),e&&this.mml.appendChild(e),this.mml=i.rewriteMfenced(this.mml)}else{const n=[t,this.mml];e&&n.push(e),this.mml=i.introduceNewLayer(n,this.semantic)}else this.mml=i.introduceNewLayer([t].concat(this.inner,[e]),this.semantic);return(0,a.setAttributes)(this.mml,this.semantic),this.mml}}e.CaseTable=s},6887:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseTensor=void 0;const a=r(5656),s=r(6839),l=r(5452),c=r(2298);class n extends s.CaseMultiindex{static test(t){return!!t.mathmlTree&&"tensor"===t.type}constructor(t){super(t)}getMathml(){l.walkTree(this.semantic.childNodes[0]);var t=s.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),e=s.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[2]),r=s.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[3]),n=s.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[4]),o=((0,c.setAttributes)(this.mml,this.semantic),[this.semantic.id,this.semantic.childNodes[0].id,t,e,r,n]);l.addCollapsedAttribute(this.mml,o);const i=a.SemanticSkeleton.collapsedLeafs(t,e,r,n);return i.unshift(this.semantic.childNodes[0].id),this.mml.setAttribute(c.Attribute.CHILDREN,i.join(",")),this.completeMultiscript(a.SemanticSkeleton.interleaveIds(r,n),a.SemanticSkeleton.interleaveIds(t,e)),this.mml}}e.CaseTensor=n},9236:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseText=void 0;const n=r(9268),o=r(5452),i=r(2298);class a extends n.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return"punctuated"===t.type&&("text"===t.role||t.contentNodes.every(t=>"dummy"===t.role))}getMathml(){var t=[],e=o.collapsePunctuated(this.semantic,t);return this.mml=o.introduceNewLayer(t,this.semantic),(0,i.setAttributes)(this.mml,this.semantic),this.mml.removeAttribute(i.Attribute.CONTENT),o.addCollapsedAttribute(this.mml,e),this.mml}}e.CaseText=a},5714:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.prepareMmlString=e.testTranslation__=e.semanticMathml=e.semanticMathmlSync=e.semanticMathmlNode=void 0;const n=r(2057),o=r(5740),i=r(5897),a=r(1414),s=r(5452),l=r(2298);function c(t){var t=o.cloneNode(t),e=a.getTree(t);return s.enrich(t,e)}function u(t){return c(o.parseInput(t))}function p(t){return(t=t.match(/^"+t).match(/\/math>$/)||(t+=""),t}r(1513),e.semanticMathmlNode=c,e.semanticMathmlSync=u,e.semanticMathml=function(e,r){i.EnginePromise.getall().then(()=>{var t=o.parseInput(e);r(c(t))})},e.testTranslation__=function(t){n.Debugger.getInstance().init();t=u(p(t)).toString();return(0,l.removeAttributePrefix)(t),n.Debugger.getInstance().exit(),t},e.prepareMmlString=p},2298:function(t,o){var i,e;function a(t){return t.map(function(t){return t.id}).join(",")}function s(t,e){const r=[];"mglyph"===e.role&&r.push("image"),e.attributes.href&&r.push("link"),r.length&&t.setAttribute(i.POSTFIX,r.join(" "))}Object.defineProperty(o,"__esModule",{value:!0}),o.addPrefix=o.removeAttributePrefix=o.setPostfix=o.setAttributes=o.makeIdList=o.EnrichAttributes=o.Attribute=o.Prefix=void 0,o.Prefix="data-semantic-",(e=i=o.Attribute||(o.Attribute={})).ADDED="data-semantic-added",e.ALTERNATIVE="data-semantic-alternative",e.CHILDREN="data-semantic-children",e.COLLAPSED="data-semantic-collapsed",e.CONTENT="data-semantic-content",e.EMBELLISHED="data-semantic-embellished",e.FENCEPOINTER="data-semantic-fencepointer",e.FONT="data-semantic-font",e.ID="data-semantic-id",e.ANNOTATION="data-semantic-annotation",e.OPERATOR="data-semantic-operator",e.OWNS="data-semantic-owns",e.PARENT="data-semantic-parent",e.POSTFIX="data-semantic-postfix",e.PREFIX="data-semantic-prefix",e.ROLE="data-semantic-role",e.SPEECH="data-semantic-speech",e.STRUCTURE="data-semantic-structure",e.TYPE="data-semantic-type",o.EnrichAttributes=[i.ADDED,i.ALTERNATIVE,i.CHILDREN,i.COLLAPSED,i.CONTENT,i.EMBELLISHED,i.FENCEPOINTER,i.FONT,i.ID,i.ANNOTATION,i.OPERATOR,i.OWNS,i.PARENT,i.POSTFIX,i.PREFIX,i.ROLE,i.SPEECH,i.STRUCTURE,i.TYPE],o.makeIdList=a,o.setAttributes=function(r,t){r.setAttribute(i.TYPE,t.type);var n=t.allAttributes();for(let t,e=0;t=n[e];e++)r.setAttribute(o.Prefix+t[0].toLowerCase(),t[1]);t.childNodes.length&&r.setAttribute(i.CHILDREN,a(t.childNodes)),t.contentNodes.length&&r.setAttribute(i.CONTENT,a(t.contentNodes)),t.parent&&r.setAttribute(i.PARENT,t.parent.id.toString()),s(r,t)},o.setPostfix=s,o.removeAttributePrefix=function(t){return t.toString().replace(new RegExp(o.Prefix,"g"),"")},o.addPrefix=function(t){return o.Prefix+t}},3532:function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.factory=n.getCase=void 0,n.getCase=function(r){for(let t,e=0;t=n.factory[e];e++)if(t.test(r))return t.constr(r);return null},n.factory=[]},1513:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(6061),o=r(5765),i=r(7251),a=r(6265),s=r(6514),l=r(7014),c=r(3416),u=r(5699),p=r(6887),h=r(9236);r(3532).factory.push({test:a.CaseLimit.test,constr:t=>new a.CaseLimit(t)},{test:i.CaseEmbellished.test,constr:t=>new i.CaseEmbellished(t)},{test:o.CaseDoubleScript.test,constr:t=>new o.CaseDoubleScript(t)},{test:p.CaseTensor.test,constr:t=>new p.CaseTensor(t)},{test:l.CaseMultiscripts.test,constr:t=>new l.CaseMultiscripts(t)},{test:s.CaseLine.test,constr:t=>new s.CaseLine(t)},{test:n.CaseBinomial.test,constr:t=>new n.CaseBinomial(t)},{test:c.CaseProof.test,constr:t=>new c.CaseProof(t)},{test:u.CaseTable.test,constr:t=>new u.CaseTable(t)},{test:h.CaseText.test,constr:t=>new h.CaseText(t)})},5452:function(j,r,t){Object.defineProperty(r,"__esModule",{value:!0}),r.printNodeList__=r.collapsePunctuated=r.formattedOutput_=r.formattedOutput=r.getInnerNode=r.setOperatorAttribute_=r.createInvisibleOperator_=r.rewriteMfenced=r.cloneContentNode=r.addCollapsedAttribute=r.parentNode_=r.isIgnorable_=r.unitChild_=r.descendNode_=r.ascendNewNode=r.validLca_=r.pathToRoot_=r.attachedElement_=r.prunePath_=r.mathmlLca_=r.lcaType=r.functionApplication_=r.isDescendant_=r.insertNewChild_=r.mergeChildren_=r.collectChildNodes_=r.collateChildNodes_=r.childrenSubset_=r.moveSemanticAttributes_=r.introduceLayerAboveLca=r.introduceNewLayer=r.walkTree=r.enrich=r.SETTINGS=void 0;const i=t(2057),l=t(5740),B=t(5897),D=t(3588),F=t(7516),a=t(5656),s=t(4795),c=t(2298),H=t(3532);function u(t){const e=(0,H.getCase)(t);let r;if(e)return A(r=e.getMathml());if(1===t.mathml.length)return i.Debugger.getInstance().output("Walktree Case 0"),r=t.mathml[0],c.setAttributes(r,t),t.childNodes.length&&(i.Debugger.getInstance().output("Walktree Case 0.1"),t.childNodes.forEach(function(t){"empty"===t.type&&r.appendChild(u(t))})),A(r);var n=t.contentNodes.map(w),o=(I(t,n),t.childNodes.map(u)),n=a.SemanticSkeleton.combineContentChildren(t,n,o);if(null===(r=t.mathmlTree))i.Debugger.getInstance().output("Walktree Case 1"),r=p(n,t);else{const t=M(n);i.Debugger.getInstance().output("Walktree Case 2"),r=t?(i.Debugger.getInstance().output("Walktree Case 2.1"),t.parentNode):(i.Debugger.getInstance().output("Walktree Case 2.2"),P(r))}return y(r=L(r),n,t),c.setAttributes(r,t),A(r)}function p(t,e){const r=S(t);let n=r.node;var o=r.type;if(o!==_.VALID||!s.hasEmptyTag(n))if(i.Debugger.getInstance().output("Walktree Case 1.1"),n=l.createElement("mrow"),o===_.PRUNED)i.Debugger.getInstance().output("Walktree Case 1.1.0"),n=h(n,r.node,t);else if(t[0]){i.Debugger.getInstance().output("Walktree Case 1.1.1");const e=M(t),r=d(e.parentNode,t);l.replaceNode(e,n),r.forEach(function(t){n.appendChild(t)})}return e.mathmlTree||(e.mathmlTree=n),n}function h(e,t,r){let n=C(t);if(s.hasMathTag(n)){i.Debugger.getInstance().output("Walktree Case 1.1.0.0"),o(n,e),l.toArray(n.childNodes).forEach(function(t){e.appendChild(t)});const t=e;e=n,n=t}t=r.indexOf(t);return r[t]=n,l.replaceNode(n,e),e.appendChild(n),r.forEach(function(t){e.appendChild(t)}),e}function o(t,e){for(const r of c.EnrichAttributes)t.hasAttribute(r)&&(e.setAttribute(r,t.getAttribute(r)),t.removeAttribute(r))}function d(t,e){const r=l.toArray(t.childNodes);let n=1/0,o=-1/0;return e.forEach(function(t){t=r.indexOf(t);-1!==t&&(n=Math.min(n,t),o=Math.max(o,t))}),r.slice(n,o+1)}function f(t,e,r){const n=[];let o=l.toArray(t.childNodes),i=!1;for(;o.length;){const t=o.shift();if(t.hasAttribute(c.Attribute.TYPE))n.push(t);else{const e=m(t);0!==e.length&&(1!==e.length?(i?t.setAttribute("AuxiliaryImplicit",!0):i=!0,o=e.concat(o)):n.push(t))}}const a=[],s=r.childNodes.map(function(t){return t.mathmlTree});for(;s.length;){const t=s.pop();if(t){if(-1!==n.indexOf(t))break;-1!==e.indexOf(t)&&a.unshift(t)}}return n.concat(a)}function m(t){const e=[];let r=l.toArray(t.childNodes);for(;r.length;){const t=r.shift();t.nodeType===l.NodeType.ELEMENT_NODE&&(t.hasAttribute(c.Attribute.TYPE)?e.push(t):r=l.toArray(t.childNodes).concat(r))}return e}function y(e,r,n){var o="implicit"===n.role&&F.flags.combine_juxtaposition?f(e,r,n):l.toArray(e.childNodes);if(o.length){let t=0;for(;r.length;){const n=r[0];o[t]===n||v(o[t],n)?(r.shift(),t++):o[t]&&-1===r.indexOf(o[t])?t++:(b(n,e)||g(e,o[t],n),r.shift())}}else r.forEach(function(t){e.appendChild(t)})}function g(r,n,o){if(n){let t=n,e=N(t);for(;e&&e.firstChild===t&&!t.hasAttribute("AuxiliaryImplicit")&&e!==r;)e=N(t=e);e&&(e.insertBefore(o,t),t.removeAttribute("AuxiliaryImplicit"))}else r.insertBefore(o,null)}function b(t,e){if(!t)return!1;do{if((t=t.parentNode)===e)return!0}while(t);return!1}function v(r,n){var t=D.functionApplication();if(r&&n&&r.textContent&&n.textContent&&r.textContent===t&&n.textContent===t&&"true"===n.getAttribute(c.Attribute.ADDED)){for(let t,e=0;t=r.attributes[e];e++)n.hasAttribute(t.nodeName)||n.setAttribute(t.nodeName,t.nodeValue);return l.replaceNode(r,n),!0}return!1}var _;function S(t){var e=M(t);if(!e)return{type:_.INVALID,node:null};var r=M(t.slice().reverse());if(e===r)return{type:_.VALID,node:e};const n=x(e),o=O(n,t),i=x(r,function(t){return-1!==o.indexOf(t)}),a=i[0],s=o.indexOf(a);return-1===s?{type:_.INVALID,node:null}:{type:o.length!==n.length?_.PRUNED:E(o[s+1],i[1])?_.VALID:_.INVALID,node:a}}function O(t,e){let r=0;for(;t[r]&&-1===e.indexOf(t[r]);)r++;return t.slice(0,r+1)}function M(t){let e=0,r=null;for(;!r&&e!1),n=[t];for(;!r(t)&&!s.hasMathTag(t)&&t.parentNode;)t=N(t),n.unshift(t);return n}function E(t,e){return!(!t||!e||t.previousSibling||e.nextSibling)}function A(t){for(;!s.hasMathTag(t)&&e(t);)t=N(t);return t}function C(t){const e=l.toArray(t.childNodes);if(!e)return t;const r=e.filter(function(t){return t.nodeType===l.NodeType.ELEMENT_NODE&&!s.hasIgnoreTag(t)});return 1===r.length&&s.hasEmptyTag(r[0])&&!r[0].hasAttribute(c.Attribute.TYPE)?C(r[0]):t}function e(e){var t=N(e);return!(!t||!s.hasEmptyTag(t))&&l.toArray(t.childNodes).every(function(t){return t===e||T(t)})}function T(t){if(t.nodeType!==l.NodeType.ELEMENT_NODE)return!0;if(!t||s.hasIgnoreTag(t))return!0;var e=l.toArray(t.childNodes);return!(!s.hasEmptyTag(t)&&e.length||s.hasDisplayTag(t)||t.hasAttribute(c.Attribute.TYPE)||s.isOrphanedGlyph(t))&&l.toArray(t.childNodes).every(T)}function N(t){return t.parentNode}function w(t){if(t.mathml.length)return u(t);var e=r.SETTINGS.implicit?n(t):l.createElement("mrow");return t.mathml=[e],e}function L(r){if("MFENCED"!==l.tagName(r))return r;const n=l.createElement("mrow");for(let t,e=0;t=r.attributes[e];e++)-1===["open","close","separators"].indexOf(t.name)&&n.setAttribute(t.name,t.value);return l.toArray(r.childNodes).forEach(function(t){n.appendChild(t)}),l.replaceNode(r,n),n}function n(t){const e=l.createElement("mo"),r=l.createTextNode(t.textContent);return e.appendChild(r),c.setAttributes(e,t),e.setAttribute(c.Attribute.ADDED,"true"),e}function I(t,e){const r=t.type+(t.textContent?","+t.textContent:"");e.forEach(function(t){P(t).setAttribute(c.Attribute.OPERATOR,r)})}function P(t){const r=l.toArray(t.childNodes);if(!r)return t;const n=r.filter(function(t){return!T(t)}),o=[];for(let t,e=0;t=n[e];e++)if(s.hasEmptyTag(t)){const r=P(t);r&&r!==t&&o.push(r)}else o.push(t);return 1===o.length?o[0]:t}function R(t,e,r,n){n=n||!1;k(t,"Original MathML",n),k(r,"Semantic Tree",n),k(e,"Semantically enriched MathML",n)}function k(t,e,r){t=l.formatXml(t.toString());r?console.info(e+":\n```html\n"+c.removeAttributePrefix(t)+"\n```\n"):console.info(t)}r.SETTINGS={collapsed:!0,implicit:!0},r.enrich=function(t,e){const r=l.cloneNode(t);return u(e.root),B.default.getInstance().structure&&t.setAttribute(c.Attribute.STRUCTURE,a.SemanticSkeleton.fromStructure(t,e).toString()),i.Debugger.getInstance().generateOutput(function(){return R(r,t,e,!0),[]}),t},r.walkTree=u,r.introduceNewLayer=p,r.introduceLayerAboveLca=h,r.moveSemanticAttributes_=o,r.childrenSubset_=d,r.collateChildNodes_=f,r.collectChildNodes_=m,r.mergeChildren_=y,r.insertNewChild_=g,r.isDescendant_=b,r.functionApplication_=v,(t=_=r.lcaType||(r.lcaType={})).VALID="valid",t.INVALID="invalid",t.PRUNED="pruned",r.mathmlLca_=S,r.prunePath_=O,r.attachedElement_=M,r.pathToRoot_=x,r.validLca_=E,r.ascendNewNode=A,r.descendNode_=C,r.unitChild_=e,r.isIgnorable_=T,r.parentNode_=N,r.addCollapsedAttribute=function(t,e){const r=new a.SemanticSkeleton(e);t.setAttribute(c.Attribute.COLLAPSED,r.toString())},r.cloneContentNode=w,r.rewriteMfenced=L,r.createInvisibleOperator_=n,r.setOperatorAttribute_=I,r.getInnerNode=P,r.formattedOutput=R,r.formattedOutput_=k,r.collapsePunctuated=function(r,t){const n=!!t,o=t||[],i=r.parent,a=r.contentNodes.map(function(t){return t.id}),s=(a.unshift("c"),[r.id,a]);for(let t,e=0;t=r.childNodes[e];e++){const r=u(t),a=(o.push(r),P(r));i&&!n&&a.setAttribute(c.Attribute.PARENT,i.id.toString()),s.push(t.id)}return s},r.printNodeList__=function(t,e){console.info(t),l.toArray(e).forEach(function(t){console.info(t.toString())}),console.info("<<<<<<<<<<<<<<<<<")}},5105:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractHighlighter=void 0;const n=r(5274),o=r(2298);class i{constructor(){this.color=null,this.mactionName="",this.currentHighlights=[]}highlight(t){this.currentHighlights.push(t.map(t=>{var e=this.highlightNode(t);return this.setHighlighted(t),e}))}highlightAll(t){var r=this.getMactionNodes(t);for(let t,e=0;t=r[e];e++)this.highlight([t])}unhighlight(){const t=this.currentHighlights.pop();t&&t.forEach(t=>{this.isHighlighted(t.node)&&(this.unhighlightNode(t),this.unsetHighlighted(t.node))})}unhighlightAll(){for(;0this.colorize(t))}uncolorizeAll(t){n.evalXPath(`.//*[@${o.Attribute.ID}]`,t).forEach(t=>this.uncolorize(t))}colorize(t){var e=(0,o.addPrefix)("foreground");t.hasAttribute(e)&&(t.setAttribute(e+"-old",t.style.color),t.style.color=t.getAttribute(e))}uncolorize(t){var e=(0,o.addPrefix)("foreground")+"-old";t.hasAttribute(e)&&(t.style.color=t.getAttribute(e))}}(e.AbstractHighlighter=i).ATTR="sre-highlight"},6937:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.ChtmlHighlighter=void 0;class n extends r(933).CssHighlighter{constructor(){super()}isMactionNode(t){return t.tagName.toUpperCase()===this.mactionName.toUpperCase()}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}}e.ChtmlHighlighter=n},8396:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContrastPicker=e.ColorPicker=void 0;const n={red:{red:255,green:0,blue:0},green:{red:0,green:255,blue:0},blue:{red:0,green:0,blue:255},yellow:{red:255,green:255,blue:0},cyan:{red:0,green:255,blue:255},magenta:{red:255,green:0,blue:255},white:{red:255,green:255,blue:255},black:{red:0,green:0,blue:0}};function r(t,e){var t=t||{color:e};let r=Object.prototype.hasOwnProperty.call(t,"color")?n[t.color]:t;return(r=r||n[e]).alpha=Object.prototype.hasOwnProperty.call(t,"alpha")?t.alpha:1,e=r,t=t=>(t=Math.max(t,0),t=Math.min(255,t),Math.round(t)),e.red=t(e.red),e.green=t(e.green),e.blue=t(e.blue),e.alpha=Math.max(e.alpha,0),e.alpha=Math.min(1,e.alpha),e}class o{constructor(t,e){this.foreground=r(e,o.DEFAULT_FOREGROUND_),this.background=r(t,o.DEFAULT_BACKGROUND_)}static toHex(t){t=t.toString(16);return 1===t.length?"0"+t:t}rgba(){function t(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"}return{background:t(this.background),foreground:t(this.foreground)}}rgb(){function t(t){return"rgb("+t.red+","+t.green+","+t.blue+")"}return{background:t(this.background),alphaback:this.background.alpha.toString(),foreground:t(this.foreground),alphafore:this.foreground.alpha.toString()}}hex(){function t(t){return"#"+o.toHex(t.red)+o.toHex(t.green)+o.toHex(t.blue)}return{background:t(this.background),alphaback:this.background.alpha.toString(),foreground:t(this.foreground),alphafore:this.foreground.alpha.toString()}}}(e.ColorPicker=o).DEFAULT_BACKGROUND_="blue",o.DEFAULT_FOREGROUND_="black",e.ContrastPicker=class{constructor(){this.hue=10,this.sat=100,this.light=50,this.incr=50}generate(){return t=function(t,e,r){e=1 "+this.getRule().action:this.constraint}}},4508:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Trie=void 0;const a=r(4391),i=r(9701);class s{constructor(){this.root=(0,i.getNode)(a.TrieNodeKind.ROOT,"",null)}static collectRules_(t){const e=[];let r=[t];for(;r.length;){const t=r.shift();if(t.getKind()===a.TrieNodeKind.QUERY||t.getKind()===a.TrieNodeKind.BOOLEAN){const r=t.getRule();r&&e.unshift(r)}r=r.concat(t.getChildren())}return e}static printWithDepth_(t,r,n){n+=new Array(r+2).join(r.toString())+": "+t.toString()+"\n";var o=t.getChildren();for(let t,e=0;t=o[e];e++)n=s.printWithDepth_(t,r+1,n);return n}static order_(t){const e=t.getChildren();if(!e.length)return 0;t=Math.max.apply(null,e.map(s.order_));return Math.max(e.length,t)}addRule(t){let r=this.root;var n=t.context,o=t.dynamicCstr.getValues();for(let t=0,e=o.length;t{t.getKind()===a.TrieNodeKind.DYNAMIC&&-1===e.indexOf(t.getConstraint())||n.push(t)});r=n.slice()}for(;r.length;){const t=r.shift();if(t.getRule){const e=t.getRule();e&&n.push(e)}const a=t.findChildren(e);r=r.concat(a)}return n}hasSubtrie(r){let n=this.root;for(let t=0,e=r.length;t!0),this.kind=i.TrieNodeKind.ROOT}}e.RootTrieNode=a;class s extends n.AbstractTrieNode{constructor(e){super(e,t=>t===e),this.kind=i.TrieNodeKind.DYNAMIC}}e.DynamicTrieNode=s;const _={"=":(t,e)=>t===e,"!=":(t,e)=>t!==e,"<":(t,e)=>t":(t,e)=>et<=e,">=":(t,e)=>e<=t};function l(t){if(t.match(/^self::\*$/))return t=>!0;if(t.match(/^self::\w+$/)){const e=t.slice(6).toUpperCase();return t=>t.tagName&&y.tagName(t)===e}if(t.match(/^self::\w+:\w+$/)){const r=t.split(":"),n=g.resolveNameSpace(r[2]);if(!n)return null;const y=r[3].toUpperCase();return t=>t.localName&&t.localName.toUpperCase()===y&&t.namespaceURI===n}if(t.match(/^@\w+$/)){const o=t.slice(1);return t=>t.hasAttribute&&t.hasAttribute(o)}if(t.match(/^@\w+="[\w\d ]+"$/)){const i=t.split("="),a=i[0].slice(1),y=i[1].slice(1,-1);return t=>t.hasAttribute&&t.hasAttribute(a)&&t.getAttribute(a)===y}if(t.match(/^@\w+!="[\w\d ]+"$/)){const s=t.split("!="),l=s[0].slice(1),y=s[1].slice(1,-1);return t=>!t.hasAttribute||!t.hasAttribute(l)||t.getAttribute(l)!==y}if(t.match(/^contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)$/)){const c=t.split('"')[1];return t=>!!b.Grammar.getInstance().getParameter(c)}if(t.match(/^not\(\s*contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)\s*\)$/)){const u=t.split('"')[1];return t=>!b.Grammar.getInstance().getParameter(u)}if(t.match(/^name\(\.\.\/\.\.\)="\w+"$/)){const p=t.split('"')[1].toUpperCase();return t=>{var e;return(null==(e=null==(e=t.parentNode)?void 0:e.parentNode)?void 0:e.tagName)&&y.tagName(t.parentNode.parentNode)===p}}if(t.match(/^count\(preceding-sibling::\*\)=\d+$/)){const h=t.split("="),d=parseInt(h[1],10);return t=>{var e;return(null==(e=t.parentNode)?void 0:e.childNodes[d])===t}}if(t.match(/^.+\[@category!?=".+"\]$/)){let[,r,n,o]=t.match(/^(.+)\[@category(!?=)"(.+)"\]$/);const b=o.match(/^unit:(.+)$/);let i="";return b&&(o=b[1],i=":unit"),t=>{var e=g.evalXPath(r,t)[0];if(e){const t=v.lookupCategory(e.textContent+i);return"="===n?t===o:t!==o}return!1}}if(t.match(/^string-length\(.+\)\W+\d+/)){const[,f,m,y]=t.match(/^string-length\((.+)\)(\W+)(\d+)/),b=_[m]||_["="],v=parseInt(y,10);return t=>{t=g.evalXPath(f,t)[0];return!!t&&b(Array.from(t.textContent).length,v)}}return null}e.constraintTest_=l;class c extends o.StaticTrieNode{constructor(t,e){super(t,l(t)),this.context=e,this.kind=i.TrieNodeKind.QUERY}applyTest(t){return this.test?this.test(t):this.context.applyQuery(t,this.constraint)===t}}e.QueryTrieNode=c;class u extends o.StaticTrieNode{constructor(t,e){super(t,l(t)),this.context=e,this.kind=i.TrieNodeKind.BOOLEAN}applyTest(t){return this.test?this.test(t):this.context.applyConstraint(t,this.constraint)}}e.BooleanTrieNode=u},7491:function(t,i,e){Object.defineProperty(i,"__esModule",{value:!0}),i.completeLocale=i.getLocale=i.setLocale=i.locales=void 0;const a=e(5897),r=e(1377),s=e(2105),n=e(4249),o=e(8657),l=e(173),c=e(9393),u=e(7978),p=e(5540),h=e(5218),d=e(3887),f=e(8384),m=e(7206),y=e(7734),g=e(7264),b=e(4356);function v(){var t=r.Variables.ensureLocale(a.default.getInstance().locale,a.default.getInstance().defaultLocale);return a.default.getInstance().locale=t,i.locales[t]()}i.locales={ca:n.ca,da:o.da,de:l.de,en:c.en,es:u.es,fr:p.fr,hi:h.hi,it:d.it,nb:f.nb,nn:y.nn,sv:g.sv,nemeth:m.nemeth},i.setLocale=function(){var t,e,r=v();if(t=r,e=a.default.getInstance().subiso,-1===t.SUBISO.all.indexOf(e)&&(a.default.getInstance().subiso=t.SUBISO.default),t.SUBISO.current=a.default.getInstance().subiso,r){for(const i of Object.getOwnPropertyNames(r))b.LOCALE[i]=r[i];for(var[n,o]of Object.entries(r.CORRECTIONS))s.Grammar.getInstance().setCorrection(n,o)}},i.getLocale=v,i.completeLocale=function(t){const e=i.locales[t.locale];if(e){var r=t.kind.toUpperCase(),n=t.messages;if(n){const o=e();for(const[t,i]of Object.entries(n))o[r][t]=i}}else console.error("Locale "+t.locale+" does not exist!")}},4356:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.createLocale=e.LOCALE=void 0;const n=r(7549);function o(){return{FUNCTIONS:(0,n.FUNCTIONS)(),MESSAGES:(0,n.MESSAGES)(),ALPHABETS:(0,n.ALPHABETS)(),NUMBERS:(0,n.NUMBERS)(),COMBINERS:{},CORRECTIONS:{},SUBISO:(0,n.SUBISO)()}}e.LOCALE=o(),e.createLocale=o},2536:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.localeFontCombiner=e.extractString=e.localEnclose=e.localRole=e.localFont=e.combinePostfixIndex=e.nestingToString=void 0;const n=r(4356),o=r(4977);function i(t,e){return void 0===t?e:"string"==typeof t?t:t[0]}e.nestingToString=function(t){switch(t){case 1:return n.LOCALE.MESSAGES.MS.ONCE||"";case 2:return n.LOCALE.MESSAGES.MS.TWICE;default:return t.toString()}},e.combinePostfixIndex=function(t,e){return t===n.LOCALE.MESSAGES.MS.ROOTINDEX||t===n.LOCALE.MESSAGES.MS.INDEX?t:t+" "+e},e.localFont=function(t){return i(n.LOCALE.MESSAGES.font[t],t)},e.localRole=function(t){return i(n.LOCALE.MESSAGES.role[t],t)},e.localEnclose=function(t){return i(n.LOCALE.MESSAGES.enclose[t],t)},e.extractString=i,e.localeFontCombiner=function(t){return"string"==typeof t?{font:t,combiner:n.LOCALE.ALPHABETS.combiner}:{font:t[0],combiner:n.LOCALE.COMBINERS[t[1]]||o.Combiners[t[1]]||n.LOCALE.ALPHABETS.combiner}}},4249:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.ca=void 0;function n(t,e,r){return t="sans serif "+(r?r+" "+t:t),e?t+" "+e:t}const o=r(4356),i=r(2536),a=r(614),s=r(4977);let l=null;e.ca=function(){return l=l||function(){const t=(0,o.createLocale)();return t.NUMBERS=a.default,t.COMBINERS.sansserif=n,t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.combineRootIndex=i.combinePostfixIndex,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>t+r,t.FUNCTIONS.fontRegexp=t=>RegExp("^"+t+" "),t.FUNCTIONS.plural=t=>/.*os$/.test(t)?t+"sos":/.*s$/.test(t)?t+"os":/.*ga$/.test(t)?t.slice(0,-2)+"gues":/.*\xe7a$/.test(t)?t.slice(0,-2)+"ces":/.*ca$/.test(t)?t.slice(0,-2)+"ques":/.*ja$/.test(t)?t.slice(0,-2)+"ges":/.*qua$/.test(t)?t.slice(0,-3)+"qües":/.*a$/.test(t)?t.slice(0,-1)+"es":/.*(e|i)$/.test(t)?t+"ns":/.*\xed$/.test(t)?t.slice(0,-1)+"ins":t+"s",t.FUNCTIONS.si=(t,e)=>(t=e.match(/^metre/)?t.replace(/a$/,"à").replace(/o$/,"ò").replace(/i$/,"í"):t)+e,t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t}()}},8657:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.da=void 0;const n=r(4356),o=r(2536),i=r(3866),a=r(4977);let s=null;e.da=function(){return s=s||function(){const e=(0,n.createLocale)();return e.NUMBERS=i.default,e.FUNCTIONS.radicalNestDepth=o.nestingToString,e.FUNCTIONS.fontRegexp=t=>t===e.ALPHABETS.capPrefix.default?RegExp("^"+t+" "):RegExp(" "+t+"$"),e.ALPHABETS.combiner=a.Combiners.postfixCombiner,e.ALPHABETS.digitTrans.default=i.default.numberToWords,e}()}},173:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.de=void 0;function n(t,e,r){return"s"===r&&(e=e.split(" ").map(function(t){return t.replace(/s$/,"")}).join(" "),r=""),t=r?r+" "+t:t,e?e+" "+t:t}function o(t,e,r){return t=r&&"s"!==r?r+" "+t:t,e?t+" "+e:t}const i=r(2105),a=r(2536),s=r(4356),l=r(1435);let c=null;e.de=function(){return c=c||function(){const e=(0,s.createLocale)();return e.NUMBERS=l.default,e.COMBINERS.germanPostfix=o,e.ALPHABETS.combiner=n,e.FUNCTIONS.radicalNestDepth=t=>1{return t.replace("Wurzel",e?e+"wurzel":"")},e.FUNCTIONS.combineNestedRadical=(t,e,r)=>{e=(e?e+" ":"")+(t=r.match(/exponent$/)?t+"r":t);return r.match(/ /)?r.replace(/ /," "+e+" "):e+" "+r},e.FUNCTIONS.fontRegexp=function(t){return t=t.split(" ").map(function(t){return t.replace(/s$/,"(|s)")}).join(" "),new RegExp("((^"+t+" )|( "+t+"$))")},e.CORRECTIONS.correctOne=t=>t.replace(/^eins$/,"ein"),e.CORRECTIONS.localFontNumber=t=>(0,a.localFont)(t).split(" ").map(function(t){return t.replace(/s$/,"")}).join(" "),e.CORRECTIONS.lowercase=t=>t.toLowerCase(),e.CORRECTIONS.article=t=>{var e=i.Grammar.getInstance().getParameter("case"),r=i.Grammar.getInstance().getParameter("plural");return"dative"===e?{der:"dem",die:r?"den":"der",das:"dem"}[t]:t},e.CORRECTIONS.masculine=t=>"dative"===i.Grammar.getInstance().getParameter("case")?t+"n":t,e}()}},9393:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.en=void 0;const n=r(2105),o=r(4356),i=r(2536),a=r(310),s=r(4977);let l=null;e.en=function(){return l=l||function(){const t=(0,o.createLocale)();return t.NUMBERS=a.default,t.FUNCTIONS.radicalNestDepth=i.nestingToString,t.FUNCTIONS.plural=t=>/.*s$/.test(t)?t:t+"s",t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=a.default.numberToWords,t.CORRECTIONS.article=t=>n.Grammar.getInstance().getParameter("noArticle")?"":t,t}()}},7978:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.es=void 0;function n(t,e,r){return t="sans serif "+(r?r+" "+t:t),e?t+" "+e:t}const o=r(4356),i=r(2536),a=r(4634),s=r(4977);let l=null;e.es=function(){return l=l||function(){const t=(0,o.createLocale)();return t.NUMBERS=a.default,t.COMBINERS.sansserif=n,t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.combineRootIndex=i.combinePostfixIndex,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>t+r,t.FUNCTIONS.fontRegexp=t=>RegExp("^"+t+" "),t.FUNCTIONS.plural=t=>/.*(a|e|i|o|u)$/.test(t)?t+"s":/.*z$/.test(t)?t.slice(0,-1)+"ces":/.*c$/.test(t)?t.slice(0,-1)+"ques":/.*g$/.test(t)?t+"ues":/.*\u00f3n$/.test(t)?t.slice(0,-2)+"ones":t+"es",t.FUNCTIONS.si=(t,e)=>(t=e.match(/^metro/)?t.replace(/a$/,"á").replace(/o$/,"ó").replace(/i$/,"í"):t)+e,t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t}()}},5540:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.fr=void 0;const n=r(2105),o=r(4356),i=r(2536),a=r(2350),s=r(4977);let l=null;e.fr=function(){return l=l||function(){const t=(0,o.createLocale)();return t.NUMBERS=a.default,t.FUNCTIONS.radicalNestDepth=i.nestingToString,t.FUNCTIONS.combineRootIndex=i.combinePostfixIndex,t.FUNCTIONS.combineNestedFraction=(t,e,r)=>r.replace(/ $/g,"")+e+t,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>r+" "+t,t.FUNCTIONS.fontRegexp=t=>RegExp(" (en |)"+t+"$"),t.FUNCTIONS.plural=t=>/.*s$/.test(t)?t:t+"s",t.CORRECTIONS.article=t=>n.Grammar.getInstance().getParameter("noArticle")?"":t,t.ALPHABETS.combiner=s.Combiners.romanceCombiner,t.SUBISO={default:"fr",current:"fr",all:["fr","be","ch"]},t}()}},5218:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.hi=void 0;const n=r(4356),o=r(4438),i=r(4977),a=r(2536);let s=null;e.hi=function(){return s=s||function(){const t=(0,n.createLocale)();return t.NUMBERS=o.default,t.ALPHABETS.combiner=i.Combiners.prefixCombiner,t.FUNCTIONS.radicalNestDepth=a.nestingToString,t}()}},3887:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.it=void 0;function n(t,e,r){return t.match(/^[a-zA-Z]$/)&&(e=e.replace("cerchiato","cerchiata")),t=r?t+" "+r:t,e?t+" "+e:t}const o=r(2536),i=r(4356),a=r(8825),s=r(4977);let l=null;e.it=function(){return l=l||function(){const t=(0,i.createLocale)();return t.NUMBERS=a.default,t.COMBINERS.italianPostfix=n,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t.FUNCTIONS.combineRootIndex=o.combinePostfixIndex,t.FUNCTIONS.combineNestedFraction=(t,e,r)=>r.replace(/ $/g,"")+e+t,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>r+" "+t,t.FUNCTIONS.fontRegexp=t=>RegExp(" (en |)"+t+"$"),t.ALPHABETS.combiner=s.Combiners.romanceCombiner,t}()}},8384:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.nb=void 0;const n=r(4356),o=r(2536),i=r(8274),a=r(4977);let s=null;e.nb=function(){return s=s||function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.ALPHABETS.combiner=a.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=i.default.numberToWords,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t}()}},7206:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.nemeth=void 0;function n(t){return t.match(RegExp("^"+h.ALPHABETS.languagePrefix.english))?t.slice(1):t}function o(t,e,r){return t=n(t),e?t+e:t}function i(t,e,r){return e+n(t)}function a(t,e,r){return e+(r||"")+n(t)+"⠻"}function s(t,e,r){return e+(r||"")+n(t)+"⠻⠻"}function l(t,e,r){return e+n(t)+"⠾"}const c=r(4356),u=r(3720),p=r(4977);let h=null;e.nemeth=function(){return h=h||function(){const t=(0,c.createLocale)();return t.NUMBERS=u.default,t.COMBINERS={postfixCombiner:o,germanCombiner:i,embellishCombiner:a,doubleEmbellishCombiner:s,parensCombiner:l},t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.fontRegexp=t=>RegExp("^"+t),t.FUNCTIONS.si=p.identityTransformer,t.ALPHABETS.combiner=(t,e,r)=>e?e+r+t:n(t),t.ALPHABETS.digitTrans={default:u.default.numberToWords},t}()}},7734:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.nn=void 0;const n=r(4356),o=r(2536),i=r(8274),a=r(4977);let s=null;e.nn=function(){return s=s||function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.ALPHABETS.combiner=a.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=i.default.numberToWords,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t.SUBISO={default:"",current:"",all:["","alt"]},t}()}},7264:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.sv=void 0;const n=r(4356),o=r(2536),i=r(3898),a=r(4977);let s=null;e.sv=function(){return s=s||function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t.FUNCTIONS.fontRegexp=function(t){return new RegExp("((^"+t+" )|( "+t+"$))")},t.ALPHABETS.combiner=a.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=i.default.numberToWords,t.CORRECTIONS.correctOne=t=>t.replace(/^ett$/,"en"),t}()}},7549:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SUBISO=e.FUNCTIONS=e.ALPHABETS=e.NUMBERS=e.MESSAGES=void 0;const n=r(4977);e.MESSAGES=function(){return{MS:{},MSroots:{},font:{},embellish:{},role:{},enclose:{},navigate:{},regexp:{},unitTimes:""}},e.NUMBERS=function(){return{zero:"zero",ones:[],tens:[],large:[],special:{},wordOrdinal:n.identityTransformer,numericOrdinal:n.identityTransformer,numberToWords:n.identityTransformer,numberToOrdinal:n.pluralCase,vulgarSep:" ",numSep:" "}},e.ALPHABETS=function(){return{latinSmall:[],latinCap:[],greekSmall:[],greekCap:[],capPrefix:{default:""},smallPrefix:{default:""},digitPrefix:{default:""},languagePrefix:{},digitTrans:{default:n.identityTransformer,mathspeak:n.identityTransformer,clearspeak:n.identityTransformer},letterTrans:{default:n.identityTransformer},combiner:(t,e,r)=>t}},e.FUNCTIONS=function(){return{fracNestDepth:t=>n.vulgarFractionSmall(t,10,100),radicalNestDepth:t=>"",combineRootIndex:function(t,e){return t},combineNestedFraction:n.Combiners.identityCombiner,combineNestedRadical:n.Combiners.identityCombiner,fontRegexp:function(t){return new RegExp("^"+t.split(/ |-/).join("( |-)")+"( |-)")},si:n.siCombiner,plural:n.identityTransformer}},e.SUBISO=function(){return{default:"",current:"",all:[]}}},614:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(2105);function o(t){const n=t%1e3,e=Math.floor(n/100),r=e?1===e?"cent":s.ones[e]+"-cents":"",o=function(){var t=n%100%100;if(t<20)return s.ones[t];var e=Math.floor(t/10),r=s.tens[e],t=s.ones[t%10];return r&&t?r+(2===e?"-i-":"-")+t:r||t}();return r&&o?r+s.numSep+o:r||o}function i(t){if(0===t)return s.zero;if(t>=Math.pow(10,36))return t.toString();let e=0,r="";for(;0=Math.pow(10,36))return t.toString();let r=0,n="";for(;0=Math.pow(10,36))return t.toString();let e=0,r="";for(;0=Math.pow(10,36))return t.toString();let e=0,r="";for(;0=Math.pow(10,36))return t.toString();let e=0,r="";for(;0=Math.pow(10,36))return t.toString();c.special["tens-"+o.default.getInstance().subiso]&&(c.tens=c.special["tens-"+o.default.getInstance().subiso]);let e=0,r="";for(;0=Math.pow(10,32))return r.toString();let t=0,e="";const n=function(){let t=r%1e3%1e3,e="";return e+=a.ones[Math.floor(t/100)]?a.ones[Math.floor(t/100)]+a.numSep+a.special.hundred:"",e=(t%=100)?(e+=e?a.numSep:"")+a.ones[t]:e}();if(!(r=Math.floor(r/1e3)))return n;for(;0=Math.pow(10,36))return t.toString();if(1===t&&n.Grammar.getInstance().getParameter("fraction"))return"un";let e=0,r="";for(;0=Math.pow(10,36))return t.toString();let r=0,n="";for(;0=Math.pow(10,36))return t.toString();let r=0,n="";for(;0=Math.pow(10,36))return t.toString();let r=0,n="";for(;0{t=this.parseCstr(t.toString().replace(o,""));this.addRule(new l.SpeechRule(r,t,e,n))})}else console.error("Action Error: No precondition for action "+r)}getFullPreconditions(t){var e=this.preconditions.get(t);return e||!this.inherits?e:this.inherits.getFullPreconditions(t)}definePrecondition(t,e,r,...n){const o=this.parsePrecondition(r,n),i=this.parseCstr(e);o&&i?(o.rank=this.rank++,this.preconditions.set(t,new s(i,o))):console.error(`Precondition Error: ${r}, (${e})`)}inheritRules(){if(this.inherits&&this.inherits.getSpeechRules().length){const r=new RegExp("^\\w+\\.\\w+\\."+(this.domain?"\\w+\\.":""));this.inherits.getSpeechRules().forEach(t=>{var e=this.parseCstr(t.dynamicCstr.toString().replace(r,""));this.addRule(new l.SpeechRule(t.name,e,t.precondition,t.action))})}}ignoreRules(e,...r){let n=this.findAllRules(t=>t.name===e);if(r.length){let t=[];for(const e of r){const r=this.parseCstr(e);for(const e of n)r.equal(e.dynamicCstr)?this.deleteRule(e):t.push(e);n=t,t=[]}}else n.forEach(this.deleteRule.bind(this))}parsePrecondition_(t){const e=this.context.customGenerators.lookup(t);return e?e():[t]}}e.BaseRuleStore=a;class s{constructor(t,e){this.base=t,this._conditions=[],this.constraints=[],this.allCstr={},this.constraints.push(t),this.addCondition(t,e)}get conditions(){return this._conditions}addConstraint(e){if(!this.constraints.filter(t=>t.equal(e)).length){this.constraints.push(e);const n=[];for(var[t,r]of this.conditions)this.base.equal(t)&&n.push([e,r]);this._conditions=this._conditions.concat(n)}}addBaseCondition(t){this.addCondition(this.base,t)}addFullCondition(e){this.constraints.forEach(t=>this.addCondition(t,e))}addCondition(t,e){var r=t.toString()+" "+e.toString();this.allCstr.condStr||(this.allCstr[r]=!0,this._conditions.push([t,e]))}}e.Condition=s},2469:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.BrailleStore=void 0;const n=r(7630),o=r(9935);class i extends o.MathStore{constructor(){super(...arguments),this.modality="braille",this.customTranscriptions={"⋊":"⠈⠡⠳"}}evaluateString(t){const e=[],r=Array.from(t);for(let t=0;te.push(this.getProperty(t).slice())),e}toString(){const e=[];return this.order.forEach(t=>e.push(t+": "+this.getProperty(t).toString())),e.join("\n")}}class s extends(e.DynamicProperties=a){constructor(t,e){const r={};for(const[e,n]of Object.entries(t))r[e]=[n];super(r,e),this.components=t}static createCstr(...n){const o=s.DEFAULT_ORDER,i={};for(let t=0,e=n.length,r=o.length;t{t=e.indexOf(t);return-1!==t&&e.splice(t,1)})}getComponents(){return this.components}getValue(t){return this.components[t]}getValues(){return this.order.map(t=>this.getValue(t))}allProperties(){const n=super.allProperties();for(let t,e,r=0;t=n[r],e=this.order[r];r++){const n=this.getValue(e);-1===t.indexOf(n)&&t.unshift(n)}return n}toString(){return this.getValues().join(".")}equal(r){const n=r.getAxes();if(this.order.length!==n.length)return!1;for(let t,e=0;t=n[e];e++){const n=this.getValue(t);if(!n||r.getValue(t)!==n)return!1}return!0}}(e.DynamicCstr=s).DEFAULT_ORDER=[r.LOCALE,r.MODALITY,r.DOMAIN,r.STYLE,r.TOPIC],s.BASE_LOCALE="base",s.DEFAULT_VALUE="default",s.DEFAULT_VALUES={[r.LOCALE]:"en",[r.DOMAIN]:s.DEFAULT_VALUE,[r.STYLE]:s.DEFAULT_VALUE,[r.TOPIC]:s.DEFAULT_VALUE,[r.MODALITY]:"speech"},e.DynamicCstrParser=class{constructor(t){this.order=t}parse(t){const r=t.split("."),n={};if(r.length>this.order.length)throw new Error("Invalid dynamic constraint: "+n);let o=0;for(let t,e=0;t=this.order[e],r.length;e++,o++){const o=r.shift();n[t]=o}return new s(n,this.order.slice(0,o))}},e.DefaultComparator=class{constructor(t,e=new a(t.getProperties(),t.getOrder())){this.reference=t,this.fallback=e,this.order=this.reference.getOrder()}getReference(){return this.reference}setReference(t,e){this.reference=t,this.fallback=e||new a(t.getProperties(),t.getOrder()),this.order=this.reference.getOrder()}match(r){const t=r.getAxes();return t.length===this.reference.getAxes().length&&t.every(t=>{var e=r.getValue(t);return e===this.reference.getValue(t)||-1!==this.fallback.getProperty(t).indexOf(e)})}compare(r,n){let o=!1;for(let t,e=0;t=this.order[e];e++){var i=r.getValue(t),a=n.getValue(t);if(!o){const r=this.reference.getValue(t);if(r===i&&r!==a)return-1;if(r===a&&r!==i)return 1;if(r===i&&r===a)continue;r!==i&&r!==a&&(o=!0)}const s=this.fallback.getProperty(t),l=s.indexOf(i),c=s.indexOf(a);if(l!p.equal(t.cstr))).push(r),this.rules.set(e,s),h.setReference(d)}lookupRule(t,e){let r=this.getRules(e.getValue(n.Axis.LOCALE));return 1===(r=r.filter(function(t){return o.testDynamicConstraints_(e,t)})).length?r[0]:r.length?r.sort((t,e)=>f.default.getInstance().comparator.compare(t.cstr,e.cstr))[0]:null}}e.MathSimpleStore=o},9935:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MathStore=void 0;const a=r(707),s=r(4356),n=r(7630),o=r(4504),l=r(4650);class i extends o.BaseRuleStore{constructor(){super(),this.annotators=[],this.parseMethods.Alias=this.defineAlias,this.parseMethods.SpecializedRule=this.defineSpecializedRule,this.parseMethods.Specialized=this.defineSpecialized}initialize(){this.initialized||(this.annotations(),this.initialized=!0)}annotations(){for(let t,e=0;t=this.annotators[e];e++)(0,n.activate)(this.domain,t)}defineAlias(t,e,...r){var n=this.parsePrecondition(e,r);if(n){const o=this.preconditions.get(t);o?o.addFullCondition(n):console.error("Alias Error: No precondition by the name of "+t)}else console.error(`Precondition Error: ${e} `+r)}defineRulesAlias(e,r,...n){const t=this.findAllRules(function(t){return t.name===e});if(0===t.length)throw new l.OutputError("Rule with name "+e+" does not exist.");const o=[];t.forEach(t=>{(t=>{var r=t.dynamicCstr.toString(),n=t.action.toString();for(let t,e=0;t=o[e];e++)if(t.action===n&&t.cstr===r)return!1;return o.push({cstr:r,action:n}),!0})(t)&&this.addAlias_(t,r,n)})}defineSpecializedRule(e,t,r,n){const o=this.parseCstr(t),i=this.findRule(t=>t.name===e&&o.equal(t.dynamicCstr)),a=this.parseCstr(r);if(!i&&n)throw new l.OutputError("Rule named "+e+" with style "+t+" does not exist.");r=n?l.Action.fromString(n):i.action,t=new l.SpeechRule(i.name,a,i.precondition,r);this.addRule(t)}defineSpecialized(t,e,r){var n=this.parseCstr(r);if(n){const o=this.preconditions.get(t);o?o.addConstraint(n):console.error("Alias Error: No precondition by the name of "+t)}else console.error("Dynamic Constraint Error: "+r)}evaluateString(r){const n=[];if(r.match(/^\s+$/))return n;let o=this.matchNumber_(r);if(o&&o.length===r.length)return n.push(this.evaluateCharacter(o.number)),n;var i=a.removeEmpty(r.replace(/\s/g," ").split(" "));for(let e,t=0;e=i[t];t++)if(1===e.length)n.push(this.evaluateCharacter(e));else if(e.match(new RegExp("^["+s.LOCALE.MESSAGES.regexp.TEXT+"]+$")))n.push(this.evaluateCharacter(e));else{let t=e;for(;t;){o=this.matchNumber_(t);const r=t.match(new RegExp("^["+s.LOCALE.MESSAGES.regexp.TEXT+"]+"));if(o)n.push(this.evaluateCharacter(o.number)),t=t.substring(o.length);else if(r)n.push(this.evaluateCharacter(r[0])),t=t.substring(r[0].length);else{const r=Array.from(t),o=r[0];n.push(this.evaluateCharacter(o)),t=r.slice(1).join("")}}}return n}parse(t){super.parse(t),this.annotators=t.annotators||[]}addAlias_(t,e,r){const n=this.parsePrecondition(e,r),o=new l.SpeechRule(t.name,t.dynamicCstr,n,t.action);o.name=t.name,this.addRule(o)}matchNumber_(t){const e=t.match(new RegExp("^"+s.LOCALE.MESSAGES.regexp.NUMBER)),r=t.match(new RegExp("^"+i.regexp.NUMBER));if(!e&&!r)return null;var n=r&&r[0]===t;return e&&e[0]===t||!n?e?{number:e[0],length:e[0].length}:null:{number:r[0].replace(new RegExp(i.regexp.DIGIT_GROUP,"g"),"X").replace(new RegExp(i.regexp.DECIMAL_MARK,"g"),s.LOCALE.MESSAGES.regexp.DECIMAL_MARK).replace(/X/g,s.LOCALE.MESSAGES.regexp.DIGIT_GROUP.replace(/\\/g,"")),length:r[0].length}}}(e.MathStore=i).regexp={NUMBER:"((\\d{1,3})(?=(,| ))((,| )\\d{3})*(\\.\\d+)?)|^\\d*\\.\\d+|^\\d+",DECIMAL_MARK:"\\.",DIGIT_GROUP:","}},4650:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.OutputError=e.Precondition=e.Action=e.Component=e.ActionType=e.SpeechRule=void 0;const n=r(5897),s=r(2105);var o;e.SpeechRule=class{constructor(t,e,r,n){this.name=t,this.dynamicCstr=e,this.precondition=r,this.action=n,this.context=null}toString(){return this.name+" | "+this.dynamicCstr.toString()+" | "+this.precondition.toString()+" ==> "+this.action.toString()}},(r=o=e.ActionType||(e.ActionType={})).NODE="NODE",r.MULTI="MULTI",r.TEXT="TEXT",r.PERSONALITY="PERSONALITY";class l{constructor({type:t,content:e,attributes:r,grammar:n}){this.type=t,this.content=e,this.attributes=r,this.grammar=n}static grammarFromString(t){return s.Grammar.parseInput(t)}static fromString(t){const e={type:function(t){switch(t){case"[n]":return o.NODE;case"[m]":return o.MULTI;case"[t]":return o.TEXT;case"[p]":return o.PERSONALITY;default:throw"Parse error: "+t}}(t.substring(0,3))};let r=t.slice(3).trim();if(!r)throw new c("Missing content.");switch(e.type){case o.TEXT:if('"'===r[0]){const t=u(r,"\\(")[0].trim();if('"'!==t.slice(-1))throw new c("Invalid string syntax.");e.content=t,-1===(r=r.slice(t.length).trim()).indexOf("(")&&(r="");break}case o.NODE:case o.MULTI:{const t=r.indexOf(" (");if(-1===t){e.content=r.trim(),r="";break}e.content=r.substring(0,t).trim(),r=r.slice(t).trim()}}if(r){const t=l.attributesFromString(r);t.grammar&&(e.grammar=t.grammar,delete t.grammar),Object.keys(t).length&&(e.attributes=t)}return new l(e)}static attributesFromString(r){if("("!==r[0]||")"!==r.slice(-1))throw new c("Invalid attribute expression: "+r);const n={},o=u(r.slice(1,-1),",");for(let t=0,e=o.length;tc.Debugger.getInstance().output(t,e.context.applyConstraint(r,t)))}static debugNamedSpeechRule(r,n){var o=g.getInstance().trie.collectRules().filter(t=>t.name==r);for(let t,e=0;t=o[e];e++)c.Debugger.getInstance().output("Rule",r,"DynamicCstr:",t.dynamicCstr.toString(),"number",e),g.debugSpeechRule(t,n)}evaluateNode(t){(0,h.updateEvaluator)(t);var e=(new Date).getTime();let r=[];try{r=this.evaluateNode_(t)}catch(t){console.error("Something went wrong computing speech."),c.Debugger.getInstance().output(t)}var n=(new Date).getTime();return c.Debugger.getInstance().output("Time:",n-e),r}toString(){return this.trie.collectRules().map(t=>t.toString()).join("\n")}runInSetting(t,e){const r=u.default.getInstance(),n={};for(const e in t)n[e]=r[e],r[e]=t[e];r.setDynamicCstr();e=e();for(const t in n)r[t]=n[t];return r.setDynamicCstr(),e}addStore(t){const e=v(t);"abstract"!==e.kind&&e.getSpeechRules().forEach(t=>this.trie.addRule(t)),this.addEvaluator(e)}processGrammar(t,e,r){const n={};for(const i in r){var o=r[i];n[i]="string"==typeof o?t.constructString(e,o):o}f.Grammar.getInstance().pushState(n)}addEvaluator(t){const e=t.evaluateDefault.bind(t),r=this.evaluators_[t.locale];if(r)r[t.modality]=e;else{const n={};n[t.modality]=e,this.evaluators_[t.locale]=n}}getEvaluator(t,e){t=this.evaluators_[t]||this.evaluators_[l.DynamicCstr.DEFAULT_VALUES[l.Axis.LOCALE]];return t[e]||t[l.DynamicCstr.DEFAULT_VALUES[l.Axis.MODALITY]]}enumerate(t){return this.trie.enumerate(t)}evaluateNode_(t){return t?(this.updateConstraint_(),this.evaluateTree_(t)):[]}evaluateTree_(o){const i=u.default.getInstance();let a;c.Debugger.getInstance().output(i.mode!==p.Mode.HTTP?o.toString():o),f.Grammar.getInstance().setAttribute(o);const s=this.lookupRule(o,i.dynamicCstr);if(!s)return i.strict?[]:(a=this.getEvaluator(i.locale,i.modality)(o),o.attributes&&this.addPersonality_(a,{},!1,o),a);c.Debugger.getInstance().generateOutput(()=>["Apply Rule:",s.name,s.dynamicCstr.toString(),(i.mode,p.Mode.HTTP,o.toString())]);const l=s.context,e=s.action.components;a=[];for(let n,t=0;n=e[t];t++){let t=[];const s=n.content||"",p=n.attributes||{};let e=!1,r=(n.grammar&&this.processGrammar(l,o,n.grammar),null);if(p.engine){r=u.default.getInstance().dynamicCstr.getComponents();const o=f.Grammar.parseInput(p.engine);u.default.getInstance().setDynamicCstr(o)}switch(n.type){case m.ActionType.NODE:{const i=l.applyQuery(o,s);i&&(t=this.evaluateTree_(i))}break;case m.ActionType.MULTI:{e=!0;const i=l.applySelector(o,s);0e.map(t=>t.name+"("+t.dynamicCstr.toString()+")")).bind(this)),e[0]}}e.SpeechRuleEngine=g;const b=new Map;function v(t){var e=`${t.locale}.${t.modality}.`+t.domain;if("actions"===t.kind){const r=b.get(e);return r.parse(t),r}i.init(),t&&!t.functions&&(t.functions=o.getStore(t.locale,t.modality,t.domain));const r=new("braille"===t.modality?a.BrailleStore:s.MathStore);return b.set(e,r),t.inherits&&(r.inherits=b.get(`${t.inherits}.${t.modality}.`+t.domain)),r.parse(t),r.initialize(),r}e.storeFactory=v,u.default.nodeEvaluator=g.getInstance().evaluateNode.bind(g.getInstance())},5662:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CustomGenerators=e.ContextFunctions=e.CustomStrings=e.CustomQueries=void 0;class r{constructor(t,e){this.prefix=t,this.store=e}add(t,e){this.checkCustomFunctionSyntax_(t)&&(this.store[t]=e)}addStore(r){var n=Object.keys(r.store);for(let t,e=0;t=n[e];e++)this.add(t,r.store[t])}lookup(t){return this.store[t]}checkCustomFunctionSyntax_(t){var e=new RegExp("^"+this.prefix);return!!t.match(e)||(console.error("FunctionError: Invalid function name. Expected prefix "+this.prefix),!1)}}e.CustomQueries=class extends r{constructor(){super("CQF",{})}},e.CustomStrings=class extends r{constructor(){super("CSF",{})}},e.ContextFunctions=class extends r{constructor(){super("CTF",{})}},e.CustomGenerators=class extends r{constructor(){super("CGF",{})}}},365:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.contentIterator=e.pauseSeparator=e.nodeCounter=void 0;const i=r(7052),a=r(5274),s=r(5897);e.nodeCounter=function(t,e){const r=t.length;let n=0,o=e?e:"";return function(){return n","≁","≂","≄","≆","≇","≉","≏","≐","≠","≢","≤","≥","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿","⊀","⊁","⋖","⋗","⋘","⋙","⋚","⋛","⋜","⋝","⋞","⋟","⋠","⋡","⋦","⋧","⋨","⋩","⩹","⩺","⩻","⩼","⩽","⩾","⩿","⪀","⪁","⪂","⪃","⪄","⪅","⪆","⪇","⪈","⪉","⪊","⪋","⪌","⪍","⪎","⪏","⪐","⪑","⪒","⪓","⪔","⪕","⪖","⪗","⪘","⪙","⪚","⪛","⪜","⪝","⪞","⪟","⪠","⪡","⪢","⪣","⪤","⪥","⪦","⪧","⪨","⪩","⪪","⪫","⪬","⪭","⪮","⪯","⪰","⪱","⪲","⪳","⪴","⪵","⪶","⪷","⪸","⪹","⪺","⪻","⪼","⫷","⫸","⫹","⫺","⧀","⧁","﹤","﹥","<",">"],type:"relation",role:"inequality"},{set:["⋢","⋣","⋤","⋥","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⪽","⪾","⪿","⫀","⫁","⫂","⫃","⫄","⫅","⫆","⫇","⫈","⫉","⫊","⫋","⫌","⫍","⫎","⫏","⫐","⫑","⫒","⫓","⫔","⫕","⫖","⫗","⫘","⋐","⋑","⋪","⋫","⋬","⋭","⊲","⊳","⊴","⊵"],type:"relation",role:"set"},{set:["⊢","⊣","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⫞","⫟","⫠","⫡","⫢","⫣","⫤","⫥","⫦","⫧","⫨","⫩","⫪","⫫","⫬","⫭"],type:"relation",role:"unknown"},{set:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿","⌁","⌃","⌄","⌤","⎋","➔","➘","➙","➚","➛","➜","➝","➞","➟","➠","➡","➢","➣","➤","➥","➦","➧","➨","➩","➪","➫","➬","➭","➮","➯","➱","➲","➳","➴","➵","➶","➷","➸","➹","➺","➻","➼","➽","➾","⟰","⟱","⟲","⟳","⟴","⟵","⟶","⟷","⟸","⟹","⟺","⟻","⟼","⟽","⟾","⟿","⤀","⤁","⤂","⤃","⤄","⤅","⤆","⤇","⤈","⤉","⤊","⤋","⤌","⤍","⤎","⤏","⤐","⤑","⤒","⤓","⤔","⤕","⤖","⤗","⤘","⤙","⤚","⤛","⤜","⤝","⤞","⤟","⤠","⤡","⤢","⤣","⤤","⤥","⤦","⤧","⤨","⤩","⤪","⤭","⤮","⤯","⤰","⤱","⤲","⤳","⤴","⤵","⤶","⤷","⤸","⤹","⤺","⤻","⤼","⤽","⤾","⤿","⥀","⥁","⥂","⥃","⥄","⥅","⥆","⥇","⥈","⥉","⥰","⥱","⥲","⥳","⥴","⥵","⥶","⥷","⥸","⥹","⥺","⥻","⦳","⦴","⦽","⧪","⧬","⧭","⨗","⬀","⬁","⬂","⬃","⬄","⬅","⬆","⬇","⬈","⬉","⬊","⬋","⬌","⬍","⬎","⬏","⬐","⬑","⬰","⬱","⬲","⬳","⬴","⬵","⬶","⬷","⬸","⬹","⬺","⬻","⬼","⬽","⬾","⬿","⭀","⭁","⭂","⭃","⭄","⭅","⭆","⭇","⭈","⭉","⭊","⭋","⭌","←","↑","→","↓","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇋","⇌","⥊","⥋","⥌","⥍","⥎","⥏","⥐","⥑","⥒","⥓","⥔","⥕","⥖","⥗","⥘","⥙","⥚","⥛","⥜","⥝","⥞","⥟","⥠","⥡","⥢","⥣","⥤","⥥","⥦","⥧","⥨","⥩","⥪","⥫","⥬","⥭","⥮","⥯","⥼","⥽","⥾","⥿"],type:"relation",role:"arrow"},{set:["∈","∊","⋲","⋳","⋴","⋵","⋶","⋷","⋸","⋹","⋿"],type:"operator",role:"element"},{set:["∉"],type:"operator",role:"nonelement"},{set:["∋","∍","⋺","⋻","⋼","⋽","⋾"],type:"operator",role:"reelement"},{set:["∌"],type:"operator",role:"renonelement"},{set:["⅀","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨃","⨄","⨅","⨆","⨇","⨈","⨉","⨊","⨋","⫼","⫿"],type:"largeop",role:"sum"},{set:["∫","∬","∭","∮","∯","∰","∱","∲","∳","⨌","⨍","⨎","⨏","⨐","⨑","⨒","⨓","⨔","⨕","⨖","⨗","⨘","⨙","⨚","⨛","⨜"],type:"largeop",role:"integral"},{set:["∟","∠","∡","∢","⊾","⊿","△","▷","▽","◁"],type:"operator",role:"geometry"},{set:["inf","lim","liminf","limsup","max","min","sup","injlim","projlim","inj lim","proj lim"],type:"function",role:"limit function"},{set:bt,type:"function",role:"prefix function"},{set:["mod","rem"],type:"operator",role:"prefix function"}],R=function(){const r={};for(let e,t=0;e=vt[t];t++)e.set.forEach(function(t){r[t]={role:e.role||"unknown",type:e.type||"unknown",font:e.font||"unknown"}});return r}(),_t=(t.equal=function(t,e){return t.type===e.type&&t.role===e.role&&t.font===e.font},t.lookupType=function(t){return(null==(t=R[t])?void 0:t.type)||"unknown"},t.lookupRole=function(t){return(null==(t=R[t])?void 0:t.role)||"unknown"},t.lookupMeaning=function(t){return R[t]||{role:"unknown",type:"unknown",font:"unknown"}},t.invisibleTimes=function(){return mt},t.invisiblePlus=function(){return dt},t.invisibleComma=function(){return e},t.functionApplication=function(){return yt},t.isMatchingFence=function(t,e){return-1!==s.indexOf(t)||-1!==l.indexOf(t)?t===e:o[t]===e||i[t]===e},t.isEmbellishedType=function(t){return"operator"===t||"relation"===t||"fence"===t||"punctuation"===t},new Map);function k(t,e,r=""){for(const n of e)_t.set(t+" "+n,r||t)}k("d",["d","ⅆ","d","𝐝","𝑑","𝒹","𝓭","𝔡","𝕕","𝖉","𝖽","𝗱","𝘥","𝚍"]),k("bar",r),k("tilde",n),t.lookupSecondary=function(t,e){return _t.get(t+" "+e)}},8158:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticMeaningCollator=e.SemanticNodeCollator=e.SemanticDefault=void 0;const n=r(3588),o=r(3882);class i{constructor(){this.map={}}static key(t,e){return e?t+":"+e:t}add(t,e){this.map[i.key(t,e.font)]=e}addNode(t){this.add(t.textContent,t.meaning())}retrieve(t,e){return this.map[i.key(t,e)]}retrieveNode(t){return this.retrieve(t.textContent,t.font)}size(){return Object.keys(this.map).length}}e.SemanticDefault=i;class a{constructor(){this.map={}}add(t,e){const r=this.map[t];r?r.push(e):this.map[t]=[e]}retrieve(t,e){return this.map[i.key(t,e)]}retrieveNode(t){return this.retrieve(t.textContent,t.font)}copy(){const t=this.copyCollator();for(const e in this.map)t.map[e]=this.map[e];return t}minimize(){for(const t in this.map)1===this.map[t].length&&delete this.map[t]}minimalCollator(){const t=this.copy();for(const e in t.map)1===t.map[e].length&&delete t.map[e];return t}isMultiValued(){for(const t in this.map)if(1!1){this.name=t,this.apply=e,this.applicable=r}}e.SemanticAbstractHeuristic=r,e.SemanticTreeHeuristic=class extends r{},e.SemanticMultiHeuristic=class extends r{}},7516:function(t,o){Object.defineProperty(o,"__esModule",{value:!0}),o.lookup=o.run=o.add=o.blacklist=o.flags=o.updateFactory=o.factory=void 0,o.factory=null,o.updateFactory=function(t){o.factory=t};const r=new Map;function i(t){return r.get(t)}o.flags={combine_juxtaposition:!0,convert_juxtaposition:!0,multioperator:!0},o.blacklist={},o.add=function(t){var e=t.name;r.set(e,t),o.flags[e]||(o.flags[e]=!1)},o.run=function(t,e,r){const n=i(t);return n&&!o.blacklist[t]&&(o.flags[t]||n.applicable(e))?n.apply(e):r?r(e):e},o.lookup=i},94:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const c=r(2057),n=r(5897),i=r(3588),u=r(7516),o=r(9911),p=r(5609),l=r(3308),a=r(4795);function s(t,e,r){let n=null;if(!t.length)return n;const o=r[r.length-1],i=o&&o.length,a=e&&e.length,s=l.default.getInstance();if(i&&a){if("infixop"===e[0].type&&"implicit"===e[0].role)return n=t.pop(),o.push(s.postfixNode_(o.pop(),t)),n;n=t.shift();const r=s.prefixNode_(e.shift(),t);return e.unshift(r),n}return i?o.push(s.postfixNode_(o.pop(),t)):a&&e.unshift(s.prefixNode_(e.shift(),t)),n}u.add(new o.SemanticTreeHeuristic("combine_juxtaposition",function(r){for(let t,e=r.childNodes.length-1;t=r.childNodes[e];e--)p.isImplicitOp(t)&&!t.nobreaking&&(r.childNodes.splice(e,1,...t.childNodes),r.contentNodes.splice(e,0,...t.contentNodes),t.childNodes.concat(t.contentNodes).forEach(function(t){t.parent=r}),r.addMathmlNodes(t.mathml));return r})),u.add(new o.SemanticTreeHeuristic("propagateSimpleFunction",t=>("infixop"!==t.type&&"fraction"!==t.type||!t.childNodes.every(p.isSimpleFunction)||(t.role="composed function"),t),t=>"clearspeak"===n.default.getInstance().domain)),u.add(new o.SemanticTreeHeuristic("simpleNamedFunction",t=>("unit"!==t.role&&-1!==["f","g","h","F","G","H"].indexOf(t.textContent)&&(t.role="simple function"),t),t=>"clearspeak"===n.default.getInstance().domain)),u.add(new o.SemanticTreeHeuristic("propagateComposedFunction",t=>("fenced"===t.type&&"composed function"===t.childNodes[0].role&&(t.role="composed function"),t),t=>"clearspeak"===n.default.getInstance().domain)),u.add(new o.SemanticTreeHeuristic("multioperator",t=>{var e;"unknown"!==t.role||t.textContent.length<=1||(e=[...t.textContent].map(i.lookupMeaning).reduce(function(t,e){return t&&e.role&&"unknown"!==e.role&&e.role!==t?"unknown"===t?e.role:null:t},"unknown"))&&(t.role=e)})),u.add(new o.SemanticMultiHeuristic("convert_juxtaposition",n=>{let o=a.partitionNodes(n,function(t){return t.textContent===i.invisibleTimes()&&"operator"===t.type});n=(o=o.rel.length?function(t){const e=[],r=[];let n=t.comp.shift(),o=null,i=[];for(;t.comp.length;)if(i=[],n.length)o&&e.push(o),r.push(n),o=t.rel.shift(),n=t.comp.shift();else{for(o&&i.push(o);!n.length&&t.comp.length;)n=t.comp.shift(),i.push(t.rel.shift());o=s(i,n,r)}return i.length||n.length?(e.push(o),r.push(n)):(i.push(o),s(i,n,r)),{rel:e,comp:r}}(o):o).comp[0];for(let t,e,r=1;t=o.comp[r],e=o.rel[r-1];r++)n.push(e),n=n.concat(t);return(o=a.partitionNodes(n,function(t){return t.textContent===i.invisibleTimes()&&("operator"===t.type||"infixop"===t.type)})).rel.length?function t(e,r,n){if(!r.length)return e;const o=e.pop(),i=r.shift(),a=n.shift();if(p.isImplicitOp(i)){c.Debugger.getInstance().output("Juxta Heuristic Case 2");const u=(o?[o,i]:[i]).concat(a);return t(e.concat(u),r,n)}if(!o)return c.Debugger.getInstance().output("Juxta Heuristic Case 3"),t([i].concat(a),r,n);const s=a.shift();if(!s){c.Debugger.getInstance().output("Juxta Heuristic Case 9");const a=u.factory.makeBranchNode("infixop",[o,r.shift()],[i],i.textContent);return a.role="implicit",u.run("combine_juxtaposition",a),r.unshift(a),t(e,r,n)}if(p.isOperator(o)||p.isOperator(s))return c.Debugger.getInstance().output("Juxta Heuristic Case 4"),t(e.concat([o,i,s]).concat(a),r,n);let l=null;return p.isImplicitOp(o)&&p.isImplicitOp(s)?(c.Debugger.getInstance().output("Juxta Heuristic Case 5"),o.contentNodes.push(i),o.contentNodes=o.contentNodes.concat(s.contentNodes),o.childNodes.push(s),o.childNodes=o.childNodes.concat(s.childNodes),s.childNodes.forEach(t=>t.parent=o),(i.parent=o).addMathmlNodes(i.mathml),o.addMathmlNodes(s.mathml),l=o):p.isImplicitOp(o)?(c.Debugger.getInstance().output("Juxta Heuristic Case 6"),o.contentNodes.push(i),o.childNodes.push(s),s.parent=o,(i.parent=o).addMathmlNodes(i.mathml),o.addMathmlNodes(s.mathml),l=o):p.isImplicitOp(s)?(c.Debugger.getInstance().output("Juxta Heuristic Case 7"),s.contentNodes.unshift(i),s.childNodes.unshift(o),o.parent=s,(i.parent=s).addMathmlNodes(i.mathml),s.addMathmlNodes(o.mathml),l=s):(c.Debugger.getInstance().output("Juxta Heuristic Case 8"),(l=u.factory.makeBranchNode("infixop",[o,s],[i],i.textContent)).role="implicit"),e.push(l),t(e.concat(a),r,n)}(o.comp.shift(),o.rel,o.comp):n})),u.add(new o.SemanticTreeHeuristic("simple2prefix",t=>(1"braille"===n.default.getInstance().modality&&"identifier"===t.type)),u.add(new o.SemanticTreeHeuristic("detect_cycle",t=>{t.type="matrix",t.role="cycle";const e=t.childNodes[0];return e.type="row",e.role="cycle",e.textContent="",e.contentNodes=[],t},t=>"fenced"===t.type&&"infixop"===t.childNodes[0].type&&"implicit"===t.childNodes[0].role&&t.childNodes[0].childNodes.every(function(t){return"number"===t.type})&&t.childNodes[0].contentNodes.every(function(t){return"space"===t.role})))},7228:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticMathml=void 0;const c=r(5740),n=r(5250),o=r(5609),u=r(3308),p=r(4795);class i extends n.SemanticAbstractParser{constructor(){super("MathML"),this.parseMap_={SEMANTICS:this.semantics_.bind(this),MATH:this.rows_.bind(this),MROW:this.rows_.bind(this),MPADDED:this.rows_.bind(this),MSTYLE:this.rows_.bind(this),MFRAC:this.fraction_.bind(this),MSUB:this.limits_.bind(this),MSUP:this.limits_.bind(this),MSUBSUP:this.limits_.bind(this),MOVER:this.limits_.bind(this),MUNDER:this.limits_.bind(this),MUNDEROVER:this.limits_.bind(this),MROOT:this.root_.bind(this),MSQRT:this.sqrt_.bind(this),MTABLE:this.table_.bind(this),MLABELEDTR:this.tableLabeledRow_.bind(this),MTR:this.tableRow_.bind(this),MTD:this.tableCell_.bind(this),MS:this.text_.bind(this),MTEXT:this.text_.bind(this),MSPACE:this.space_.bind(this),"ANNOTATION-XML":this.text_.bind(this),MI:this.identifier_.bind(this),MN:this.number_.bind(this),MO:this.operator_.bind(this),MFENCED:this.fenced_.bind(this),MENCLOSE:this.enclosed_.bind(this),MMULTISCRIPTS:this.multiscripts_.bind(this),ANNOTATION:this.empty_.bind(this),NONE:this.empty_.bind(this),MACTION:this.action_.bind(this)};const e={type:"identifier",role:"numbersetletter",font:"double-struck"};["C","H","N","P","Q","R","Z","ℂ","ℍ","ℕ","ℙ","ℚ","ℝ","ℤ"].forEach((t=>this.getFactory().defaultMap.add(t,e)).bind(this))}static getAttribute_(t,e,r){if(!t.hasAttribute(e))return r;const n=t.getAttribute(e);return n.match(/^\s*$/)?null:n}parse(t){u.default.getInstance().setNodeFactory(this.getFactory());const e=c.toArray(t.childNodes),r=c.tagName(t),n=this.parseMap_[r],o=(n||this.dummy_.bind(this))(t,e);return p.addAttributes(o,t),-1===["MATH","MROW","MPADDED","MSTYLE","SEMANTICS"].indexOf(r)&&(o.mathml.unshift(t),o.mathmlTree=t),o}semantics_(t,e){return e.length?this.parse(e[0]):this.getFactory().makeEmptyNode()}rows_(t,e){const r=t.getAttribute("semantics");if(r&&r.match("bspr_"))return u.default.proof(t,r,this.parseList.bind(this));let n;return 1===(e=p.purgeNodes(e)).length?"empty"!==(n=this.parse(e[0])).type||n.mathmlTree||(n.mathmlTree=t):n=u.default.getInstance().row(this.parseList(e)),n.mathml.unshift(t),n}fraction_(t,e){if(!e.length)return this.getFactory().makeEmptyNode();var r=this.parse(e[0]),e=e[1]?this.parse(e[1]):this.getFactory().makeEmptyNode();return u.default.getInstance().fractionLikeNode(r,e,t.getAttribute("linethickness"),"true"===t.getAttribute("bevelled"))}limits_(t,e){return u.default.getInstance().limitNode(c.tagName(t),this.parseList(e))}root_(t,e){return e[1]?this.getFactory().makeBranchNode("root",[this.parse(e[1]),this.parse(e[0])],[]):this.sqrt_(t,e)}sqrt_(t,e){e=this.parseList(p.purgeNodes(e));return this.getFactory().makeBranchNode("sqrt",[u.default.getInstance().row(e)],[])}table_(t,e){const r=t.getAttribute("semantics");if(r&&r.match("bspr_"))return u.default.proof(t,r,this.parseList.bind(this));const n=this.getFactory().makeBranchNode("table",this.parseList(e),[]);return n.mathmlTree=t,u.default.tableToMultiline(n),n}tableRow_(t,e){const r=this.getFactory().makeBranchNode("row",this.parseList(e),[]);return r.role="table",r}tableLabeledRow_(t,e){if(!e.length)return this.tableRow_(t,e);const r=this.parse(e[0]),n=(r.role="label",this.getFactory().makeBranchNode("row",this.parseList(e.slice(1)),[r]));return n.role="table",n}tableCell_(t,e){e=this.parseList(p.purgeNodes(e)),e=e.length?1===e.length&&o.isType(e[0],"empty")?e:[u.default.getInstance().row(e)]:[];const r=this.getFactory().makeBranchNode("cell",e,[]);return r.role="table",r}space_(t,e){const r=t.getAttribute("width"),n=r&&r.match(/[a-z]*$/);if(!n)return this.empty_(t,e);var o=n[0],i=parseFloat(r.slice(0,n.index)),o={cm:.4,pc:.5,em:.5,ex:1,in:.15,pt:5,mm:5}[o];if(!o||isNaN(i)||it.parent=e),"CONTENT"===n.tagName(r)?e.contentNodes=t:e.childNodes=t}}querySelectorAll(r){let n=[];for(let t,e=0;t=this.childNodes[e];e++)n=n.concat(t.querySelectorAll(r));for(let t,e=0;t=this.contentNodes[e];e++)n=n.concat(t.querySelectorAll(r));return r(this)&&n.unshift(this),n}xml(o,i){function t(t,e){const r=e.map(function(t){return t.xml(o,i)}),n=o.createElementNS("",t);for(let t,e=0;t=r[e];e++)n.appendChild(t);return n}const e=o.createElementNS("",this.type);return i||this.xmlAttributes(e),e.textContent=this.textContent,0");return n.serializeXml(this.xml(e,t))}allAttributes(){const t=[];return t.push(["role",this.role]),"unknown"!==this.font&&t.push(["font",this.font]),Object.keys(this.annotation).length&&t.push(["annotation",this.xmlAnnotation()]),this.embellished&&t.push(["embellished",this.embellished]),this.fencePointer&&t.push(["fencepointer",this.fencePointer]),t.push(["id",this.id.toString()]),t}xmlAnnotation(){const e=[];for(const r in this.annotation)this.annotation[r].forEach(function(t){e.push(r+":"+t)});return e.join(";")}toJson(){const r={};r.type=this.type;var n=this.allAttributes();for(let t,e=0;t=n[e];e++)r[t[0]]=t[1].toString();return this.textContent&&(r.$t=this.textContent),this.childNodes.length&&(r.children=this.childNodes.map(function(t){return t.toJson()})),this.contentNodes.length&&(r.content=this.contentNodes.map(function(t){return t.toJson()})),r}updateContent(t,e){var e=e?t.replace(/^[ \f\n\r\t\v\u200b]*/,"").replace(/[ \f\n\r\t\v\u200b]*$/,""):t.trim();this.textContent!==(t=t&&!e?t:e)&&(e=(0,o.lookupMeaning)(t),this.textContent=t,this.role=e.role,this.type=e.type,this.font=e.font)}addMathmlNodes(r){for(let t,e=0;t=r[e];e++)-1===this.mathml.indexOf(t)&&this.mathml.push(t)}appendChild(t){this.childNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this}replaceChild(e,r){var t,n=this.childNodes.indexOf(e);-1!==n&&(e.parent=null,(r.parent=this).childNodes[n]=r,n=e.mathml.filter(function(t){return-1===r.mathml.indexOf(t)}),t=r.mathml.filter(function(t){return-1===e.mathml.indexOf(t)}),this.removeMathmlNodes(n),this.addMathmlNodes(t))}appendContentNode(t){t&&(this.contentNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this)}removeContentNode(t){t&&-1!==(t=this.contentNodes.indexOf(t))&&this.contentNodes.slice(t,1)}equals(n){if(!n)return!1;if(this.type!==n.type||this.role!==n.role||this.textContent!==n.textContent||this.childNodes.length!==n.childNodes.length||this.contentNodes.length!==n.contentNodes.length)return!1;for(let t,e,r=0;t=this.childNodes[r],e=n.childNodes[r];r++)if(!t.equals(e))return!1;for(let t,e,r=0;t=this.contentNodes[r],e=n.contentNodes[r];r++)if(!t.equals(e))return!1;return!0}displayTree(){console.info(this.displayTree_(0))}addAnnotation(t,e){e&&this.addAnnotation_(t,e)}getAnnotation(t){return this.annotation[t]||[]}hasAnnotation(t,e){const r=this.annotation[t];return!!r&&-1!==r.indexOf(e)}parseAnnotation(t){const r=t.split(";");for(let t=0,e=r.length;ti(t,"infixop")))return!1}return!0},n.isPrefixFunctionBoundary=function(t){return c(t)&&!s(t,"division")||i(t,"appl")||l(t)},n.isBigOpBoundary=function(t){return c(t)||l(t)},n.isIntegralDxBoundary=function(t,e){return!!e&&i(e,"identifier")&&r.lookupSecondary("d",t.textContent)},n.isIntegralDxBoundarySingle=function(t){var e;return!!i(t,"identifier")&&((e=t.textContent[0])&&t.textContent[1]&&r.lookupSecondary("d",e))},n.isGeneralFunctionBoundary=l,n.isEmbellished=function(t){return t.embellished||(r.isEmbellishedType(t.type)?t.type:null)},n.isOperator=c,n.isRelation=u,n.isPunctuation=p,n.isFence=h,n.isElligibleEmbellishedFence=function(t){return!(!t||!h(t))&&(!t.embellished||function t(e){return!e.embellished||!(i(e,"tensor")&&(!i(e.childNodes[1],"empty")||!i(e.childNodes[2],"empty"))&&(!i(e.childNodes[3],"empty")||!i(e.childNodes[4],"empty")))&&(!s(e,"close")||!i(e,"tensor"))&&(!s(e,"open")||!i(e,"subscript")&&!i(e,"superscript"))&&t(e.childNodes[0])}(t))},n.isTableOrMultiline=d,n.tableIsMatrixOrVector=function(t){return!!t&&f(t)&&d(t.childNodes[0])},n.isFencedElement=f,n.tableIsCases=function(t,e){return 0=r)){const o=n.childNodes[0].role;"unknown"!==o&&t.childNodes.every(function(t){t=t.childNodes[0];return!t||t.role===o&&(c.isType(t,"relation")||c.isType(t,"relseq"))})&&(t.role=o)}}static classifyTable(t){var e=y.computeColumns_(t);y.classifyByColumns_(t,e,"equality")||y.classifyByColumns_(t,e,"inequality",["equality"])||y.classifyByColumns_(t,e,"arrow")||y.detectCaleyTable(t)}static detectCaleyTable(t){if(!t.mathmlTree)return!1;const e=t.mathmlTree,r=e.getAttribute("columnlines"),n=e.getAttribute("rowlines");return!(!r||!n||!y.cayleySpacing(r)||!y.cayleySpacing(n)||(t.role="cayley",0))}static cayleySpacing(t){const e=t.split(" ");return("solid"===e[0]||"dashed"===e[0])&&e.slice(1).every(t=>"none"===t)}static proof(t,e,r){e=y.separateSemantics(e);return y.getInstance().proof(t,e,r)}static findSemantics(t,e,r){r=null==r?null:r,t=y.getSemantics(t);return!(!t||!t[e]||null!=r&&t[e]!==r)}static getSemantics(t){t=t.getAttribute("semantics");return t?y.separateSemantics(t):null}static removePrefix(t){const[,...e]=t.split("_");return e.join("_")}static separateSemantics(t){const r={};return t.split(";").forEach(function(t){var[t,e]=t.split(":");r[y.removePrefix(t)]=e}),r}static matchSpaces_(r,n){for(let t,e=0;t=n[e];e++){const n=r[e].mathmlTree,i=r[e+1].mathmlTree;var o;n&&i&&((o=n.nextSibling)&&o!==i&&(o=y.getSpacer_(o))&&(t.mathml.push(o),t.mathmlTree=o,t.role="space"))}}static getSpacer_(t){if("MSPACE"===m.tagName(t))return t;for(;u.hasEmptyTag(t)&&1===t.childNodes.length;)if(t=t.childNodes[0],"MSPACE"===m.tagName(t))return t;return null}static fenceToPunct_(t){var e=y.FENCE_TO_PUNCT_[t.role];if(e){for(;t.embellished;)t.embellished="punctuation",c.isRole(t,"subsup")||c.isRole(t,"underover")||(t.role=e),t=t.childNodes[0];t.type="punctuation",t.role=e}}static classifyFunction_(e,r){if("appl"===e.type||"bigop"===e.type||"integral"===e.type)return"";if(r[0]&&r[0].textContent===s.functionApplication()){y.getInstance().funcAppls[e.id]=r.shift();let t="simple function";return o.run("simple2prefix",e),"prefix function"!==e.role&&"limit function"!==e.role||(t=e.role),y.propagateFunctionRole_(e,t),"prefix"}return y.CLASSIFY_FUNCTION_[e.role]||(c.isSimpleFunctionHead(e)?"simple":"")}static propagateFunctionRole_(t,e){t&&"infixop"!==t.type&&(c.isRole(t,"subsup")||c.isRole(t,"underover")||(t.role=e),y.propagateFunctionRole_(t.childNodes[0],e))}static getFunctionOp_(r,n){if(n(r))return r;for(let t,e=0;t=r.childNodes[e];e++){const r=y.getFunctionOp_(t,n);if(r)return r}return null}static tableToMatrixOrVector_(t){const r=t.childNodes[0];c.isType(r,"multiline")?y.tableToVector_(t):y.tableToMatrix_(t),t.contentNodes.forEach(r.appendContentNode.bind(r));for(let t,e=0;t=r.childNodes[e];e++)y.assignRoleToRow_(t,y.getComponentRoles_(r));return r.parent=null,r}static tableToVector_(t){const e=t.childNodes[0];e.type="vector",1!==e.childNodes.length?y.binomialForm_(e):y.tableToSquare_(t)}static binomialForm_(t){c.isBinomial(t)&&(t.role="binomial",t.childNodes[0].role="binomial",t.childNodes[1].role="binomial")}static tableToMatrix_(t){const e=t.childNodes[0];e.type="matrix",e.childNodes&&0t.match(/[^\s]/)),r=e.map(s.lookupMeaning);if(r.every(function(t){return"number"===t.type&&"integer"===t.role||"punctuation"===t.type&&"comma"===t.role}))return t.role="integer",void("0"===e[0]&&t.addAnnotation("general","basenumber"));r.every(function(t){return"number"===t.type&&"integer"===t.role||"punctuation"===t.type})?t.role="float":t.role="othernumber"}}static exprFont_(t){var e;"unknown"===t.font&&(e=[...t.textContent].map(s.lookupMeaning).reduce(function(t,e){return t&&e.font&&"unknown"!==e.font&&e.font!==t?"unknown"===t?e.font:null:t},"unknown"))&&(t.font=e)}static purgeFences_(e){const r=e.rel,n=e.comp,o=[],i=[];for(;0y.isPureRelation_(t,r))||2===e.length&&(y.testColumns_(e,1,t=>y.isEndRelation_(t,r)||y.isPureRelation_(t,r))||y.testColumns_(e,0,t=>y.isEndRelation_(t,r,!0)||y.isPureRelation_(t,r))))&&(t.role=r,!0)}static isEndRelation_(t,e,r){r=r?t.childNodes.length-1:0;return c.isType(t,"relseq")&&c.isRole(t,e)&&c.isType(t.childNodes[r],"empty")}static isPureRelation_(t,e){return c.isType(t,"relation")&&c.isRole(t,e)}static computeColumns_(e){const n=[];for(let r,t=0;r=e.childNodes[t];t++)for(let t,e=0;t=r.childNodes[e];e++)n[e]?n[e].push(t):n[e]=[t];return n}static testColumns_(t,e,r){const n=t[e];return!!n&&n.some(function(t){return t.childNodes.length&&r(t.childNodes[0])})&&n.every(function(t){return!t.childNodes.length||r(t.childNodes[0])})}setNodeFactory(t){y.getInstance().factory_=t,o.updateFactory(y.getInstance().factory_)}getNodeFactory(){return y.getInstance().factory_}identifierNode(t,e,r){if("MathML-Unit"===r)t.type="identifier",t.role="unit";else if(!e&&1===t.textContent.length&&("integer"===t.role||"latinletter"===t.role||"greekletter"===t.role)&&"normal"===t.font)return t.font="italic",o.run("simpleNamedFunction",t);return"unknown"===t.type&&(t.type="identifier"),y.exprFont_(t),o.run("simpleNamedFunction",t)}implicitNode(t){if(t=y.getInstance().getMixedNumbers_(t),1===(t=y.getInstance().combineUnits_(t)).length)return t[0];t=y.getInstance().implicitNode_(t);return o.run("combine_juxtaposition",t)}text(t,e){return y.exprFont_(t),t.type="text","MS"===e?t.role="string":"MSPACE"!==e&&!t.textContent.match(/^\s*$/)||(t.role="space"),t}row(t){return 0===(t=t.filter(function(t){return!c.isType(t,"empty")})).length?y.getInstance().factory_.makeEmptyNode():(t=y.getInstance().getFencesInRow_(t),t=y.getInstance().tablesInRow(t),t=y.getInstance().getPunctuationInRow_(t),t=y.getInstance().getTextInRow_(t),t=y.getInstance().getFunctionsInRow_(t),y.getInstance().relationsInRow_(t))}limitNode(t,e){if(!e.length)return y.getInstance().factory_.makeEmptyNode();let r,n=e[0],o="unknown";if(!e[1])return n;if(c.isLimitBase(n)){var i=(r=y.MML_TO_LIMIT_[t]).length;if(o=r.type,e=e.slice(0,r.length+1),1===i&&c.isAccent(e[1])||2===i&&c.isAccent(e[1])&&c.isAccent(e[2]))return r=y.MML_TO_BOUNDS_[t],y.getInstance().accentNode_(n,e,r.type,r.length,r.accent);if(2===i){if(c.isAccent(e[1]))return n=y.getInstance().accentNode_(n,[n,e[1]],{MSUBSUP:"subscript",MUNDEROVER:"underscore"}[t],1,!0),e[2]?y.getInstance().makeLimitNode_(n,[n,e[2]],null,"limupper"):n;if(e[2]&&c.isAccent(e[2]))return n=y.getInstance().accentNode_(n,[n,e[2]],{MSUBSUP:"superscript",MUNDEROVER:"overscore"}[t],1,!0),y.getInstance().makeLimitNode_(n,[n,e[1]],null,"limlower");e[i]||(o="limlower")}return y.getInstance().makeLimitNode_(n,e,null,o)}return r=y.MML_TO_BOUNDS_[t],y.getInstance().accentNode_(n,e,r.type,r.length,r.accent)}tablesInRow(t){let r=u.partitionNodes(t,c.tableIsMatrixOrVector),n=[];for(let t,e=0;t=r.rel[e];e++)(n=n.concat(r.comp.shift())).push(y.tableToMatrixOrVector_(t));n=n.concat(r.comp.shift()),r=u.partitionNodes(n,c.isTableOrMultiline),n=[];for(let t,e=0;t=r.rel[e];e++){const o=r.comp.shift();c.tableIsCases(t,o)&&y.tableToCases_(t,o.pop()),(n=n.concat(o)).push(t)}return n.concat(r.comp.shift())}mfenced(e,r,t,n){if(t&&0{r.push(y.getInstance().factory_.makeContentNode(e())),r.push(t)}),n=r}return e&&r?y.getInstance().horizontalFencedNode_(y.getInstance().factory_.makeContentNode(e),y.getInstance().factory_.makeContentNode(r),n):(e&&n.unshift(y.getInstance().factory_.makeContentNode(e)),r&&n.push(y.getInstance().factory_.makeContentNode(r)),y.getInstance().row(n))}fractionLikeNode(t,e,r,n){let o;if(n||!u.isZeroLength(r))return o=y.getInstance().fractionNode_(t,e),n&&o.addAnnotation("general","bevelled"),o;{const r=y.getInstance().factory_.makeBranchNode("line",[t],[]),n=y.getInstance().factory_.makeBranchNode("line",[e],[]);return o=y.getInstance().factory_.makeBranchNode("multiline",[r,n],[]),y.binomialForm_(o),y.classifyMultiline(o),o}}tensor(t,e,r,n,o){const i=y.getInstance().factory_.makeBranchNode("tensor",[t,y.getInstance().scriptNode_(e,"leftsub"),y.getInstance().scriptNode_(r,"leftsuper"),y.getInstance().scriptNode_(n,"rightsub"),y.getInstance().scriptNode_(o,"rightsuper")],[]);return i.role=t.role,i.embellished=c.isEmbellished(t),i}pseudoTensor(t,e,r){var n=t=>!c.isType(t,"empty"),o=e.filter(n).length,n=r.filter(n).length;if(!o&&!n)return t;const i=o?n?"MSUBSUP":"MSUB":"MSUP",a=[t];return o&&a.push(y.getInstance().scriptNode_(e,"rightsub",!0)),n&&a.push(y.getInstance().scriptNode_(r,"rightsuper",!0)),y.getInstance().limitNode(i,a)}font(t){return y.MATHJAX_FONTS[t]||t}proof(t,e,r){if(e.inference||e.axiom||console.log("Noise"),e.axiom){const e=y.getInstance().cleanInference(t.childNodes),n=e.length?y.getInstance().factory_.makeBranchNode("inference",r(e),[]):y.getInstance().factory_.makeEmptyNode();return n.role="axiom",n.mathmlTree=t,n}const n=y.getInstance().inference(t,e,r);return e.proof&&(n.role="proof",n.childNodes[0].role="final"),n}inference(t,e,r){if(e.inferenceRule){const e=y.getInstance().getFormulas(t,[],r);return y.getInstance().factory_.makeBranchNode("inference",[e.conclusion,e.premises],[])}const n=e.labelledRule,o=m.toArray(t.childNodes),i=[],a=("left"!==n&&"both"!==n||i.push(y.getInstance().getLabel(t,o,r,"left")),"right"!==n&&"both"!==n||i.push(y.getInstance().getLabel(t,o,r,"right")),y.getInstance().getFormulas(t,o,r)),s=y.getInstance().factory_.makeBranchNode("inference",[a.conclusion,a.premises],i);return s.mathmlTree=t,s}getLabel(t,e,r,n){const o=y.getInstance().findNestedRow(e,"prooflabel",n),i=y.getInstance().factory_.makeBranchNode("rulelabel",r(m.toArray(o.childNodes)),[]);return i.role=n,i.mathmlTree=o,i}getFormulas(t,e,r){const n=e.length?y.getInstance().findNestedRow(e,"inferenceRule"):t,o="up"===y.getSemantics(n).inferenceRule,i=o?n.childNodes[1]:n.childNodes[0],a=o?n.childNodes[0]:n.childNodes[1],s=i.childNodes[0].childNodes[0],l=m.toArray(s.childNodes[0].childNodes),c=[];let u=1;for(const t of l)u%2&&c.push(t.childNodes[0]),u++;const p=r(c),h=r(m.toArray(a.childNodes[0].childNodes))[0],d=y.getInstance().factory_.makeBranchNode("premises",p,[]),f=(d.mathmlTree=s,y.getInstance().factory_.makeBranchNode("conclusion",[h],[]));return f.mathmlTree=a.childNodes[0].childNodes[0],{conclusion:f,premises:d}}findNestedRow(t,e,r){return y.getInstance().findNestedRow_(t,e,0,r)}cleanInference(t){return m.toArray(t).filter(function(t){return"MSPACE"!==m.tagName(t)})}operatorNode(t){return"unknown"===t.type&&(t.type="operator"),o.run("multioperator",t)}implicitNode_(t){const e=y.getInstance().factory_.makeMultipleContentNodes(t.length-1,s.invisibleTimes()),r=(y.matchSpaces_(t,e),y.getInstance().infixNode_(t,e[0]));return r.role="implicit",e.forEach(function(t){t.parent=r}),r.contentNodes=e,r}infixNode_(t,e){const r=y.getInstance().factory_.makeBranchNode("infixop",t,[e],u.getEmbellishedInner(e).textContent);return r.role=e.role,o.run("propagateSimpleFunction",r)}explicitMixed_(r){var n=u.partitionNodes(r,function(t){return t.textContent===s.invisiblePlus()});if(!n.rel.length)return r;let o=[];for(let t,e=0;t=n.rel[e];e++){const s=n.comp[e],i=n.comp[e+1],a=s.length-1;if(s[a]&&i[0]&&c.isType(s[a],"number")&&!c.isRole(s[a],"mixed")&&c.isType(i[0],"fraction")){const r=y.getInstance().factory_.makeBranchNode("number",[s[a],i[0]],[]);r.role="mixed",(o=o.concat(s.slice(0,a))).push(r),i.shift()}else(o=o.concat(s)).push(t)}return o.concat(n.comp[n.comp.length-1])}concatNode_(t,e,r){if(0===e.length)return t;const n=e.map(function(t){return u.getEmbellishedInner(t).textContent}).join(" "),o=y.getInstance().factory_.makeBranchNode(r,[t],e,n);return 1c.isRole(t,"subtraction"));let n=y.getInstance().concatNode_(t,r.comp.pop(),"prefixop");for(1===n.contentNodes.length&&"addition"===n.contentNodes[0].role&&"+"===n.contentNodes[0].textContent&&(n.role="positive");0c.isType(t,"text"));if(0===r.rel.length)return t;const n=[];let o=r.comp[0];0c.isRole(t,"open");if(0===t.length){const t=n.shift();for(;0{t=t.type;return"punctuation"===t||"text"===t||"operator"===t||"relation"===t},t=u.partitionNodes(r,function(t){if(!c.isPunctuation(t))return!1;if(c.isPunctuation(t)&&!c.isRole(t,"ellipsis"))return!0;t=r.indexOf(t);if(0===t)return!r[1]||!n(r[1]);var e=r[t-1];if(t===r.length-1)return!n(e);t=r[t+1];return!n(e)||!n(t)});if(0===t.rel.length)return r;const e=[];let o=t.comp.shift(),i=(0c.isRole(t,"dummy"))?r.role="text":t.every(t=>c.isRole(t,"space"))?r.role="space":r.role="sequence",r}dummyNode_(t){const e=y.getInstance().factory_.makeMultipleContentNodes(t.length-1,s.invisibleComma());return e.forEach(function(t){t.role="dummy"}),y.getInstance().punctuatedNode_(t,e)}accentRole_(t,e){if(!c.isAccent(t))return!1;var r=t.textContent,r=s.lookupSecondary("bar",r)||s.lookupSecondary("tilde",r)||t.role;return t.role="underscore"===e?"underaccent":"overaccent",t.addAnnotation("accent",r),!0}accentNode_(t,e,r,n,o){var i=(e=e.slice(0,n+1))[1],a=e[2];let s;if(!o&&a&&((s=y.getInstance().factory_.makeBranchNode("subscript",[t,i],[])).role="subsup",e=[s,a],r="superscript"),o){const n=y.getInstance().accentRole_(i,r);a&&(r=y.getInstance().accentRole_(a,"overscore")&&!n?(e=[s=y.getInstance().factory_.makeBranchNode("overscore",[t,a],[]),i],"underscore"):(e=[s=y.getInstance().factory_.makeBranchNode("underscore",[t,i],[]),a],"overscore"),s.role="underover")}return y.getInstance().makeLimitNode_(t,e,s,r)}makeLimitNode_(t,e,r,n){if("limupper"===n&&"limlower"===t.type)return t.childNodes.push(e[1]),(e[1].parent=t).type="limboth",t;if("limlower"===n&&"limupper"===t.type)return t.childNodes.splice(1,-1,e[1]),(e[1].parent=t).type="limboth",t;const o=y.getInstance().factory_.makeBranchNode(n,e,[]),i=c.isEmbellished(t);return r&&(r.embellished=i),o.embellished=i,o.role=t.role,o}getFunctionsInRow_(t,e){const r=e||[];if(0===t.length)return r;var e=t.shift(),n=y.classifyFunction_(e,t);if(!n)return r.push(e),y.getInstance().getFunctionsInRow_(t,r);t=y.getInstance().getFunctionsInRow_(t,[]),e=y.getInstance().getFunctionArgs_(e,t,n);return r.concat(e)}getFunctionArgs_(t,e,r){let n,o,i;switch(r){case"integral":{const r=y.getInstance().getIntegralArgs_(e);if(!r.intvar&&!r.integrand.length)return r.rest.unshift(t),r.rest;const n=y.getInstance().row(r.integrand);return i=y.getInstance().integralNode_(t,n,r.intvar),r.rest.unshift(i),r.rest}case"prefix":if(e[0]&&"fenced"===e[0].type){const r=e.shift();return c.isNeutralFence(r)||(r.role="leftright"),i=y.getInstance().functionNode_(t,r),e.unshift(i),e}if((n=u.sliceNodes(e,c.isPrefixFunctionBoundary)).head.length)o=y.getInstance().row(n.head),n.div&&n.tail.unshift(n.div);else{if(!n.div||!c.isType(n.div,"appl"))return e.unshift(t),e;o=n.div}return i=y.getInstance().functionNode_(t,o),n.tail.unshift(i),n.tail;case"bigop":return(n=u.sliceNodes(e,c.isBigOpBoundary)).head.length?(o=y.getInstance().row(n.head),i=y.getInstance().bigOpNode_(t,o),n.div&&n.tail.unshift(n.div),n.tail.unshift(i),n.tail):(e.unshift(t),e);default:{if(0===e.length)return[t];const r=e[0];return"fenced"===r.type&&!c.isNeutralFence(r)&&c.isSimpleFunctionScope(r)?(r.role="leftright",y.propagateFunctionRole_(t,"simple function"),i=y.getInstance().functionNode_(t,e.shift()),e.unshift(i)):e.unshift(t),e}}}getIntegralArgs_(t,e=[]){if(0===t.length)return{integrand:e,intvar:null,rest:t};const r=t[0];if(c.isGeneralFunctionBoundary(r))return{integrand:e,intvar:null,rest:t};if(c.isIntegralDxBoundarySingle(r))return r.role="integral",{integrand:e,intvar:r,rest:t.slice(1)};if(t[1]&&c.isIntegralDxBoundary(r,t[1])){const n=y.getInstance().prefixNode_(t[1],[r]);return n.role="integral",{integrand:e,intvar:n,rest:t.slice(2)}}return e.push(t.shift()),y.getInstance().getIntegralArgs_(t,e)}functionNode_(t,e){const r=y.getInstance().factory_.makeContentNode(s.functionApplication()),n=y.getInstance().funcAppls[t.id];n&&(r.mathmlTree=n.mathmlTree,r.mathml=n.mathml,r.annotation=n.annotation,r.attributes=n.attributes,delete y.getInstance().funcAppls[t.id]),r.type="punctuation",r.role="application";var o=y.getFunctionOp_(t,function(t){return c.isType(t,"function")||c.isType(t,"identifier")&&c.isRole(t,"simple function")});return y.getInstance().functionalNode_("appl",[t,e],o,[r])}bigOpNode_(t,e){var r=y.getFunctionOp_(t,t=>c.isType(t,"largeop"));return y.getInstance().functionalNode_("bigop",[t,e],r,[])}integralNode_(t,e,r){e=e||y.getInstance().factory_.makeEmptyNode(),r=r||y.getInstance().factory_.makeEmptyNode();var n=y.getFunctionOp_(t,t=>c.isType(t,"largeop"));return y.getInstance().functionalNode_("integral",[t,e,r],n,[])}functionalNode_(t,e,r,n){var o=e[0];let i;r&&(i=r.parent,n.push(r));const a=y.getInstance().factory_.makeBranchNode(t,e,n);return a.role=o.role,i&&(r.parent=i),a}fractionNode_(t,e){const r=y.getInstance().factory_.makeBranchNode("fraction",[t,e],[]);return r.role=r.childNodes.every(function(t){return c.isType(t,"number")&&c.isRole(t,"integer")})?"vulgar":r.childNodes.every(c.isPureUnit)?"unit":"division",o.run("propagateSimpleFunction",r)}scriptNode_(t,e,r){let n;switch(t.length){case 0:n=y.getInstance().factory_.makeEmptyNode();break;case 1:if(n=t[0],r)return n;break;default:n=y.getInstance().dummyNode_(t)}return n.role=e,n}findNestedRow_(r,n,o,i){if(3{return t.concat((t=e,l.simpleCollapseStructure(t)?[t]:l.contentCollapseStructure(t[1])?t.slice(2):t.slice(1)))},[])}static fromStructure(t,e){return new l(l.tree_(t,e.root))}static combineContentChildren(t,e,r){switch(t.type){case"relseq":case"infixop":case"multirel":return n.interleaveLists(r,e);case"prefixop":return e.concat(r);case"postfixop":return r.concat(e);case"fenced":return r.unshift(e[0]),r.push(e[1]),r;case"appl":return[r[0],e[0],r[1]];case"root":return[r[1],r[0]];case"row":case"line":return e.length&&r.unshift(e[0]),r;default:return r}}static makeSexp_(t){return l.simpleCollapseStructure(t)?t.toString():l.contentCollapseStructure(t)?"(c "+t.slice(1).map(l.makeSexp_).join(" ")+")":"("+t.map(l.makeSexp_).join(" ")+")"}static fromString_(t){let e=t.replace(/\(/g,"[");return e=(e=(e=e.replace(/\)/g,"]")).replace(/ /g,",")).replace(/c/g,'"c"'),JSON.parse(e)}static fromNode_(t){if(!t)return[];const e=t.contentNodes;let r;e.length&&(r=e.map(l.fromNode_)).unshift("c");const n=t.childNodes;if(!n.length)return e.length?[t.id,r]:t.id;const o=n.map(l.fromNode_);return e.length&&o.unshift(r),o.unshift(t.id),o}static tree_(r,t){if(!t)return[];if(!t.childNodes.length)return t.id;const e=t.id,n=[e],o=a.evalXPath(`.//self::*[@${s.Attribute.ID}=${e}]`,r)[0],i=l.combineContentChildren(t,t.contentNodes.map(function(t){return t}),t.childNodes.map(function(t){return t}));o&&l.addOwns_(o,i);for(let t,e=0;t=i[e];e++)n.push(l.tree_(r,t));return n}static addOwns_(t,e){const r=t.getAttribute(s.Attribute.COLLAPSED),n=r?l.realLeafs_(l.fromString(r).array):e.map(t=>t.id);t.setAttribute(s.Attribute.OWNS,n.join(" "))}static realLeafs_(e){if(l.simpleCollapseStructure(e))return[e];if(l.contentCollapseStructure(e))return[];let r=[];for(let t=1;tl.simpleCollapseStructure(t)?t:l.contentCollapseStructure(t)?t[1]:t[0]):[]}subtreeNodes(t){if(!this.isRoot(t))return[];const r=(t,e)=>{l.simpleCollapseStructure(t)?e.push(t):(t=l.contentCollapseStructure(t)?t.slice(1):t).forEach(t=>r(t,e))},e=this.levelsMap[t],n=[];return r(e.slice(1),n),n}}e.SemanticSkeleton=l},7075:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTree=void 0;const n=r(5740),o=r(7630),i=r(9265),a=r(7228),s=r(5952),l=r(5609);r(94);class c{constructor(t){this.mathml=t,this.parser=new a.SemanticMathml,this.root=this.parser.parse(t),this.collator=this.parser.getFactory().leafMap.collateMeaning();var e=this.collator.newDefault();e&&(this.parser=new a.SemanticMathml,this.parser.getFactory().defaultMap=e,this.root=this.parser.parse(t)),u.visit(this.root,{}),(0,o.annotate)(this.root)}static empty(){const t=n.parseInput(""),e=new c(t);return e.mathml=t,e}static fromNode(t,e){const r=c.empty();return r.root=t,e&&(r.mathml=e),r}static fromRoot(t,e){let r=t;for(;r.parent;)r=r.parent;const n=c.fromNode(r);return e&&(n.mathml=e),n}static fromXml(t){const e=c.empty();return t.childNodes[0]&&(e.root=s.SemanticNode.fromXml(t.childNodes[0])),e}xml(t){const e=n.parseInput(""),r=this.root.xml(e.ownerDocument,t);return e.appendChild(r),e}toString(t){return n.serializeXml(this.xml(t))}formatXml(t){t=this.toString(t);return n.formatXml(t)}displayTree(){this.root.displayTree()}replaceNode(t,e){const r=t.parent;r?r.replaceChild(t,e):this.root=e}toJson(){const t={};return t.stree=this.root.toJson(),t}}e.SemanticTree=c;const u=new i.SemanticVisitor("general","unit",(t,e)=>{if("infixop"===t.type&&("multiplication"===t.role||"implicit"===t.role)){const e=t.childNodes;e.length&&(l.isPureUnit(e[0])||l.isUnitCounter(e[0]))&&t.childNodes.slice(1).every(l.isPureUnit)&&(t.role="unit")}return!1})},4795:function(t,o,e){Object.defineProperty(o,"__esModule",{value:!0}),o.partitionNodes=o.sliceNodes=o.getEmbellishedInner=o.addAttributes=o.isZeroLength=o.purgeNodes=o.isOrphanedGlyph=o.hasDisplayTag=o.hasEmptyTag=o.hasIgnoreTag=o.hasLeafTag=o.hasMathTag=o.directSpeechKeys=o.DISPLAYTAGS=o.EMPTYTAGS=o.IGNORETAGS=o.LEAFTAGS=void 0;const i=e(5740);function r(t){return!!t&&-1!==o.LEAFTAGS.indexOf(i.tagName(t))}function a(r,n,o){o&&r.reverse();const i=[];for(let t,e=0;t=r[e];e++){if(n(t))return o?{head:r.slice(e+1).reverse(),div:t,tail:i.reverse()}:{head:i,div:t,tail:r.slice(e+1)};i.push(t)}return o?{head:[],div:null,tail:i.reverse()}:{head:i,div:null,tail:[]}}o.LEAFTAGS=["MO","MI","MN","MTEXT","MS","MSPACE"],o.IGNORETAGS=["MERROR","MPHANTOM","MALIGNGROUP","MALIGNMARK","MPRESCRIPTS","ANNOTATION","ANNOTATION-XML"],o.EMPTYTAGS=["MATH","MROW","MPADDED","MACTION","NONE","MSTYLE","SEMANTICS"],o.DISPLAYTAGS=["MROOT","MSQRT"],o.directSpeechKeys=["aria-label","exact-speech","alt"],o.hasMathTag=function(t){return!!t&&"MATH"===i.tagName(t)},o.hasLeafTag=r,o.hasIgnoreTag=function(t){return!!t&&-1!==o.IGNORETAGS.indexOf(i.tagName(t))},o.hasEmptyTag=function(t){return!!t&&-1!==o.EMPTYTAGS.indexOf(i.tagName(t))},o.hasDisplayTag=function(t){return!!t&&-1!==o.DISPLAYTAGS.indexOf(i.tagName(t))},o.isOrphanedGlyph=function(t){return!!t&&"MGLYPH"===i.tagName(t)&&!r(t.parentNode)},o.purgeNodes=function(r){const n=[];for(let t,e=0;t=r[e];e++)if(t.nodeType===i.NodeType.ELEMENT_NODE){const r=i.tagName(t);-1!==o.IGNORETAGS.indexOf(r)||-1!==o.EMPTYTAGS.indexOf(r)&&0===t.childNodes.length||n.push(t)}return n},o.isZeroLength=function(t){if(!t)return!1;if(-1!==["negativeveryverythinmathspace","negativeverythinmathspace","negativethinmathspace","negativemediummathspace","negativethickmathspace","negativeverythickmathspace","negativeveryverythickmathspace"].indexOf(t))return!0;t=t.match(/[0-9.]+/);return!!t&&0===parseFloat(t[0])},o.addAttributes=function(e,t){if(t.hasAttributes()){var r=t.attributes;for(let t=r.length-1;0<=t;t--){const n=r[t].name;n.match(/^ext/)&&(e.attributes[n]=r[t].value,e.nobreaking=!0),-1!==o.directSpeechKeys.indexOf(n)&&(e.attributes["ext-speech"]=r[t].value,e.nobreaking=!0),n.match(/texclass$/)&&(e.attributes.texclass=r[t].value),"href"===n&&(e.attributes.href=r[t].value,e.nobreaking=!0)}}},o.getEmbellishedInner=function t(e){return e&&e.embellished&&0n[t.id]=!0),"implicit"!==e.role&&r.push(e.contentNodes.map(t=>t.id))),e.childNodes.length){if("implicit"===e.role){const o=[];let t=[];for(const r of e.childNodes){const e=[];l.visitStree_(r,e,n),e.length<=2&&o.push(e.shift()),t=t.concat(e)}return r.push(o),void t.forEach(t=>r.push(t))}e.childNodes.forEach(t=>l.visitStree_(t,r,n))}}else n[e.id]||r.push(e.id)}getSpeech(t,e){return a.getAttribute(t,this.modality)}generateSpeech(t,e){return this.getRebuilt()||this.setRebuilt(new i.RebuildStree(t)),this.colorLeaves_(t),a.getAttribute(t,this.modality)}colorLeaves_(e){const r=[];l.visitStree_(this.getRebuilt().streeRoot,r,{});for(const t of r){const r=this.contrast.generate();(Array.isArray(t)?t.map(t=>this.colorLeave_(e,t,r)).reduce((t,e)=>t||e,!1):this.colorLeave_(e,t.toString(),r))&&this.contrast.increment()}}colorLeave_(t,e,r){const n=a.getBySemanticId(t,e);return!!n&&(n.setAttribute(this.modality,r),!0)}}e.ColorGenerator=l},6604:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.DirectSpeechGenerator=void 0;const n=r(1204),o=r(6278);class i extends o.AbstractSpeechGenerator{getSpeech(t,e){return n.getAttribute(t,this.modality)}}e.DirectSpeechGenerator=i},3123:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.DummySpeechGenerator=void 0;class n extends r(6278).AbstractSpeechGenerator{getSpeech(t,e){return""}}e.DummySpeechGenerator=n},5858:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.NodeSpeechGenerator=void 0;const n=r(1204),o=r(4598);class i extends o.TreeSpeechGenerator{getSpeech(t,e){return super.getSpeech(t,e),n.getAttribute(t,this.modality)}}e.NodeSpeechGenerator=i},9552:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.generatorMapping_=e.generator=void 0;const n=r(1452),o=r(5152),i=r(6604),a=r(3123),s=r(5858),l=r(597),c=r(4598);e.generator=function(t){return(e.generatorMapping_[t]||e.generatorMapping_.Direct)()},e.generatorMapping_={Adhoc:()=>new n.AdhocSpeechGenerator,Color:()=>new o.ColorGenerator,Direct:()=>new i.DirectSpeechGenerator,Dummy:()=>new a.DummySpeechGenerator,Node:()=>new s.NodeSpeechGenerator,Summary:()=>new l.SummarySpeechGenerator,Tree:()=>new c.TreeSpeechGenerator}},9543:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.computeSummary_=e.retrieveSummary=e.connectAllMactions=e.connectMactions=e.nodeAtPosition_=e.computePrefix_=e.retrievePrefix=e.addPrefix=e.addModality=e.addSpeech=e.recomputeMarkup=e.computeMarkup=e.recomputeSpeech=e.computeSpeech=void 0;const n=r(8290),c=r(5740),o=r(5274),u=r(2298),i=r(2362),a=r(7075),p=r(1204);function s(t){return i.SpeechRuleEngine.getInstance().evaluateNode(t)}function l(t){return s(a.SemanticTree.fromNode(t).xml())}function h(t){t=l(t);return n.markup(t)}function d(t){t=f(t);return n.markup(t)}function f(t){const e=a.SemanticTree.fromRoot(t),r=o.evalXPath('.//*[@id="'+t.id+'"]',e.xml());let n=r[0];return(n=1{const r={};return Object.keys(t).forEach(t=>r[t]=!0),Object.keys(e).forEach(t=>r[t]=!0),Object.keys(r)};u.Domains_.small=e(t.smallPrefix,t.letterTrans),u.Domains_.capital=e(t.capPrefix,t.letterTrans),u.Domains_.digit=e(t.digitPrefix,t.digitTrans)}function c([t,e],r){const n=parseInt(t,16),o=parseInt(e,16),i=[];for(let e=n;e<=o;e++){let t=3<(a=(a=e).toString(16).toUpperCase()).length?a:("000"+a).slice(-4);!1!==r[t]&&(t=r[t]||t,i.push(t))}var a;return i}function d(t){t="normal"!==t&&"fullwidth"!==t&&(p.LOCALE.MESSAGES.font[t]||p.LOCALE.MESSAGES.embellish[t])||"";return(0,r.localeFontCombiner)(t)}function f(o,i,a,t,s,l){var c=d(t);for(let t,e,r,n=0;t=o[n],e=i[n],r=a[n];n++){const o=l?p.LOCALE.ALPHABETS.capPrefix:p.LOCALE.ALPHABETS.smallPrefix,i=l?u.Domains_.capital:u.Domains_.small;y(c.combiner,t,e,r,c.font,o,s,p.LOCALE.ALPHABETS.letterTrans,i)}}function m(n,o,t,i,a){var s=d(t);for(let t,e,r=0;t=n[r],e=o[r];r++){const n=p.LOCALE.ALPHABETS.digitPrefix,o=r+a;y(s.combiner,t,e,o,s.font,n,i,p.LOCALE.ALPHABETS.digitTrans,u.Domains_.digit)}}function y(r,n,o,i,a,s,l,c,u){for(let t,e=0;t=u[e];e++){const u=t in c?c[t]:c.default,p=t in s?s[t]:s.default;h.defineRule(n.toString(),t,"default",l,o,r(u(i),a,p))}}(s=e=u.Font||(u.Font={})).BOLD="bold",s.BOLDFRAKTUR="bold-fraktur",s.BOLDITALIC="bold-italic",s.BOLDSCRIPT="bold-script",s.DOUBLESTRUCK="double-struck",s.FULLWIDTH="fullwidth",s.FRAKTUR="fraktur",s.ITALIC="italic",s.MONOSPACE="monospace",s.NORMAL="normal",s.SCRIPT="script",s.SANSSERIF="sans-serif",s.SANSSERIFITALIC="sans-serif-italic",s.SANSSERIFBOLD="sans-serif-bold",s.SANSSERIFBOLDITALIC="sans-serif-bold-italic",(a=s=u.Embellish||(u.Embellish={})).SUPER="super",a.SUB="sub",a.CIRCLED="circled",a.PARENTHESIZED="parenthesized",a.PERIOD="period",a.NEGATIVECIRCLED="negative-circled",a.DOUBLECIRCLED="double-circled",a.CIRCLEDSANSSERIF="circled-sans-serif",a.NEGATIVECIRCLEDSANSSERIF="negative-circled-sans-serif",a.COMMA="comma",a.SQUARED="squared",a.NEGATIVESQUARED="negative-squared",(n=a=u.Base||(u.Base={})).LATINCAP="latinCap",n.LATINSMALL="latinSmall",n.GREEKCAP="greekCap",n.GREEKSMALL="greekSmall",n.DIGIT="digit",u.Domains_={small:["default"],capital:["default"],digit:["default"]},u.makeDomains_=l,u.generate=function(t){const r=o.default.getInstance().locale;o.default.getInstance().locale=t,i.setLocale(),h.addSymbolRules({locale:t}),l();var n=u.INTERVALS;for(let t,e=0;t=n[e];e++){const u=c(t.interval,t.subst),r=u.map(function(t){return String.fromCodePoint(parseInt(t,16))});"offset"in t?m(u,r,t.font,t.category,t.offset||0):f(u,r,p.LOCALE.ALPHABETS[t.base],t.font,t.category,!!t.capital)}o.default.getInstance().locale=r,i.setLocale()},u.makeInterval=c,u.getFont=d,u.alphabetRules=f,u.numberRules=m,u.makeLetter=y,u.INTERVALS=[{interval:["1D400","1D419"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.BOLD},{interval:["1D41A","1D433"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.BOLD},{interval:["1D56C","1D585"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.BOLDFRAKTUR},{interval:["1D586","1D59F"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.BOLDFRAKTUR},{interval:["1D468","1D481"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.BOLDITALIC},{interval:["1D482","1D49B"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.BOLDITALIC},{interval:["1D4D0","1D4E9"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.BOLDSCRIPT},{interval:["1D4EA","1D503"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.BOLDSCRIPT},{interval:["1D538","1D551"],base:a.LATINCAP,subst:{"1D53A":"2102","1D53F":"210D","1D545":"2115","1D547":"2119","1D548":"211A","1D549":"211D","1D551":"2124"},capital:!0,category:"Lu",font:e.DOUBLESTRUCK},{interval:["1D552","1D56B"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.DOUBLESTRUCK},{interval:["1D504","1D51D"],base:a.LATINCAP,subst:{"1D506":"212D","1D50B":"210C","1D50C":"2111","1D515":"211C","1D51D":"2128"},capital:!0,category:"Lu",font:e.FRAKTUR},{interval:["1D51E","1D537"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.FRAKTUR},{interval:["FF21","FF3A"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.FULLWIDTH},{interval:["FF41","FF5A"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.FULLWIDTH},{interval:["1D434","1D44D"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.ITALIC},{interval:["1D44E","1D467"],base:a.LATINSMALL,subst:{"1D455":"210E"},capital:!1,category:"Ll",font:e.ITALIC},{interval:["1D670","1D689"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.MONOSPACE},{interval:["1D68A","1D6A3"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.MONOSPACE},{interval:["0041","005A"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.NORMAL},{interval:["0061","007A"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.NORMAL},{interval:["1D49C","1D4B5"],base:a.LATINCAP,subst:{"1D49D":"212C","1D4A0":"2130","1D4A1":"2131","1D4A3":"210B","1D4A4":"2110","1D4A7":"2112","1D4A8":"2133","1D4AD":"211B"},capital:!0,category:"Lu",font:e.SCRIPT},{interval:["1D4B6","1D4CF"],base:a.LATINSMALL,subst:{"1D4BA":"212F","1D4BC":"210A","1D4C4":"2134"},capital:!1,category:"Ll",font:e.SCRIPT},{interval:["1D5A0","1D5B9"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.SANSSERIF},{interval:["1D5BA","1D5D3"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.SANSSERIF},{interval:["1D608","1D621"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.SANSSERIFITALIC},{interval:["1D622","1D63B"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.SANSSERIFITALIC},{interval:["1D5D4","1D5ED"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.SANSSERIFBOLD},{interval:["1D5EE","1D607"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.SANSSERIFBOLD},{interval:["1D63C","1D655"],base:a.LATINCAP,subst:{},capital:!0,category:"Lu",font:e.SANSSERIFBOLDITALIC},{interval:["1D656","1D66F"],base:a.LATINSMALL,subst:{},capital:!1,category:"Ll",font:e.SANSSERIFBOLDITALIC},{interval:["0391","03A9"],base:a.GREEKCAP,subst:{"03A2":"03F4"},capital:!0,category:"Lu",font:e.NORMAL},{interval:["03B0","03D0"],base:a.GREEKSMALL,subst:{"03B0":"2207","03CA":"2202","03CB":"03F5","03CC":"03D1","03CD":"03F0","03CE":"03D5","03CF":"03F1","03D0":"03D6"},capital:!1,category:"Ll",font:e.NORMAL},{interval:["1D6A8","1D6C0"],base:a.GREEKCAP,subst:{},capital:!0,category:"Lu",font:e.BOLD},{interval:["1D6C1","1D6E1"],base:a.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:e.BOLD},{interval:["1D6E2","1D6FA"],base:a.GREEKCAP,subst:{},capital:!0,category:"Lu",font:e.ITALIC},{interval:["1D6FB","1D71B"],base:a.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:e.ITALIC},{interval:["1D71C","1D734"],base:a.GREEKCAP,subst:{},capital:!0,category:"Lu",font:e.BOLDITALIC},{interval:["1D735","1D755"],base:a.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:e.BOLDITALIC},{interval:["1D756","1D76E"],base:a.GREEKCAP,subst:{},capital:!0,category:"Lu",font:e.SANSSERIFBOLD},{interval:["1D76F","1D78F"],base:a.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:e.SANSSERIFBOLD},{interval:["1D790","1D7A8"],base:a.GREEKCAP,subst:{},capital:!0,category:"Lu",font:e.SANSSERIFBOLDITALIC},{interval:["1D7A9","1D7C9"],base:a.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:e.SANSSERIFBOLDITALIC},{interval:["0030","0039"],base:a.DIGIT,subst:{},offset:0,category:"Nd",font:e.NORMAL},{interval:["2070","2079"],base:a.DIGIT,subst:{2071:"00B9",2072:"00B2",2073:"00B3"},offset:0,category:"No",font:s.SUPER},{interval:["2080","2089"],base:a.DIGIT,subst:{},offset:0,category:"No",font:s.SUB},{interval:["245F","2473"],base:a.DIGIT,subst:{"245F":"24EA"},offset:0,category:"No",font:s.CIRCLED},{interval:["3251","325F"],base:a.DIGIT,subst:{},offset:21,category:"No",font:s.CIRCLED},{interval:["32B1","32BF"],base:a.DIGIT,subst:{},offset:36,category:"No",font:s.CIRCLED},{interval:["2474","2487"],base:a.DIGIT,subst:{},offset:1,category:"No",font:s.PARENTHESIZED},{interval:["2487","249B"],base:a.DIGIT,subst:{2487:"1F100"},offset:0,category:"No",font:s.PERIOD},{interval:["2775","277F"],base:a.DIGIT,subst:{2775:"24FF"},offset:0,category:"No",font:s.NEGATIVECIRCLED},{interval:["24EB","24F4"],base:a.DIGIT,subst:{},offset:11,category:"No",font:s.NEGATIVECIRCLED},{interval:["24F5","24FE"],base:a.DIGIT,subst:{},offset:1,category:"No",font:s.DOUBLECIRCLED},{interval:["277F","2789"],base:a.DIGIT,subst:{"277F":"1F10B"},offset:0,category:"No",font:s.CIRCLEDSANSSERIF},{interval:["2789","2793"],base:a.DIGIT,subst:{2789:"1F10C"},offset:0,category:"No",font:s.NEGATIVECIRCLEDSANSSERIF},{interval:["FF10","FF19"],base:a.DIGIT,subst:{},offset:0,category:"Nd",font:e.FULLWIDTH},{interval:["1D7CE","1D7D7"],base:a.DIGIT,subst:{},offset:0,category:"Nd",font:e.BOLD},{interval:["1D7D8","1D7E1"],base:a.DIGIT,subst:{},offset:0,category:"Nd",font:e.DOUBLESTRUCK},{interval:["1D7E2","1D7EB"],base:a.DIGIT,subst:{},offset:0,category:"Nd",font:e.SANSSERIF},{interval:["1D7EC","1D7F5"],base:a.DIGIT,subst:{},offset:0,category:"Nd",font:e.SANSSERIFBOLD},{interval:["1D7F6","1D7FF"],base:a.DIGIT,subst:{},offset:0,category:"Nd",font:e.MONOSPACE},{interval:["1F101","1F10A"],base:a.DIGIT,subst:{},offset:0,category:"No",font:s.COMMA},{interval:["24B6","24CF"],base:a.LATINCAP,subst:{},capital:!0,category:"So",font:s.CIRCLED},{interval:["24D0","24E9"],base:a.LATINSMALL,subst:{},capital:!1,category:"So",font:s.CIRCLED},{interval:["1F110","1F129"],base:a.LATINCAP,subst:{},capital:!0,category:"So",font:s.PARENTHESIZED},{interval:["249C","24B5"],base:a.LATINSMALL,subst:{},capital:!1,category:"So",font:s.PARENTHESIZED},{interval:["1F130","1F149"],base:a.LATINCAP,subst:{},capital:!0,category:"So",font:s.SQUARED},{interval:["1F170","1F189"],base:a.LATINCAP,subst:{},capital:!0,category:"So",font:s.NEGATIVESQUARED},{interval:["1F150","1F169"],base:a.LATINCAP,subst:{},capital:!0,category:"So",font:s.NEGATIVECIRCLED}]},8504:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.Comparator=e.ClearspeakPreferences=void 0;const n=r(5897),a=r(4440),i=r(1676),s=r(1676),o=r(2780),l=r(2362);class c extends i.DynamicCstr{constructor(t,e){super(t),this.preference=e}static comparator(){return new p(n.default.getInstance().dynamicCstr,s.DynamicProperties.createProp([i.DynamicCstr.DEFAULT_VALUES[s.Axis.LOCALE]],[i.DynamicCstr.DEFAULT_VALUES[s.Axis.MODALITY]],[i.DynamicCstr.DEFAULT_VALUES[s.Axis.DOMAIN]],[i.DynamicCstr.DEFAULT_VALUES[s.Axis.STYLE]]))}static fromPreference(t){const r=t.split(":"),n={},o=u.getProperties(),i=Object.keys(o);for(let t,e=0;t=r[e];e++){const r=t.split("_");var a;-1!==i.indexOf(r[0])&&((a=r[1])&&a!==c.AUTO&&-1!==o[r[0]].indexOf(a)&&(n[r[0]]=r[1]))}return n}static toPreference(e){const r=Object.keys(e),n=[];for(let t=0;tA(t)||"identifier"===t.tagName)}function T(t){return"text"===t.type||"punctuated"===t.type&&"text"===t.role&&_(t.childNodes[0])&&N(t.childNodes.slice(1))||"identifier"===t.type&&"unit"===t.role||"infixop"===t.type&&("implicit"===t.role||"unit"===t.role)}function N(e){for(let t=0;tt(e,n++)).bind(this),300)}:b)(t))}function g(){switch(i.default.getInstance().mode){case a.Mode.ASYNC:return S;case a.Mode.HTTP:return M;default:a.Mode.SYNC;return O}}function b(r){const t=i.default.getInstance().customLoader?i.default.getInstance().customLoader:g(),e=new Promise(e=>{t(r).then(t=>{v(t),i.EnginePromise.loaded[r]=[!0,!0],e(r)},t=>{i.EnginePromise.loaded[r]=[!0,!1],console.error("Unable to load locale: "+r),i.default.getInstance().locale=i.default.getInstance().defaultLocale,e(r)})});i.EnginePromise.promises[r]=e}function v(t){_(JSON.parse(t))}function _(r,n){let o=!0;for(let t,e=0;t=Object.keys(r)[e];e++){var i=t.split("/");n&&n!==i[0]||("rules"===i[1]?p.SpeechRuleEngine.getInstance().addStore(r[t]):"messages"===i[1]?(0,h.completeLocale)(r[t]):(o&&(d.generate(i[0]),o=!1),r[t].forEach(f[i[1]])))}}function S(t){const e=s.localePath(t);return new Promise((r,n)=>{l.default.fs.readFile(e,"utf8",(t,e)=>{if(t)return n(t);r(e)})})}function O(t){const n=s.localePath(t);return new Promise((t,e)=>{let r="{}";try{r=l.default.fs.readFileSync(n,"utf8")}catch(t){return e(t)}t(r)})}function M(t){const n=s.localePath(t),o=new XMLHttpRequest;return new Promise((e,r)=>{o.onreadystatechange=function(){var t;4===o.readyState&&(0===(t=o.status)||200<=t&&t<400?e(o.responseText):r(t))},o.open("GET",n,!0),o.send()})}e.loadLocale=function(e=i.default.getInstance().locale){return n(this,void 0,void 0,function*(){return m||(y(c.DynamicCstr.BASE_LOCALE),m=!0),i.EnginePromise.promises[c.DynamicCstr.BASE_LOCALE].then(()=>n(this,void 0,void 0,function*(){var t=i.default.getInstance().defaultLocale;return t?(y(t),i.EnginePromise.promises[t].then(()=>n(this,void 0,void 0,function*(){return y(e),i.EnginePromise.promises[e]}))):(y(e),i.EnginePromise.promises[e])}))})},e.standardLoader=g,e.retrieveFiles=b,e.parseMaps=v,e.loadFile=S,e.loadFileSync=O,e.loadAjax=M},7088:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.leftSubscriptBrief=e.leftSuperscriptBrief=e.leftSubscriptVerbose=e.leftSuperscriptVerbose=e.baselineBrief=e.baselineVerbose=void 0;const n=r(1378);e.baselineVerbose=function(t){return n.baselineVerbose(t).replace(/-$/,"")},e.baselineBrief=function(t){return n.baselineBrief(t).replace(/-$/,"")},e.leftSuperscriptVerbose=function(t){return n.superscriptVerbose(t).replace(/^exposant/,"exposant gauche")},e.leftSubscriptVerbose=function(t){return n.subscriptVerbose(t).replace(/^indice/,"indice gauche")},e.leftSuperscriptBrief=function(t){return n.superscriptBrief(t).replace(/^sup/,"sup gauche")},e.leftSubscriptBrief=function(t){return n.subscriptBrief(t).replace(/^sub/,"sub gauche")}},9577:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MathspeakRules=void 0;const n=r(1676),o=r(365),i=r(7088),a=r(1378),s=r(8437),l=r(7283),c=r(7598);e.MathspeakRules=function(){l.addStore(n.DynamicCstr.BASE_LOCALE+".speech.mathspeak","",{CQFspaceoutNumber:a.spaceoutNumber,CQFspaceoutIdentifier:a.spaceoutIdentifier,CSFspaceoutText:a.spaceoutText,CSFopenFracVerbose:a.openingFractionVerbose,CSFcloseFracVerbose:a.closingFractionVerbose,CSFoverFracVerbose:a.overFractionVerbose,CSFopenFracBrief:a.openingFractionBrief,CSFcloseFracBrief:a.closingFractionBrief,CSFopenFracSbrief:a.openingFractionSbrief,CSFcloseFracSbrief:a.closingFractionSbrief,CSFoverFracSbrief:a.overFractionSbrief,CSFvulgarFraction:s.vulgarFraction,CQFvulgarFractionSmall:a.isSmallVulgarFraction,CSFopenRadicalVerbose:a.openingRadicalVerbose,CSFcloseRadicalVerbose:a.closingRadicalVerbose,CSFindexRadicalVerbose:a.indexRadicalVerbose,CSFopenRadicalBrief:a.openingRadicalBrief,CSFcloseRadicalBrief:a.closingRadicalBrief,CSFindexRadicalBrief:a.indexRadicalBrief,CSFopenRadicalSbrief:a.openingRadicalSbrief,CSFindexRadicalSbrief:a.indexRadicalSbrief,CQFisSmallRoot:a.smallRoot,CSFsuperscriptVerbose:a.superscriptVerbose,CSFsuperscriptBrief:a.superscriptBrief,CSFsubscriptVerbose:a.subscriptVerbose,CSFsubscriptBrief:a.subscriptBrief,CSFbaselineVerbose:a.baselineVerbose,CSFbaselineBrief:a.baselineBrief,CSFleftsuperscriptVerbose:a.superscriptVerbose,CSFleftsubscriptVerbose:a.subscriptVerbose,CSFrightsuperscriptVerbose:a.superscriptVerbose,CSFrightsubscriptVerbose:a.subscriptVerbose,CSFleftsuperscriptBrief:a.superscriptBrief,CSFleftsubscriptBrief:a.subscriptBrief,CSFrightsuperscriptBrief:a.superscriptBrief,CSFrightsubscriptBrief:a.subscriptBrief,CSFunderscript:a.nestedUnderscript,CSFoverscript:a.nestedOverscript,CSFendscripts:a.endscripts,CTFordinalCounter:s.ordinalCounter,CTFwordCounter:s.wordCounter,CTFcontentIterator:o.contentIterator,CQFdetIsSimple:a.determinantIsSimple,CSFRemoveParens:a.removeParens,CQFresetNesting:a.resetNestingDepth,CGFbaselineConstraint:a.generateBaselineConstraint,CGFtensorRules:a.generateTensorRules}),l.addStore("es.speech.mathspeak",n.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CTFunitMultipliers:c.unitMultipliers,CQFoneLeft:c.oneLeft}),l.addStore("fr.speech.mathspeak",n.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CSFbaselineVerbose:i.baselineVerbose,CSFbaselineBrief:i.baselineBrief,CSFleftsuperscriptVerbose:i.leftSuperscriptVerbose,CSFleftsubscriptVerbose:i.leftSubscriptVerbose,CSFleftsuperscriptBrief:i.leftSuperscriptBrief,CSFleftsubscriptBrief:i.leftSubscriptBrief})}},1378:function(t,s,e){Object.defineProperty(s,"__esModule",{value:!0}),s.smallRoot=s.generateTensorRules=s.removeParens=s.generateBaselineConstraint=s.determinantIsSimple=s.nestedOverscript=s.endscripts=s.overscoreNestingDepth=s.nestedUnderscript=s.underscoreNestingDepth=s.indexRadicalSbrief=s.openingRadicalSbrief=s.indexRadicalBrief=s.closingRadicalBrief=s.openingRadicalBrief=s.indexRadicalVerbose=s.closingRadicalVerbose=s.openingRadicalVerbose=s.getRootIndex=s.nestedRadical=s.radicalNestingDepth=s.baselineBrief=s.baselineVerbose=s.superscriptBrief=s.superscriptVerbose=s.subscriptBrief=s.subscriptVerbose=s.nestedSubSuper=s.isSmallVulgarFraction=s.overFractionSbrief=s.closingFractionSbrief=s.openingFractionSbrief=s.closingFractionBrief=s.openingFractionBrief=s.overFractionVerbose=s.closingFractionVerbose=s.openingFractionVerbose=s.nestedFraction=s.fractionNestingDepth=s.computeNestingDepth_=s.containsAttr=s.getNestingDepth=s.resetNestingDepth=s.nestingBarriers=s.spaceoutIdentifier=s.spaceoutNumber=s.spaceoutNodes=s.spaceoutText=void 0;const l=e(707),c=e(5740),n=e(5274),a=e(4356),u=e(3308);let p={};function r(t,r){const n=Array.from(t.textContent),o=[],i=u.default.getInstance(),a=t.ownerDocument;for(let t,e=0;t=n[e];e++){const n=i.getNodeFactory().makeLeafNode(t,"unknown"),s=i.identifierNode(n,"unknown","");r(s),o.push(s.xml(a))}return o}function o(t,e,r,n,o,i){n=n||s.nestingBarriers,o=o||{},i=i||function(t){return!1};var a=c.serializeXml(e);if(p[t]||(p[t]={}),p[t][a])return p[t][a];if(i(e)||r.indexOf(e.tagName)<0)return 0;e=d(e,r,l.setdifference(n,r),o,i,0);return p[t][a]=e}function h(t,r){if(!t.attributes)return!1;var n=c.toArray(t.attributes);for(let t,e=0;t=n[e];e++)if(r[t.nodeName]===t.nodeValue)return!0;return!1}function d(t,e,r,n,o,i){if(o(t)||-1t.map(t=>"ancestor::"+t),e=t=>"not("+t+")",r=e(t(["subscript","superscript","tensor"]).join(" or ")),n=t(["relseq","multrel"]),o=t(["fraction","punctuation","fenced","sqrt","root"]);let i=[];for(let e,t=0;e=o[t];t++)i=i.concat(n.map(function(t){return e+"/"+t}));return[["ancestor::*/following-sibling::*",r,e(i.join(" | "))].join(" and ")]},s.removeParens=function(t){if(!t.childNodes.length||!t.childNodes[0].childNodes.length||!t.childNodes[0].childNodes[0].childNodes.length)return"";const e=t.childNodes[0].childNodes[0].childNodes[0].textContent;return e.match(/^\(.+\)$/)?e.slice(1,-1):e};const S=new Map([[3,"CSFleftsuperscript"],[4,"CSFleftsubscript"],[2,"CSFbaseline"],[1,"CSFrightsubscript"],[0,"CSFrightsuperscript"]]),O=new Map([[4,2],[3,3],[2,1],[1,4],[0,5]]);s.generateTensorRules=function(i,a=!0){var e=["11111","11110","11101","11100","10111","10110","10101","10100","01111","01110","01101","01100"];for(let o,t=0;o=e[t];t++){let t="tensor"+o,[e,r,n]=function(t){const e=[];let r="",n="",o=parseInt(t,2);for(let t=0;t<5;t++){var i="children/*["+O.get(t)+"]";if(1&o){const e=S.get(t%5);r="[t] "+e+"Verbose; [n] "+i+";"+r,n="[t] "+e+"Brief; [n] "+i+";"+n}else e.unshift("name("+i+')="empty"');o>>=1}return[e,r,n]}(o);i.defineRule(t,"default",r,"self::tensor",...e),a&&(i.defineRule(t,"brief",n,"self::tensor",...e),i.defineRule(t,"sbrief",n,"self::tensor",...e));var s=S.get(2),s=(r+="; [t]"+s+"Verbose",n+="; [t]"+s+"Brief",t+="-baseline","((.//*[not(*)])[last()]/@id)!=(((.//ancestor::fraction|ancestor::root|ancestor::sqrt|ancestor::cell|ancestor::line|ancestor::stree)[1]//*[not(*)])[last()]/@id)");i.defineRule(t,"default",r,"self::tensor",s,...e),a&&(i.defineRule(t,"brief",n,"self::tensor",s,...e),i.defineRule(t,"sbrief",n,"self::tensor",s,...e))}},s.smallRoot=function(t){var e=Object.keys(a.LOCALE.MESSAGES.MSroots).length;if(!e)return[];if(e++,!t.childNodes||0===t.childNodes.length||!t.childNodes[0].childNodes)return[];var r=t.childNodes[0].childNodes[0].textContent;if(!/^\d+$/.test(r))return[];r=parseInt(r,10);return 1i.generateTensorRules(t,!1),CTFrelationIterator:a.relationIterator,CTFimplicitIterator:a.implicitIterator})}},7599:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.init=e.INIT_=void 0;const n=r(5425),o=r(9577),i=r(9284);e.INIT_=!1,e.init=function(){e.INIT_||((0,o.MathspeakRules)(),(0,n.ClearspeakRules)(),(0,i.PrefixRules)(),(0,i.OtherRules)(),(0,i.BrailleRules)(),e.INIT_=!0)}},7283:function(t,o,e){Object.defineProperty(o,"__esModule",{value:!0}),o.getStore=o.addStore=o.funcStore=void 0;const n=e(1676);o.funcStore=new Map,o.addStore=function(t,e,r){var n={};if(e){const t=o.funcStore.get(e)||{};Object.assign(n,t)}o.funcStore.set(t,Object.assign(n,r))},o.getStore=function(t,e,r){return o.funcStore.get([t,e,r].join("."))||o.funcStore.get([n.DynamicCstr.DEFAULT_VALUES[n.Axis.LOCALE],e,r].join("."))||o.funcStore.get([n.DynamicCstr.BASE_LOCALE,e,r].join("."))||{}}},7598:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.oneLeft=e.leftMostUnit=e.rightMostUnit=e.unitMultipliers=void 0;const o=r(7052),n=r(5274),i=r(4356),a=(e.unitMultipliers=function(t,e){const r=t;let n=0;return function(){var t=o.AuditoryDescription.create({text:s(r[n])&&l(r[n+1])?i.LOCALE.MESSAGES.unitTimes:""},{});return n++,[t]}},["superscript","subscript","overscore","underscore"]);function s(t){for(;t;){if("unit"===t.getAttribute("role"))return!0;var e=t.tagName,r=n.evalXPath("children/*",t);t=-1!==a.indexOf(e)?r[0]:r[r.length-1]}return!1}function l(t){for(;t;){if("unit"===t.getAttribute("role"))return!0;t=n.evalXPath("children/*",t)[0]}return!1}e.rightMostUnit=s,e.leftMostUnit=l,e.oneLeft=function(t){for(;t;){if("number"===t.tagName&&"1"===t.textContent)return[t];if("infixop"!==t.tagName||"multiplication"!==t.getAttribute("role")&&"implicit"!==t.getAttribute("role"))return[];t=n.evalXPath("children/*",t)[0]}return[]}},3284:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractWalker=void 0;const o=r(7052),i=r(8290),a=r(5740),n=r(4440),s=r(6828),l=r(8496),c=r(2298),u=r(4356),p=r(2105),h=r(5656),d=r(9552),f=r(9543),m=r(8504),y=r(7730),g=r(1214),b=r(179),v=r(1204),_=r(5274);class S{constructor(t,e,r,n){this.node=t,this.generator=e,this.highlighter=r,this.modifier=!1,this.keyMapping=new Map([[l.KeyCode.UP,this.up.bind(this)],[l.KeyCode.DOWN,this.down.bind(this)],[l.KeyCode.RIGHT,this.right.bind(this)],[l.KeyCode.LEFT,this.left.bind(this)],[l.KeyCode.TAB,this.repeat.bind(this)],[l.KeyCode.DASH,this.expand.bind(this)],[l.KeyCode.SPACE,this.depth.bind(this)],[l.KeyCode.HOME,this.home.bind(this)],[l.KeyCode.X,this.summary.bind(this)],[l.KeyCode.Z,this.detail.bind(this)],[l.KeyCode.V,this.virtualize.bind(this)],[l.KeyCode.P,this.previous.bind(this)],[l.KeyCode.U,this.undo.bind(this)],[l.KeyCode.LESS,this.previousRules.bind(this)],[l.KeyCode.GREATER,this.nextRules.bind(this)]]),this.cursors=[],this.xml_=null,this.rebuilt_=null,this.focus_=null,this.active_=!1,this.node.id?this.id=this.node.id:this.node.hasAttribute(S.SRE_ID_ATTR)?this.id=this.node.getAttribute(S.SRE_ID_ATTR):(this.node.setAttribute(S.SRE_ID_ATTR,S.ID_COUNTER.toString()),this.id=S.ID_COUNTER++),this.rootNode=v.getSemanticRoot(t),this.rootId=this.rootNode.getAttribute(c.Attribute.ID),this.xmlString_=n,this.moved=b.WalkerMoves.ENTER}getXml(){return this.xml_||(this.xml_=a.parseInput(this.xmlString_)),this.xml_}getRebuilt(){return this.rebuilt_||this.rebuildStree(),this.rebuilt_}isActive(){return this.active_}activate(){this.isActive()||(this.generator.start(),this.toggleActive_())}deactivate(){this.isActive()&&(b.WalkerState.setState(this.id,this.primaryId()),this.generator.end(),this.toggleActive_())}getFocus(t=!1){return this.focus_||(this.focus_=this.singletonFocus(this.rootId)),t&&this.updateFocus(),this.focus_}setFocus(t){this.focus_=t}getDepth(){return this.levels.depth()-1}isSpeech(){return this.generator.modality===c.Attribute.SPEECH}focusDomNodes(){return this.getFocus().getDomNodes()}focusSemanticNodes(){return this.getFocus().getSemanticNodes()}speech(){var r=this.focusDomNodes();if(!r.length)return"";const n=this.specialMove();if(null!==n)return n;switch(this.moved){case b.WalkerMoves.DEPTH:return this.depth_();case b.WalkerMoves.SUMMARY:return this.summary_();case b.WalkerMoves.DETAIL:return this.detail_();default:{const n=[],a=this.focusSemanticNodes();for(let t=0,e=r.length;tt.id.toString()),this.getRebuilt(),this.node))}rebuildStree(){this.rebuilt_=new g.RebuildStree(this.getXml()),this.rootId=this.rebuilt_.stree.root.id.toString(),this.generator.setRebuilt(this.rebuilt_),this.skeleton=h.SemanticSkeleton.fromTree(this.rebuilt_.stree),this.skeleton.populate(),this.focus_=this.singletonFocus(this.rootId),this.levels=this.initLevels(),f.connectMactions(this.node,this.getXml(),this.rebuilt_.xml)}previousLevel(){var t=this.getFocus().getDomPrimary();return t?v.getAttribute(t,c.Attribute.PARENT):this.getFocus().getSemanticPrimary().parent.id.toString()}nextLevel(){var t=this.getFocus().getDomPrimary();let e,r;if(t){e=v.splitAttribute(v.getAttribute(t,c.Attribute.CHILDREN)),r=v.splitAttribute(v.getAttribute(t,c.Attribute.CONTENT));const n=v.getAttribute(t,c.Attribute.TYPE),o=v.getAttribute(t,c.Attribute.ROLE);return this.combineContentChildren(n,o,r,e)}const n=t=>t.id.toString(),o=this.getRebuilt().nodeDict[this.primaryId()];return e=o.childNodes.map(n),r=o.contentNodes.map(n),0===e.length?[]:this.combineContentChildren(o.type,o.role,r,e)}singletonFocus(t){this.getRebuilt();var e=this.retrieveVisuals(t);return this.focusFromId(t,e)}retrieveVisuals(t){if(!this.skeleton)return[t];const e=parseInt(t,10),r=this.skeleton.subtreeNodes(e);if(!r.length)return[t];r.unshift(e);const n={},o=[];_.updateEvaluator(this.getXml());for(const t of r)n[t]||(o.push(t.toString()),n[t]=!0,this.subtreeIds(t,n));return o}subtreeIds(t,e){t=_.evalXPath(`//*[@data-semantic-id="${t}"]`,this.getXml());_.evalXPath("*//@data-semantic-id",t[0]).forEach(t=>e[parseInt(t.textContent,10)]=!0)}focusFromId(t,e){return y.Focus.factory(t,e,this.getRebuilt(),this.node)}summary(){return this.moved=this.isSpeech()?b.WalkerMoves.SUMMARY:b.WalkerMoves.REPEAT,this.getFocus().clone()}detail(){return this.moved=this.isSpeech()?b.WalkerMoves.DETAIL:b.WalkerMoves.REPEAT,this.getFocus().clone()}specialMove(){return null}virtualize(t){return this.cursors.push({focus:this.getFocus(),levels:this.levels,undo:t||!this.cursors.length}),this.levels=this.levels.clone(),this.getFocus().clone()}previous(){var t=this.cursors.pop();return t?(this.levels=t.levels,t.focus):this.getFocus()}undo(){let t;for(;(t=this.cursors.pop())&&!t.undo;);return t?(this.levels=t.levels,t.focus):this.getFocus()}update(t){this.generator.setOptions(t),(0,s.setup)(t).then(()=>d.generator("Tree").getSpeech(this.node,this.getXml()))}nextRules(){const t=this.generator.getOptions();return"speech"!==t.modality?this.getFocus():(n.DOMAIN_TO_STYLES[t.domain]=t.style,t.domain="mathspeak"===t.domain?"clearspeak":"mathspeak",t.style=n.DOMAIN_TO_STYLES[t.domain],this.update(t),this.moved=b.WalkerMoves.REPEAT,this.getFocus().clone())}nextStyle(t,e){if("mathspeak"===t){const t=["default","brief","sbrief"],n=t.indexOf(e);return-1===n?e:n>=t.length-1?t[0]:t[n+1]}if("clearspeak"!==t)return e;{const t=m.ClearspeakPreferences.getLocalePreferences().en;if(!t)return"default";const o=m.ClearspeakPreferences.relevantPreferences(this.getFocus().getSemanticPrimary()),i=m.ClearspeakPreferences.findPreference(e,o),a=t[o].map(function(t){return t.split("_")[1]}),s=a.indexOf(i);if(-1===s)return e;var r=s>=a.length-1?a[0]:a[s+1];return m.ClearspeakPreferences.addPreference(e,o,r)}}previousRules(){const t=this.generator.getOptions();return"speech"!==t.modality?this.getFocus():(t.style=this.nextStyle(t.domain,t.style),this.update(t),this.moved=b.WalkerMoves.REPEAT,this.getFocus().clone())}refocus(){let t,e=this.getFocus();for(;!e.getNodes().length;){t=this.levels.peek();var r=this.up();if(!r)break;this.setFocus(r),e=this.getFocus(!0)}this.levels.push(t),this.setFocus(e)}toggleActive_(){this.active_=!this.active_}mergePrefix_(t,e=[]){var r=this.isSpeech()?this.prefix_():"",r=(r&&t.unshift(r),this.isSpeech()?this.postfix_():"");return r&&t.push(r),i.finalize(i.merge(e.concat(t)))}prefix_(){var t=this.getFocus().getDomNodes(),e=this.getFocus().getSemanticNodes();return t[0]?v.getAttribute(t[0],c.Attribute.PREFIX):f.retrievePrefix(e[0])}postfix_(){var t=this.getFocus().getDomNodes();return t[0]?v.getAttribute(t[0],c.Attribute.POSTFIX):""}depth_(){var t=p.Grammar.getInstance().getParameter("depth"),e=(p.Grammar.getInstance().setParameter("depth",!0),this.getFocus().getDomPrimary()),e=this.expandable(e)?u.LOCALE.MESSAGES.navigate.EXPANDABLE:this.collapsible(e)?u.LOCALE.MESSAGES.navigate.COLLAPSIBLE:"",r=u.LOCALE.MESSAGES.navigate.LEVEL+" "+this.getDepth(),n=this.getFocus().getSemanticNodes(),n=f.retrievePrefix(n[0]),r=[new o.AuditoryDescription({text:r,personality:{}}),new o.AuditoryDescription({text:n,personality:{}}),new o.AuditoryDescription({text:e,personality:{}})];return p.Grammar.getInstance().setParameter("depth",t),i.finalize(i.markup(r))}actionable_(t){t=null==t?void 0:t.parentNode;return t&&this.highlighter.isMactionNode(t)?t:null}summary_(){var t=this.getFocus().getSemanticPrimary().id.toString(),t=this.getRebuilt().xml.getAttribute("id")===t?this.getRebuilt().xml:a.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",t)[0],t=f.retrieveSummary(t);return this.mergePrefix_([t])}detail_(){const t=this.getFocus().getSemanticPrimary().id.toString(),e=this.getRebuilt().xml.getAttribute("id")===t?this.getRebuilt().xml:a.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",t)[0],r=e.getAttribute("alternative");e.removeAttribute("alternative");var n=f.computeMarkup(e),n=this.mergePrefix_([n]);return e.setAttribute("alternative",r),n}}(e.AbstractWalker=S).ID_COUNTER=0,S.SRE_ID_ATTR="sre-explorer-id"},162:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.DummyWalker=void 0;class n extends r(3284).AbstractWalker{up(){return null}down(){return null}left(){return null}right(){return null}repeat(){return null}depth(){return null}home(){return null}getDepth(){return 0}initLevels(){return null}combineContentChildren(t,e,r,n){return[]}findFocusOnLevel(t){return null}}e.DummyWalker=n},7730:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Focus=void 0;const p=r(1204);class h{constructor(t,e){this.nodes=t,this.primary=e,this.domNodes=[],this.domPrimary_=null,this.allNodes=[]}static factory(t,e,r,n){const o=t=>p.getBySemanticId(n,t),i=r.nodeDict,a=o(t),s=e.map(o),l=e.map(function(t){return i[t]}),c=new h(l,i[t]);return c.domNodes=s,c.domPrimary_=a,c.allNodes=h.generateAllVisibleNodes_(e,s,i,n),c}static generateAllVisibleNodes_(r,n,o,i){var a=t=>p.getBySemanticId(i,t);let s=[];for(let t=0,e=r.length;t=e.length?null:e[t]}depth(){return this.level_.length}clone(){const t=new r;return t.level_=this.level_.slice(0),t}toString(){let r="";for(let t,e=0;t=this.level_[e];e++)r+="\n"+t.map(function(t){return t.toString()});return r}}},1214:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.RebuildStree=void 0;const n=r(5740),c=r(2298),o=r(3588),i=r(6537),a=r(3308),s=r(5656),l=r(7075),u=r(4795),p=r(1204);class h{constructor(t){this.mathml=t,this.factory=new i.SemanticNodeFactory,this.nodeDict={},this.mmlRoot=p.getSemanticRoot(t),this.streeRoot=this.assembleTree(this.mmlRoot),this.stree=l.SemanticTree.fromNode(this.streeRoot,this.mathml),this.xml=this.stree.xml(),a.default.getInstance().setNodeFactory(this.factory)}static addAttributes(t,e,r){r&&1===e.childNodes.length&&e.childNodes[0].nodeType!==n.NodeType.TEXT_NODE&&u.addAttributes(t,e.childNodes[0]),u.addAttributes(t,e)}static textContent(t,e,r){!r&&e.textContent?t.textContent=e.textContent:1<(r=p.splitAttribute(p.getAttribute(e,c.Attribute.OPERATOR))).length&&(t.textContent=r[1])}static isPunctuated(t){return!s.SemanticSkeleton.simpleCollapseStructure(t)&&t[1]&&s.SemanticSkeleton.contentCollapseStructure(t[1])}getTree(){return this.stree}assembleTree(t){const e=this.makeNode(t),r=p.splitAttribute(p.getAttribute(t,c.Attribute.CHILDREN)),n=p.splitAttribute(p.getAttribute(t,c.Attribute.CONTENT));if(h.addAttributes(e,t,!(r.length||n.length)),0===n.length&&0===r.length)return h.textContent(e,t),e;if(0this.setParent(t,e)),e.childNodes=r.map(t=>this.setParent(t,e));t=p.getAttribute(t,c.Attribute.COLLAPSED);return t?this.postProcess(e,t):e}makeNode(t){const e=p.getAttribute(t,c.Attribute.TYPE),r=p.getAttribute(t,c.Attribute.ROLE),n=p.getAttribute(t,c.Attribute.FONT),o=p.getAttribute(t,c.Attribute.ANNOTATION)||"",i=p.getAttribute(t,c.Attribute.ID),a=p.getAttribute(t,c.Attribute.EMBELLISHED),s=p.getAttribute(t,c.Attribute.FENCEPOINTER),l=this.createNode(parseInt(i,10));return l.type=e,l.role=r,l.font=n||"unknown",l.parseAnnotation(o),s&&(l.fencePointer=s),a&&(l.embellished=a),l}makePunctuation(t){const e=this.createNode(t);return e.updateContent((0,o.invisibleComma)()),e.role="dummy",e}makePunctuated(t,e,r){const n=this.createNode(e[0]),o=(n.type="punctuated",n.embellished=t.embellished,n.fencePointer=t.fencePointer,n.role=r,e.splice(1,1)[0].slice(1));n.contentNodes=o.map(this.makePunctuation.bind(this)),this.collapsedChildren_(e)}makeEmpty(t,e,r){const n=this.createNode(e);n.type="empty",n.embellished=t.embellished,n.fencePointer=t.fencePointer,n.role=r}makeIndex(t,e,r){if(h.isPunctuated(e))return this.makePunctuated(t,e,r),void e[0];s.SemanticSkeleton.simpleCollapseStructure(e)&&!this.nodeDict[e.toString()]&&this.makeEmpty(t,e,r)}postProcess(t,e){const r=s.SemanticSkeleton.fromString(e).array;if("subsup"===t.type){const e=this.createNode(r[1][0]);return e.type="subscript",e.role="subsup",t.type="superscript",e.embellished=t.embellished,e.fencePointer=t.fencePointer,this.makeIndex(t,r[1][2],"rightsub"),this.makeIndex(t,r[2],"rightsuper"),this.collapsedChildren_(r),t}if("subscript"===t.type)return this.makeIndex(t,r[2],"rightsub"),this.collapsedChildren_(r),t;if("superscript"===t.type)return this.makeIndex(t,r[2],"rightsuper"),this.collapsedChildren_(r),t;if("tensor"===t.type)return this.makeIndex(t,r[2],"leftsub"),this.makeIndex(t,r[3],"leftsuper"),this.makeIndex(t,r[4],"rightsub"),this.makeIndex(t,r[5],"rightsuper"),this.collapsedChildren_(r),t;if("punctuated"===t.type){if(h.isPunctuated(r)){const e=r.splice(1,1)[0].slice(1);t.contentNodes=e.map(this.makePunctuation.bind(this))}return t}if("underover"!==t.type)return t;{const e=this.createNode(r[1][0]);return"overaccent"===t.childNodes[1].role?(e.type="overscore",t.type="underscore"):(e.type="underscore",t.type="overscore"),e.role="underover",e.embellished=t.embellished,e.fencePointer=t.fencePointer,this.collapsedChildren_(r),t}}createNode(t){var e=this.factory.makeNode(t);return this.nodeDict[t.toString()]=e}collapsedChildren_(t){const i=r=>{const n=this.nodeDict[r[0]];n.childNodes=[];for(let t=1,e=r.length;tt.getSemanticPrimary().id===e)}}e.SemanticWalker=i},9806:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SyntaxWalker=void 0;const o=r(707),n=r(3284),i=r(9797);class a extends n.AbstractWalker{constructor(t,e,r,n){super(t,e,r,n),this.node=t,this.generator=e,this.highlighter=r,this.levels=null,this.restoreState()}initLevels(){const t=new i.Levels;return t.push([this.primaryId()]),t}up(){super.up();var t=this.previousLevel();return t?(this.levels.pop(),this.singletonFocus(t)):null}down(){super.down();var t=this.nextLevel();if(0===t.length)return null;var e=this.singletonFocus(t[0]);return e&&this.levels.push(t),e}combineContentChildren(t,e,r,n){switch(t){case"relseq":case"infixop":case"multirel":return(0,o.interleaveLists)(n,r);case"prefixop":return r.concat(n);case"postfixop":return n.concat(r);case"matrix":case"vector":case"fenced":return n.unshift(r[0]),n.push(r[1]),n;case"cases":return n.unshift(r[0]),n;case"punctuated":return"text"===e?(0,o.interleaveLists)(n,r):n;case"appl":return[n[0],r[0],n[1]];case"root":return[n[1],n[0]];default:return n}}left(){super.left();var t=this.levels.indexOf(this.primaryId());if(null===t)return null;t=this.levels.get(t-1);return t?this.singletonFocus(t):null}right(){super.right();var t=this.levels.indexOf(this.primaryId());if(null===t)return null;t=this.levels.get(t+1);return t?this.singletonFocus(t):null}findFocusOnLevel(t){return this.singletonFocus(t.toString())}focusDomNodes(){return[this.getFocus().getDomPrimary()]}focusSemanticNodes(){return[this.getFocus().getSemanticPrimary()]}}e.SyntaxWalker=a},1799:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.TableWalker=void 0;const i=r(5740),o=r(8496),n=r(9806),a=r(179);class s extends n.SyntaxWalker{constructor(t,e,r,n){super(t,e,r,n),this.node=t,this.generator=e,this.highlighter=r,this.firstJump=null,this.key_=null,this.row_=0,this.currentTable_=null,this.keyMapping.set(o.KeyCode.ZERO,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.ONE,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.TWO,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.THREE,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.FOUR,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.FIVE,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.SIX,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.SEVEN,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.EIGHT,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.NINE,this.jumpCell.bind(this))}move(t){this.key_=t;t=super.move(t);return this.modifier=!1,t}up(){return this.moved=a.WalkerMoves.UP,this.eligibleCell_()?this.verticalMove_(!1):super.up()}down(){return this.moved=a.WalkerMoves.DOWN,this.eligibleCell_()?this.verticalMove_(!0):super.down()}jumpCell(){if(!this.isInTable_()||null===this.key_)return this.getFocus();if(this.moved===a.WalkerMoves.ROW){this.moved=a.WalkerMoves.CELL;const t=this.key_-o.KeyCode.ZERO;return this.isLegalJump_(this.row_,t)?this.jumpCell_(this.row_,t):this.getFocus()}const t=this.key_-o.KeyCode.ZERO;return t>this.currentTable_.childNodes.length?this.getFocus():(this.row_=t,this.moved=a.WalkerMoves.ROW,this.getFocus().clone())}undo(){var t=super.undo();return t===this.firstJump&&(this.firstJump=null),t}eligibleCell_(){var t=this.getFocus().getSemanticPrimary();return this.modifier&&"cell"===t.type&&-1!==s.ELIGIBLE_CELL_ROLES.indexOf(t.role)}verticalMove_(t){var e=this.previousLevel();if(!e)return null;var r=this.getFocus(),n=this.levels.indexOf(this.primaryId()),o=this.levels.pop(),e=this.levels.indexOf(e),t=this.levels.get(t?e+1:e-1);if(!t)return this.levels.push(o),null;this.setFocus(this.singletonFocus(t));e=this.nextLevel();return e[n]?(this.levels.push(e),this.singletonFocus(e[n])):(this.setFocus(r),this.levels.push(o),null)}jumpCell_(t,e){this.firstJump?this.virtualize(!1):(this.firstJump=this.getFocus(),this.virtualize(!0));var r=this.currentTable_.id.toString();let n;for(;-1===(n=this.levels.pop()).indexOf(r););this.levels.push(n),this.setFocus(this.singletonFocus(r)),this.levels.push(this.nextLevel());const o=this.currentTable_.childNodes[t-1];return this.setFocus(this.singletonFocus(o.id.toString())),this.levels.push(this.nextLevel()),this.singletonFocus(o.childNodes[e-1].id.toString())}isLegalJump_(t,e){const r=i.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",this.currentTable_.id.toString())[0];if(!r||r.hasAttribute("alternative"))return!1;const n=this.currentTable_.childNodes[t-1];if(!n)return!1;const o=i.querySelectorAllByAttrValue(r,"id",n.id.toString())[0];return!(!o||o.hasAttribute("alternative")||!n||!n.childNodes[e-1])}isInTable_(){let t=this.getFocus().getSemanticPrimary();for(;t;){if(-1!==s.ELIGIBLE_TABLE_TYPES.indexOf(t.type))return this.currentTable_=t,!0;t=t.parent}return!1}}(e.TableWalker=s).ELIGIBLE_CELL_ROLES=["determinant","rowvector","binomial","squarematrix","multiline","matrix","vector","cases","table"],s.ELIGIBLE_TABLE_TYPES=["multiline","matrix","vector","cases","table"]},179:function(t,e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.WalkerState=e.WalkerMoves=void 0,(r=e.WalkerMoves||(e.WalkerMoves={})).UP="up",r.DOWN="down",r.LEFT="left",r.RIGHT="right",r.REPEAT="repeat",r.DEPTH="depth",r.ENTER="enter",r.EXPAND="expand",r.HOME="home",r.SUMMARY="summary",r.DETAIL="detail",r.ROW="row",r.CELL="cell";class n{static resetState(t){delete n.STATE[t]}static setState(t,e){n.STATE[t]=e}static getState(t){return n.STATE[t]}}(e.WalkerState=n).STATE={}},3362:function(t,i,e){Object.defineProperty(i,"__esModule",{value:!0}),i.walkerMapping_=i.walker=void 0;const o=e(162),a=e(6295),s=e(9806),l=e(1799);i.walker=function(t,e,r,n,o){return(i.walkerMapping_[t.toLowerCase()]||i.walkerMapping_.dummy)(e,r,n,o)},i.walkerMapping_={dummy:(t,e,r,n)=>new o.DummyWalker(t,e,r,n),semantic:(t,e,r,n)=>new a.SemanticWalker(t,e,r,n),syntax:(t,e,r,n)=>new s.SyntaxWalker(t,e,r,n),table:(t,e,r,n)=>new l.TableWalker(t,e,r,n)}},1204:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.getBySemanticId=e.getSemanticRoot=e.getAttribute=e.splitAttribute=void 0;const n=r(5740),o=r(2298);e.splitAttribute=function(t){return t?t.split(/,/):[]},e.getAttribute=function(t,e){return t.getAttribute(e)},e.getSemanticRoot=function(t){if(t.hasAttribute(o.Attribute.TYPE)&&!t.hasAttribute(o.Attribute.PARENT))return t;var r=n.querySelectorAllByAttr(t,o.Attribute.TYPE);for(let t,e=0;t=r[e];e++)if(!t.hasAttribute(o.Attribute.PARENT))return t;return t},e.getBySemanticId=function(t,e){return t.getAttribute(o.Attribute.ID)===e?t:n.querySelectorAllByAttrValue(t,o.Attribute.ID,e)[0]}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;e=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(e.exports,e,e.exports,__webpack_require__),e.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var __webpack_exports__={};!function(){var t=__webpack_require__(9515),e=__webpack_require__(3282),r=__webpack_require__(235),j=__webpack_require__(265),n=__webpack_require__(2388);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r + + diff --git a/docs/index.html b/docs/index.html index 9e2cb5b..b93fea0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,11 +12,12 @@ - + - + + @@ -50,6 +51,7 @@
        • Deploying Your Models in a Shiny App
        • Trial/Rule-Based Simulations
        • +
        • Estimation of In Vitro/Static Systems
        • Non-Compartmental Analysis
        • Integrated Word and PowerPoint Reporting
        • diff --git a/docs/news/index.html b/docs/news/index.html index 10acefc..59f4318 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,5 +1,5 @@ -Changelog • ubiquity +Changelog • ubiquity Skip to contents @@ -26,6 +26,7 @@
        • Deploying Your Models in a Shiny App
        • Trial/Rule-Based Simulations
        • +
        • Estimation of In Vitro/Static Systems
        • Non-Compartmental Analysis
        • Integrated Word and PowerPoint Reporting
        • @@ -209,7 +210,7 @@

          Bug Fixeshalflife=NCA.reshalflife = NCA.resresult[NCA.resresultresultPPTESTCD == “half.life”, : Coercing LHS to a list +
        • Removed coercion warnings: In tmpsumhalflife = NCA.resresult[NCA.resresultPPTESTCD == “half.life”, : Coercing LHS to a list
        • Removed digits input from system_nca_run (this is now handled with system_nca_summary below)
        • Fixed coercion warnings for covariates when building the system
        • Using explicit declaration of officer functions and specifying those in importFrom this is to prevent namespace issues with readxl to allow the function readxl::read_xlsx
        • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 9c311b6..a0f5d9a 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,12 +5,13 @@ articles: Deployment: Deployment.html Estimation: Estimation.html Howto: Howto.html + In_Vitro: In_Vitro.html Language: Language.html NCA: NCA.html Reporting: Reporting.html Simulation: Simulation.html Titration: Titration.html -last_built: 2024-10-20T03:26Z +last_built: 2024-10-20T23:28Z urls: reference: https://r.ubiquity.tools/reference article: https://r.ubiquity.tools/articles diff --git a/docs/reference/AUC_Bailers_method.html b/docs/reference/AUC_Bailers_method.html index f7e6b22..5b6442e 100644 --- a/docs/reference/AUC_Bailers_method.html +++ b/docs/reference/AUC_Bailers_method.html @@ -1,5 +1,5 @@ -Calculate AUC for Sparse Data — AUC_Bailers_method • ubiquityCalculate AUC for Sparse Data — AUC_Bailers_method • ubiquityOther Analysis Options

        • Deploying Your Models in a Shiny App
        • Trial/Rule-Based Simulations
        • +
        • Estimation of In Vitro/Static Systems
        • Non-Compartmental Analysis
        • Integrated Word and PowerPoint Reporting
        • diff --git a/docs/reference/GUI_log_entry.html b/docs/reference/GUI_log_entry.html index dfdfab8..594989c 100644 --- a/docs/reference/GUI_log_entry.html +++ b/docs/reference/GUI_log_entry.html @@ -1,5 +1,5 @@ -Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry • ubiquity Skip to contents @@ -28,6 +28,7 @@
        • Deploying Your Models in a Shiny App
        • Trial/Rule-Based Simulations
        • +
        • Estimation of In Vitro/Static Systems
        • Non-Compartmental Analysis
        • Integrated Word and PowerPoint Reporting
        • diff --git a/docs/reference/apply_sub_file_COV.html b/docs/reference/apply_sub_file_COV.html index e218bca..38a8cdf 100644 --- a/docs/reference/apply_sub_file_COV.html +++ b/docs/reference/apply_sub_file_COV.html @@ -1,5 +1,5 @@ -Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV • ubiquityExtracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV • ubiquityOther Analysis Options

      • Deploying Your Models in a Shiny App
      • Trial/Rule-Based Simulations
      • +
      • Estimation of In Vitro/Static Systems
      • Non-Compartmental Analysis
      • Integrated Word and PowerPoint Reporting
      • diff --git a/docs/reference/archive_estimation.html b/docs/reference/archive_estimation.html index d35b53f..227f905 100644 --- a/docs/reference/archive_estimation.html +++ b/docs/reference/archive_estimation.html @@ -1,5 +1,5 @@ -Archive Estimation Results — archive_estimation • ubiquityArchive Estimation Results — archive_estimation • ubiquityOther Analysis Options

    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/build_system.html b/docs/reference/build_system.html index f05bded..b8d04cf 100644 --- a/docs/reference/build_system.html +++ b/docs/reference/build_system.html @@ -1,5 +1,5 @@ -Build the System File — build_system • ubiquity +Build the System File — build_system • ubiquity Skip to contents @@ -26,6 +26,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • @@ -133,7 +134,7 @@

      Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Creating output directory diff --git a/docs/reference/calculate_halflife.html b/docs/reference/calculate_halflife.html index 3bc7513..161cba2 100644 --- a/docs/reference/calculate_halflife.html +++ b/docs/reference/calculate_halflife.html @@ -1,5 +1,5 @@ -Calculate the halflife of data — calculate_halflife • ubiquity +Calculate the halflife of data — calculate_halflife • ubiquity Skip to contents @@ -26,6 +26,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/calculate_objective.html b/docs/reference/calculate_objective.html index b7f16e5..caacf85 100644 --- a/docs/reference/calculate_objective.html +++ b/docs/reference/calculate_objective.html @@ -1,5 +1,5 @@ -Calculates the Value of the Specified Objective Function — calculate_objective • ubiquityCalculates the Value of the Specified Objective Function — calculate_objective • ubiquity Skip to contents @@ -28,6 +28,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/calculate_objective_ga.html b/docs/reference/calculate_objective_ga.html index 500eee0..5ae6f57 100644 --- a/docs/reference/calculate_objective_ga.html +++ b/docs/reference/calculate_objective_ga.html @@ -1,5 +1,5 @@ -GA Wrapper for calculate_objective — calculate_objective_ga • ubiquityGA Wrapper for calculate_objective — calculate_objective_ga • ubiquity Skip to contents @@ -28,6 +28,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/calculate_objective_pso.html b/docs/reference/calculate_objective_pso.html index 546c333..acc5d93 100644 --- a/docs/reference/calculate_objective_pso.html +++ b/docs/reference/calculate_objective_pso.html @@ -1,5 +1,5 @@ -pso Wrapper for calculate_objective — calculate_objective_pso • ubiquitypso Wrapper for calculate_objective — calculate_objective_pso • ubiquityOther Analysis Options

    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/calculate_variance.html b/docs/reference/calculate_variance.html index 4dc5dae..7f8ef60 100644 --- a/docs/reference/calculate_variance.html +++ b/docs/reference/calculate_variance.html @@ -1,5 +1,5 @@ -Calculates the Variance in od_general — calculate_variance • ubiquityCalculates the Variance in od_general — calculate_variance • ubiquity Skip to contents @@ -28,6 +28,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/check_steady_state.html b/docs/reference/check_steady_state.html index fe7acc5..4044bbf 100644 --- a/docs/reference/check_steady_state.html +++ b/docs/reference/check_steady_state.html @@ -1,5 +1,5 @@ -Verify System Steady State — check_steady_state • ubiquity +Verify System Steady State — check_steady_state • ubiquity Skip to contents @@ -26,6 +26,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/compare_estimate.html b/docs/reference/compare_estimate.html index 55c8393..248b1bb 100644 --- a/docs/reference/compare_estimate.html +++ b/docs/reference/compare_estimate.html @@ -1,5 +1,5 @@ -Compares Estimate to Bounds — compare_estimate • ubiquityCompares Estimate to Bounds — compare_estimate • ubiquity Skip to contents @@ -28,6 +28,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/estimate_parameters.html b/docs/reference/estimate_parameters.html index 7fc5e9b..82397aa 100644 --- a/docs/reference/estimate_parameters.html +++ b/docs/reference/estimate_parameters.html @@ -1,5 +1,5 @@ -Performs parameter estimation — estimate_parameters • ubiquity +Performs parameter estimation — estimate_parameters • ubiquity Skip to contents @@ -26,6 +26,7 @@
    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/fetch_full_parameters.html b/docs/reference/fetch_full_parameters.html index 22f3bd7..0e1496a 100644 --- a/docs/reference/fetch_full_parameters.html +++ b/docs/reference/fetch_full_parameters.html @@ -1,5 +1,5 @@ -Create Full Parameter Vector from Estimation Subset — fetch_full_parameters • ubiquityCreate Full Parameter Vector from Estimation Subset — fetch_full_parameters • ubiquityOther Analysis Options

    • Deploying Your Models in a Shiny App
    • Trial/Rule-Based Simulations
    • +
    • Estimation of In Vitro/Static Systems
    • Non-Compartmental Analysis
    • Integrated Word and PowerPoint Reporting
    • diff --git a/docs/reference/find_bracketed_arguments.html b/docs/reference/find_bracketed_arguments.html index 896a9cd..9f47b1f 100644 --- a/docs/reference/find_bracketed_arguments.html +++ b/docs/reference/find_bracketed_arguments.html @@ -1,5 +1,5 @@ -Parse Prototype Functions for Arguments — find_bracketed_arguments • ubiquityParse Prototype Functions for Arguments — find_bracketed_arguments • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/generate_parameter.html b/docs/reference/generate_parameter.html index 56624e3..aa6ff0e 100644 --- a/docs/reference/generate_parameter.html +++ b/docs/reference/generate_parameter.html @@ -1,5 +1,5 @@ -Generates a Parameter Based on <IIV:?> in the System File — generate_parameter • ubiquity +Generates a Parameter Based on <IIV:?> in the System File — generate_parameter • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/generate_report.html b/docs/reference/generate_report.html index 030609f..6f05cfa 100644 --- a/docs/reference/generate_report.html +++ b/docs/reference/generate_report.html @@ -1,5 +1,5 @@ -Generate Text Report with Estimation Results — generate_report • ubiquity +Generate Text Report with Estimation Results — generate_report • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/generate_subject.html b/docs/reference/generate_subject.html index 9cd16c4..bb87e65 100644 --- a/docs/reference/generate_subject.html +++ b/docs/reference/generate_subject.html @@ -1,5 +1,5 @@ -Generate Subject — generate_subject • ubiquityGenerate Subject — generate_subject • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/gg_axis.html b/docs/reference/gg_axis.html index 0446178..c8ab25c 100644 --- a/docs/reference/gg_axis.html +++ b/docs/reference/gg_axis.html @@ -1,5 +1,5 @@ -Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis • ubiquity +Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/gg_log10_xaxis.html b/docs/reference/gg_log10_xaxis.html index 265a1ee..130e529 100644 --- a/docs/reference/gg_log10_xaxis.html +++ b/docs/reference/gg_log10_xaxis.html @@ -1,5 +1,5 @@ -Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis • ubiquity +Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/gg_log10_yaxis.html b/docs/reference/gg_log10_yaxis.html index 5e7ac67..6abae56 100644 --- a/docs/reference/gg_log10_yaxis.html +++ b/docs/reference/gg_log10_yaxis.html @@ -1,5 +1,5 @@ -Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis • ubiquity +Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/index.html b/docs/reference/index.html index 66403d4..11a5530 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,5 +1,5 @@ -Package index • ubiquity +Package index • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/linspace.html b/docs/reference/linspace.html index 6889be0..ad38152 100644 --- a/docs/reference/linspace.html +++ b/docs/reference/linspace.html @@ -1,5 +1,5 @@ -Implementation of the linspace Function from Matlab — linspace • ubiquity +Implementation of the linspace Function from Matlab — linspace • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/logspace.html b/docs/reference/logspace.html index 1dc5bc5..70ba84a 100644 --- a/docs/reference/logspace.html +++ b/docs/reference/logspace.html @@ -1,5 +1,5 @@ -Implementation of the logspace Function from Matlab — logspace • ubiquity +Implementation of the logspace Function from Matlab — logspace • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/make_forcing_function.html b/docs/reference/make_forcing_function.html index 9fd9fe0..28919cc 100644 --- a/docs/reference/make_forcing_function.html +++ b/docs/reference/make_forcing_function.html @@ -1,5 +1,5 @@ -Makes Forcing Function From Times and Values — make_forcing_function • ubiquity +Makes Forcing Function From Times and Values — make_forcing_function • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/nm_select_records.html b/docs/reference/nm_select_records.html index d78ee61..842aab6 100644 --- a/docs/reference/nm_select_records.html +++ b/docs/reference/nm_select_records.html @@ -1,5 +1,5 @@ -Select Records from NONMEM-ish Data Set — nm_select_records • ubiquity +Select Records from NONMEM-ish Data Set — nm_select_records • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/pad_string.html b/docs/reference/pad_string.html index aac3b89..d1cadb9 100644 --- a/docs/reference/pad_string.html +++ b/docs/reference/pad_string.html @@ -1,5 +1,5 @@ -Pad String with Spaces — pad_string • ubiquity +Pad String with Spaces — pad_string • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/parse_patterns.html b/docs/reference/parse_patterns.html index 71a8b8b..92baf0f 100644 --- a/docs/reference/parse_patterns.html +++ b/docs/reference/parse_patterns.html @@ -1,5 +1,5 @@ -Parse String for Prototype Functions — parse_patterns • ubiquity +Parse String for Prototype Functions — parse_patterns • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/prepare_figure.html b/docs/reference/prepare_figure.html index 0319b20..a1d3185 100644 --- a/docs/reference/prepare_figure.html +++ b/docs/reference/prepare_figure.html @@ -1,5 +1,5 @@ -Make ggplot Figure Pretty — prepare_figure • ubiquityMake ggplot Figure Pretty — prepare_figure • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/run_simulation_titrate.html b/docs/reference/run_simulation_titrate.html index 86dfe97..1add6aa 100644 --- a/docs/reference/run_simulation_titrate.html +++ b/docs/reference/run_simulation_titrate.html @@ -1,5 +1,5 @@ -Simulate With Titration or Rule-Based Inputs — run_simulation_titrate • ubiquitySimulate With Titration or Rule-Based Inputs — run_simulation_titrate • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/run_simulation_ubiquity.html b/docs/reference/run_simulation_ubiquity.html index 93a9986..89852c0 100644 --- a/docs/reference/run_simulation_ubiquity.html +++ b/docs/reference/run_simulation_ubiquity.html @@ -1,5 +1,5 @@ -Simulate Individual Response — run_simulation_ubiquity • ubiquity +Simulate Individual Response — run_simulation_ubiquity • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/sample_around.html b/docs/reference/sample_around.html index c8bd297..257b11b 100644 --- a/docs/reference/sample_around.html +++ b/docs/reference/sample_around.html @@ -1,5 +1,5 @@ -Define Sample Times Around Events — sample_around • ubiquityDefine Sample Times Around Events — sample_around • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/simulate_subjects.html b/docs/reference/simulate_subjects.html index fddacf3..dfed016 100644 --- a/docs/reference/simulate_subjects.html +++ b/docs/reference/simulate_subjects.html @@ -1,5 +1,5 @@ -Run Population Simulations — simulate_subjects • ubiquityRun Population Simulations — simulate_subjects • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/solution_statistics.html b/docs/reference/solution_statistics.html index c93fa90..0581c45 100644 --- a/docs/reference/solution_statistics.html +++ b/docs/reference/solution_statistics.html @@ -1,5 +1,5 @@ -Calculate Solution Statistics — solution_statistics • ubiquityCalculate Solution Statistics — solution_statistics • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/som_to_df.html b/docs/reference/som_to_df.html index 64af856..44ca03b 100644 --- a/docs/reference/som_to_df.html +++ b/docs/reference/som_to_df.html @@ -1,5 +1,5 @@ -Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df • ubiquityCreate New system.txt File — system_new • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_rpt_add_doc_content.html b/docs/reference/system_rpt_add_doc_content.html index 302046c..1356db3 100644 --- a/docs/reference/system_rpt_add_doc_content.html +++ b/docs/reference/system_rpt_add_doc_content.html @@ -1,5 +1,5 @@ -Adds Content to a Word Report — system_rpt_add_doc_content • ubiquity +Adds Content to a Word Report — system_rpt_add_doc_content • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_rpt_add_slide.html b/docs/reference/system_rpt_add_slide.html index b26a46d..b28fbbe 100644 --- a/docs/reference/system_rpt_add_slide.html +++ b/docs/reference/system_rpt_add_slide.html @@ -1,5 +1,5 @@ -Add Slide to a Powerpoint Report — system_rpt_add_slide • ubiquity +Add Slide to a Powerpoint Report — system_rpt_add_slide • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_rpt_estimation.html b/docs/reference/system_rpt_estimation.html index f5c7daa..a21c2fb 100644 --- a/docs/reference/system_rpt_estimation.html +++ b/docs/reference/system_rpt_estimation.html @@ -1,5 +1,5 @@ -Generate a Report from Parameter Estimation — system_rpt_estimation • ubiquity +Generate a Report from Parameter Estimation — system_rpt_estimation • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_rpt_nca.html b/docs/reference/system_rpt_nca.html index dd1fff5..c4efd56 100644 --- a/docs/reference/system_rpt_nca.html +++ b/docs/reference/system_rpt_nca.html @@ -1,5 +1,5 @@ -Report NCA — system_rpt_nca • ubiquity +Report NCA — system_rpt_nca • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_rpt_read_template.html b/docs/reference/system_rpt_read_template.html index b0ee728..37ecd0a 100644 --- a/docs/reference/system_rpt_read_template.html +++ b/docs/reference/system_rpt_read_template.html @@ -1,5 +1,5 @@ -Initialize a New Report — system_rpt_read_template • ubiquityInitialize a New Report — system_rpt_read_template • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_rpt_save_report.html b/docs/reference/system_rpt_save_report.html index cce2c28..57ec584 100644 --- a/docs/reference/system_rpt_save_report.html +++ b/docs/reference/system_rpt_save_report.html @@ -1,5 +1,5 @@ -Save Report to a File — system_rpt_save_report • ubiquity +Save Report to a File — system_rpt_save_report • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_rpt_template_details.html b/docs/reference/system_rpt_template_details.html index e3b8544..c88c0fc 100644 --- a/docs/reference/system_rpt_template_details.html +++ b/docs/reference/system_rpt_template_details.html @@ -1,5 +1,5 @@ -Generate Details about Report Template — system_rpt_template_details • ubiquityGenerate Details about Report Template — system_rpt_template_details • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_select_set.html b/docs/reference/system_select_set.html index 50ddd3a..1ee54f3 100644 --- a/docs/reference/system_select_set.html +++ b/docs/reference/system_select_set.html @@ -1,5 +1,5 @@ -Selecting Parameter Sets — system_select_set • ubiquitySelecting Parameter Sets — system_select_set • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -113,7 +114,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system diff --git a/docs/reference/system_set_bolus.html b/docs/reference/system_set_bolus.html index e1450f0..ecc898b 100644 --- a/docs/reference/system_set_bolus.html +++ b/docs/reference/system_set_bolus.html @@ -1,5 +1,5 @@ -Set Bolus Inputs — system_set_bolus • ubiquity +Set Bolus Inputs — system_set_bolus • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -112,7 +113,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system diff --git a/docs/reference/system_set_covariate.html b/docs/reference/system_set_covariate.html index 636696d..4624e56 100644 --- a/docs/reference/system_set_covariate.html +++ b/docs/reference/system_set_covariate.html @@ -1,5 +1,5 @@ -Set Covariate Values — system_set_covariate • ubiquitySet Covariate Values — system_set_covariate • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -114,7 +115,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system diff --git a/docs/reference/system_set_guess.html b/docs/reference/system_set_guess.html index eb3b288..c225093 100644 --- a/docs/reference/system_set_guess.html +++ b/docs/reference/system_set_guess.html @@ -1,5 +1,5 @@ -Alter Initial Guess and Parameter Bounds — system_set_guess • ubiquityAlter Initial Guess and Parameter Bounds — system_set_guess • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_set_iiv.html b/docs/reference/system_set_iiv.html index 5052fc1..6b33686 100644 --- a/docs/reference/system_set_iiv.html +++ b/docs/reference/system_set_iiv.html @@ -1,5 +1,5 @@ -Set Variability Terms — system_set_iiv • ubiquitySet Variability Terms — system_set_iiv • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -115,7 +116,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system diff --git a/docs/reference/system_set_option.html b/docs/reference/system_set_option.html index 5691ae2..a80affc 100644 --- a/docs/reference/system_set_option.html +++ b/docs/reference/system_set_option.html @@ -1,5 +1,5 @@ -Setting Analysis Options — system_set_option • ubiquitySetting Analysis Options — system_set_option • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_set_parameter.html b/docs/reference/system_set_parameter.html index 2c1436d..2983cb3 100644 --- a/docs/reference/system_set_parameter.html +++ b/docs/reference/system_set_parameter.html @@ -1,5 +1,5 @@ -Set Value for Parameter — system_set_parameter • ubiquity +Set Value for Parameter — system_set_parameter • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_set_rate.html b/docs/reference/system_set_rate.html index fb9218b..fb53024 100644 --- a/docs/reference/system_set_rate.html +++ b/docs/reference/system_set_rate.html @@ -1,5 +1,5 @@ -Set Infusion Rate Inputs — system_set_rate • ubiquity +Set Infusion Rate Inputs — system_set_rate • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -112,7 +113,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system diff --git a/docs/reference/system_set_rpt_officer_object.html b/docs/reference/system_set_rpt_officer_object.html index 5ad4b06..3594835 100644 --- a/docs/reference/system_set_rpt_officer_object.html +++ b/docs/reference/system_set_rpt_officer_object.html @@ -1,5 +1,5 @@ -Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object • ubiquitySets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_set_rpt_onbrand_object.html b/docs/reference/system_set_rpt_onbrand_object.html index ab10d3f..7d2aab7 100644 --- a/docs/reference/system_set_rpt_onbrand_object.html +++ b/docs/reference/system_set_rpt_onbrand_object.html @@ -1,5 +1,5 @@ -Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object • ubiquitySets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_set_tt_bolus.html b/docs/reference/system_set_tt_bolus.html index 4d5b21e..6f5b3f2 100644 --- a/docs/reference/system_set_tt_bolus.html +++ b/docs/reference/system_set_tt_bolus.html @@ -1,5 +1,5 @@ -Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus • ubiquityActual Function Called by SI_TT_BOLUS — system_set_tt_bolus • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_set_tt_cond.html b/docs/reference/system_set_tt_cond.html index 74ce04e..d2c0420 100644 --- a/docs/reference/system_set_tt_cond.html +++ b/docs/reference/system_set_tt_cond.html @@ -1,5 +1,5 @@ -Define Titration Triggers and Actions — system_set_tt_cond • ubiquityDefine Titration Triggers and Actions — system_set_tt_cond • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_set_tt_rate.html b/docs/reference/system_set_tt_rate.html index 969dc5a..86b7a7b 100644 --- a/docs/reference/system_set_tt_rate.html +++ b/docs/reference/system_set_tt_rate.html @@ -1,5 +1,5 @@ -Actual Function Called by SI_TT_RATE — system_set_tt_rate • ubiquityActual Function Called by SI_TT_RATE — system_set_tt_rate • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_simulate_estimation_results.html b/docs/reference/system_simulate_estimation_results.html index 858a2df..e7af9a8 100644 --- a/docs/reference/system_simulate_estimation_results.html +++ b/docs/reference/system_simulate_estimation_results.html @@ -1,5 +1,5 @@ -Simulate Results at Estimates — system_simulate_estimation_results • ubiquity +Simulate Results at Estimates — system_simulate_estimation_results • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_ts_to_simtime.html b/docs/reference/system_ts_to_simtime.html index 0a736ab..44c5fbe 100644 --- a/docs/reference/system_ts_to_simtime.html +++ b/docs/reference/system_ts_to_simtime.html @@ -1,5 +1,5 @@ -Convert Time in Timescale to Simulation Time — system_ts_to_simtime • ubiquityConvert Time in Timescale to Simulation Time — system_ts_to_simtime • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/system_view.html b/docs/reference/system_view.html index 1a73b59..1baed7b 100644 --- a/docs/reference/system_view.html +++ b/docs/reference/system_view.html @@ -1,5 +1,5 @@ -View Information About the System — system_view • ubiquityView Information About the System — system_view • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -118,7 +119,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system @@ -158,8 +159,8 @@

    Examples#> → field | values | scaling | units #> → -------------------------------------------------- #> → times | 0 7 14 | 1 | days -#> → At | 400 0 0 | 1e3/MW | mg #> → Cc | 0 0 0 | 1e3/MW/Vc | mg +#> → At | 400 0 0 | 1e3/MW | mg #> → -------------------------------------------------- #> → Infusion rate details #> → Rate | field | values | scaling | units @@ -190,10 +191,10 @@

    Examples#> → ETAQ 0 0 0 0 0.6990 #> #> → On parameters -#> → Vc, ETAVc(LN) -#> → ka, ETAka(LN) -#> → Vp, ETAVp(LN) #> → CL, ETACL(LN) +#> → Vp, ETAVp(LN) +#> → ka, ETAka(LN) +#> → Vc, ETAVc(LN) #> → Q, ETAQ(LN) #> #> → integrate_with c-file diff --git a/docs/reference/system_zero_inputs.html b/docs/reference/system_zero_inputs.html index 85a4911..bb7ad58 100644 --- a/docs/reference/system_zero_inputs.html +++ b/docs/reference/system_zero_inputs.html @@ -1,5 +1,5 @@ -Zero All Model Inputs — system_zero_inputs • ubiquityZero All Model Inputs — system_zero_inputs • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -114,7 +115,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system diff --git a/docs/reference/tic.html b/docs/reference/tic.html index 4966680..78b0ef4 100644 --- a/docs/reference/tic.html +++ b/docs/reference/tic.html @@ -1,5 +1,5 @@ -Implementation of Matlab tic() command — tic • ubiquityImplementation of Matlab tic() command — tic • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -95,7 +96,7 @@

    ExamplesSys.sleep(3) toc() #> elapsed -#> 3.012 +#> 3.007

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/toc.html b/docs/reference/toc.html index 0c8110b..99b0869 100644 --- a/docs/reference/toc.html +++ b/docs/reference/toc.html @@ -1,5 +1,5 @@ -Implementation of Matlab toc() command — toc • ubiquityImplementation of Matlab toc() command — toc • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/ubiquity_name_check.html b/docs/reference/ubiquity_name_check.html index 9bc5b0c..ecbc6ca 100644 --- a/docs/reference/ubiquity_name_check.html +++ b/docs/reference/ubiquity_name_check.html @@ -1,5 +1,5 @@ -Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check • ubiquityCheck Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check • ubiquityOther Analysis Options

  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/var2string.html b/docs/reference/var2string.html index 363a1bc..4cecf55 100644 --- a/docs/reference/var2string.html +++ b/docs/reference/var2string.html @@ -1,5 +1,5 @@ -Converts Numeric Variables into Padded Strings — var2string • ubiquity +Converts Numeric Variables into Padded Strings — var2string • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/var2string_gen.html b/docs/reference/var2string_gen.html index 04abee0..2442bf7 100644 --- a/docs/reference/var2string_gen.html +++ b/docs/reference/var2string_gen.html @@ -1,5 +1,5 @@ -Convert R Objects to Strings — var2string_gen • ubiquity +Convert R Objects to Strings — var2string_gen • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • diff --git a/docs/reference/vp.html b/docs/reference/vp.html index aef8b58..398bb1d 100644 --- a/docs/reference/vp.html +++ b/docs/reference/vp.html @@ -1,5 +1,5 @@ -Print and Log Messages — vp • ubiquity +Print and Log Messages — vp • ubiquity Skip to contents @@ -26,6 +26,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -106,7 +107,7 @@

    Examples output_directory = file.path(tempdir(), "output"), temporary_directory = tempdir()) #> -#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM +#> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system diff --git a/docs/reference/workshop_fetch.html b/docs/reference/workshop_fetch.html index e630c0d..9d6676c 100644 --- a/docs/reference/workshop_fetch.html +++ b/docs/reference/workshop_fetch.html @@ -1,5 +1,5 @@ -Fetch Ubiquity Workshop Sections — workshop_fetch • ubiquityFetch Ubiquity Workshop Sections — workshop_fetch • ubiquity Skip to contents @@ -28,6 +28,7 @@
  • Deploying Your Models in a Shiny App
  • Trial/Rule-Based Simulations
  • +
  • Estimation of In Vitro/Static Systems
  • Non-Compartmental Analysis
  • Integrated Word and PowerPoint Reporting
  • @@ -103,28 +104,28 @@

    Value

    Details

    -

    Valid sections are "Simulation", "Estimation", "Titration" "Reporting", and "NCA"

    +

    Valid sections are "Simulation", "Estimation", "In Vitro", "Titration" "Reporting", and "NCA"

    Examples

    # \donttest{
     workshop_fetch("Estimation", output_directory=tempdir(), overwrite=TRUE)
    -#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent.r
    -#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent_metabolite.r
    -#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent_metabolite_global.r
    -#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent_metabolite_nm_data.r
    -#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/system.txt
    -#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/pm_data.csv
    -#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/nm_data.csv
    +#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent.r
    +#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent_metabolite.r
    +#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent_metabolite_global.r
    +#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent_metabolite_nm_data.r
    +#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/system.txt
    +#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/pm_data.csv
    +#> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/nm_data.csv
     #> $sources
    -#> [1] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent.r"                   
    -#> [2] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent_metabolite.r"        
    -#> [3] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent_metabolite_global.r" 
    -#> [4] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent_metabolite_nm_data.r"
    -#> [5] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/systems/system-adapt.txt"                    
    -#> [6] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/csv/pm_data.csv"                             
    -#> [7] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/csv/nm_data.csv"                             
    +#> [1] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent.r"                   
    +#> [2] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent_metabolite.r"        
    +#> [3] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent_metabolite_global.r" 
    +#> [4] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent_metabolite_nm_data.r"
    +#> [5] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/systems/system-adapt.txt"                    
    +#> [6] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/csv/pm_data.csv"                             
    +#> [7] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/csv/nm_data.csv"                             
     #> 
     #> $destinations
     #> [1] "analysis_parent.r"                   
    diff --git a/docs/search.json b/docs/search.json
    index 3206a30..dd5f1b1 100644
    --- a/docs/search.json
    +++ b/docs/search.json
    @@ -1 +1 @@
    -[{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Model Deployment","text":"model developed may useful provide easy way run simulations automate specific analyses. , ubiquity provides ShinyApp allows model run easy use interface highly customizable. App can run locally (useful meetings answer quick questions) deployed Shiny server allow others access model. demonstrate interface can begin PK model mAbs humans (Davda etal. mAbs, 6(4), 1094-1102) : Use ?system_new see list available system file examples. building system can create ShinyApp template: create following three files: ubiquity_app.R - Script run control ubiquity ShinyApp server.R - Server script ui.R- UI script","code":"library(ubiquity) system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE) cfg = build_system(system_file = \"system.txt\") system_fetch_template(cfg, template = \"ShinyApp\", overwrite = TRUE)"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"running-the-model","dir":"Articles","previous_headings":"","what":"Running the model","title":"Model Deployment","text":"Next simply open ubiquity_app.R RStudio source , RStudio open window associated application. ShinyApp tends work better run within browser. starting App load default dosing file run model. first model output plotted. make changes App, changes reflected user log bottom screen. can change outputs plotted, axis limits, aspects plot using plot controls figure. intent provide quick method get model running default behaviors provide users need. behavior ShinyApp can customized (described ). First discuss default interface:","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"altering-dosing","dir":"Articles","previous_headings":"Running the model","what":"Altering dosing","title":"Model Deployment","text":"list bolus times values can specified comma-separated values. dose repeated fashion check ``Repeat last dose’’ box, provide dosing interval (units dosing times), give number doses administer. example repeat 400 mg dose every two weeks two doses. Rates infusion specified set switching times corresponding infusion rates (separated commas). infusion rates held constant next switching time. example infuse drug 800mg/min starting time 0, infusion turned (set 0) 30 minutes.","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"population-simulations","dir":"Articles","previous_headings":"Running the model","what":"Population simulations","title":"Model Deployment","text":"variability system parameters specified (? ?) “Variability” tab visible. Simply check “Simulate variability” box, alter number subjects, prediction interval, elements variance-covariance matrix simulate desired population response. select “Update Plot”, selected output plotted (mean – solid line, selected confidence interval – shaded region).","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"saving-model-results","dir":"Articles","previous_headings":"","what":"Saving model results","title":"Model Deployment","text":"save model results need provide descriptive name analysis, push save button, click link generated. select time stamp, appended name zip file. default following files saved: analysis_single_dose_400_mg_lib.r, analysis_single_dose_400_mg.r - two files can used recreate results ShinyApp. analysis_single_dose_400_mg_timecourse.png - Time-course simulation results analysis_single_dose_400_mg.csv - Predictions containing timescale model, every state, output analysis_single_dose_400_mg_RX.html - file report (X) specified ubiquity_app.R (See ) system.txt - system file describing model ubiquity_log.txt - log file user done","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"model-scripts","dir":"Articles","previous_headings":"Saving model results","what":"Model scripts","title":"Model Deployment","text":"files analysis_NAME.r analysis_NAME_lib.r can used two ways. First, two files can used stand-alone files recreate simulation results ShinyApp. Creating Simulation Scripts main script (analysis_NAME.r) can used starting point create simulation scripts. necessary modify First comment sourcing standalone library: Next (script system.txt file) uncommenting following lines force system rebuilt changes system file loaded.","code":"#source(\"analysis_NAME_lib.r\"); if(!require(ubiquity)){   source(file.path('library', 'r_general', 'ubiquity.R')) } cfg = build_system(system_file=\"system.txt\")"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"controlling-what-is-saved","dir":"Articles","previous_headings":"Saving model results","what":"Controlling what is saved","title":"Model Deployment","text":"certain instances may want allow user access everything saved default. edit ubiquity_app.R can alter pushed user setting relevant fields FALSE.","code":"cfg$gui$save$system_txt = TRUE cfg$gui$save$user_log   = TRUE"},{"path":[]},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"model-diagram","dir":"Articles","previous_headings":"Model documentation","what":"Model diagram","title":"Model Deployment","text":"can difficult user look set parameters, dosing inputs, outputs determine model works. aid user can useful create model diagram. utilize majority screen space, image roughly twice wide tall. can create image favorite drawing program. Inkscape free vector drawing program available inkscape.org. run following: create file system.svg. can edit save portable network graphics (png) file named system.png directory ubiquity_app.R file. start ShinyApp find file create tab plotting area App.","code":"system_fetch_template(cfg, template=\"Model Diagram\")"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"model-reports","dir":"Articles","previous_headings":"Model documentation","what":"Model reports","title":"Model Deployment","text":"Sometimes need detail annotated model diagram. may need perform calculations based results simulation. may better present information tabulated format. scenarios can create RMarkdown file. Create copy report template (system_report.Rmd) script test (test_system_report.r): called ’ll access ubiquity model object (cfg) simulation results som. simulation results take form deterministic simulation (see output ?run_simulation_ubiquity) , variability checked, stochastic simulation (see output ?simulate_subjects) tell ShinyApp load report (named system_report.Rmd), following lines need added ubiquity_app.R. title field title tab ShinyApp file name file created. can create five reports way, differentiated list name (R1, R2, … R5). file test_system_report.r can used debug model report file. First run model ShinyApp reports disabled. App runs stores state (cfg) current simulation results (som) following data files: cfg →\\rightarrowtransient/rgui/default/gui_state.RData som →\\rightarrowtransient/rgui/default/gui_som.RData Next load test script, modify report name accordingly, run : generate report HTML format. can insert debugging commands report test add information. working, can enable report described appear tab viewable user. reports may depend user input. example, RMarkdown file documents modeling assumptions model construction process content change user interacts App. use pre-rendered report simply replace .Rmd .html: tell App read html, prevent rendering report, speed things user.","code":"system_fetch_template(cfg, template=\"Shiny Rmd Report\") cfg$gui$modelreport_files$R1$title = \"Tab Title\" cfg$gui$modelreport_files$R1$file  = \"system_report.Rmd\" load(\"transient/rgui/default/gui_som.RData\") load(\"transient/rgui/default/gui_state.RData\") params = list() params$cfg = cfg params$som = som rmarkdown::render(\"system_report.Rmd\",                    params = params,                    output_format = \"html_document\") cfg$gui$modelreport_files$R1$title = \"Tab Title\" cfg$gui$modelreport_files$R1$file  = \"system_report.html\""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"user-definable-functions","dir":"Articles","previous_headings":"","what":"User definable functions","title":"Model Deployment","text":"customize simulation plotting within ShinyApp necessary create custom functions. need placed file. example placed mylibs.r main template directory. Lastly, need tell ShinyApp load file. need edit ubiquity_app.R add following line:","code":"cfg$gui$functions$user_def = 'mylibs.r'"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"custom-simulation-commands","dir":"Articles","previous_headings":"User definable functions","what":"Custom simulation commands","title":"Model Deployment","text":"default ShinyApp run simulations using run_simulation_ubiquity (individual) simulate_subjects (population). take inputs parameters vector containing current parameter set changes made interface cfg data structure. can create functions overwrite defining following: Individual Simulations Population Simulations Note order use default plotting functionality functions need return values format default functions individual (run_simulation_ubiquity) population (simulate_subjects) simulations.","code":"cfg$gui$functions$sim_ind = 'function_name(parameters, cfg)' cfg$gui$functions$sim_var = 'function_name(parameters, cfg)'"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"custom-plotting-commands","dir":"Articles","previous_headings":"User definable functions","what":"Custom plotting commands","title":"Model Deployment","text":"customize plotting output need create functions can utilize simulation output som. individual population simulations output run_simulation_ubiquity simulate_subjects, respectively. Unless user-specified simulation functions used. case som can format needed. possible also access parameters vector containing current parameter set changes made interface cfg data structure. can create plotting functions overwrite defining following ubiquity_app.R: Indiviudal Plot Population Plot","code":"cfg$gui$functions$plot_ind =  'function_name(cfg, parameters,som)' cfg$gui$functions$plot_var =  'function_name(cfg, parameters,som)'"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"deployment-on-a-shiny-server","dir":"Articles","previous_headings":"","what":"Deployment on a Shiny Server","title":"Model Deployment","text":"deploy ShinyApp shiny server need indicate modifying ubiquity_app.R changing deploying variable TRUE: ShinyApp needs initialized server. can two ways. First can create empty file called REBUILD needs deployed along side app files. can touch command nat.utils package: force initialization first time app loaded. works well using rsconnect deploy app. Alternatively, can manually sync files run following shiny user server. App fails run Shiny Server check following: Make sure correct packages installed available user Shiny Server running . Make sure ownership permissions server files correct. test deployment can install shinyVM","code":"deploying = TRUE nat.utils::touch(\"REBUILD\") R -e \"source('ubiquity_app.R')\""},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Naive-Pooled Parameter Estimation","text":"workshop (workshop.ubiquity.tools) provides several examples performing parameter estimation ubiquity. make copy scripts supporting files current working directory run following: analysis_parent.r - Least squares estimation single output analysis_parent_metabolite.r - Maximum likelihood estimation two outputs analysis_parent_metabolite_global.r - Using global optimization packages analysis_parent_metabolite_nm_data.r - Reading cohorts NONMEM file scripts build previous one demonstrate different features ubiquity parameter estimation routines. examples use system (shown figure ) contains three differential equations tracking mass parent drug blood (Mpb) tissue space (Mpt). blood parent can form (fmKp) metabolite (Mmb) subsequent elimination (Km). parent/metabolite model adapted ADAPT5 Users Manual (https://bmsr.usc.edu/files/2013/02/ADAPT5-User-Guide.pdf). Using system_new (use ?system_new see list available system file examples) can copy template file current directory build system: system built, can create local copy estimation template system: create file: analysis_estimate.R working directory. beginning script three variables created control script format output. variable analysis_name defines prefix prepended output generated script. Archiving analysis results controlled Boolean variable archive_results. Lastly, script controlled using flowctl variable (possible options listed commented ). estimation script following main components: Select parameter set subset parameters estimate Set options (simulation, estimation, etc) Load datasets Define cohorts Estimate parameters Plot results explored using scripts .","code":"library(ubiquity) fr = workshop_fetch(section=\"Estimation\", overwrite=TRUE) library(ubiquity) system_new(file_name=\"system.txt\", system_file=\"adapt\", overwrite = TRUE) cfg = build_system(system_file = \"system.txt\") system_fetch_template(cfg, template=\"Estimation\")"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"least-squares-estimationsingle-output-analysis_parent-r","dir":"Articles","previous_headings":"","what":"Least squares estimation/single output (analysis_parent.r)","title":"Naive-Pooled Parameter Estimation","text":"first example (analysis_parent.r) begins specifying want perform parameter estimation archive results using name1 parent_d1030 indicate analyzing parent PK 10 30 mg dosing cohorts: Next select parameters estimate. ’re estimating parent data, names parameters relevant parent PK (pnames) selected. estimate parameters simply exclude third argument. system parameters estimated weighted least squares objective used2. Next set options relevant estimation underlying simulation routines. example simulation output times specified, relevant parameters can set. template generated several common options commented . can uncommented modified needed. dataset (shown table ) included ubiquity package accessed using system.file. example script referenced explicitly. format requirements datasets flat files header row. format flexible requires time/observation information columns required filter data isolate cohorts received treatment. inputs defined cohorts defined. Data files loaded using system_load_data() name3 assigned dataset. Data can read files (csv, xls, xlsx, tab) existing data frame. name (pm_data ) used reference dataset later script. dataset column observation time (TIME), subject id (ID), concentrations parent (PT) metabolite (MT), BLQ flag nominal dose (DOSE). columns used (TIME, PT, MT DOSE), others (BQL) ignored. intended example general guide dataset format. necessary different outputs different columns (wide format). dataset loaded tall skinny format well. example going analyze parent data individuals given 10 30 mg using least squares objective. Next need identify data inputs associated data. done defining cohorts, groups data receive treatment model inputs (bolus dosing, infusion rates, covariates) associated cohorts. example define cohort dosing group. make sure starting blank slate can use system_clear_cohorts() remove previously defined information. cohort define list information cohort. cohort unique name field4 dataset field pointing dataset (pm_data) loaded . optional cohort filter (cf) field used reduce entire dataset records associated cohort. See help system_define_cohort() information construct cohort filters. Next necessary define inputs cohort. inputs refers model inputs may include dosing well covariates, estimation template (generated using system_fetch_template() ) contain placeholders defined system file. Note: bolus infusion inputs, necessary define inputs nonzero, covariates necessary define differ definitions system file. input AMT field TIME field units specified system file (AMT TIME internal indentifiers taken dataset). Next need match outputs model outputs dataset. cohort$outputs field used group output. cohort output mapping blood PK parent output Parent. times observations dataset found 'TIME’ column ’PT’ column (missing data specified -1 dropped). mapped model timescale ('hours', specified ) model output (’Cpblood’, specified ). Note units dataset must model: output grouping cohort marker color, shape line type can specified (controlling plotted output). Finally cohort defined using system_define_cohort(): thing 30 mg dose group: cohorts defined call estimation function (system_estimate_parameters()). flowctl set 'plot previous estimate' 'plot guess' values just returned. one estimation options selected flowctl several files generated output folder analysis_name prefix: output/parent_d1030-report.txt - Text file summary estimation results. output/parent_d1030-parameters_all.csv - Summary table parameters (estimated fixed) output/parent_d1030-parameters_est.csv - Summary table estimated parameters output/parent_d1030-system_update.txt - Text update system.txt file new parameter estimates output/parent_d1030-sessionInfo.RData - output sessionInfo() stored SI object data file Next system simulated estimate data stored erp. information variable used generate standard plots , may desirable save information generate figures. necessary understand structure erp. list two different fields. TIME - Time units data OBS - Observations (SMOOTH = FALSE), -1 (SMOOTH=TRUE) PRED - Predictions (SMOOTH = FALSE) VAR - Variance (SMOOTH = FALSE), -1 (SMOOTH=TRUE) SMOOTH - FALSE observation times, TRUE observations OUTPUT - name output COHORT - name cohort ts.time - Simulation time scale ts.TS - entry timescale TS pred - Simulated predictions name - State model output cohort - Cohort name Lastly predictions overlaying data observed vs predicted plots generated using system_plot_cohorts(). Basic formatting figures controlled using plot_opts list (see ?system_plot_cohorts details). called, system_plot_cohorts() write png pdf output time course observed vs predicted files. also return list ggplot objects relative paths files well. example following generated: output/parent_d1030_time course_Parent.pdf output/parent_d1030_time course_Parent.png output/parent_d1030_obs_pred_Parent.pdf output/parent_d1030_obs_pred_Parent.png","code":"flowctl = 'estimate' archive_results = TRUE analysis_name = 'parent_d1030' pnames = c('Vp', 'Vt', 'CLp', 'Q') cfg = system_select_set(cfg, \"default\", pnames) cfg=system_set_option(cfg, group  = \"simulation\",                             option = \"output_times\",                             seq(0,100,1)) cfg = system_load_data(cfg, dsname     = \"pm_data\",                              data_file  = system.file(\"ubinc\", \"csv\",                                                      \"pm_data.csv\",                                                       package = \"ubiquity\")) cfg = system_clear_cohorts(cfg) cohort = list(   name         = \"dose_10\",   cf           = list(DOSE      = c(10)),   inputs       = NULL,   outputs      = NULL,   dataset      = \"pm_data\") cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"TIME\"]] = c( 0) # hours  cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"AMT\"]]  = c(10) # mpk cohort[[\"outputs\"]][[\"Parent\"]] = list()  # Mapping to data set cohort[[\"outputs\"]][[\"Parent\"]][[\"obs\"]] = list(          time           = \"TIME\",          value          = \"PT\",          missing        = -1)  # Mapping to system file cohort[[\"outputs\"]][[\"Parent\"]][[\"model\"]] = list(          time           = \"hours\",                 value          = \"Cpblood\",             variance       = \"1\")  # Plot formatting cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list(          marker_color   = \"black\",          marker_shape   = 1,          marker_line    = 2 ) cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list(          marker_color   = \"black\",          marker_shape   = 1,          marker_line    = 2 ) cfg = system_define_cohort(cfg, cohort) cohort = list(   name         = \"dose_30\",   cf           = list(DOSE      = c(30)),   dataset      = \"pm_data\",   inputs       = NULL,   outputs      = NULL)  # Bolus inputs for the cohort cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"TIME\"]] = c( 0) # hours  cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"AMT\"]]  = c(30) # mpk    # Defining Parent output cohort[[\"outputs\"]][[\"Parent\"]] = list()  # Mapping to data set cohort[[\"outputs\"]][[\"Parent\"]][[\"obs\"]] = list(          time           = \"TIME\",          value          = \"PT\",          missing        = -1)  # Mapping to system file cohort[[\"outputs\"]][[\"Parent\"]][[\"model\"]] = list(          time           = \"hours\",                 value          = \"Cpblood\",             variance       = \"1\")  # Plot formatting cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list(          marker_color   = \"red\",          marker_shape   = 2,          marker_line    = 2 ) cfg = system_define_cohort(cfg, cohort) pest = system_estimate_parameters(cfg,                                    flowctl         = flowctl,                                    analysis_name   = analysis_name,                                    archive_results = archive_results) cfg=system_set_option(cfg, group  = \"simulation\",                             option = \"output_times\",                             seq(0,100,5)) erp = system_simulate_estimation_results(pest = pest, cfg = cfg) plot_opts = c() plot_opts$outputs$Parent$yscale       = 'log' plinfo = system_plot_cohorts(erp, plot_opts, cfg, analysis_name=analysis_name)"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"automated-reporting","dir":"Articles","previous_headings":"Least squares estimation/single output (analysis_parent.r)","what":"Automated Reporting","title":"Naive-Pooled Parameter Estimation","text":"outputs provide components generating presentations documents. Coping pasting figures tables documents can tedious. can convenient automate process accomplished function system_rpt_estimation().","code":""},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"powerpoint","dir":"Articles","previous_headings":"Least squares estimation/single output (analysis_parent.r) > Automated Reporting","what":"PowerPoint","title":"Naive-Pooled Parameter Estimation","text":"append results analysis PowerPoint document simply initialize new report (template=\"PowerPoint\"), call system_rpt_estimation() appropriate analysis_name, results analysis attached slides. save analysis results output directory.","code":"cfg = system_rpt_read_template(cfg, template=\"PowerPoint\") cfg = system_rpt_estimation(cfg=cfg, analysis_name=analysis_name) system_rpt_save_report(cfg=cfg,  output_file=file.path(\"output\",paste(analysis_name, \"-report.pptx\", sep=\"\")))"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"word","dir":"Articles","previous_headings":"Least squares estimation/single output (analysis_parent.r) > Automated Reporting","what":"Word","title":"Naive-Pooled Parameter Estimation","text":"process Word document . Just make sure template set \"Word\" report initialized: information integrated report generation see Reporting vignette.","code":"cfg = system_rpt_read_template(cfg, template=\"Word\") cfg = system_rpt_estimation(cfg=cfg, analysis_name=analysis_name) system_rpt_save_report(cfg=cfg, output_file=file.path(\"output\",paste(analysis_name, \"-report.docx\", sep=\"\")))"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"maximum-likelihoodtwo-outputs-analysis_parent_metabolite-r","dir":"Articles","previous_headings":"","what":"Maximum likelihood/two outputs (analysis_parent_metabolite.r)","title":"Naive-Pooled Parameter Estimation","text":"example similar last except analyzing two different outputs (parent metabolite) proportional variance model. now can estimate parameters associated outputs well variance parameters: parameters estimated contain variance parameters (slope_parent slope_metabolite) maximum likelihood objective used. cohort definitions look much except variance model defined 'slope_parent*PRED^2', separate output named Metabolite. Similar modifications made 30 mg dosing cohort.","code":"pnames = c('Vp',            'Vt',            'Vm',            'CLp',            'Q',            'CLm',            'slope_parent',            'slope_metabolite');  cfg = system_select_set(cfg, \"default\", pnames) cohort = list(   name         = \"dose_10\",   cf           = list(DOSE      = c(10)),   inputs       = NULL,   outputs      = NULL,   dataset      = \"pm_data\")   # Bolus inputs for the cohort cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"TIME\"]] = c( 0) # hours  cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"AMT\"]]  = c(10) # mpk    # Defining Parent output cohort[[\"outputs\"]][[\"Parent\"]] = list()  # Mapping to data set cohort[[\"outputs\"]][[\"Parent\"]][[\"obs\"]] = list(          time           = \"TIME\",          value          = \"PT\",          missing        = -1)  # Mapping to system file cohort[[\"outputs\"]][[\"Parent\"]][[\"model\"]] = list(          time           = \"hours\",                 value          = \"Cpblood\",             variance       = \"slope_parent*PRED^2\")  # Plot formatting cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list(          marker_color   = \"black\",          marker_shape   = 1,          marker_line    = 1 )  # Defining Metabolite output cohort[[\"outputs\"]][[\"Metabolite\"]] = list()  # Mapping to data set cohort[[\"outputs\"]][[\"Metabolite\"]][[\"obs\"]] = list(          time           = \"TIME\",          value          = \"MT\",          missing        = -1)  # Mapping to system file cohort[[\"outputs\"]][[\"Metabolite\"]][[\"model\"]] = list(          time           = \"hours\",                 value          = \"Cmblood\",             variance       = \"slope_metabolite*PRED^2\")  # Plot formatting cohort[[\"outputs\"]][[\"Metabolite\"]][[\"options\"]] = list(          marker_color   = \"blue\",          marker_shape   = 1,          marker_line    = 1 )  cfg = system_define_cohort(cfg, cohort)"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"global-estimation-routines-analysis_parent_metabolite_global-r","dir":"Articles","previous_headings":"","what":"Global estimation routines (analysis_parent_metabolite_global.r)","title":"Naive-Pooled Parameter Estimation","text":"Now build previous example demonstrate select different optimization routines. default, parameter estimation carried using Nelder-Mead optimization method optim library. can specify different functions library. See documentation optim (?optim) valid values method elements control. example, use simulated annealing change method SANN. also global optimization libraries R, two can readily used ubiquity: Particle Swarm Optimizer (pso package) Genetic Algorithms (GA package). use pso package set following options: use GA package set following options: Note: Optimizers like SANN global optimizers (pso GA) good identifying parameter sets outside region initial guess. However, one consequence algorithms can quickly approach bounds. Consequently important provide realistic upper lower bounds parameters (

    descriptor system file using system_set_guess() scripting level). use default value machine precision (eps) lower bound infinity (Inf) upper bound optimization routines can choose parameter values can cause internal simulations fail.","code":"cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"SANN\") library(pso) cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"pso\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"psoptim\") library(GA) cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"control\", value = list(maxiter = 10000, optimArgs = list(method = \"Nelder-Mead\", maxiter = 1000)))"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"cohorts-from-nonmem-dataset-analysis_parent_metabolite_nm_data-r","dir":"Articles","previous_headings":"","what":"Cohorts from NONMEM dataset (analysis_parent_metabolite_nm_data.r)","title":"Naive-Pooled Parameter Estimation","text":"examples , cohorts defined manually. Sometimes may data NONMEM dataset dosing information located dataset. may convenient simply define cohort subject dataset. function system_define_cohorts_nm can used. differences script analysis_parent_metabolite.r now highlighted: First load NONMEM dataset clear cohorts: Next define filter use dataset (include 10 30 mg doses): information filtering datasets see help nm_select_records(). Now define maps different outputs. output specify variance, compartment (CMT) number, model output missing number flag: Lastly define map model inputs. case bolus Mpb compartment: Unused columns dataset ignored. filter, input observation maps defined, now add cohorts","code":"cfg = system_load_data(cfg, dsname = \"nm_pm_data\", data_file = system.file(\"ubinc\", \"csv\", \"nm_data.csv\", package = \"ubiquity\")) cfg = system_clear_cohorts(cfg); filter = list() filter$DOSE = c(10, 30) OBSMAP = list() OBSMAP$PT = list(variance = 'slope_parent*PRED^2', CMT = 1, output = 'Cpblood', missing = -1 ) OBSMAP$MT = list(variance = 'slope_metabolite*PRED^2', CMT = 2, output = 'Cmblood', missing = -1 ) INPUTMAP = list() INPUTMAP$bolus$Mpb$CMT_NUM = 1 cfg = system_define_cohorts_nm(cfg, DS = 'nm_pm_data', col_ID = 'ID', col_CMT = 'CMT', col_DV = 'DV', col_TIME = 'TIME', col_AMT = 'AMT', col_RATE = 'RATE', col_EVID = 'EVID', col_GROUP= 'DOSE', filter = filter, INPUTS = INPUTMAP, OBS = OBSMAP, group = FALSE)"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"contents-of-system-txt","dir":"Articles","previous_headings":"","what":"Contents of system.txt","title":"Naive-Pooled Parameter Estimation","text":"","code":"# # Parent/Metabolite example taken from Section 9.3 of the ADAPT5 Users Manual # # https://bmsr.usc.edu/files/2013/02/ADAPT5-User-Guide.pdf #

    Vp 10.0 1e-5 100 L yes System

    Vt 10.0 1e-5 100 L yes System

    Vm 30.0 1e-5 100 L yes System

    CLp 1.0 1e-5 100 L/hr yes System

    CLm 1.0 1e-5 100 L/hr yes System

    Q 0.3 1e-5 100 L/hr yes System Original Estimates slope_parent 0.1 1e-9 10 -- no Variance slope_metabolite 0.1 1e-9 10 -- no Variance ; [ 0 ]; 1; hours ; Mpb; [ 0 ]; 70; mpk -(CLp/Vp + Q/Vp)*Mpb + Q/Vt*Mpt Q/Vp*Mpb - Q/Vt*Mpt CLp/Vp*Mpb - CLm/Vm*Mmb Cpblood = Mpb/Vp Cmblood = Mmb/Vm 1.0 1.0/24.0 0.08 Vp 0.08 Vt 0.08 CLp 0.08 CLm SIMINT_SEQ[0][100][1] "},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"working-with-rxode2-nlmixr2-nonmem-and-monolix","dir":"Articles","previous_headings":"","what":"Working with rxode2, nlmixr2, NONMEM, and Monolix","title":"Howtos","text":"Say model ubiquity want use nlmixr2. perhaps want try simulation engine rxode2, want hand model someone using Monolix. provide way easily convert model different formats automated fashion.","code":""},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"getting-your-model-in-rxode2-format","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Getting your model in rxode2 format","title":"Howtos","text":"example consider system file two compartment model (system_2cmt.txt ). build system rxode2 output target created. can use system_fetch_template() function access file. ’m placing script temporary directory. script generate rxode2 model function store function object my_model. default input nlmixr2. can use function piping methodology things like add IIV terms parameters. can use ubiquity build structural model piping, rxode2, nlmixr2 analysis. can see contents system_nlmixr2.R my_model object looks like . Note include output ubiquity need error model. along Descriptor need define variance parameters () also output error model ().","code":"cfg = build_system(system_file = sf_2cmt_full, temporary_directory = file.path(tempdir(), \"transient\")) fr = system_fetch_template(cfg, template = \"nlmixr2\", output_directory = tempdir(), overwrite = TRUE) library(rxode2) source(file.path(tempdir(), \"system_nlmixr2.R\"))"},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"getting-your-model-in-nonmem-format","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Getting your model in NONMEM format","title":"Howtos","text":"model rxode2 format can convert NONMEM format babelmixr2 package (via ruminate package). need least one inter-individual variability term. can system file delimiter. example using model piping. specify typical value Vc, parameter TV_Vc, error lognormally distributed. add IIV term eta_Vc. Next just need load ruminate package (>=0.2.4) use rx2other() function create NONMEM control stream:","code":"my_model = my_model |> model({Vc = exp(TV_Vc + eta_Vc)}) library(ruminate) my_model_nm = rx2other(my_model, out_type=\"nonmem\")"},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"getting-your-model-in-monolix-format","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Getting your model in Monolix format","title":"Howtos","text":"can also get model Monolix specifying monolix output type:","code":"my_model_mlx = rx2other(my_model, out_type=\"monolix\")"},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"further-reading","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Further reading","title":"Howtos","text":"discussion topic see following: https://github.com/nlmixr2/babelmixr2/issues/107","code":""},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"models-in-different-formats","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Models in different formats","title":"Howtos","text":"ubiquity rxode2 script rxode2 object NONMEM Monolix Contents system_2cmt.txt file: Contents system_nlmixr2.R file produced system_fetch_template(): my_model object: file containing control stream found : my_model_nm$files$ctl$fn_full. file containing mlxtran output found : my_model_mlx$files$mlxtran$fn_full","code":"# Two compartment model with absorption compartment (At). The central # compartment (Cc) had a volume (Vc), and the tissue compartment (Cp) has a # volume (Vt). The system is parameterized in terms of macro constants (Q and # CL) # # While the the default dosing is a 1 mg IV dose into the central compartment, # the model is written to accept dosing into an absorption compartment and # through continuous IV infusion. # _________ # | | # | At | # | | # |_________| # | # | ka, fb # | # V # _________ _________ # | | Q | | # | Cc |------>| Cp | # | Vc |<------| Vt | # |_________| |_________| # | # | CL # | # V # # System Units: # # mass [=] mg # volume [=] ml # concentration [=] mg/ml # time [=] hr # #-------------# # | Parameters | # #-------------# # # System parameters # name value lower upper units editable grouping # bound bound

    Vc 1.0 eps Inf ml yes System

    Vt 1.0 eps Inf ml yes System

    CL 1.0 eps Inf ml/hr yes System

    Q 1.0 eps Inf ml/hr yes System

    ka 1.0 eps Inf 1/hr yes System

    fb 1.0 eps Inf -- yes System # Bolus Events # ------------ # times/events state values scale units ; [ 0 ]; 1; hours ; Cc; [1.0 ]; 1/Vc; mg ; At; [0.0 ]; 1; mg # Infusion Rates # ------------ # name time/levels values scale units ; times; [0]; 1; hours ; levels; [0]; 1; mg/hour -ka*At ka*At*fb/Vc - CL/Vc*Cc -Q*(Cc-Cp)/Vc + Dinf/Vc +Q*(Cc-Cp)/Vt Cc_mg_ml = Cc prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf ng/ml yes Variance add=add_err; prop=prop_err 1.0 1.0/24 # # # my_model <- function() { ini({ # Typical Value of System Parameters TV_Vc = c(.Machine$double.eps, 1.0, Inf) TV_Vt = c(.Machine$double.eps, 1.0, Inf) TV_CL = c(.Machine$double.eps, 1.0, Inf) TV_Q = c(.Machine$double.eps, 1.0, Inf) TV_ka = c(.Machine$double.eps, 1.0, Inf) TV_fb = c(.Machine$double.eps, 1.0, Inf) # Between-subject variability: # Error model parameters prop_err = c(.Machine$double.eps, 0.1, .Machine$double.xmax) add_err = c(.Machine$double.eps, 0.1, .Machine$double.xmax) }) model({ # System Parameters Vc = TV_Vc Vt = TV_Vt CL = TV_CL Q = TV_Q ka = TV_ka fb = TV_fb # Placeholders for infusion rates. # These should be defined in the dataset. # time scale: 1 units: (hours) # mass scale: 1 units: (mg/hour) Dinf = 0.0 # Defining ODEs d/dt(At) = (-ka*At) d/dt(Cc) = (ka*At*fb/Vc - CL/Vc*Cc -Q*(Cc-Cp)/Vc + Dinf/Vc) d/dt(Cp) = (+Q*(Cc-Cp)/Vt) # Outputs and error models Cc_mg_ml = Cc Cc_mg_ml ~ add(add_err) + prop(prop_err) }) } 
[36m──
[39m 
[1mrxode2-based free-form 3-cmt ODE model
[22m 
[36m──────────────────────────────────────
[39m ── 
[1m
[1mInitalization:
[1m
[22m ── 
[1mFixed Effects
[22m (
[1m
[34m$theta
[39m
[22m): TV_Vc TV_Vt TV_CL TV_Q TV_ka TV_fb prop_err add_err 1.0 1.0 1.0 1.0 1.0 1.0 0.1 0.1 
[1mOmega
[22m (
[1m
[34m$omega
[39m
[22m): eta_Vc eta_Vc 1 
[1m States
[22m (
[1m
[34m$state
[39m
[22m or 
[1m
[34m$stateDf
[39m
[22m): Compartment Number Compartment Name 1 1 At 2 2 Cc 3 3 Cp ── 
[1m
[1m
[1m
[1mμ-referencing
[1m
[1m (
[1m
[1m
[34m$muRefTable
[39m
[1m
[1m):
[1m
[22m ── theta eta level 1 TV_Vc eta_Vc id ── 
[1m
[1mModel (Normalized Syntax):
[1m
[22m ── function() { ini({ TV_Vc <- c(2.22044604925031e-16, 1) TV_Vt <- c(2.22044604925031e-16, 1) TV_CL <- c(2.22044604925031e-16, 1) TV_Q <- c(2.22044604925031e-16, 1) TV_ka <- c(2.22044604925031e-16, 1) TV_fb <- c(2.22044604925031e-16, 1) prop_err <- c(2.22044604925031e-16, 0.1) add_err <- c(2.22044604925031e-16, 0.1) eta_Vc ~ 1 }) model({ Vc <- exp(TV_Vc + eta_Vc) Vt = TV_Vt CL = TV_CL Q = TV_Q ka = TV_ka fb = TV_fb Dinf = 0 d/dt(At) = (-ka * At) d/dt(Cc) = (ka * At * fb/Vc - CL/Vc * Cc - Q * (Cc - Cp)/Vc + Dinf/Vc) d/dt(Cp) = (+Q * (Cc - Cp)/Vt) Cc_mg_ml = Cc Cc_mg_ml ~ add(add_err) + prop(prop_err) }) } $PROBLEM translated from babelmixr2 ; comments show mu referenced model in ui$getSplitMuModel $DATA my_model.csv IGNORE=@ $INPUT ID TIME EVID AMT DV CMT RXROW $SUBROUTINES ADVAN13 TOL=6 ATOL=12 SSTOL=6 SSATOL=12 $MODEL NCOMPARTMENTS=3 COMP(AT, DEFDOSE) ; At COMP(CC) ; Cc COMP(CP) ; Cp $PK MU_1=THETA(1) VC=DEXP(MU_1+ETA(1)) ; Vc <- exp(TV_Vc) VT=THETA(2) ; Vt <- TV_Vt CL=THETA(3) ; CL <- TV_CL RXR1=THETA(4) ; Q <- TV_Q KA=THETA(5) ; ka <- TV_ka FB=THETA(6) ; fb <- TV_fb $DES DINF=0 ; Dinf = 0 DADT(1) = (- KA*A(1)) ; d/dt(At) = (-ka * At) DADT(2) = (KA*A(1)*FB/VC-CL/VC*A(2)-RXR1*(A(2)-A(3))/VC+DINF/VC) ; d/dt(Cc) = (ka * At * fb/Vc - CL/Vc * Cc - Q * (Cc - Cp)/Vc + Dinf/Vc) DADT(3) = (RXR1*(A(2)-A(3))/VT) ; d/dt(Cp) = (Q * (Cc - Cp)/Vt) CC_MG_ML=A(2) ; Cc_mg_ml = Cc $ERROR ;Redefine LHS in $DES by prefixing with on RXE_ for $ERROR RXE_DINF=0 ; Dinf = 0 RXE_CC_MG_ML=A(2) ; Cc_mg_ml = Cc RX_PF1=RXE_CC_MG_ML ; rx_pf1 ~ Cc_mg_ml ; Write out expressions for ipred and w RX_IP1 = RX_PF1 RX_P1 = RX_IP1 W1=DSQRT((THETA(8))**2+(RX_PF1)**2*(THETA(7))**2) ; W1 ~ sqrt((add_err)^2 + (rx_pred_f_)^2 * (prop_err)^2) IF (W1 .EQ. 0.0) W1 = 1 IPRED = RX_IP1 W = W1 Y = IPRED + W*EPS(1) $THETA (2.2204e-16, 1 ) ; 1 - TV_Vc (2.2204e-16, 1 ) ; 2 - TV_Vt (2.2204e-16, 1 ) ; 3 - TV_CL (2.2204e-16, 1 ) ; 4 - TV_Q (2.2204e-16, 1 ) ; 5 - TV_ka (2.2204e-16, 1 ) ; 6 - TV_fb (2.2204e-16, 0.1) ; 7 - prop_err (2.2204e-16, 0.1) ; 8 - add_err $OMEGA 1 ; eta_Vc $SIGMA 1 FIX $ESTIMATION METHOD=1 INTER MAXEVALS=100000 SIGDIG=3 SIGL=12 PRINT=1 NOABORT $COVARIANCE $TABLE ID ETAS(1:LAST) OBJI FIRSTONLY ONEHEADER NOPRINT FORMAT=s1PE17.9 NOAPPEND FILE=my_model.eta $TABLE ID TIME IPRED PRED RXROW ONEHEADER NOPRINT FORMAT=s1PE17.9 NOAPPEND FILE=my_model.pred [FILEINFO] file='my_model-monolix.csv' delimiter = comma header = {ID, TIME, EVID, AMT, DV, ADM, nlmixrRowNums} [CONTENT] ID = {use=identifier} TIME = {use=time} EVID = {use=eventidentifier} AMT = {use=amount} DV = {use=observation, name=rx_prd_Cc_mg_ml, type=continuous} ADM = {use=administration} [INDIVIDUAL] input={Vc_pop, omega_Vc, Vt_pop, CL_pop, Q_pop, ka_pop, fb_pop} DEFINITION: Vc = {distribution=logNormal, typical=Vc_pop, sd=omega_Vc} Vt = {distribution=normal, typical=Vt_pop, no-variability} CL = {distribution=normal, typical=CL_pop, no-variability} Q = {distribution=normal, typical=Q_pop, no-variability} ka = {distribution=normal, typical=ka_pop, no-variability} fb = {distribution=normal, typical=fb_pop, no-variability} [LONGITUDINAL] input={add_err, prop_err} file='my_model-monolix.txt' DEFINITION: rx_prd_Cc_mg_ml={distribution = normal, prediction = rx_pred_Cc_mg_ml, errorModel=combined2(add_err,prop_err)} data={rx_prd_Cc_mg_ml} model={rx_prd_Cc_mg_ml} Vc_pop={value=2.71828182845905, method=MLE} Vt_pop={value=1, method=MLE} CL_pop={value=1, method=MLE} Q_pop={value=1, method=MLE} ka_pop={value=1, method=MLE} fb_pop={value=1, method=MLE} prop_err={value=0.1, method=MLE} add_err={value=0.1, method=MLE} omega_Vc={value=1, method=MLE} [TASKS] populationParameters() individualParameters(method = {conditionalMode}) fim(method = StochasticApproximation) logLikelihood(method = ImportanceSampling) plotResult(method = {outputplot, indfits, obspred, residualsscatter, residualsdistribution, parameterdistribution, covariatemodeldiagnosis, randomeffects, covariancemodeldiagnosis, saemresults}) [SETTINGS] GLOBAL: exportpath = 'my_model-monolix' POPULATION: exploratoryautostop = no smoothingautostop = no burniniterations = 5 exploratoryiterations = 250 simulatedannealingiterations = 250 smoothingiterations = 200 exploratoryalpha = 0 exploratoryinterval = 200 omegatau = 0.95 errormodeltau = 0.95"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Modeling Language","text":"core, ubiquity modeling language set scripts meant facilitate model development deployment. focus document model description language. plain text file, referred system file. line contains descriptor (e.g. 

    ) defines aspect model, comments made hash sign (#). follows overview different components language can used create system file.","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"system-parameters-p","dir":"Articles","previous_headings":"Parameters","what":"System parameters

    ","title":"Modeling Language","text":"system parameter specified name, value, lower bound, upper bound, units, whether editable ShinyApp ‘type’ parameter (grouping ShinyApp). values eps (machine precision, smallest value zero) inf (infinity) can used. example specify parameter koffR value .1 positive parameter KDR value .04 also positive following used:","code":"# name value lb ub units editable type

    koffR 0.1 eps inf 1/hr yes Target

    KDR 0.04 eps inf nM yes Target"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"parameter-sets","dir":"Articles","previous_headings":"Parameters","what":"Parameter sets","title":"Modeling Language","text":"Often model developed incorporate different situations scenarios. example, model may used describe healthy diseased individuals. differences simply parametric nature, can cumbersome code model multiple times (parameterization). framework provides mechanism including multiple parameterizations withing system file. Consider system want describe antibody disposition. humans described two compartment model, mice single compartment needed. First create set parameters describing human scenario. mean parameters taken literature [DM]: parameter created using

    descriptor part default parameter set. short name1 parameter set. longer verbose name can given well, seen ShinyApp. human parameter set can labeled using PSET descriptor following way: default parameter set short name name, “mAb Human” value shown user ShinyApp. Next, add parameterization mice simply create new set following way: alone create new parameter set short name mouse, exact copy default parameter set. identify parametric differences mouse human use PSET following way: Consider clearance parameter entry want murine half-life antibody [VR]: use set name (mouse) parameter name (CL) overwrite default specified value 7.71e-6. aspects parameter (bounds, edit flag, etc.) default value.","code":"

    Weight 70.0 eps inf kg yes System # Organism weight

    CL 0.0129 eps inf L/hr yes System # Systemic Clearance

    Q 0.0329 eps inf L/hr yes System # Inter-compartmental clearance

    Vp 3.1 eps inf L yes System # Vol. central compartment

    Vt 2.8 eps inf L yes System # Vol. peripheral compartment mAb in Human mAb in Mouse 0.020 # 20 gram mouse 7.71e-6 0.0 1.6e-3 1 # arbitrary 7.71e-6"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"secondary-parameters-as-and-ad","dir":"Articles","previous_headings":"Parameters","what":"Secondary parameters and ","title":"Modeling Language","text":"static secondary parameter refers parameter change simulation. specified using <> descriptor can written terms system parameters previously defined static secondary parameters. can used differential equations, defining initial conditions, input scaling model outputs. similar secondary parameters defined $PK block NONMEM. example, wanted define rate elimination terms system parameters clearance CL volume distribution Vp following used: dynamic secondary parameters refers parameter can change simulation. typically means defined, using descriptor, terms state another dynamic secondary parameter. can used differential equations model outputs. similar parameters defined $DES block NONMEM. example wanted use concentration central compartment Cp dependent amount compartment Ap volume compartment Vp following used:","code":" kel = CL/Vp Cp = Ap/Vp"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"variance-parameters-vp","dir":"Articles","previous_headings":"Parameters","what":"Variance parameters ","title":"Modeling Language","text":"Variance parameters specified using format system parameters (

    ) : difference descriptor used grouping set Variance. used performing parameter estimation simulating residual variability.","code":"# name value lower_bound upper_bound units editable grouping SLOPE 0.01 eps inf 1/hr yes Variance"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"parameter-estimation-information-est","dir":"Articles","previous_headings":"Parameters","what":"Parameter estimation information ?","title":"Modeling Language","text":"Currently applies nlmixr2/rxode2. Essentially parameters listed fixed. descriptor specifies information parameters estimation. Sometimes necessary estimate parameters log space. can specify parmaeters log transform (LT). wanted log transform parameters P1, P2, P3 following: NOTE Monolix outputs work correctly need logtransform parameters log-normal IIV assigned. default parameters specified estimation. want estimate subset parameters (P), say P1 P2, can use following:","code":" P1; P2; P3 P1; P2"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"output-error-model-oe","dir":"Articles","previous_headings":"Parameters","what":"Output error model ?","title":"Modeling Language","text":"Current applies nlmixr2/rxode2 output. defines output error model format: OUTPUT can name output defined . expression model type (add additive, prop proportional) equal sign name variance paramter () use. use one error model type separate statments ; example define variance parameters add_err prop_err want use proportional error model output Cp use: use additive proportional error following work:","code":"` expression` prop=prop_err add=add_err; prop=prop_err"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"variability-defining-the-variancecovariance-matrix-iiv-iivcor","dir":"Articles","previous_headings":"Parameters","what":"Variability: defining the variance/covariance Matrix ? & ?","title":"Modeling Language","text":"variable name assigned inter-individual variability (IIV) correlation/covariance (IIVCOR) term makes sense user may used. following sample codes variable names (eg: ETACL) likely make sense population modeler NONMEM user. define IIV term named ETACL variance 0.15 use following: next need associate IIV term system parameter. associate IIV term clearance (system parameter CL) specify log normal distribution (LN) simply write: Alternatively normal (N) distribution can used. Next specify IIV term ETAV variance 0.1. IIV term also log normal distribution applied parameter V: Now can define covariance (-diagonal elements) CL V 0.01 using: order isn’t important IIV terms can reversed","code":" 0.15 CL 0.10 V 0.01"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"iiv-and-parameter-sets-iivset-iivcorset","dir":"Articles","previous_headings":"Parameters","what":"IIV and parameter sets ? & ?","title":"Modeling Language","text":"default parameter sets inter individual variability specified using descriptors. associate specific set IIVs parameter set use descriptors. set descriptors operate differently parameter set descriptors (). just overwrites default values inherits default variance/covariance information. alter IIV information parameter set reset IIV information parameter set. entire variance covariance matrix need specified parameter set. parameter set MYPSET defined following used define IIV parameters Q CL: system parameters IIV information parameter set.","code":" 0.05 Q 0.25 CL 0.01"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"differential-equations","dir":"Articles","previous_headings":"","what":"Differential equations","title":"Modeling Language","text":"differential equations system can defined simply writing . Alternative can ‘built’ using different descriptors provided . Part flexibility ubiquity lies ability combine different notations. construct model (see section : Bringing together) combination five following methods can used: Differential equations Reaction rates =?=> Equilibrium relationships <=kforward:kreverse=> Sources sinks Movement compartments ","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"writing-odes-ode","dir":"Articles","previous_headings":"Differential equations","what":"Writing ODEs ","title":"Modeling Language","text":"Portions differential equations can specified ? state compartment. define dA/dT koffR*C - konR**B write: might convenient specify ODE across several lines, making things readable. Just use multiple statements appended together. give result example :","code":" koffR*C - konR*A*B koffR*C - konR*A*B"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"rate-equations","dir":"Articles","previous_headings":"Differential equations","what":"Rate equations =?=>","title":"Modeling Language","text":"may convenient write chemical reactions rather differential equations. can done using general form: stoichiometric coefficients, beginning CR CP , brackets need specified one. reaction order assumed equal stoichiometric coefficient reactant. specific example Consider decomposition hydrogen peroxide water oxygen: H2O2→kdegH2O+12O2 H_2O_2 \\xrightarrow{k_{deg}} H_2O + \\frac{1}{2}O_2 system format written following manner: translated following differential equations: $$ \\frac{dH_2O_2}{dt}=-k_{deg}H_2O_2 \\\\ \\frac{dH_2O}{dt}= k_{deg}H_2O_2 \\\\ \\frac{dO_2}{dt}= 0.5k_{deg}H_2O_2 $$ also defined differential equations using ?. equivalent: rates (e.g. kdeg) need defined either system secondary parameter. can put saturable terms, Michaelis-Menten kinetics.","code":"[CR1]Reactant1 + [CR2]Reactant2 + ... =kf=> [CP1]Product1 + [CP2]Product2 + ... H2O2 =kdeg=> H2O + [0.5]O2 - kdeg*H2O2 kdeg*H2O2 0.5*kdeg*H2O2"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"equilibrium-relationships-kforwardkreverse","dir":"Articles","previous_headings":"Differential equations","what":"Equilibrium relationships <=kforward:kreverse=>","title":"Modeling Language","text":"Forward reverse reaction rates can written separately: can written equilibrium equations forward (konR) reverse (koffR) rates specified : specify reaction differential equations, following also used: stoichiometric coefficients also define reaction order . example, create following equilibrium reaction: 2A+3B⇄krkf4C 2A + 3B \\mathop{\\rightleftarrows}^{\\mathrm{k_f}}_{\\mathrm{k_r}} 4C rate notation used system file: produce following terms differential equations: $$ \\frac{dA}{dt} = 2k_rC^4 - 2k_fA^2B^3 \\\\ \\frac{dB}{dt} = 3k_rC^4 - 3k_fA^2B^3 \\\\ \\frac{dC}{dt} =-4k_rC^4 + 4k_fA^2B^3 $$ write equilibrium reaction differential equations following used: See generic functions SIMINT_POWER[][].","code":"A + B =konR=> C C =koffR=> A + B A + B <=konR:koffR=> C koffR*C - konR*A*B koffR*C - konR*A*B -koffR*C + konR*A*B [2]A + [3]B <=kf:kr=> [4]C = 2*kr*SIMINT_POWER[C][4] - 2*kf*SIMINT_POWER[A][2]*SIMINT_POWER[B][3] = 3*kr*SIMINT_POWER[C][4] - 3*kf*SIMINT_POWER[A][2]*SIMINT_POWER[B][3] = -4*kr*SIMINT_POWER[C][4] + 4*kf*SIMINT_POWER[A][2]*SIMINT_POWER[B][3]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"sources-and-sinks-s","dir":"Articles","previous_headings":"Differential equations","what":"Sources and sinks ","title":"Modeling Language","text":"method allows turnover described terms synthesis degradation terms. produced rate ksynA (mass quantities), degraded rate kdegA, modeled concentration units sources specified left hand side sinks (elimination) specified left hand side . Multiple sources sinks can separated semicolons. example compartment volume V writing differential equation:","code":"ksynA/V kdeg*A koffR*C - konR*A*B + ksynA/V - kdeg*A"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"movement-between-compartments-c","dir":"Articles","previous_headings":"Differential equations","what":"Movement between compartments ","title":"Modeling Language","text":"mass moves two physical spaces different volumes need specify, compartment, species, volume rate transport. descriptor allows us just identify compartment information separated semicolons (order important) movement central compartment volume V tissue space volume Vt rates kps ksp respectively specified following manner: equivalent following differential equation:","code":"Species; Volume; Rate Species; Volume; Rate A; V; kps At; Vt; ksp -kps*A + ksp*At*Vt/V +kps*A*V/Vt - ksp*At"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"bringing-it-all-together","dir":"Articles","previous_headings":"","what":"Bringing it all together","title":"Modeling Language","text":"final example consider target-mediated drug disposition system . system can defined set ODES: simply defined terms underlying processes:","code":" Cp*kpt*Vp/Vt - Ct*ktp -Cp*kpt + Ct*ktp*Vt/Vp - kel*Cp + koff*CpTp - kon*Cp*Tp + ksyn/Vp - kint*Tp + koff*CpTp - kon*Cp*Tp - kint*CpTp - koff*CpTp + kon*Cp*Tp # tissue distribution Ct; Vt; ktp Cp; Vp; kpt # equilibrium Cp + Tp <=kon:koff=> CpTp # Turnover ksyn/Vp kint*Tp kel*Cp kint*CpTp"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"initial-conditions-i","dir":"Articles","previous_headings":"Bringing it all together","what":"Initial conditions ","title":"Modeling Language","text":"default initial conditions zero. can specify non-zero initial condition using <> string set ‘state’ ‘value’ Value can combination numbers, system parameters

    static secondary parameters <. Consider turnover system value ksyn kdeg specified parameters: can calculate initial value target : can specify initial value target :","code":" state = value

    ksyn 0.1 eps inf 1/hr yes Target

    kdeg 0.04 eps inf nM yes Target T_IC = ksyn/kdeg T = T_IC"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Modeling Language","text":"Inputs model include typical interventions bolus dosing continuous infusions. However inputs refers mathematical inputs. Typically covariates may attributes system (gender, specific genotype), treated inputs. defining inputs necessary provide typical/placeholder values. provide default values ShinyApp interface well scripting level (Matlab R) can overwritten user.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"bolus-dosing-btimes-bevents","dir":"Articles","previous_headings":"Model inputs","what":"Bolus dosing , ","title":"Modeling Language","text":" descriptor used define bolus dosing. Dosing information broken list times bolus injections occur list events containing amount specified compartment receive. scale used convert bolus dosing information proscribed units (mg daily) units system coded (mg/mL hours). dosing done days 0, 1, 2… simulation time hours, scale dosing times 24.events contain magnitude bolus given time. want dose central compartment Cp mg/kg central compartment mg/mL need scale body weight (e.g. 70 kg) volume central compartment (system static secondary parameter Vp) scale 70/Vp. just want create palceholder can following: want setup default dosing shiny app scripts, can somethign complicated. multiple compartments receiving bolus, times must include times bolus may applied system. state receive bolus particular time, magnitude time 0. illustrate consider following dosing schedule: example want dose two different drugs two different states/compartments. Drug 1 (D1) dosed Cp1 drug 2 (D2) Cp2. Dosing mg/kg concentrations mg/ml. dosing time days, simulation time units hours. dosing D1 8 & 2 mpk days 0 & 6. D2 dosed 5 mpk day 9. Assume V1 V2 compartmental volumes D1 D2 ml, subject body weight 70 kg. convert doses mpk mg/ml. default doses can overwritten ShinyApp within scripts.","code":"# type state values scale units ; [0]; 24; days ; Cp; [0]; 70/Vc; mpk # type state values scale units ; [0 6 9]; 24; days ; Cp1; [8 2 0]; 70/V1; mpk ; Cp2; [0 0 5]; 70/V2; mpk"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"continuous-infusions-r","dir":"Articles","previous_headings":"Model inputs","what":"Continuous infusions ","title":"Modeling Language","text":"Rates infusion defined using descriptor. Like bolus values, infusion rates two components. component specifies switching times (e.g. switching 10 mg/hr 0). switching time corresponding rate infusion. infusion rate held constant next time. Also like bolus specification scale associated infusion times levels converts proscriptive units units simulation. Consider following example: two entries create infusion rate called myrate. can used system specifications (e.g., myrate/Vp). first row specifies times rate changed (0 30 minutes). system coded terms hours, scale 1/60 must used. levels indicate rate 1 mg/min switched 30 minutes. converted mg/hr using scale 60. can add many paired rate entries need describe many infusion interventions necessary. Note: just want placeholder can just set values [0].","code":"# name time/levels values scale units ; times; [0 30]; 1/60; min ; levels; [1 0]; 60; mg/min"},{"path":[]},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"simple-covariates","dir":"Articles","previous_headings":"Model inputs","what":"Simple covariates","title":"Modeling Language","text":"simulation purposes covariates (normally found dataset) need defined. Covariates can either constant change time. times values must scale system. following defines value covariate RACE: Covariates can also change time. case consider subject weight (WGT). begins 70 measurements made several time points. Next can alter simulations interpret values setting type covariate. default weight linearly interpolated (type = linear), however can hold weight constant next measurement encountered (last value carried forward) declaring type step Now model parameterized male female subjects can define two parameter sets (described ) account : values covariate can changed set ‘female’:","code":"; times; [0]; hours ; values; [1]; ethnicity ; times; [ 0 1680 3360 5040 10080]; hours ; values; [70 65 60 58 56]; kg step Male Female ; times; [ 0 1680 3360 10080] ; values; [60 55 52 50]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"complicated-covariates","dir":"Articles","previous_headings":"Model inputs","what":"Complicated covariates","title":"Modeling Language","text":"Detailed time course profiles can created well. example, create covariate profile zero time 0-1 time 1 jumps 8 decreases rate 1 per unit time time 5 stays value 4 time 12. might profile like following:","code":"# name time/values values units ; times; [0 .999 1 5 12]; hours ; values; [0 0 8 4 4 ]; -- linear"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"model-outputs","dir":"Articles","previous_headings":"","what":"Model outputs","title":"Modeling Language","text":"Outputs defined terms states, parameters, secondary parameters, input rates, covariates listed . format used : example: Outputs begin QC, like QC_CLtot , displayed ShinyApp. intended make available scripting level quality control (QC) purposes.","code":" name = expression A_obs = A Coverage = A/(KD + A) QC_CLtot = Cp*CL/Vp + Cp*Vmax/(Km+Cp)"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"functions-and-operators","dir":"Articles","previous_headings":"","what":"Functions and operators","title":"Modeling Language","text":"standard operators behave expected (+, -, *, & /) languages use consistently. however certain operators functions differ languages. example, consider power function (aba^b). FORTRAN **b, Matlab ^b, C pow(,b). Given objectives (write create multiple formats), can quite challenging. solution used convert language specific functions operators generic functions. power operator : converted appropriate output format depending output target. following generic functions can used:","code":"SIMINT_POWER[a][b]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"current-simulation-time","dir":"Articles","previous_headings":"Functions and operators","what":"Current simulation time","title":"Modeling Language","text":"systems want access simulation time. can use internal variable SIMINT_TIME.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"modeling-quasi-equilibrium-of-target-mediated-drugs","dir":"Articles","previous_headings":"Functions and operators","what":"Modeling quasi-equilibrium of target-mediated drugs","title":"Modeling Language","text":"free amount drug Cfree binding receptor affinity KD given total values Ctot Rtot following can calculated using following equation: Cfree=12[(Ctot−Rtot−KD)+(Ctot−Rtot−KD)2+4KDCtot] C_{free}=\\frac{1}{2} \\left[ (C_{tot}-R_{tot}-K_D) + \\sqrt{(C_{tot}-R_{tot}-K_D)^2 + 4K_DC_{tot}} \\right] can tedious, especially using generic functions . make easier can use following generic function: get Rfree, just switch first two arguments:","code":" Cfree = SIMINT_QEQ[Ctot][Rtot][KD] Rfree = SIMINT_QEQ[Rtot][Ctot][KD]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"timescales","dir":"Articles","previous_headings":"","what":"Timescales","title":"Modeling Language","text":"system default units constructed, indicated comments model. can useful (generating figures example) show simulations different time scales. Now can achieved multiplying time outputs correct scaling factor. However requires end user (1) remember original timescale (2) correctly scale value. Now particularly challenging mathematical perspective, introduces chance error. possible, instead, specify time scale information using descriptor. system coded hours, following define timescales default (hours), days, weeks months: used ShinyApp command line Matlab R","code":" 1.0 1.0/24.0 1.0/24.0/7.0 1.0/24.0/7.0/4.0"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"mathematical-sets","dir":"Articles","previous_headings":"","what":"Mathematical sets","title":"Modeling Language","text":"Consider following systems: PBPK: organs systems mathematically identical, variations parameters. However coding organs modifying existing system (say incorporate presences target organ) can become tedious. Anti-drug antibody generation: consider ADAs generated response therapeutic proteins, response consist distribution ADAs terms concentration separate distribution terms affinity. Modeling maturation process interactions ADAs, therapeutic protein, drug targets becomes unmanageable quickly. question : can make difficult problems easy intractable problems possible? solution implemented allows system defined terms mathematical sets","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"set-notation-set","dir":"Articles","previous_headings":"Mathematical sets","what":"Set notation ?","title":"Modeling Language","text":"Consider interactions occurring assay designed detect drug (D) present serum. assay biotinylated target (TB) used pull drug labeled target (TL) signaling molecule used. assay provide signal complex containing TB TL present (TB:D:TL TL:D:TB). Samples can contain soluble target well (TS) can interfere assay. model assay, following interactions considered: Several options available construct system. ODEs simply typed every possible combination. ’s also possible use equilibrium <=kon:koff=> interactions well. However, another option handle enumeration easily. First define two mathematical sets TSi TSk: defined can use curly brace notation ({ }) descriptors used construct system. example, initial conditions target states defined parameters (T0_TL, T0_TS, T0_TB) model. identified initial conditions using <> notation, can done single statement. line: Expands : Similar initial condition, equilibrium monomeric drug different targets can defined using single statement: uses one sets (TSi) expanded element set. account formation complexes contain drug molecule two different target molecules, following statement used: statement contains two different sets (TSi TSk). multiple sets encountered, every possible combination evaluated","code":" TL; TB; TS TL; TB; TS {TSi} = T0_{TSi} TL = T0_TL TB = T0_TB TS = T0_TS D + {TSi} <=kon:koff=> D_{TSi} D_{TSi} + {TSk} <=kon:koff=> {TSk}_D_{TSi}"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"aligning-sets","dir":"Articles","previous_headings":"Mathematical sets > Set notation ?","what":"Aligning Sets","title":"Modeling Language","text":"default sets interpreted evaluating every possible permutation shown . However, may desirable pair align sets. Take example transit compartments implemented Lobo Balthasar delay onset drug effect cancer cells [LB]. transit compartment implemented using series differential equations: $$ \\frac{dK1}{dt} = (K-K1)\\frac{1}{\\tau} \\\\ \\frac{dK2}{dt} = (K1-K2)\\frac{1}{\\tau} \\\\ \\frac{dK3}{dt} = (K2-K3)\\frac{1}{\\tau} \\\\ \\frac{dK4}{dt} = (K3-K4)\\frac{1}{\\tau} $$ ’s possible code individually, ’s also possible define using mathematical set notation. see first equation K paired aligned K1, second ’s K1 K2, etc. first define two sets equal length whose elements aligned: Next write ? statement terms sets, use SIMINT_SET_ALIGN function: first argument names sets align separated semicolon ; second argument system file descriptor written terms sets. expanded internally :","code":" K; K1; K2; K3 K1; K2; K3; K4 SIMINT_SET_ALIGN[TRIN;TROUT][ 1.0/tau*({TRIN}-{TROUT})] 1.0/tau*(K-K1) 1.0/tau*(K1-K2) 1.0/tau*(K2-K3) 1.0/tau*(K3-K4)"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"set-functions","dir":"Articles","previous_headings":"Mathematical sets > Set notation ?","what":"Set Functions","title":"Modeling Language","text":"can useful perform operations sets. can use following functions: SIMINT_SET_SUM mathematical equivalent ∑SET\\sum_{SET} SIMINT_SET_PRODUCT mathematical equivalent ∏SET\\prod_{SET} functions take two bracketed arguments. first argument set name second argument mathematical relationship expanded. example, consider system parameterized several species. variable EN_Mouse 1 species mouse 0 otherwise. Similarly EN_Human, EN_Monkey, etc. also defined body weights system parameters: BW_Mouse mouse, BW_Human human, etc. Now want assign BW value currently selected species (EN species 1). First define species parameter set: Next define secondary parameter BW summing product Boolean species parameter body weight species:","code":" Mouse; Rat; Monkey; Human BW = SIMINT_SET_SUM[SP][EN_{SP}*BW_{SP}]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"set-evaluation","dir":"Articles","previous_headings":"Mathematical sets > Set notation ?","what":"Set Evaluation","title":"Modeling Language","text":"Sets evaluated following order: First set functions (SIMINT_SET_SUM SIMINT_SET_PRODUCT) evaluated. Next aligned sets applied (SIMINT_SET_ALIGN) Lastly, remaining sets evaluated every permutation","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"piecewise-continuous-functionsparameters-if","dir":"Articles","previous_headings":"","what":"Piecewise-continuous functions/parameters ","title":"Modeling Language","text":"specify conditional assignment use statement: name name secondary parameter defined COND indicates Boolean condition needs satisfied. condition (boolean) can , , greater , etc. relationships. parameter assigned value Boolean relationship true. conditions can function different elements system depending whether name refers static dynamic secondary parameter: <> function system parameters, previously defined static secondary parameters covariates change given subject. function system parameters, static secondary parameters, states, previously defined dynamic secondary parameters covariates. important include default ELSE condition:","code":" boolean; value value"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"constructing-a-piece-wise-continuous-functionparameter","dir":"Articles","previous_headings":"Piecewise-continuous functions/parameters ","what":"Constructing a piece-wise continuous function/parameter","title":"Modeling Language","text":"see example use following command (use ?system_new see list available system file examples): system_new(system_file=\"pwc\", file_name=\"system-pwc.txt\") example specify fast (kelf) slow (kels) rates elimination. want fast rate active drug concentration Cth time Tf. system parameters look like: Now need define rate elimination constraints followed. First define kel dynamic secondary parameter value 0.0. define different conditions relevant values:","code":"

    kelf 1.0 eps inf 1/time yes System

    kels 0.01 eps inf 1/time yes System

    Cth 10 eps inf conc yes System

    Tf 10 eps inf time yes System kel = 0.0 SIMINT_AND[SIMINT_LT[SIMINT_TIME][Tf]][ SIMINT_GT[Cp][Cth]]; kelf kels"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"controlling-indices","dir":"Articles","previous_headings":"","what":"Controlling indices","title":"Modeling Language","text":"default, build script construct odes, parameter sets, etc. automatically. means order states/compartments going arbitrary. Sometimes necessary specify order states outputs. example using NONMEM order control stream must correlate values dataset. specify state Cp compartment 3, following used: general notation output state name assigned number :","code":" 3 number number"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"output-error-oe","dir":"Articles","previous_headings":"Controlling indices","what":"Output error ?","title":"Modeling Language","text":"links parameters defined using specific outputs defined using . can define either add additive /prop proportional error.","code":" prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf conc yes Variance Cp = expression add=add_error; prop=prop_error"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"concentrations-vs-amounts","dir":"Articles","previous_headings":"","what":"Concentrations vs amounts","title":"Modeling Language","text":"’s convenient model systems terms concentrations. However software allow scaling inputs. inputs provided mass units, need differential equation also mass units. can use descriptor system.txt tell ubiquity generate perform conversion differential equations. example, defined state Cc want Ac within nlmixr2 model target. related Cc = Ac/Vc Vc parameter following used:","code":" Cc; Ac; Vc"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"options","dir":"Articles","previous_headings":"","what":"Options","title":"Modeling Language","text":"Several options can specified using ? can used timescale plotting ShinyApp using: define default output times ShinyApp simulation scripts use following:","code":" days SIMINT_SEQ[0][100][1]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"example-system-files","dir":"Articles","previous_headings":"","what":"Example system files","title":"Modeling Language","text":"example system files can found examples directory stand-alone analysis template (ubiquity_template.zip). can also loaded form R package (see help ?system_new). system-adapt.txt - Parent/metabolite structural model taken ADAPT5 Users Manual [ADAPT]. system used estimation examples ubiquity workshop. system-glp_study.txt - PK model parameterized humans NHPs, used example GLP tox study design. system-mab_pk.txt - Linear model mAb PK humans taken [DM]. model used simulation examples ubiquity workshop. system-one_cmt_cl.txt - One compartment model parameterized terms clearances volumes. system-one_cmt_micro.txt - One compartment model parameterized micro constants (rates). system-pbpk.txt - Implementation large molecule PBPK model Shah Betts [SB]. model provides good examples use mathematical set notation. system-pbpk_template.txt - Template containing species parameter [SB]. can used construct systems parameterized multiple species. system-pwc.txt - Example construct piece-wise secondary parameters (.e. using //else statements). system-sets.txt - Example parameterized systems multiple parameter sets. system-tmdd.txt - Example code TMDD model using either ODEs process descriptors. system-tumor.txt - Implementation transit effect model cancer cell inhibition [LB]. demonstrates use aligned mathematical sets. system-two_cmt_cl.txt - Two compartment model parameterized terms clearances volumes system-two_cmt_micro.txt - Two compartment model parameterized terms micro constants (rates)","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"templates","dir":"Articles","previous_headings":"","what":"Templates","title":"Modeling Language","text":"system built, multiple files generated temporary directory (transient) support different software. R package can access templates programatically (see help ?system_fetch_template). list supporting software generated.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"r-workflow","dir":"Articles","previous_headings":"Templates","what":"R workflow","title":"Modeling Language","text":"auto_simulation_driver.R: R-Script named placeholders used run simulations. auto_analysis_estimation.R: R-Script named placeholders used perform naive-pooled parameter estimation.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"matlab-workflow","dir":"Articles","previous_headings":"Templates","what":"Matlab workflow","title":"Modeling Language","text":"auto_simulation_driver.m: M-file named placeholders used run simulations. auto_analysis_estimation.m: M-file named placeholders used perform naive-pooled parameter estimation.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"other-software-targets","dir":"Articles","previous_headings":"Templates","what":"Other Software Targets","title":"Modeling Language","text":"target_adapt_5.target_adapt_5-PSET.prm: system defined Adapt Fortran parameter (prm) file parameter set PSET. target_berkely_madonna-PSET.txt: text file containing system parameter set PSET run Berkeley Madonna. target_mrgsolve-PSET.cpp: C++ file containing system parameter set PSET run using mrgsolve package R. target_nlmixr-PSET.R: R script defines system analysis nlmixr2 parameter set PSET. Note: nlmixr2 target can used create input model files NONMEM Monolix","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Modeling Language","text":"[ADAPT] Adapt 5 Users Guide [DM] Dirks & Meibohm Clin. PK (2010) Oct 1;49(10):633-59 [LB] Lobo, E.D. & Balthasar, J.P. AAPS J (2002) 4, 212-222 [MK] Mager, D.E. & Krzyzanski, W. Pharm Res (2005) 22: 1589. [SB] Shah, D.K. & Betts, .M. JPKPD (2012) 39 (1), 67-86 [VR] Vieira & Rajewsky Eur J Immunol. (1988) Feb;18(2):313-6","code":""},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Noncompartmental Analysis","text":"Non-compartmental analysis (NCA) simple quick method evaluating exposure drug. allows evaluate things like linearity vivo exposure. illustrate consider antibody given subcutaneous injection. actual profile patient might experience given solid black line. don’t yet ability sample continuous fashion. might observer given blue points. Generally NCA determine following directly data: Cmax - Maximum observed concentration (units=concentration) Tmax - time maximum concentration observed (units=time) AUC - area curve (units=time×concentrationunits=time \\times concentration) AUMC - area first moment curve (units=time2×concentrationunits=time^2 \\times concentration) properties based observational data. Cmax Tmax certainly actual maximum concentration long sample judiciously give us good approximation. Similarly, calculated AUC AUMC different actual values. calculate areas need dig back calculus text books trapezoid method. Basically sampling interval trapezoid area calculated added n samples: AUC=∫0tfCdt≈∑=1n−1Ci+Ci+12×(ti+1−ti),AUMC=∫0tft×Cdt≈∑=1n−1tiCi+ti+1Ci+12×(ti+1−ti) AUC = \\int_0^{t_f} Cdt \\approx \\sum_{=1}^{n-1}{\\frac{C_i+C_{+1}}{2}\\times (t_{+1}-t_{})}, \\ \\ \\ \\ \\ AUMC = \\int_0^{t_f} t\\times Cdt \\approx \\sum_{=1}^{n-1}{\\frac{t_iC_i+t_{+1}C_{+1}}{2}\\times (t_{+1}-t_{})} can done Excel pretty easily. Depending data analysis properties can calculated. example can calculate clearance, steady-state volume distribution terminal half-life: Clearance: CL=DoseAUCCL = \\frac{Dose}{AUC} Mean residence time: MRT=AUMCAUCMRT = \\frac{AUMC}{AUC} Steady state volume distribution: Vss=MRT×CLV_{ss} = MRT \\times CL Half-life: Terminal slope natural log data Properties like AUC AUMC can also calculated using extrapolation last time point infinity account data beyond observations hand. subsequent values clearance, volumes distribution, etc can also change extrapolation. lot nuance associated calculations, good rely software focuses type analysis. PKNCA package developed mind. Ubiquity provides set functions automate NCA reporting preclinical data. functions act wrapper PKNCA package heavy lifting. small subset PKNCA functionality used . extensive analysis necessary PKNCA can used directly. vignette contains series examples perform NCA ubiquity. make copy scripts supporting files current working directory run following: creates several files working directory. First data sets: pk_all_sd.csv - PK data multiple subjects dosed either IV SC different levels pk_all_md.csv - Multiple dose data intensive sampling first last dose pk_sparse_sd.csv - Single dose data sparse sampling Next following scripts demonstrate perform NCA: analysis_nca_sd.R - Single dose data individuals analysis_nca_md.R - Multiple dose data individuals analysis_nca_sparse.R- Average NCA analyzing sparsely sampled data","code":"library(ubiquity) fr = workshop_fetch(section=\"NCA\", overwrite=TRUE)"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"quick-template-for-running-nca","dir":"Articles","previous_headings":"","what":"Quick Template for Running NCA","title":"Noncompartmental Analysis","text":"read rest vignette understand required data format functions work. returning just want template running NCA can use following: create file analysis_nca.R current working directory. can just uncomment/edit script get started.","code":"library(ubiquity) cfg = build_system() fr = system_fetch_template(cfg, template = \"NCA\")"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"single-dose-data","dir":"Articles","previous_headings":"","what":"Single Dose Data","title":"Noncompartmental Analysis","text":"example follows script analysis_nca_sd.R, uses dataset pk_all_sd.csv.","code":""},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"expected-format-of-data","dir":"Articles","previous_headings":"Single Dose Data","what":"Expected Format of Data","title":"Noncompartmental Analysis","text":"First build system load dataset. NCA functions ubiquity expect data certain format. columns required, optional depend kind analysis performed columns can also present. context consider following dataset: required columns names dataset provided parenthesis : ID - Unique subject identifier (ID) TIME - Time since first dose (TIME_HR) NTIME - Nominal time since last recent dose (since dealing single dose data also TIME_HR) CONC - Observed concentration record (C_ng_ml ng/ml) DOSE - Dose given (DOSE mg) ROUTE - Route administration (ROUTE); can either: iv bolus, iv infusion extra-vascular Optional columns include: DOSENUM - analyzing multiple dose data (example ), column used associate records doses BACKEXTRAP - Back-extrapolation IV data can done generally entire dataset column can used specify number points use individual basis SPARSEGROUP - Grouping sparse sampling data want average data time point","code":"cfg = build_system(system_file=\"system.txt\") cfg = system_load_data(cfg, dsname = \"PKDATA\", data_file = \"pk_all_sd.csv\")"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"nca-and-outputs","dir":"Articles","previous_headings":"Single Dose Data","what":"NCA and Outputs","title":"Noncompartmental Analysis","text":"Next perform NCA using system_nca_run: link analysis dataset specifying dataset name (dsname) used load dataset. Data can filtered either ’s loaded using optional dsfilter input (used ). dosing dataset mg (.e. 30 mg dose), mass units concentration values ng (.e. ng/ml). dscale input converts mass units dose mass units observed concentration. analysis_name 1 used refer analysis reporting function well files generated analysis. default initial concentration (nominal time zero) back-extrapolated can disabled setting extrap_C0 FALSE. Next map columns dataset names used analysis (dsmap). Note actual time (TIME) nominal time (NTIME) use column dataset (TIME_HR). Lastly, NCA_options can used specify analysis options used PKNCA. example maximum percent AUCinf extrapolation specified 10%. change option remaining defaults PKCNA used. Either omit argument set NULL use PKNCA defaults. Running function produce following files: output/pk_single_dose-nca_summary-pknca.csv Summary level output analysis (see table ) output/pk_single_dose-nca_data.RData R objects used downstream reporting output/pk_single_dose-pknca_raw.csv Raw output PKNCA may useful carry forward values certain columns PK dataset output. can use dsinc argument provide list columns input dataset appended summary table. can access summary table using function system_fetch_nca analysis_name: get explanation columns NCA output can use system_fetch_nca_columns function passing NCA analysis name function. list output contains data frame NCA_col_summary outputs description meaning:","code":"cfg = system_nca_run(cfg, dsname = \"PKDATA\", dscale = 1e6, analysis_name = \"pk_single_dose\", extrap_C0 = FALSE, dsmap = list(TIME = \"TIME_HR\", NTIME = \"TIME_HR\", CONC = \"C_ng_ml\", DOSE = \"DOSE\", ROUTE = \"ROUTE\", ID = \"ID\"), NCA_options = list(max.aucinf.pext = 10) ) NCA_results = system_fetch_nca(cfg, analysis_name = \"pk_single_dose\") nca_cols = system_fetch_nca_columns(cfg, \"pk_single_dose\") rhandsontable(nca_cols[[\"NCA_col_summary\"]], width=\"100%\", height=200)"},{"path":[]},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"powerpoint","dir":"Articles","previous_headings":"Single Dose Data > Automated Reporting","what":"PowerPoint","title":"Noncompartmental Analysis","text":"NCA run, results can appended open PowerPoint report. initialize empty report use function system_rpt_nca() analysis name assigned analysis (pk_single_dose) attach results. can write file: dose summary slide produced full timecourse created showing data subject/group dataset: Actual data gray Data used NCA green Initial extrapolated concentrations orange (solid) Points used extrapolating “iv bolus” data shown orange open circles shows slides generated individual subject first set summary slides analysis. Notice extrap_C0 set FALSE C0 calculated (-1). individual received SC dose estimate Vp also calculated (-1). Also note data individual allow extrapolation AUC infinity (NA). result parameters depend value also resulted (NA). timecourse figure shows data dataset (gray closed symbols, solid line) data used NCA (green open symbols, dashed line). way can visually confirm subject level data used.","code":"cfg = system_rpt_read_template(cfg, template=\"PowerPoint\") cfg = system_rpt_add_slide(cfg, template = \"title_slide\", elements = list( title= list(content = \"NCA Single Dose PK\", type = \"text\"))) cfg = system_rpt_nca(cfg=cfg, analysis_name=\"pk_single_dose\") system_rpt_save_report(cfg=cfg, output_file=file.path(\"output\",\"pk_single_dose-report.pptx\"))"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"word","dir":"Articles","previous_headings":"Single Dose Data > Automated Reporting","what":"Word","title":"Noncompartmental Analysis","text":"Similarly, Word report can generated appending results already initialized Word report. done setting template \"Word\" calling system_rpt_read_template(). attach content report PowerPoint report . information integrated report generation see Reporting vignette.","code":"cfg = system_rpt_read_template(cfg, template=\"Word\") cfg = system_rpt_nca(cfg=cfg, analysis_name=\"pk_single_dose\") system_rpt_save_report(cfg=cfg, output_file=file.path(\"output\",\"pk_single_dose-report.docx\"))"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"summarizing-data","dir":"Articles","previous_headings":"Single Dose Data","what":"Summarizing Data","title":"Noncompartmental Analysis","text":"automated reporting intended generate results quickly easily digestible way (Word PowerPoint). may decided need control presented. function system_fetch_nca() mentioned give access NCA output. want filter, select columns summarize results function system_nca_summary() can used. first argument (analysis_name) indicates NCA analysis want summarize. parameters summarized order table specified params_include. default internal headers used, can overwrite alter defaults optional params_header input. cmax overwritten internally predefined label (\"

    F1 0.744 eps inf --- yes System

    ka 0.282 eps inf 1/day yes System

    CL 0.200 eps inf L/day yes System

    Vc 3.61 eps inf L yes System

    Vp 2.75 eps inf L yes System

    Q 0.747 eps inf L/day yes System

    MW 140 eps inf kD yes System mAb in Humans # Interindividual Variability # Taken from Table 3 0.416 ka 0.09875 CL 0.116 Vc 0.0789 Vp 0.699 Q 0.0786 0.0619 0.0377 # Covariates ; times; [ 0 ]; day ; values; [400]; mg step ; times; [ 0 ]; day ; values; [ 60]; kg step # static secondary parameters kel = CL/Vc kcp = Q/Vc kpc = Q/Vp # #-------------------# # |Input Information | # #-------------------# # # 1e6 ng 1 nmole 1 # X mg x ------ x ----------------- x --- => X*1e3/MW/Vc # 1 mg MW (KDA) * 1000 V(L) # # Bolus Events # times/events state values scale units ; [ 0.0, 7, 14 ]; 1; days ; At; [400.0, 0, 0 ]; 1e3/MW; mg ; Cc; [ 0.0, 0, 0 ]; 1e3/MW/Vc; mg ; times; [0, 30]; 1/60/24; min ; levels; [0, 0]; 60*24*1e3/MW; mg/min # ODEs -ka*At ka*At*F1/Vc -kel*Cc - kcp*Cc + kpc*Cp*Vp/Vc + Dinf/Vc kcp*Cc*Vc/Vp - kpc*Cp # #---------# # | Outputs | # #---------# # Outputs that begin with QC will not be displayed in the GUI # Convert nM to ng/ml # # X nM ===> X*MW(KDA) # # Convert nM to ug/ml/mg(dose) # # X nM ===> X*MW(KDA)/1000/dose # C_ng_ml = Cc*MW C_DOSE = Cc*MW/DOSE/1000 prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf ng/ml yes Variance Vp; Vc; CL; Q; ka Vp; Vc; CL; Q; ka; add_err; prop_err add=add_err; prop=prop_err Cp; Ap; Vp # #---------# # | Options # # #---------# # General Options: # specify different time scales 24.0*60.0 1.0 24.0 1.0/7.0 1.0/7.0/4.0"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Titration/Rule-Based Simulations","text":"Simulation vignette several examples provided using fixed dosing regimens. works well compounds relatively safe, PK consistent time, drug concentrations required achieve efficacy consistent. fact restrictions apply many different compounds. However, many scenarios necessary adjust dosing based periodic clinical visits: compounds narrow therapeutic index, disease progression alters drug PK requires increases dose amount, etc. possible manually current simulation tools provided, section outlines generalized framework make easier users. workshop provides several examples running titration rule-based simulations. make copy scripts supporting files current working directory run following: provide following scripts: analysis_repeat_dosing.r - Implement fixed bolus dosing using titration framework analysis_repeat_infusion.r - Implement fixed infusion rates using titration framework analysis_visit_dosing_titration.r - Alter dosing based predictions specified time points (individual) analysis_visit_dosing_titration_stochastic.r - Alter dosing based predictions specified time points (population) analysis_state_reset.r - Combine multiple rules dose drug perform state reset Titration rule-based simulations run using following functions: system_new_tt_rule() - Defines new rule times evaluated system_set_tt_cond() - Adds condition rule associated action perform condition true run_simulation_titrate() - Runs individual simulation using titration rules","code":"library(ubiquity) fr = workshop_fetch(section=\"Titration\", overwrite=TRUE)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"repeated-bolus-dosing-analysis_repeat_dosing-r","dir":"Articles","previous_headings":"","what":"Repeated Bolus Dosing (analysis_repeat_dosing.r)","title":"Titration/Rule-Based Simulations","text":"example shows implement dosing regimen using fixed-dosing methodologies titration functions . meant means bridge two concepts. First use model Simulation vignette (Davda etal. mAbs, 6(4), 1094-1102), simulate five doses 500 mg IV given every two weeks: use rule-based control simulation enable titration option: Next need define rule using system_new_tt_rule(). rule contains set times (timescale) want evaluate rule. create rule called \"ivdose\" evaluate rule weeks 0, 2, 4, 6 8. timescale defined using system file can used: rule created can attach conditions rule using system_set_tt_cond(). name passed function name rule condition applies. cond argument string evaluated internally. put kind Boolean argument want , even create user definable function returns Boolean argument (eg, 'myfunction(arguments)'). condition evaluates true string action evaluated. string SI_TT_BOLUS prototype function used modify dosing titration points. See help (?system_set_tt_cond) details prototype functions variables available titration environment. action define dosing specified state (defined system file) values times shown. units specified system file times relative titration time point. Next simulate system using titration function: Now can overlay predictions using methods show produce result: output run_simulation_titrate() similar run_simulation_ubiquity() two extra elements list returned: tt.tname.value - Value rule active condition -1 triggered tt.tname.simtime - Simulation time last condition became active tt.tname.timescale - Simulation time time scale rule specified fields tname - Titration rule name value - Value rule active condition simtime - Simulation time last condition became active timescale - Simulation time time scale rule specified ","code":"cfg = build_system() cfg = system_select_set(cfg, \"default\") parameters = system_fetch_parameters(cfg) cfg=system_set_option(cfg,group = \"simulation\", option = \"solver\", value = \"lsoda\") cfg=system_set_option(cfg, group = \"simulation\", option = \"output_times\", seq(0,10*7,1)) cfg = system_zero_inputs(cfg) cfg = system_set_bolus(cfg, state = \"Cc\", times = c(0, 14, 28, 42, 56), values = c(500, 500, 500, 500, 500)) som_fix = run_simulation_ubiquity(parameters, cfg) cfg=system_set_option(cfg, group = \"titration\", option = \"titrate\", value = TRUE) cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 2, 4, 6, 8), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"TRUE\", action = \"SI_TT_BOLUS[state='Cc', values=500, times=0]\", value = \"1\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_fix$simout, aes(x=ts.days, y=Cc, color=\"Fixed Dosing\"), linetype=1) + geom_line(data=som_tt$simout, aes(x=ts.days, y=Cc, color=\"Titration\" ), linetype=2) + scale_colour_manual(values=c(\"Fixed Dosing\"=\"darkblue\", \"Titration\"=\"firebrick3\")) + theme(legend.title = element_blank()) + theme(legend.position = 'bottom') myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"repeated-infusions-analysis_repeat_infusion-r","dir":"Articles","previous_headings":"","what":"Repeated Infusions (analysis_repeat_infusion.r)","title":"Titration/Rule-Based Simulations","text":"example want give 30 minute infusion 15 mg/min every two weeks. Similar previous example first using fixed dosing methods: Now use rule-based dosing enable titration, create rule (\"ivdose\") hold dosing times, create conditions resulting dosing. similar previous example except use SI_TT_RATE prototype function. rate units times levels specified system file (). times also relative titration time.","code":"cfg = system_zero_inputs(cfg) cfg = system_set_rate(cfg, rate = \"Dinf\", times = c( 0, 30, 20160, 20190, 40320, 40350, 60480, 60510, 80640, 80670), levels = c(15 , 0, 15, 0, 15, 0, 15, 0, 15, 0)) som_fix = run_simulation_ubiquity(parameters, cfg) cfg=system_set_option(cfg, group = \"titration\", option = \"titrate\", value = TRUE) cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 2, 4, 6, 8), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"TRUE\", action = \"SI_TT_RATE[rate='Dinf', times=c(0,30), levels=c(15,0)]\", value = \"1\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_fix$simout, aes(x=ts.days, y=Cc, color=\"Fixed Dosing\"), linetype=1) + geom_line(data=som_tt$simout, aes(x=ts.days, y=Cc, color=\"Titration\" ), linetype=2) + scale_colour_manual(values=c(\"Fixed Dosing\"=\"darkblue\", \"Titration\"=\"firebrick3\")) + theme(legend.title = element_blank()) + theme(legend.position = 'bottom') myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"titrated-dosing-analysis_visit_dosing_titration-r","dir":"Articles","previous_headings":"","what":"Titrated Dosing (analysis_visit_dosing_titration.r)","title":"Titration/Rule-Based Simulations","text":"following example want administer subcutaneous dose () every two weeks (interval=14) 12 weeks. dose level evaluated every 6 months. serum concentration (Cc) less 900, dose 700 mg. Cc greater 900 dose 600 mg. relevant code implement shown : Initially concentration serum 0 (Cc < 900), dosing starts 700. six months titration rule triggered . point serum concentration greater greater 900 dose level reduced 600. subsequent measurements greater 900 dose remains 600. Titration output: som_tt$titration Titration output: som_tt$titration_history","code":"cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 6, 12, 18, 24), timescale = \"months\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"Cc < 900\", action = \"SI_TT_BOLUS[state='At', values=700, times=0, repdose='last', number=11, interval=14]\", value = \"700\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"Cc > 900\", action = \"SI_TT_BOLUS[state='At', values=600, times=0, repdose='last', number=11, interval=14]\", value = \"600\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_tt$simout, aes(x=ts.weeks, y=Cc), color=\"blue\") myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"monte-carlo-simulations-analysis_visit_dosing_titration_stochastic-r","dir":"Articles","previous_headings":"","what":"Monte Carlo Simulations (analysis_visit_dosing_titration_stochastic.r)","title":"Titration/Rule-Based Simulations","text":"example similar last except performing population simulations (20 subjects). function (simulate_subjects()) used setting 'titrate' option TRUE tells function use rule-based dosing. add data list element called som$titration three fields titration rule (tname): tt.tname.value - Value rule active condition tt.tname.simtime - Simulation time last condition became active tt.tname.timescale - Simulation time time scale rule specified fields matrix entry simulation time (column) subject (row). example accessed following list elements: som$titration$tt.ivdose.simtime som$titration$tt.ivdose.value som$titration$tt.ivdose.timescaletimescale data structure (som) can collapsed data frame using som_to_df function. titration simulations column added rule giving value rule indicated time (first 100 rows shown):","code":"cfg = system_set_option(cfg, group=\"stochastic\", option=\"nsub\", value=20) som= simulate_subjects(parameters, cfg) sdf = som_to_df(cfg, som)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"performing-statecompartment-resets-analysis_state_reset-r","dir":"Articles","previous_headings":"","what":"Performing State/Compartment Resets (analysis_state_reset.r)","title":"Titration/Rule-Based Simulations","text":"Along changing dosing titration time points, may also necessary directly alter state compartment values. last example dose every two weeks week 3 drop total drug system 1/2. portion covers IV dosing component: portion reduces amount drug Cc Cp 1/2 week 3:","code":"cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 2, 4, 6, 8), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = 'TRUE', action = \"SI_TT_BOLUS[state='Cc', values=500, times=0]\", value = \"5\") cfg=system_new_tt_rule(cfg, name = \"state_reset\", times = c(3), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"state_reset\", cond = 'TRUE', action = \"SI_TT_STATE[Cc][0.5*Cc]\", value = \"0\") cfg=system_set_tt_cond(cfg, name = \"state_reset\", cond = 'TRUE', action = \"SI_TT_STATE[Cp][0.5*Cp]\", value = \"0\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_tt$simout, aes(x=ts.weeks, y=Cc), color=\"red\") myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"contents-of-system-txt","dir":"Articles","previous_headings":"","what":"Contents of system.txt","title":"Titration/Rule-Based Simulations","text":"","code":"# Implementation of the two compartment model from Davda 2014 # # Davda, J. P., Dodds, M. G., Gibbs, M. A., Wisdom, W., & Gibbs, J. (2014). A # model-based meta-analysis of monoclonal antibody pharmacokinetics to guide # optimal first-in-human study design. mAbs, 6(4), 1094-1102. # http://doi.org/10.4161/mabs.29095 # # System Units: # mass [=] nmoles # volume [=] L # concentration [=] nM # time [=] day # # #-------------# # | Parameters | # #-------------# # System parameters #name value lower upper units editable grouping # bound bound

    F1 0.744 eps inf --- yes System

    ka 0.282 eps inf 1/day yes System

    CL 0.200 eps inf L/day yes System

    Vc 3.61 eps inf L yes System

    Vp 2.75 eps inf L yes System

    Q 0.747 eps inf L/day yes System

    MW 140 eps inf kD yes System mAb in Humans # Interindividual Variability # Taken from Table 3 0.416 ka 0.09875 CL 0.116 Vc 0.0789 Vp 0.699 Q 0.0786 0.0619 0.0377 # Covariates ; times; [ 0 ]; day ; values; [400]; mg step ; times; [ 0 ]; day ; values; [ 60]; kg step # static secondary parameters kel = CL/Vc kcp = Q/Vc kpc = Q/Vp # #-------------------# # |Input Information | # #-------------------# # # 1e6 ng 1 nmole 1 # X mg x ------ x ----------------- x --- => X*1e3/MW/Vc # 1 mg MW (KDA) * 1000 V(L) # # Bolus Events # times/events state values scale units ; [ 0.0, 7, 14 ]; 1; days ; At; [400.0, 0, 0 ]; 1e3/MW; mg ; Cc; [ 0.0, 0, 0 ]; 1e3/MW/Vc; mg ; times; [0, 30]; 1/60/24; min ; levels; [0, 0]; 60*24*1e3/MW; mg/min # ODEs -ka*At ka*At*F1/Vc -kel*Cc - kcp*Cc + kpc*Cp*Vp/Vc + Dinf/Vc kcp*Cc*Vc/Vp - kpc*Cp # #---------# # | Outputs | # #---------# # Outputs that begin with QC will not be displayed in the GUI # Convert nM to ng/ml # # X nM ===> X*MW(KDA) # # Convert nM to ug/ml/mg(dose) # # X nM ===> X*MW(KDA)/1000/dose # C_ng_ml = Cc*MW C_DOSE = Cc*MW/DOSE/1000 prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf ng/ml yes Variance Vp; Vc; CL; Q; ka Vp; Vc; CL; Q; ka; add_err; prop_err add=add_err; prop=prop_err Cp; Ap; Vp # #---------# # | Options # # #---------# # General Options: # specify different time scales 24.0*60.0 1.0 24.0 1.0/7.0 1.0/7.0/4.0"},{"path":"https://r.ubiquity.tools/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"John Harrold. Author, maintainer.","code":""},{"path":"https://r.ubiquity.tools/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Harrold, J.M., Abraham, .K. Ubiquity: framework physiological/mechanism-based pharmacokinetic/pharmacodynamic model development deployment. J Pharmacokinet Pharmacodyn 41, 141–151 (2014). https://doi.org/10.1007/s10928-014-9352-6","code":"@Article{, title = {Ubiquity: a framework for physiological/mechanism-based pharmacokinetic/pharmacodynamic model development and deployment}, author = {J.M. Harrold and A.K. Abraham}, journal = {Journal of Pharmacokinetics and Pharmacodynamics}, year = {2014}, volume = {41}, number = {2}, pages = {141-151}, url = {https://doi.org/10.1007/s10928-014-9352-6}, }"},{"path":[]},{"path":"https://r.ubiquity.tools/index.html","id":"overview","dir":"","previous_headings":"ubiquity R Workflow","what":"Overview","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"Provides interface R workflow ubiquity: set modeling tools created accelerate development deployment models drug disposition efficacy within organization institution. designed make model development easier, reduce pain moving modeling software, provide simple customizable interface allow scientists interrogate models. provide free BSD license source code available GitHub (R-package, ubiquity project).","code":""},{"path":"https://r.ubiquity.tools/index.html","id":"installing-ubiquity","dir":"","previous_headings":"ubiquity R Workflow","what":"Installing ubiquity","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"detailed software requirements installation instructions see page: (https://ubiquity.tools/rworkflow) Briefly, install following: R RStudio Perl (Windows) Rtools (Windows) can install ubiquity CRAN install development version GitHub: Note may need install development version onbrand GitHub well","code":"install.packages(\"ubiquity\", dependencies=TRUE) # Installing devtools if it's not already installed if(system.file(package=\"devtools\") == \"\"){ install.packages(\"devtools\") } devtools::install_github(\"john-harrold/ubiquity\", dependencies=TRUE)"},{"path":"https://r.ubiquity.tools/index.html","id":"getting-started","dir":"","previous_headings":"ubiquity R Workflow","what":"Getting started","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"full documentation ubiquity vignettes manuals available. information specific tasks see following vignettes: Language: Constructing ODE-based systems using ubiquity language Simulation: Running individual population simulations Estimation: Naive-pooled parameter estimation Titration: Rule-based/titration simulations Deployment: ShinyApp running deploying models Reporting: Inline generation PowerPoint Word reports NCA: Automated non-compartmental analysis PKNCA","code":""},{"path":"https://r.ubiquity.tools/index.html","id":"changes-and-updates","dir":"","previous_headings":"ubiquity R Workflow","what":"Changes and Updates","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"See NEWS.md details differences updates.","code":""},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate AUC for Sparse Data — AUC_Bailers_method","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"implementation Bailors method calculating AUCs sparse sampling. taken following publication: Nedelman, J. R., Gibiansky, E., & Lau, D. T. (1995). Applying Bailer's method AUC confidence intervals sparse sampling Pharmaceutical Research, 12(1), 124-128.","code":""},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"","code":"AUC_Bailers_method( conc_data = NULL, dsmap = list(NTIME = \"NTIME\", CONC = \"CONC\", ID = \"ID\") )"},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"conc_data data frame containing sparse data dsmap list names specifying columns: NTIME Nominal time since last dose; \"NTIME\" (default) CONC Concentration data; \"CONC\" (default) ID Subject ID; (\"ID\" (default)","code":""},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"list following elements isgood Boolean value indicating result function call AUC Mean AUC var_AUC Variance AUC msgs Sequence strings contianing description problems obss Internal observations times Sequence time corresponding rows obs r number observations time point (rows correspond rows obs)","code":""},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"Called ShinyApp add log entry \"App\" prepended log entry","code":""},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"","code":"GUI_log_entry(cfg, text)"},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"cfg ubiquity system object text string print/log","code":""},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"function used stochastic simulations performed using data file subject level information. data file contains covariate information, function update system subjects covariates.","code":""},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"","code":"apply_sub_file_COV( tmpcfg, cov_found, sub_dataset, sub_ID_col, sub_TIME_col, file_ID )"},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"tmpcfg ubiquity system object cov_found list covariates found dataset sub_dataset name dataset subject parameters sub_ID_col name column dataset subject IDs sub_TIME_col name column dataset simulation time file_ID subject ID extract covariates ","code":""},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"ubiquity system object covariates set current subject","code":""},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":null,"dir":"Reference","previous_headings":"","what":"Archive Estimation Results — archive_estimation","title":"Archive Estimation Results — archive_estimation","text":"Archives estimation results moving output files file names 'name' prepended . prevents overwritten different analysis script following files archived: output/parameters_all.csv output/parameters_est.csv output/report.txt Example: archive_estimation('mysoln', cfg) rename files output/mysoln-parameters_all.csv output/mysoln-parameters_est.csv output/mysoln-report.txt","code":""},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Archive Estimation Results — archive_estimation","text":"","code":"archive_estimation(name, cfg)"},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Archive Estimation Results — archive_estimation","text":"name analysis name cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Archive Estimation Results — archive_estimation","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":null,"dir":"Reference","previous_headings":"","what":"Build the System File — build_system","title":"Build the System File — build_system","text":"Builds specified system file creating targets R languages well templates performing simulations estimations.","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build the System File — build_system","text":"","code":"build_system( system_file = \"system.txt\", distribution = \"automatic\", perlcmd = \"perl\", output_directory = file.path(\".\", \"output\"), temporary_directory = file.path(\".\", \"transient\"), verbose = TRUE, ubiquity_app = FALSE, debug = TRUE )"},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build the System File — build_system","text":"system_file name file defining system ubiquity format (default = 'system.txt'), file exist template created compiled. distribution indicates weather using 'package' 'stand alone' distribution ubiquity. set 'automatic' build script first look see ubiquity R package installed. installed use package. Otherwise, assume \"sand alone\" distribution. perlcmd system command run perl (\"perl\") output_directory location store analysis outputs (file.path(\".\", \"output\")) temporary_directory location templates otehr files building system (file.path(\".\", \"transient\")) verbose enable verbose messaging (TRUE) ubiquity_app set TRUE building system used ubiquty App (FALSE) debug Boolean variable indicating debugging information displayed (TRUE)","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Build the System File — build_system","text":"initialized ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Build the System File — build_system","text":"","code":"# \\donttest{ fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Creating output directory #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # }"},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the halflife of data — calculate_halflife","title":"Calculate the halflife of data — calculate_halflife","text":"Determines terminal halflife sequence corresponding times values optional minimum maximum times censor data.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the halflife of data — calculate_halflife","text":"","code":"calculate_halflife(times = NULL, values = NULL, tmin = NULL, tmax = NULL)"},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the halflife of data — calculate_halflife","text":"times - sequence times values - corresponding sequence values tmin - minimum time include (NULL) tmax - maximum time include (NULL)","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the halflife of data — calculate_halflife","text":"List following names thalf Halflife units times mod Result lm used fit log transformed data df Dataframe data predicted values time within tmin tmax","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the halflife of data — calculate_halflife","text":"","code":"x = c(0:100) y = exp(-.1*x) th = calculate_halflife(times=x, values=y) #> Warning: essentially perfect fit: summary may be unreliable #> Warning: essentially perfect fit: summary may be unreliable thalf = th$thalf"},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates the Value of the Specified Objective Function — calculate_objective","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"given set system parameters objective function calculated based defined cohorts variance models.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"","code":"calculate_objective(parameters, cfg, estimation = TRUE)"},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"parameters system parameters cfg ubiquity system object estimation boolean variable indicate objective function called parameter estimation","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"estimation TRUE return objective function value, FALSE return list element value containing objective function value element named isgood TRUE objective function successful.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":null,"dir":"Reference","previous_headings":"","what":"GA Wrapper for calculate_objective — calculate_objective_ga","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"Converts parameter vector named list returns negative objective (turning maximization minimization)","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"","code":"calculate_objective_ga(pvect, cfg)"},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"pvect system parameters cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"objective function value","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":null,"dir":"Reference","previous_headings":"","what":"pso Wrapper for calculate_objective — calculate_objective_pso","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"psoptim objective function assumes parameters vector function converts named list consistent ubiquity optmization routines.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"","code":"calculate_objective_pso(pvect, cfg)"},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"pvect system parameters cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"objective function value","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates the Variance in od_general — calculate_variance","title":"Calculates the Variance in od_general — calculate_variance","text":"Takes variance specified string evaluates locally, returns value","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates the Variance in od_general — calculate_variance","text":"","code":"calculate_variance( SIMINT_parameters, SIMINT_varstr, SIMINT_odchunk, SIMINT_cfg )"},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates the Variance in od_general — calculate_variance","text":"SIMINT_parameters system parameters SIMINT_varstr string containing variance calculation SIMINT_odchunk chunk observation details containing predictions, observations time SIMINT_cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates the Variance in od_general — calculate_variance","text":"Variance calculated given set parameters model","code":""},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify System Steady State — check_steady_state","title":"Verify System Steady State — check_steady_state","text":"Takes output run_simulation_ubiquity verifies system running steady state analyzing timecourse states system","code":""},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify System Steady State — check_steady_state","text":"","code":"check_steady_state(cfg, som)"},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify System Steady State — check_steady_state","text":"cfg ubiquity system object som output run_simulation_ubiquity","code":""},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify System Steady State — check_steady_state","text":"list name steady_state (boolean indicating weather system steady state) states vector states steady state offset.","code":""},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares Estimate to Bounds — compare_estimate","title":"Compares Estimate to Bounds — compare_estimate","text":"Compares parameter estimate bounds indicates estimate near bound.","code":""},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares Estimate to Bounds — compare_estimate","text":"","code":"compare_estimate(cfg, parameters, pname)"},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares Estimate to Bounds — compare_estimate","text":"cfg ubiquity system object parameters list parameter estimates pname name parameter compare","code":""},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares Estimate to Bounds — compare_estimate","text":"L - near lower bound, U - near upper bound","code":""},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Performs parameter estimation — estimate_parameters","title":"Performs parameter estimation — estimate_parameters","text":"Performs actual parameter estimation","code":""},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Performs parameter estimation — estimate_parameters","text":"","code":"estimate_parameters(cfg)"},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Performs parameter estimation — estimate_parameters","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Performs parameter estimation — estimate_parameters","text":"list elements: estimate - vector parameter estimates raw - raw output underlying optimization routine conv - list convergence criteria keys num (numeric) text (text description) obj - objective function value statistics_est - solution statistics sysup - Text update system file parameter estimates estimate - Names list parameter estiamtes report - Named list elements reporting cohorts - Cohort elements cfg file cohort_view - Cohort view system_view() system_file - Contents system file estimation run","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"Can used take subset parameters (estimated returned ' system_estimate_parameters) full list system parameters.","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"","code":"fetch_full_parameters(pest, cfg)"},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"pest list containing subset parameters estimated cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"Full list parameters default values currently selected parameter set values pest merged","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"function used build full parameter set subset, normally used parameter estimation observation details function entire parameter vector needed simulate system. function select_set pulls parameter set can optionally select subset estimation: default values subset can accessed following way: estimation routines work reduced parameter set, run simulations full set needed. full values can retrieved using following:","code":"pnames = c('Vp', 'CL') cfg = system_select_set(cfg, \"default\", pnames) pest = system_fetch_guess(cfg) parameters = fetch_full_parameters(pest, cfg)"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Prototype Functions for Arguments — find_bracketed_arguments","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"Parses strings find abstract functions (format SIFUNC[ARG1][ARG2][ARG3] extract arguments function replace actual functions additional arguments needed","code":""},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"","code":"find_bracketed_arguments(str, pattern, replace = \"\", narg, op = \"[\", cp = \"]\")"},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"str string containing prototype function call pattern string indicating start function eg. \"SI_TT_BOLUS[\" replace string replace pattern narg number arguments prototype function op string used indicating open parenthesis cp string used indicating close parenthesis","code":""},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"string containing actual function call/code built prototype function","code":""},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates a Parameter Based on in the System File — generate_parameter","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"Internal function used generate parameters based IIV information","code":""},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"","code":"generate_parameter( SIMINT_parameters, SIMINT_cfg, SIMINT_PARAMETER_TV, SIMINT_IIV_VALUE, SIMINT_equation )"},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"SIMINT_parameters parameters vector containing typical values SIMINT_cfg ubiquity system object SIMINT_PARAMETER_TV Typical value parameter question SIMINT_IIV_VALUE sample mvr distribution SIMINT_equation equation relating IIV typical value parameter value variability","code":""},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"parameter value variability applied","code":""},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Text Report with Estimation Results — generate_report","title":"Generate Text Report with Estimation Results — generate_report","text":"Internal function used generate report estimation results","code":""},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Text Report with Estimation Results — generate_report","text":"","code":"generate_report(parameters, ss, cfg, conv_desc)"},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Text Report with Estimation Results — generate_report","text":"parameters list parameter estimates ss output solution_statistics cfg ubiquity system object conv_desc description convergence criteria","code":""},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Text Report with Estimation Results — generate_report","text":"List following elements: report_file name report file report_file_contents contents report file parameters_all_file name CSV file parameters parameters_est_file name CSV file estimates","code":""},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Subject — generate_subject","title":"Generate Subject — generate_subject","text":"Generates subject variability specified using descriptor system file","code":""},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Subject — generate_subject","text":"","code":"generate_subject(parameters, cfg)"},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Subject — generate_subject","text":"parameters vector nominal parameter values cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Subject — generate_subject","text":"List field named parameters containing sample representing subject","code":""},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":null,"dir":"Reference","previous_headings":"","what":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"used convert x y-axis ggplot log 10 scale visually satisfying ggplot default.","code":""},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"","code":"gg_axis( fo, yaxis_scale = TRUE, xaxis_scale = TRUE, ylim_min = NULL, ylim_max = NULL, xlim_min = NULL, xlim_max = NULL, x_tick_label = TRUE, y_tick_label = TRUE )"},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"fo ggplot figure object yaxis_scale TRUE indicates y-axis log10 scaled xaxis_scale TRUE indicates x-axis log10 scaled ylim_min set number define lower bound y-axis ylim_max set number define upper bound y-axis xlim_min set number define lower bound x-axis xlim_max set number define upper bound x-axis x_tick_label TRUE show x tick labels, FALSE hide x tick labels y_tick_label TRUE show y tick labels, FALSE hide y tick labels","code":""},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"ggplot object formatted axis","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":null,"dir":"Reference","previous_headings":"","what":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"Wrapper gg_axis create log 10 x-axis","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"","code":"gg_log10_xaxis( fo, xlim_min = NULL, xlim_max = NULL, y_tick_label = TRUE, x_tick_label = TRUE )"},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"fo ggplot figure object xlim_min set number define lower bound x-axis xlim_max set number define upper bound x-axis y_tick_label TRUE show y tick labels, FALSE hide y tick labels x_tick_label TRUE show x tick labels, FALSE hide x tick labels","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"ggplot object formatted axis","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":null,"dir":"Reference","previous_headings":"","what":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"Wrapper gg_axis create log 10 y-axis","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"","code":"gg_log10_yaxis( fo, ylim_min = NULL, ylim_max = NULL, y_tick_label = TRUE, x_tick_label = TRUE )"},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"fo ggplot figure object ylim_min set number define lower bound y-axis ylim_max set number define upper bound y-axis y_tick_label TRUE show y tick labels, FALSE hide y tick labels x_tick_label TRUE show x tick labels, FALSE hide x tick labels","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"ggplot object formatted axis","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of the linspace Function from Matlab — linspace","title":"Implementation of the linspace Function from Matlab — linspace","text":"Creates vector n elements equally spaced apart.","code":""},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of the linspace Function from Matlab — linspace","text":"","code":"linspace(a, b, n = 100)"},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Implementation of the linspace Function from Matlab — linspace","text":"initial number b final number n number elements (integer >= 2)","code":""},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of the linspace Function from Matlab — linspace","text":"vector numbers b n linearly spaced apart","code":""},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of the linspace Function from Matlab — linspace","text":"","code":"linspace(0,100, 20) #> [1] 0.000000 5.263158 10.526316 15.789474 21.052632 26.315789 #> [7] 31.578947 36.842105 42.105263 47.368421 52.631579 57.894737 #> [13] 63.157895 68.421053 73.684211 78.947368 84.210526 89.473684 #> [19] 94.736842 100.000000"},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of the logspace Function from Matlab — logspace","title":"Implementation of the logspace Function from Matlab — logspace","text":"Creates vector n elements logarithmically spaced apart.","code":""},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of the logspace Function from Matlab — logspace","text":"","code":"logspace(a, b, n = 100)"},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Implementation of the logspace Function from Matlab — logspace","text":"initial number b final number n number elements (integer >=2)","code":""},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of the logspace Function from Matlab — logspace","text":"vector numbers b n logarithmically (base 10) spaced apart","code":""},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of the logspace Function from Matlab — logspace","text":"","code":"logspace(-2, 3,20) #> [1] 1.000000e-02 1.832981e-02 3.359818e-02 6.158482e-02 1.128838e-01 #> [6] 2.069138e-01 3.792690e-01 6.951928e-01 1.274275e+00 2.335721e+00 #> [11] 4.281332e+00 7.847600e+00 1.438450e+01 2.636651e+01 4.832930e+01 #> [16] 8.858668e+01 1.623777e+02 2.976351e+02 5.455595e+02 1.000000e+03"},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Makes Forcing Function From Times and Values — make_forcing_function","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"Takes list times, values, interpolation method","code":""},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"","code":"make_forcing_function( times, values, type, output_times, sample_delta_mult = 0.001 )"},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"times time values forcing function values magnitude time (length time) type string indicating type forcing function can one following: \"step\" constant values switch new values times \"linear\" linearly interpolate points output_times vector simulation output times sample_delta_mult multiplier used control magnitude spacing around event times","code":""},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"matrix two columns: first column vector times second column vector values","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":null,"dir":"Reference","previous_headings":"","what":"Select Records from NONMEM-ish Data Set — nm_select_records","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"Retrieves subset NONMEM-ish data set based list containing filtering information.","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"","code":"nm_select_records(cfg, values, filter)"},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"cfg ubiquity system object values dataframe containing dataset column headers filter list element names headers values values header 'd values across headers 'd","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"subset dataset","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"dataset headings ID, DOSE SEX filter following format: translated boolean filter:","code":"filter = list() filter$ID = c(1:4) filter$DOSE = c(5,10) filter$SEX = c(1) ((ID==1) | (ID==2) | (ID==3) | (ID==4)) & ((DOSE == 5) | (DOSE==10)) & (SEX == 1)"},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Pad String with Spaces — pad_string","title":"Pad String with Spaces — pad_string","text":"Adds spaces beginning end strings reaches maxlength. Used aligning text.","code":""},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pad String with Spaces — pad_string","text":"","code":"pad_string(str, maxlength = 1, location = \"beginning\")"},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pad String with Spaces — pad_string","text":"str string maxlength length pad location either \"beginning\" pad left \"end\" pad right","code":""},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pad String with Spaces — pad_string","text":"Padded string","code":""},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pad String with Spaces — pad_string","text":"","code":"pad_string(\"bob\", maxlength=10) #> [1] \" bob\" pad_string(\"bob\", maxlength=10, location=\"end\") #> [1] \"bob \""},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse String for Prototype Functions — parse_patterns","title":"Parse String for Prototype Functions — parse_patterns","text":"string can contain number prototype functions, function find replace actual R code.","code":""},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse String for Prototype Functions — parse_patterns","text":"","code":"parse_patterns(cfg, str)"},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse String for Prototype Functions — parse_patterns","text":"cfg ubiquity system object str string","code":""},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse String for Prototype Functions — parse_patterns","text":"String prototype functions replaced","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":null,"dir":"Reference","previous_headings":"","what":"Make ggplot Figure Pretty — prepare_figure","title":"Make ggplot Figure Pretty — prepare_figure","text":"Takes ggplot object alters line thicknesses makes cosmetic changes make appropriate exporting.","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make ggplot Figure Pretty — prepare_figure","text":"","code":"prepare_figure( purpose = \"present\", fo, y_tick_minor = FALSE, y_tick_major = FALSE, x_tick_minor = FALSE, x_tick_major = FALSE )"},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make ggplot Figure Pretty — prepare_figure","text":"purpose either \"present\" (default), \"print\" \"shiny\" fo ggplot figure object y_tick_minor Boolean value control grid lines y_tick_major Boolean value control grid lines x_tick_minor Boolean value control grid lines x_tick_major Boolean value control grid lines","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make ggplot Figure Pretty — prepare_figure","text":"ggplot object","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make ggplot Figure Pretty — prepare_figure","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"Provides interface run_simulation_ubiquity start stop simulations apply rules control dosing state-resets.","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"","code":"run_simulation_titrate(SIMINT_p, SIMINT_cfg, SIMINT_dropfirst = TRUE)"},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"SIMINT_p list system parameters SIMINT_cfg ubiquity system object SIMINT_dropfirst TRUE drop first sample point (prevents bolus doses starting 0)","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"som","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate Individual Response — run_simulation_ubiquity","title":"Simulate Individual Response — run_simulation_ubiquity","text":"Controls execution individual simulations deSolve using either R scripts loadable C libraries.","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate Individual Response — run_simulation_ubiquity","text":"","code":"run_simulation_ubiquity(SIMINT_parameters, SIMINT_cfg, SIMINT_dropfirst = TRUE)"},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate Individual Response — run_simulation_ubiquity","text":"SIMINT_parameters vector parameters SIMINT_cfg ubiquity system object SIMINT_dropfirst TRUE drop first sample point (prevents bolus doses starting 0)","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate Individual Response — run_simulation_ubiquity","text":"simulation output mapped (som) list. time-course stored simout element. first column (time) contains simulation time units simulation. Next column : State, output system parameter Models covariate contain initial value (prefix: SIMINT_CVIC_) well values time point static dynamic system parameter also passed column timescale returned \"ts.\" prefix.","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Sample Times Around Events — sample_around","title":"Define Sample Times Around Events — sample_around","text":"events, bolus doses, applied system rapid changes can occur. system sampled heavily around times, changes may missed output profiles. Based total duration sample times, extra samples can added near events.","code":""},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Sample Times Around Events — sample_around","text":"","code":"sample_around(tvals, ot, sample_delta_mult = 1e-06)"},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Sample Times Around Events — sample_around","text":"tvals vector event times ot simualtion output times sample_delta_mult multiplier used control magnitude spacing around following event times","code":""},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Sample Times Around Events — sample_around","text":"vector event times added samples","code":""},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Sample Times Around Events — sample_around","text":"information setting options population simulation see stochastic section system_set_option help file.","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Population Simulations — simulate_subjects","title":"Run Population Simulations — simulate_subjects","text":"Used run Population/Monte Carlo simulations subjects generated either provided variance/covariance information dataset.","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Population Simulations — simulate_subjects","text":"","code":"simulate_subjects( parameters, cfg, show_progress = TRUE, progress_message = \"Simulating Subjects:\" )"},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Population Simulations — simulate_subjects","text":"parameters list containing typical value parameters cfg ubiquity system object show_progress Boolean value controlling display progress indicator (TRUE) progress_message text string prepend called ShinyApp","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Population Simulations — simulate_subjects","text":"Mapped simulation output individual predictions, individual parameters, summary statistics parameters. Vignettes details format output.","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run Population Simulations — simulate_subjects","text":"Failures due numerical instability integration errors captured within function. Data subjects removed output. IDs displayed messages stored output. information setting options population simulation see stochastic section system_set_option help file.","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Solution Statistics — solution_statistics","title":"Calculate Solution Statistics — solution_statistics","text":"Attempts determine variance/covariance matrix, confidence intervals CV percent list parameter estimates parameters. method taken ADAPT 5 User's Guide chapter 3.","code":""},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Solution Statistics — solution_statistics","text":"","code":"solution_statistics(parameters, cfg)"},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Solution Statistics — solution_statistics","text":"parameters list parameter estimates cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Solution Statistics — solution_statistics","text":"list containing information provided estimates","code":""},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Solution Statistics — solution_statistics","text":"returned list following format: objective - objective function value num_observations - number observations degrees_of_freedom - degrees freedom aic - Akaike information criterion bic - Bayesian (Schwarz) information criterion covariance - variance covariance matrix wls - defined weighted least squares objective following elements: jacobian - Jacobian matrix weights - diagonal matrix weights error_variance - diagonal matrix variances ml - defined maximum likelihood objective following elements: M - Jacobian matrix block variance parameters coefficient_of_variation$pname - CV percent parameter pname confidence_interval$lower_bound$pname - Lower bound confidence interval pname confidence_interval$upper_bound$pname - Upper bound confidence interval pname","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"functions run_simulation_ubiquity, simulate_subjects, run_simulation_titrate provide outputs structured format, may useful convert \"wide\" format tall/skinny format.","code":""},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"","code":"som_to_df(cfg, som)"},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"cfg ubiquity system object som simulation output run_simulation_ubiquity, simulate_subjects, run_simulation_titrate","code":""},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"Data frame format: applied output run_simulation_ubiquity run_simulation_titrate ts.time - timescale system ts.ts1, ... ts.tsn - timescales defined system () pred - predicted/simulated response tt.ti1.x - titration event information (*) name - state output () name corresponding prediction applied output simulate_subjects ID - subject ID ts.time - timescale system ts.ts1, ... ts.tsn - timescales defined system () pred - predicted/simulated response tt.ti1.x - titration event information (*) P1, P2, ... Pn - system parameters subject (

    ) name - state output () name corresponding prediction (* - field present titration enabled)","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":null,"dir":"Reference","previous_headings":"","what":"Check For Perl and C Tools — system_check_requirements","title":"Check For Perl and C Tools — system_check_requirements","text":"Check local installation perl verify C compiler installed working.","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check For Perl and C Tools — system_check_requirements","text":"","code":"system_check_requirements( checklist = list(perl = list(check = TRUE, perlcmd = \"perl\"), C = list(check = TRUE)), verbose = TRUE )"},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check For Perl and C Tools — system_check_requirements","text":"checklist list names corresponding elements system check. verbose enable verbose messaging","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check For Perl and C Tools — system_check_requirements","text":"List fn result packages","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check For Perl and C Tools — system_check_requirements","text":"","code":"# \\donttest{ invisible(system_check_requirements()) #> #> system_check_requirements() #> #> Testing perl, looking for a perl interpreter #> #> Perl interpreter found, now testing it #> #> > Success: Perl runs, everything should be good #> #> Attempting to compile C file #> #> > Success: C file compiled #> #> Loading the library #> #> > Success: C library loaded # }"},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify System Steady State — system_check_steady_state","title":"Verify System Steady State — system_check_steady_state","text":"Takes ubiquity system object optional inputs verify system running steady state. also provides information can helpful debugging systems running steady state.","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify System Steady State — system_check_steady_state","text":"","code":"system_check_steady_state( cfg, parameters = NULL, zero_rates = TRUE, zero_bolus = TRUE, output_times = seq(0, 100, 1), offset_tol = .Machine$double.eps * 100, derivative_tol = .Machine$double.eps * 100, derivative_time = 0 )"},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify System Steady State — system_check_steady_state","text":"cfg ubiquity system object parameters optional set parameters (NULL) check steady state (set NULL parameters currently selected parameter set used) zero_rates Boolean value control removing rate inputs (TRUE) zero_bolus Boolean value control removing bolus inputs (TRUE) output_times sequence output times simulate offset determination (seq(0,100,1)) offset_tol maximum percent offset considered zero (.Machine$double.eps*100) derivative_tol maximum derivative value considered zero (.Machine$double.eps*100) derivative_time time evaluate derivatives identify deviations (0), set NULL skip derivative evaluation","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify System Steady State — system_check_steady_state","text":"List following names steady_state Boolean indicating weather system steady state states_derivative Derivatives values greater derivative_tol states_simulation States values greater offset_tol som Simulated output derivatives Derivatives states_derivative_NA_NaN States derivatives evaluated either NA NaN states_simulation_NA_NaN States simulation values either NA NaN derivative_tc Data frame timecourse states derivative found greater tolerance (states_derivative)","code":""},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear all Cohorts — system_clear_cohorts","title":"Clear all Cohorts — system_clear_cohorts","text":"Clear previously defined cohorts","code":""},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear all Cohorts — system_clear_cohorts","text":"","code":"system_clear_cohorts(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear all Cohorts — system_clear_cohorts","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear all Cohorts — system_clear_cohorts","text":"ubiquity system object cohorts defined","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Estimation Cohort — system_define_cohort","title":"Define Estimation Cohort — system_define_cohort","text":"Define cohort include parameter estimation","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Estimation Cohort — system_define_cohort","text":"","code":"system_define_cohort(cfg, cohort)"},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Estimation Cohort — system_define_cohort","text":"cfg ubiquity system object cohort list cohort information","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Estimation Cohort — system_define_cohort","text":"ubiquity system object cohort defined","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Estimation Cohort — system_define_cohort","text":"cohort name (eg d5mpk), dataset containing information cohort identified (name defined system_load_data) Next portion dataset applies current cohort, can define filter (cf field). applied dataset return values relevant cohort. example, want records column DOSE 5 (5 mpk cohort). can use following: dataset headings ID, DOSE SEX cohort filter following format: translated boolean filter: Optionally may want fix system parameter different value given cohort. can done using cohort parameter (cp) field. example body weight defined system parameter (BW), wanted fix body weight 70 current cohort following: Note can fix parameters estimated. default underlying simulation output times taken general output_times option (see system_set_option). However may also necessary specify simulation output times specific cohort. output_times field can used . Simply provide vector output times: Next define dosing cohort. necessary define inputs non-zero. data generated animals given single 5 mpk IV time 0. Bolus dosing defined using . Cp central compartment, pass information cohort following manner: Inputs can also include infusion rates (infusion_rates) covariates (covariates). Covariates default value specified system file unless overwritten . units system file Next need map outputs model observation data dataset. outputs field field output. field ONAME can replaced something useful (like PK). want filter dataset. Say example two outputs cf applied reduces dataset outputs. can use \"\" field apply \"output filter\" filter records apply current output ONAME. need filtering data, can can just omit field. Next need identify columns dataset contain times observations. found obs field current observation: times observations dataset found ’TIMECOL’ column ’OBSCOL’ column (optional missing data option specified -1). observations dataset need mapped appropriate elements model defined system file. done model field: First system time scale indicated TS placeholder must specfied. time scale must correspond data found TIMECOL . Next model output indicated MODOUTPUT placeholder needs specified. defined system file using correspond OBSCOL dataset. Lastly variance field specifies variance model. can use keyword PRED (model predicted output) variance parameters. examples include: variance = \"1\" - Least squares variance = \"PRED^2\" - Weighted least squares proportional prediction squared variance = \"(SLOPE*PRED)^2\" Maximum likelihood estimation SLOPE defined variance parameter () following controls plotting aspects associated output. color, shape line values values used ggplot functions. cohort multiple outputs, simply repeat process . additional cohorts. estimation vignettes contains examples . Note: Output names consistent cohorts grouped together plotting results.","code":"cohort = list( name = \"d5mpk\", dataset = \"pm_data\", inputs = NULL, outputs = NULL) cohort[[\"cf\"]] = list(DOSE = c(5)) cohort[[\"cf\"]] = list(ID = c(1:4), DOSE = c(5,10), SEX = c(1)) (ID==1) | (ID==2) | (ID==3) | (ID==4)) & ((DOSE == 5) | (DOSE==10)) & (SEX == 1) cohort[[\"cp\"]] = list(BW = c(70)) cohort[[\"output_times\"]] = seq(0,100,2) cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Cp\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Cp\"]][[\"TIME\"]] = c( 0) cohort[[\"inputs\"]][[\"bolus\"]][[\"Cp\"]][[\"AMT\"]] = c( 5) cohort[[\"outputs\"]][[\"ONAME\"]] = list() cohort[[\"outputs\"]][[\"ONAME\"]][[\"of\"]] = list( COLNAME = c(), COLNAME = c()) cohort[[\"outputs\"]][[\"ONAME\"]][[\"obs\"]] = list( time = \"TIMECOL\", value = \"OBSCOL\", missing = -1) cohort[[\"outputs\"]][[\"ONAME\"]][[\"model\"]] = list( time = \"TS\", value = \"MODOUTPUT\", variance = \"PRED^2\") cohort[[\"outputs\"]][[\"ONAME\"]][[\"options\"]] = list( marker_color = \"black\", marker_shape = 16, marker_line = 1 )"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"function allows user define cohorts automatically NONMEM dataset","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"","code":"system_define_cohorts_nm( cfg, DS = \"DSNAME\", col_ID = \"ID\", col_CMT = \"CMT\", col_DV = \"DV\", col_TIME = \"TIME\", col_AMT = \"AMT\", col_RATE = \"RATE\", col_EVID = \"EVID\", col_GROUP = NULL, filter = NULL, INPUTS = NULL, OBS = NULL )"},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"cfg ubiquity system object DS Name dataset loaded using system_load_data col_ID Column unique subject identifier col_CMT Compartment column col_DV Column observations ’.’ input col_TIME Column system time record col_AMT Infusion/dose amounts (need units specified system.txt file) col_RATE Rate infusion ’.’ bolus col_EVID EVID (0 - observation, 1 dose) col_GROUP Column name use defining similar cohorts generating figures. filter List used filter dataset NULL whole dataset used (see filter rules nm_select_records description use option) INPUTS List mapping input information dataset names used system.txt file OBS List mapping obseravation information dataset nams used system.txt file","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"ubiquity system object cohorts defined.","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"NOTE: use function necessary timescale define system time scale. example, system time scale days, something like following needed: Include records dataset Include records matching following filter Mapping information: inputs mapping information (INPUTMAP) alist field type input: input: bolus List name bolus state dataset (): bolus name CMT_NUM field indicating compartment number state infusion_rates List name rate dataset (): rate name CMT_NUM field indicating compartment number state covariates List covariate dataset (): covariate name col_COV indicating column database contains covariate coding perspective looks like : observation mapping information (OBSMAP) list elements output described system_define_cohort. output list following names: variance Variance model output CMT Compartment number mapping observations output output Name output () corresponding observations missing Value indicating missing observation NULL coding perspective looks like :","code":" 1 filter = NULL filter = list() filter$COLNAME = c() INPUTMAP = list() INPUTMAP$bolus$SPECIES$CMT_NUM = 1 INPUTMAP$infusion_rates$RATE$CMT_NUM = 1 INPUTMAP$covariates$CVNAME$col_COV = 'CNAME' OBSMAP = list() OBSMAP$ONAME=list(variance = 'PRED^2', CMT = 1, output = '', missing = NULL )"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Control Estimation Process — system_estimate_parameters","title":"Control Estimation Process — system_estimate_parameters","text":"Manages flow parameter estimation using data specified system_define_cohort.","code":""},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Control Estimation Process — system_estimate_parameters","text":"","code":"system_estimate_parameters( cfg, flowctl = \"plot guess\", analysis_name = \"my_analysis\", archive_results = TRUE )"},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Control Estimation Process — system_estimate_parameters","text":"cfg ubiquity system object flowctl string control flow function analysis_name string containing name analysis archive_results boolean variable control whether results archived","code":""},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Control Estimation Process — system_estimate_parameters","text":"parameter estimates","code":""},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Control Estimation Process — system_estimate_parameters","text":"flowctl argument can following values \"plot guess\" return initial guess \"estimate\" perform estimation \"previous estimate guess\" load previous estimate analysis_name use initial guess \"plot previous estimate\" return previous estimate analysis_name","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch System Timescale — system_fetch_TSsys","title":"Fetch System Timescale — system_fetch_TSsys","text":"Reads system information tries determine system time scale (timescale value 1)","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch System Timescale — system_fetch_TSsys","text":"","code":"system_fetch_TSsys(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch System Timescale — system_fetch_TSsys","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch System Timescale — system_fetch_TSsys","text":"Name system timescale NULL found","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Current Parameter Guesses — system_fetch_guess","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"Fetch list guesses current parameter set parameters selected estimation","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"","code":"system_fetch_guess(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"list current parameter gauesses","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Variability Terms — system_fetch_iiv","title":"Fetch Variability Terms — system_fetch_iiv","text":"Extract elements current variance/covariance matrix specified system file ?, ?, ?, ?","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Variability Terms — system_fetch_iiv","text":"","code":"system_fetch_iiv(cfg, IIV1, IIV2)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Variability Terms — system_fetch_iiv","text":"cfg ubiquity system object IIV1 row name variance/covariance matrix IIV2 column name variance/covariance matrix","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Variability Terms — system_fetch_iiv","text":"Value variance/covariance matrix","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Variability Terms — system_fetch_iiv","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Covariance term for ETACL and ETAVc val = system_fetch_iiv(cfg, IIV1=\"ETACL\", IIV2=\"ETAVc\") # }"},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch NCA Results — system_fetch_nca","title":"Fetch NCA Results — system_fetch_nca","text":"Fetches NCA summary ubiquity system object.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch NCA Results — system_fetch_nca","text":"","code":"system_fetch_nca(cfg, analysis_name = \"analysis\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch NCA Results — system_fetch_nca","text":"cfg ubiquity system object analysis_name string containing name NCA analysis (default 'analysis')","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch NCA Results — system_fetch_nca","text":"List data frame NCA results (NCA_summary), raw output PKNCA (PKNCA_results), also list element indicating overall success function call (isgood)","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Columns in NCA Analysis — system_fetch_nca_columns","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"Show columns available given NCA analysis","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"","code":"system_fetch_nca_columns(cfg, analysis_name = \"analysis\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"cfg ubiquity system object analysis_name string containing name NCA analysis (default 'analysis')","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"list following elements: isgood Boolean variable identify function executed properly (TRUE) errors (FALSE) NCA_col_summary dataframe columns analysis analysis_name (col_name - NCA short name, - parameter derived , label - verbose text label column, description, verbose text description parameter. len_NCA_col maximum length col_name column len_from maximum length column len_label maximum length label column len_description maximum length description column","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch System Parameters — system_fetch_parameters","title":"Fetch System Parameters — system_fetch_parameters","text":"Fetch parameters currently selected parameter set. switch parameter sets use system_select_set","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch System Parameters — system_fetch_parameters","text":"","code":"system_fetch_parameters(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch System Parameters — system_fetch_parameters","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch System Parameters — system_fetch_parameters","text":"List parameters selected parameter set","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch System Parameters — system_fetch_parameters","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Fetching the default parameter set parameters = system_fetch_parameters(cfg) # }"},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"extract officer object ubiqiuty system object specified report name.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"","code":"system_fetch_rpt_officer_object(cfg, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"cfg ubiquity system object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"officer report object","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"extract onbrand object ubiqiuty system object specified report name.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"","code":"system_fetch_rpt_onbrand_object(cfg, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"cfg ubiquity system object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"onbrand report object","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Mathematical Set — system_fetch_set","title":"Fetch Mathematical Set — system_fetch_set","text":"Fetch elements specified mathematical set defined system file.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Mathematical Set — system_fetch_set","text":"","code":"system_fetch_set(cfg, set_name = NULL)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Mathematical Set — system_fetch_set","text":"cfg ubiquity system object set_name name mathematical set","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Mathematical Set — system_fetch_set","text":"sequence containing elements parameter set NULL problem.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Mathematical Set — system_fetch_set","text":"","code":"# \\donttest{ # Creating a system file from the pbpk example fr = system_new(file_name = \"system.txt\", system_file = \"pbpk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Fetching the contents of the ORG mathematical set ORG_elements = system_fetch_set(cfg, \"ORG\") # }"},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":null,"dir":"Reference","previous_headings":"","what":"Create New Analysis Template — system_fetch_template","title":"Create New Analysis Template — system_fetch_template","text":"Building system file produce templates R languages. function provides method make local copies templates.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create New Analysis Template — system_fetch_template","text":"","code":"system_fetch_template( cfg, template = \"Simulation\", overwrite = FALSE, output_directory = getwd() )"},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create New Analysis Template — system_fetch_template","text":"cfg ubiquity system object template template type overwrite TRUE new system file overwrite existing files present output_directory directory workshop files placed (getwd())","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create New Analysis Template — system_fetch_template","text":"List vectors template sources, destinations corresponding write success (write_file), also list element indicating overall success function call (isgood)","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create New Analysis Template — system_fetch_template","text":"template argument can following values R workflow: \"Simulation\" produces analysis_simulate.R: R-Script named placeholders used run simulations \"Estimation\" produces analysis_estimate.R: R-Script named placeholders used perform naive-pooled parameter estimation \"NCA\" produces analysis_nca.R: R-Script perform non-compartmental analysis (NCA) report results \"ShinyApp\" produces ubiquity_app.R, server.R ui.R: files needed run model Shiny App either locally Shiny Server \"Model Diagram\" produces system.svg: SVG template producing model diagram (Goto https://inkscape.org free SVG editor) \"Shiny Rmd Report\" produces system_report.Rmd test_system_report.R: R-Markdown file used generate report tabs Shiny App script test create files use software: \"Adapt\" produces system_adapt.system_adapt.prm: Fortran parameter files currently selected parameter set Adapt format. \"Berkeley Madonna\" produces system_berkeley_madonna.txt: text file model currently selected parameter set Berkeley Madonna format \"nlmixr\" produces system_nlmixr.R currently selected parameter set define system `nlmixr` format. \"NONMEM\" produces system_nonmem.ctl currently selected parameter set NONMEM conntrol stream. \"Monolix\" produces system_monolix.txt system_monolix.mlxtran currently selected parameter set. \"mrgsolve\" produces system_mrgsolve.cpp: text file model currently selected parameter set mrgsolve format","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create New Analysis Template — system_fetch_template","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Creating a simulation template fr = system_fetch_template(cfg, template = \"Simulation\", output_directory = tempdir()) #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_simulate.R # }"},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize GLP study design — system_glp_init","title":"Initialize GLP study design — system_glp_init","text":"Creates new GLP study design","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize GLP study design — system_glp_init","text":"","code":"system_glp_init(cfg, study_title = \"Study Title\", study_name = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize GLP study design — system_glp_init","text":"cfg ubiquity system object study_title String containing descriptive information study study_name short name used identify study functions (\"default\")","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initialize GLP study design — system_glp_init","text":"cfg ubiquity system object study initialized","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":null,"dir":"Reference","previous_headings":"","what":"Design GLP Study For a Scenario — system_glp_scenario","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"Identifies top dose required GLP tox study order match human metrics (Cmax AUCs) within specified multiplier. given set human parameters human doses required hit target Cmin AUC (one) identified. Cmax AUC associated largest doses determined corresponding doses tox species (provided parameters) determined specific tox multipliers. Optionally, simulations can run specifying doses either/human tox species. Sample times can also specified generate annotated figures tables given analysts facilitate assay design. system file requires following components: - Output drug concentration - Output cumulative AUC - Bolus dosing defined specific compartment - Timescale specified system timescale (e.g. timescale hours need hours = 1.0)","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"","code":"system_glp_scenario( cfg, output_Conc = NULL, output_AUC = NULL, timescale = NULL, units_Conc = \"\", units_AUC = \"\", study_scenario = \"Tox Study\", human_sim_times = NULL, study_name = \"default\", human_parameters = NULL, human_bolus = NULL, human_ndose = 1, human_dose_interval = 1, human_Cmin = NULL, human_AUC = NULL, human_sample_interval = NULL, human_sim_doses = NULL, human_sim_samples = NULL, tox_species = \"Tox\", tox_sim_times = NULL, tox_parameters = NULL, tox_bolus = NULL, tox_ndose = 1, tox_dose_interval = 1, tox_Cmax_multiple = 10, tox_AUC_multiple = 10, tox_sample_interval = NULL, tox_sim_doses = NULL, tox_sim_samples = NULL, annotate_plots = TRUE )"},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"cfg ubiquity system object output_Conc model output specified containing concentration associated drug exposure. output_AUC model output specified containing cumulative exposure timescale system timescale specified used AUC comparisons plotting units_Conc units concentration ('') units_AUC units AUC ('') study_scenario string containing descriptive name tox study human_sim_times user-specified simulation output times humans (timescale system) study_name name study append scenario set 'system_glp_init()' ('default'): report initialized using system_rpt_read_template report name 'default' unless otherwise specified. disable reporting set NULL, use different report specify name . human_parameters list containing human parameters human_bolus string containing dosing state human doses (specified ) human_ndose number human doses simulate human_dose_interval dosing interval humans (time units specified ) human_Cmin target Cmin humans (corresponding output_Conc ) human_AUC target AUC humans (corresponding output_AUC ) human_sample_interval time interval units specified timescale evaluate trough concentration AUC (e.g c(1.99, 4.001) consider interval 2 4) human_sim_doses optional list doses human_bolus simulate (see Details ) human_sim_samples optional list sample times units specified timescale label plots simulated doses (default NULL disable labels) tox_species optional name tox species (\"Tox\") tox_sim_times user-specified simulation output times tox species (timescale system) tox_parameters list containing parameters tox species tox_bolus string containing dosing state tox species doses (specified ) tox_ndose number tox doses simulate tox_dose_interval dosing interval tox species (time units specified ) tox_Cmax_multiple target (Cmin AUC) dose tox species found cover multiple projected Cmax humans (10) tox_AUC_multiple target (Cmin AUC) dose tox species found cover multiple projected AUC humans (10) tox_sample_interval interval consider AUC Cmax comparing human prediction tox multiple tox_sim_doses optional list doses tox_bolus simulate (see Details ) tox_sim_samples optional list sample times units specified timescale label plots simulated doses (default NULL disable labels) annotate_plots Boolean switch indicate human_sim_samples tox_sim_samples labeled respective plots (TRUE)","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"cfg ubiquity system object scenario added successful","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"human_sim_doses tox_sim_doses lists names corresponding label dose. element AMT TIME element corresponds dosing times amounts units specified system file. example wanted simulate four weekly doses 20 mg 70 kg person units bolus doses days mg/kg times amounts following:","code":"human_sim_doses = list() human_sim_doses[[\"20 mg QW\"]]$TIME = c( 0, 7, 14, 21) human_sim_doses[[\"20 mg QW\"]]$AMT = c(0.2857, 0.2857, 0.2857, 0.2857)"},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Loading Datasets — system_load_data","title":"Loading Datasets — system_load_data","text":"Loads datasets scripting level variable data_file data.frame following formats (based file extension) csv - comma delimited tab - tab delimited xls xlsx - excel spread sheet Multiple datasets can loaded long given different names. Datasets NONMEM-ish format first row containing column header names.","code":""},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Loading Datasets — system_load_data","text":"","code":"system_load_data(cfg, dsname, data_file, data_sheet)"},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Loading Datasets — system_load_data","text":"cfg ubiquity system object dsname short name dataset used link dataset different operations data_file file name dataset data frame containing data data_sheet argument identifying name sheet excel file","code":""},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Loading Datasets — system_load_data","text":"Ubiquity system object dataset loaded","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":null,"dir":"Reference","previous_headings":"","what":"Save variables to files — system_log_debug_save","title":"Save variables to files — system_log_debug_save","text":"Triggered debugging enabled, function save contents values specified file name ubiquity temporary directory.","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save variables to files — system_log_debug_save","text":"","code":"system_log_debug_save(cfg, file_name = \"my_file\", values = NULL)"},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save variables to files — system_log_debug_save","text":"cfg ubiquity system object file_name name save file without \".RData\" extension values named list variables save","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Save variables to files — system_log_debug_save","text":"Boolean variable indicating success","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save variables to files — system_log_debug_save","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # enable debugging: cfg=system_set_option(cfg,group = \"logging\", option = \"debug\", value = TRUE) # Saving the cfg variable system_log_debug_save(cfg, file_name = 'my_file', values = list(cfg=cfg)) #> [1] TRUE # }"},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Log Entry — system_log_entry","title":"Add Log Entry — system_log_entry","text":"Appends specified line analysis log","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Log Entry — system_log_entry","text":"","code":"system_log_entry(cfg, entry)"},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Log Entry — system_log_entry","text":"cfg ubiquity system object entry string containing log entry","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Log Entry — system_log_entry","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Log Entry — system_log_entry","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Initialzing the log file system_log_entry(cfg, \"Text of log entry\") #> NULL # }"},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize System Log File — system_log_init","title":"Initialize System Log File — system_log_init","text":"Initializes currently specified system log file.","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize System Log File — system_log_init","text":"","code":"system_log_init(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize System Log File — system_log_init","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initialize System Log File — system_log_init","text":"ubiquity system object logging enabled","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Initialize System Log File — system_log_init","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Initialzing the log file cfg = system_log_init(cfg) # }"},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"Provides verbose information NCA parameters","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"","code":"system_nca_parameters_meta(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"List following elements: isgood Boolean value indicating success function call. parameters List element names standard column header NCA output. element name list following elements: label Textual descriptor parameter. description Verbose description parameter. Text indicating source parameter (either PKNCA ubiquity).","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":null,"dir":"Reference","previous_headings":"","what":"Automatic NCA — system_nca_run","title":"Automatic NCA — system_nca_run","text":"Performs NCA automated fashion","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automatic NCA — system_nca_run","text":"","code":"system_nca_run( cfg, dsname = \"PKDS\", dscale = 1, NCA_options = NULL, NCA_min = 4, analysis_name = \"analysis\", dsfilter = NULL, extrap_C0 = TRUE, extrap_N = 2, sparse = FALSE, dsmap = list(TIME = \"TIME\", NTIME = \"NTIME\", CONC = \"CONC\", DOSE = \"DOSE\", ID = \"ID\", ROUTE = \"ROUTE\", DOSENUM = NULL, BACKEXTRAP = NULL, SPARSEGROUP = NULL), dsinc = NULL )"},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automatic NCA — system_nca_run","text":"cfg ubiquity system object dsname name dataset loaded (system_load_data) dscale factor multiply dose get units concentration (default 1): dosing mg/kg concentrations ng/ml, dscale = 1e6 NCA_options specify list options PKNCA overwrite defaults (default NULL use defaults). example want set maximum extrapolation AUCinf 10 half-life half-life 0.8 use: list(max.aucinf.pext=10, min.hl.r.squared=.9) NCA_min minimum number points required perform NCA given subset (default 4) analysis_name string containing name analysis (default 'analysis') archive files reference results later dsfilter list names corresponding column names dataset values sequence indicating values keep (default NULL. Multiple names -ed together. example following keep records dose 1, 2, 5 dose_number 1 extrap_C0 Boolean variable enable automatic determination initial drug concentration value specified; rules used WinNonlin used: route \"iv infusion\" \"extra-vascular\" data single dose data, concentration zero used. repeat dosing used, minimum value previous dosing interval used. route \"iv bolus\" log-linear regression number observations specified extrap_N used. slope points positive first positive observation used estimate C0 extrap_N number points use back extrapolation (default 2); number can overwritten subject using BACKEXTRAP column dataset sparse Boolean variable used indicate data used sparse sampling analysis use average time point (SPARSEGROUP column must specified dsmap ) dsmap list names specifying columns dataset (* required): TIME* Time since first dose; \"TIME\" (default) NTIME* Nominal time since last dose; \"NTIME\" (default) CONC* Concentration data; \"CONC\" (default) DOSE* Dose given; (\"DOSE\" (default) ID* Subject ID; (\"ID\" (default) ROUTE* Route administration; \"ROUTE\" (default), can either \"iv bolus\", \"iv infusion\" \"extra-vascular\". Variants \"IV_bolus\" \"extravascular\" work well. DOSENUM Numeric dose (starting 1) used grouping multiple dose data; optional, NULL (default) single dose data) BACKEXTRAP Specifying number points use extrapolate initial concentration \"iv bolus\" dosing; optoinal f NULL (default) use value defined extrap_N (note value must <= NCA_min) SPARSEGROUP Column containing unique value grouping cohorts pooling data. Needed sparse set TRUE; optional, NULL (default) dsinc (CURRENTLY IMPLEMENTED) optional character vector columns dataset include output summary (default NULL)","code":"dsfilter = list(dose=c(1,2,5), dose_number = c(1))"},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Automatic NCA — system_nca_run","text":"cfg ubiquity system object NCA results analysis name specified: output/analysis_name-nca_summary-pknca.csv NCA summary output/analysis_name-pknca_summary.csv Raw output PKNCA subject dose number columns appended output/analysis_name-nca_data.RData objects containing NCA summary list ggplot grobs","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_nca_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize NCA Results in Tabular Format — system_nca_summary","title":"Summarize NCA Results in Tabular Format — system_nca_summary","text":"Creates tabular summaries NCA results","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize NCA Results in Tabular Format — system_nca_summary","text":"","code":"system_nca_summary( cfg, analysis_name = \"analysis\", treat_as_factor = c(\"ID\", \"Dose_Number\", \"Dose\"), params_include = c(\"ID\", \"cmax\", \"tmax\", \"auclast\"), params_header = NULL, rptname = \"default\", label_format = NULL, summary_stats = NULL, summary_labels = list(MEAN = \"Mean\", STD = \"Std Dev\", MEDIAN = \"Median\", N = \"N obs\", SE = \"Std Err.\"), summary_location = NULL, ds_wrangle = NULL, digits = 3, table_theme = \"theme_zebra\" )"},{"path":"https://r.ubiquity.tools/reference/system_nca_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize NCA Results in Tabular Format — system_nca_summary","text":"cfg ubiquity system object analysis_name string containing name analysis (default 'analysis') previously run treat_as_factor sequence column names treated factors (default c(\"ID\", \"Dose_Number\", \"Dose\")). Use report values without added decimals. params_include vector names parameters include (default c(\"ID\", \"cmax\", \"tmax\", \"auclast\")) params_header list names parameters followed vector headers. can use placeholder \"

    ) reassigned parameter set (?). can altered scripting level using function.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"","code":"system_set_guess(cfg, pname, value, lb = NULL, ub = NULL)"},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"cfg ubiquity system object pname name parameter set value value assign lb optionally change lower bound (NULL) ub optionally change upper bound (NULL)","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"cfg ubiquity system object guess bounds assigned","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"performing parameter estimation, initial guess value specified system.txt file currently selected parameter set. following command can used parameter set selected specify value (VALUE) parameter PNAME optionally lower (lb) upper (ub) bounds: set initial guess parameter Vc value 3, following used: specify guess overwrite upper bound Vc set 5","code":"cfg = system_set_guess(cfg, pname=\"PNAME\", value=VALUE, lb=NULL, ub=NULL) cfg = system_set_guess(cfg, \"Vc\", value=3) cfg = system_set_guess(cfg, \"Vc\", value=3, ub=5)"},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Variability Terms — system_set_iiv","title":"Set Variability Terms — system_set_iiv","text":"Set elements current variance covariance matrix specified system file ?, ?, ?, ?","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Variability Terms — system_set_iiv","text":"","code":"system_set_iiv(cfg, IIV1, IIV2, value)"},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Variability Terms — system_set_iiv","text":"cfg ubiquity system object IIV1 row name variance/covariance matrix IIV2 column name variance/covariance matrix element value value assign variance/covariance matrix element","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Variability Terms — system_set_iiv","text":"Ubiquity system object IIV information set","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Variability Terms — system_set_iiv","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Clearing all inputs cfg = system_zero_inputs(cfg) # Setting the covariance element for CL and Vc to 0.03 cfg = system_set_iiv(cfg, IIV1 = \"ETACL\", IIV2 = \"ETAVc\", value=0.03) # }"},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":null,"dir":"Reference","previous_headings":"","what":"Setting Analysis Options — system_set_option","title":"Setting Analysis Options — system_set_option","text":"Different options associated performing analyses (e.g running simulations, performing parameter estimation, logging, etc.) can set function","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setting Analysis Options — system_set_option","text":"","code":"system_set_option(cfg, group, option, value)"},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setting Analysis Options — system_set_option","text":"cfg ubiquity system object group options grouped together underlying activity performed: \"estimation\", \"general\", \"logging\", \"simulation\", \"solver\", \"stochastic\", \"titration\" option group set options value corresponding value option","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setting Analysis Options — system_set_option","text":"Ubiquity system object option set","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Setting Analysis Options — system_set_option","text":"group=\"estimation\" default estimation R performed using either optim optimx libraries. selected setting optimizer option: optimization routine specified using method. default option set Nelder-Mead. different attributes selected using control. different methods control options, see documentation optim optimx libraries. perform global optimization can install either particle swarm (pso) genetic algorithm (GA) libraries. use particle swarm set optimizer method: control option list described pso documentation. use genetic algorithm set optimizer method: control option list list elements named options GA documentation. Use following example: alter initial guesses see: system_set_guess performing parameter estimation, internal function system_od_general used. function simulates system conditions defined different cohorts. pretty flexible want go beyond can set observation_function option: instruct optimziation routines use user defined function my_od. need construct function input/output format system_od_general. group=general \"output_directory\" = String analysis outputs placed. Generally wont want change , can useful Shiny apps need shiny user generate output users directory : file.path(\".\", \"output\") group=logging default ubiquity prints different information console logs information log file. following options can used control behavior: \"enabled\" = Boolean variable control logging: TRUE \"file\" = String containing name log file: file.path(\"transient\", \"ubiquity_log.txt\") \"timestamp\" = Boolean switch control appending time stamp log entries: TRUE \"ts_str\" = String format timestamp: \" \"debug\" = Boolean switch control debugging (see ): FALSE \"verbose\" = Boolean switch control printing console FALSE enable debugging different functions (like performing esitmation), set debug option TRUE. Important function calls trapped information logged reported console. group=\"simulation\" \"dynamic\" - Set TRUE (default) simulations behave normally. Set FALSE ODES evaulate zero. useful steady-state anslysis. \"include_important_output_times\" - Automatically add bolus, infusion rate switching times, etc: \"yes\"(default), \"\". \"integrate_with\" - Specify ODE solver use Rscript (\"r-file\") compiled C (\"c-file\"), build process can compile load C version default otherwise switch R script. \"output_times\" - Vector times evaulate simulation (default seq(0,100,1)). \"solver\" - Selects ODE solver: \"lsoda\" (default), \"lsode\", \"vode\", etc.; see documentation deSolve exhaustive list. \"sample_bolus_delta\" - Spacing used sampling around bolus events (default 1e-6). \"sample_forcing_delta\" - Spacing used sampling around forcing functions (infusion rates, covariates, etc) (default 1e-3). group=solver Depending solver, different options can set. documentation deSolve lists different solvers. full list options, see documentation specific solver (e.g. ?lsoda). common options consider : \"atol\" - Relative error tolerance \"rtol\" - Absolute error tolerance \"hmin\" - Minimum integration step size \"hmax\" - Maximum integration step size select vode solver set maximum step size 0.01, following used: group=\"stochastic\" running stochastic simulations (inter-individual variability applied system parameters) can useful specify following: \"ci\" - Confidence interval (default 95) \"nsub\" - Number subjects (default 100) \"seed\" - Seed random numebr generator (default 8675309) \"ponly\" - generate subject parameters run simulations (default FALSE) \"ssp\" - list calculated static secondary parameters include (default parameters defined <>) \"outputs\" - list predicted outputs include (default outputs defined ) \"states\" - list predicted states include(default states) \"sub_file\" - Name data set loaded (system_load_data) containing subject level parameters coviariates \"sub_file_sample\" - Controls subjects sampled dataset wanted generate 1000 subjects wanted parameters, use following: wanted exclude states secondary parameters, including output Cp_nM, following: pull subject information data file instead generating subject parameters IIV information sub_file option can used. value SUBFILE_NAME name given dataset loaded (system_load_data): Sampling dataset can controlled using sub_file_sample option: Sampling can done sequentially (\"sequential\"), replacement (\"replacement\"), without replacement (\"without replacement\") group=\"titration\" \"titrate\" - default titration disable (set FALSE). going use titration, enable setting option TRUE. force #' simulate_subjects use run_simulation_titrate internally running simulations.","code":"cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"optim\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"Nelder-Mead\") cfg = system_set_option(cfg, group = \"estimation\", option = \"control\", value = list(trace = TRUE, maxit = 500, REPORT = 10)) cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"pso\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"psoptim\") cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"control\", value = list(maxiter = 10000, optimArgs = list( method = \"Nelder-Mead\", maxiter = 1000))) cfg = system_set_option(cfg, group = \"estimation\", option = \"observation_function\", value = \"my_od\") cfg = system_set_option(cfg, group = \"estimation\", option = \"debug\", value = FALSE) cfg=system_set_option(cfg, group = \"simulation\", option = \"solver\", value = \"vode\") cfg=system_set_option(cfg, group = \"solver\", option = \"hmax\", value = 0.01) cfg = system_set_option(cfg, group = \"stochastic\", option = \"nsub \", value = 1000) cfg = system_set_option(cfg, group = \"stochastic\", option = \"ponly\", value = TRUE ) cfg = system_set_option (cfg, group = \"stochastic\", option = \"ssp\", value = list()) cfg = system_set_option (cfg, group = \"stochastic\", option = \"states\", value = list()) cfg = system_set_option (cfg, group = \"stochastic\", option = \"outputs\", value = c(\"Cp_nM\")) cfg=system_set_option(cfg, group = \"stochastic\", option = \"sub_file\", value = \"SUBFILE_NAME\") cfg=system_set_option(cfg, group = \"stochastic\", option = \"sub_file_sample\", value = \"with replacement\")"},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Value for Parameter — system_set_parameter","title":"Set Value for Parameter — system_set_parameter","text":"Assigns value named parameter parameter list.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Value for Parameter — system_set_parameter","text":"","code":"system_set_parameter(cfg, parameters, pname, value)"},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Value for Parameter — system_set_parameter","text":"cfg ubiquity system object parameters vector parameters pname parameter name value value","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Value for Parameter — system_set_parameter","text":"parameters vector pname set value","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Value for Parameter — system_set_parameter","text":"set parameter Vc value 3, following used:","code":"parameters = system_fetch_parameters(cfg) parameters = system_set_parameter(cfg, parameters, pname = 'Vc', value = 3)"},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Infusion Rate Inputs — system_set_rate","title":"Set Infusion Rate Inputs — system_set_rate","text":"Defines infusion rates specified system file using ","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Infusion Rate Inputs — system_set_rate","text":"","code":"system_set_rate(cfg, rate, times, levels)"},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Infusion Rate Inputs — system_set_rate","text":"cfg ubiquity system object rate name infusion rate times list time values levels corresponding list infusion values","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Infusion Rate Inputs — system_set_rate","text":"Ubiquity system object infusion rate set","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Infusion Rate Inputs — system_set_rate","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Clearing all inputs cfg = system_zero_inputs(cfg) # 5 minute infusion at 10 mg/min cfg = system_set_rate(cfg, rate = \"Dinf\", times = c(0, 5), levels = c(10, 0)) # }"},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"replace officer object ubiqiuty system object specified report name value supplied.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"","code":"system_set_rpt_officer_object(cfg, rpt = NULL, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"cfg ubiquity system object rpt officer report object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"ubiquity system object replaced officer object","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"reset onbrand object ubiqiuty system object specified report name.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"","code":"system_set_rpt_onbrand_object(cfg, obnd = NULL, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"cfg ubiquity system object obnd onbrand report object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"ubiquity system object onbrand report set","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":null,"dir":"Reference","previous_headings":"","what":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"prototype function SI_TT_BOLUS provides interface function. Based input SI_TT_BOLUS bolus inputs updated current titration time.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"","code":"system_set_tt_bolus( cfg, state, values, times, tt_ts, tsinfo, repdose = \"none\", interval = 1, number = 0 )"},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"cfg ubiquity system object state dosing state/compartment (Defined ) values vector dosing amounts (dosing units defined ) times vector dosing times relative current titration time (# time units defiend ) tt_ts list timescale values current titration time tsinfo list timescale information inputs (bolus, rates, etc) repdose \"none\", \"last\", \"\" interval interval repeat units defined number number times repeat","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"ubiquity system object bolus dosing updated.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Titration Triggers and Actions — system_set_tt_cond","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"rule defined using system_new_tt_rule, can used specifying checks titration time points , true, perform actions.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"","code":"system_set_tt_cond(cfg, name, cond, action, value = \"-1\")"},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"cfg ubiquity system object name string containing name titration rule condition applies cond string evaluates boolean value TRUE action triggered action stringing evaluates done condition met (e.g. changing dose, state change, etc) value code stored titration history track condition triggered","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"Ubiquity system object titration condition defined","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"general syntax setting new condition : name input associate condition previously defined rule. time defined rule created, condition (cond) evaluated. condition evaluates TRUE action evaluated. Lastly, condition action evaluated, value stored titration history. Multiple conditions can associated rule. internal titration history track one condition evaluated true, simulation output show last condition evaluated true. cond field string , evaluated, produce boolean value (TRUE FALSE). simply want force action times given rule can use: cond = \"TRUE\". Alternatively can provide mathematical expressions even complicated user defined functions. action field evaluated cond true. modify simulation going performed, want modify SIMINT_cfgtt variable using different system commands. Certain common tasks prototype functions created make easier user: SI_TT_BOLUS - Set bolus dosing SI_TT_RATE - Set infusion inputs SI_TT_STATE - Reset system states Note: Protype functions strings sometimes necessary specify strings within string. main string use double quotes (\") internal strings use single quotes (') SI_TT_BOLUS simplest way apply bolus condition true use following: values times vectors numbers equal length. dosing time units specified system.txt file delimiter. times relative titration time. 0 means titration time. ’s possible specify interval number times repeat last dose using following: give dose 5 titration point 2 time units later. dose 10 time 4 repeated 7 times every 4 time units. total 8 (7 + 1) doses 10 administered. Remember time units defined . input repdose can either ’last’ ’none’. Note: main string double quotes \" \" strings protype argument (e.g. ’last’) single quotes ’ ’. SI_TT_RATE created infusion named Dinf using infusion units min (times) mg/min (rates). 60 minute infusion 20 mg/min following: wanted every day 9 days (total 10 days) can repeat sequence: input repdose can either ’sequence’ ’none’. Note: time units dosing rate specified using . SI_TT_STATE provide fine control states titration points state reset prototype provided. example, modeling assay wash step want drop concentration zero. state named Cc defined system.txt want set 0.0 condition following action work. value number can use mathematical combination variables available titration environment. Also can create user function place function call within brackets . Titration Environment cond, action, value statements can use variables available titration environment. want perform complicated actions, can simply create user defined functions pass variables titration environment need. include named variables model well internal variables used control titration. States Parameters System parameters (

    ), static secondary parameters (<>) initial value covariates available. Also state values (current titration time) can used. available names specified system.txt file. Since system resets (SI_TT_STATE) processed first, changes made states values active actions. Internal Simulation Variables Internal variables used control titration activities. variables can also used conditions actions. SIMINT_p - list system parameters SIMINT_cfg - system configuration sent titration routine SIMINT_cfgtt- system configuration current titration event time SIMINT_ttimes - vector titration times (simulation units) SIMINT_ttime - current titration time (simulation units) SIMINT_tt_ts - list time scales current titration SIMINT_history - data frame tracking history conditions evaluated true following structure: tname - name titration rule value - value indicating condition satisfied simtime - simulation time rule/value triggered timescale - time rule timescale rule/value triggered Individual Simulations run individual titration simulation use following: provides output run_simulation_ubiquity two extra fields. first, som$titration, contains three columns titration rule. columns length equal corresponding simulation times. rule name rname, column headers following names meanings: tt.rname.value - Value rule active condition -1 triggered tt.rname.simtime - Simulation time last condition became active tt.rname.timescale - Simulation time time scale rule specified second field som$titration_history contains summary list titration events triggered. tname - Titration rule name value - Value rule active condition -1 triggered simtime - Simulation time last condition became active timescale - Simulation time time scale rule specified convert structured list data frame som_to_df command can used: run stochastic titration simulations, function used: add data list element called som$titration three fields titration rule: tt.rname.value - Value rule active condition -1 triggered tt.rname.simtime - Simulation time last condition became active tt.rname.timescale - Simulation time time scale rule specified fields matrix entry simulation time (column) subject (row). data structure can also converted data frame using som_to_df.","code":"cfg = system_new_tt_cond(cfg, name = \"rname\", cond = \"BOOLEAN EXPRESSION\", action = \"EXPRESSION\", value = \"VALUE\") action = \"SI_TT_BOLUS[state=’At’, values=c(10, 10, 10), times=c(0, 1, 2)]\" action = \"SI_TT_BOLUS[state = ’At’, values = c(5, 5, 10), times = c(0, 2, 4), repdose = ’last’, number = 7, interval = 4]\" action = \"SI_TT_RATE[rate=’Dinf’, times=c(0, 60), levels=c(20.0, 0)]\" action = \"SI_TT_RATE[rate = ’Dinf’, times = c(0, 60), levels = c(20, 0), repdose = ’sequence’, number = 9, interval = 24*60]\" action = \"SI_TT_STATE[Cc][0.0]\" som = run_simulation_titrate(parameters, cfg) sdf = som_to_df(cfg, som) som = simulate_subjects(parameters, cfg)"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":null,"dir":"Reference","previous_headings":"","what":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"prototype function SI_TT_RATE provides abstract interface function. Based input SI_TT_RATE infusion rate inputs updated current titration time.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"","code":"system_set_tt_rate( cfg, rate, times, levels, tt_ts, tsinfo, repdose = \"none\", interval = 1, number = 0 )"},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"cfg ubiquity system object rate name infusion rate update(Defined ) times vector switching times relative current titration time (time units defined ) levels vector infusion rates (dosing units defined ) tt_ts list timescale values current titration time tsinfo list timescale information inputs (bolus, rates, etc) repdose \"none\" \"sequence\" interval interval repeat units defined number number times repeat","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"ubiquity system object infusion rates updated.","code":""},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate Results at Estimates — system_simulate_estimation_results","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"Simulates system parameter estimates pest creating diagnostic plots","code":""},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"","code":"system_simulate_estimation_results(pest, cfg, details = FALSE)"},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"pest vector parameters cfg ubiquity system object details set TRUE display information cohorts simulated (useful debugging)","code":""},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"observations list, see system_od_general estimation=FALSE","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"converts time specified defined timescale (say weeks) timescale simulation (say hours rates 1/hr units)","code":""},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"","code":"system_ts_to_simtime(cfg, tstime, ts)"},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"cfg ubiquity system object tstime numeric time timescale ts string containing timescale","code":""},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"tstime system timescale units","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":null,"dir":"Reference","previous_headings":"","what":"View Information About the System — system_view","title":"View Information About the System — system_view","text":"Displays information (dosing, simulation options, covariates, etc) system.","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"View Information About the System — system_view","text":"","code":"system_view(cfg, field = \"all\", verbose = FALSE)"},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"View Information About the System — system_view","text":"cfg ubiquity system object field string indicating aspect system display verbose Boolean variable set true echo information screen","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"View Information About the System — system_view","text":"sequence strings system formation (one line per element) field \"\" show information system \"parameters\" summary parameter information \"bolus\" currently set bolus dosing \"rate\" infusion rate dosing \"covariate\" covariates \"iiv\" variance/covariance information \"datasets\" loaded datasets \"simulation\" simulation options \"estimation\" estimation options \"nca\" non-compartmental analyses performed","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"View Information About the System — system_view","text":"","code":"# To log and display the current system information: # \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") msgs = system_view(cfg, verbose=TRUE) #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' ' #> → Parameter Information #> → Parameter set selected: #> → Short Name: default #> → Description: mAb in Humans #> → Default parameters for current set: #> → name | value | units #> → ---------------------------------------------------- #> → F1 | 0.7440 | --- #> → ka | 0.2820 | 1/day #> → CL | 0.2000 | L/day #> → Vc | 3.6100 | L #> → Vp | 2.7500 | L #> → Q | 0.7470 | L/day #> → MW | 140.0000 | kD #> → prop_err | 0.1000 | -- #> → add_err | 0.1000 | ng/ml #> → ---------------------------------------------------- #> → #> → Bolus dosing details #> → field | values | scaling | units #> → -------------------------------------------------- #> → times | 0 7 14 | 1 | days #> → At | 400 0 0 | 1e3/MW | mg #> → Cc | 0 0 0 | 1e3/MW/Vc | mg #> → -------------------------------------------------- #> → Infusion rate details #> → Rate | field | values | scaling | units #> → ----------------------------------------------------------------- #> → Dinf | time | 0 30 | 1/60/24 | min #> → | levels | 0 0 | 60*24*1e3/MW | mg/min #> → ----------------------------------------------------------------- #> → #> → Covariate details #> → Covariate | field | values | units #> → -------------------------------------------------- #> → DOSE | time | 0 | day #> → (step) | levels | 400 | mg #> → WT | time | 0 | day #> → (step) | levels | 60 | kg #> → -------------------------------------------------- #> → #> → IIV details #> → IIV/Parameter set: #> → Short Name: default #> → Variance/covariance matrix #> → #> → ETAka ETACL ETAVc ETAVp ETAQ #> → ETAka 0.4160 0 0 0 0 #> → ETACL 0 0.0988 0.0786 0.0619 0 #> → ETAVc 0 0.0786 0.1160 0.0377 0 #> → ETAVp 0 0.0619 0.0377 0.0789 0 #> → ETAQ 0 0 0 0 0.6990 #> → #> → On parameters #> → Vc, ETAVc(LN) #> → ka, ETAka(LN) #> → Vp, ETAVp(LN) #> → CL, ETACL(LN) #> → Q, ETAQ(LN) #> → #> → integrate_with c-file #> → output_times min = 0; max = 10.0; length = 101 #> → No datasets loaded #> → #> → Estimation details #> → Parameter set: default #> → Parameters estimated: F1, ka, CL, Vc, Vp, Q, MW, prop_err, add_err #> → objective_type ml #> → observation_function system_od_general #> → No cohort information found #> → No NCA has been performed # }"},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":null,"dir":"Reference","previous_headings":"","what":"Zero All Model Inputs — system_zero_inputs","title":"Zero All Model Inputs — system_zero_inputs","text":"Multiple default inputs can specified system file. scripting level function can used set inputs zero. subsequently specified inputs applied.","code":""},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Zero All Model Inputs — system_zero_inputs","text":"","code":"system_zero_inputs(cfg, bolus = TRUE, rates = TRUE)"},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Zero All Model Inputs — system_zero_inputs","text":"cfg ubiquity system object bolus Boolean value indicating weather bolus inputs set zero rates Boolean value indicating weather infusion rate inputs set zero","code":""},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Zero All Model Inputs — system_zero_inputs","text":"Ubiquity system object specified inputs set zero","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Zero All Model Inputs — system_zero_inputs","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Clear only infusion rates cfg = system_zero_inputs(cfg, bolus=TRUE, rates=FALSE) # Clear all inputs: cfg = system_zero_inputs(cfg) # }"},{"path":"https://r.ubiquity.tools/reference/tic.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of Matlab tic() command — tic","title":"Implementation of Matlab tic() command — tic","text":"Used conjunction toc() find elapsed time code executed.","code":""},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of Matlab tic() command — tic","text":"","code":"tic(type = c(\"elapsed\", \"user.self\", \"sys.self\"))"},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Implementation of Matlab tic() command — tic","text":"type can either \"elapsed\" \"user.self\" \"sys.self\"","code":""},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of Matlab tic() command — tic","text":"time tic called","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of Matlab tic() command — tic","text":"","code":"tic() Sys.sleep(3) toc() #> elapsed #> 3.012"},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"Given matrix (d) time courses (row individual column time point) confidence interval (ci) calculate mean, median, confidence intervals vector values creating patches.","code":""},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"","code":"timecourse_stats(d, ci)"},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"d matrix responses (row individual column time point) ci confidence interval percent (eg, 95)","code":""},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"List following elements: stats$ub_ci vector confidence interval upper bound stats$lb_ci vector confidence interval lower bound stats$mean vector mean values stats$median vector median values","code":""},{"path":"https://r.ubiquity.tools/reference/toc.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of Matlab toc() command — toc","title":"Implementation of Matlab toc() command — toc","text":"Used conjunction tic() find elapsed time code executed.","code":""},{"path":"https://r.ubiquity.tools/reference/toc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of Matlab toc() command — toc","text":"","code":"toc()"},{"path":"https://r.ubiquity.tools/reference/toc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of Matlab toc() command — toc","text":"time seconds since tic() called","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/toc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of Matlab toc() command — toc","text":"","code":"tic() Sys.sleep(3) toc() #> elapsed #> 3.007"},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"Checks names specified different analysis aspects (cohorts, analyses, reports, etc.) make sure start letter contain letters, numbers _","code":""},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"","code":"ubiquity_name_check(test_name)"},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"test_name string containing name tested","code":""},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"List Boolean element isgood TRUE name tests correct, FALSE fails. element msgs contains verbose message fails.","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts Numeric Variables into Padded Strings — var2string","title":"Converts Numeric Variables into Padded Strings — var2string","text":"Mechanism converting numeric variables strings reporting.","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts Numeric Variables into Padded Strings — var2string","text":"","code":"var2string(vars, maxlength = 0, nsig_e = 3, nsig_f = 4)"},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts Numeric Variables into Padded Strings — var2string","text":"vars numeric variable vector numeric variables maxlength value greater zero spaces added beginning string total length equal maxlength nsig_e number significant figures scientific notation nsig_f number significant figures numbers (2.123)","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts Numeric Variables into Padded Strings — var2string","text":"Number string padded","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Converts Numeric Variables into Padded Strings — var2string","text":"","code":"var2string(pi, nsig_f=20) #> [1] \"3.14159265358979311600\" var2string(.0001121, nsig_e=2, maxlength=10) #> [1] \" 1.12e-04\""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert R Objects to Strings — var2string_gen","title":"Convert R Objects to Strings — var2string_gen","text":"Mechanism converting R objects strings reporting.","code":""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert R Objects to Strings — var2string_gen","text":"","code":"var2string_gen(var)"},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert R Objects to Strings — var2string_gen","text":"var R variable","code":""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert R Objects to Strings — var2string_gen","text":"Variable string form","code":""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert R Objects to Strings — var2string_gen","text":"","code":"var2string_gen(c(1,2,3)) #> [1] \"min = 1.0; max = 3.0; length = 3 \""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":null,"dir":"Reference","previous_headings":"","what":"Print and Log Messages — vp","title":"Print and Log Messages — vp","text":"Used print messages screen log file.","code":""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print and Log Messages — vp","text":"","code":"vp(cfg, str, fmt = \"alert\")"},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print and Log Messages — vp","text":"cfg ubiquity system object str sequence strings print fmt string format one following: \"h1\", \"h2\", \"h3\", \"verbatim\", \"alert\" (default), \"warning\", \"danger\".","code":""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print and Log Messages — vp","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print and Log Messages — vp","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYM #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Initialzing the log file vp(cfg, \"Message that will be logged\") #> → Message that will be logged #> [1] TRUE # }"},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Ubiquity Workshop Sections — workshop_fetch","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"ubiquity package function can used fetch example files different sections workshop.","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"","code":"workshop_fetch( section = \"Simulation\", overwrite = FALSE, copy_files = TRUE, output_directory = getwd() )"},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"section Name section workshop retrieve (\"Simulation\") overwrite TRUE new workshop files overwrite existing files present (FALSE) copy_files TRUE files written output_directory, FALSE names locations files returned (TRUE) output_directory directory workshop files placed (getwd())","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"list","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"Valid sections \"Simulation\", \"Estimation\", \"Titration\" \"Reporting\", \"NCA\"","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"","code":"# \\donttest{ workshop_fetch(\"Estimation\", output_directory=tempdir(), overwrite=TRUE) #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent_metabolite.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent_metabolite_global.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/analysis_parent_metabolite_nm_data.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/system.txt #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/pm_data.csv #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpYMmwwq/nm_data.csv #> $sources #> [1] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent.r\" #> [2] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent_metabolite.r\" #> [3] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent_metabolite_global.r\" #> [4] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/scripts/analysis_parent_metabolite_nm_data.r\" #> [5] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/systems/system-adapt.txt\" #> [6] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/csv/pm_data.csv\" #> [7] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpxcbYSf/temp_libpath162a173a31bf3/ubiquity/ubinc/csv/nm_data.csv\" #> #> $destinations #> [1] \"analysis_parent.r\" #> [2] \"analysis_parent_metabolite.r\" #> [3] \"analysis_parent_metabolite_global.r\" #> [4] \"analysis_parent_metabolite_nm_data.r\" #> [5] \"system.txt\" #> [6] \"pm_data.csv\" #> [7] \"nm_data.csv\" #> #> $write_file #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> #> $isgood #> [1] TRUE #> # }"},{"path":[]},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-4","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.4 (development version)","text":"Removed NONMEM Monolix outputs Added translation rxode2 output NONMEM Monolix outputs Added simulation option dynamic set TRUE default set FALSE fix ODEs 0 allow vitro analysis.","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-203","dir":"Changelog","previous_headings":"","what":"ubiquity 2.0.3","title":"ubiquity 2.0.3","text":"CRAN release: 2024-03-08","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-3","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.3","text":"Fixed IIV comments breaking nlmixr2 output Fixed bug spaces breaking compilation C output Fixed bug CRAN flextable/officer update broke saved values vignettes","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-201","dir":"Changelog","previous_headings":"","what":"ubiquity 2.0.1","title":"ubiquity 2.0.1","text":"CRAN release: 2023-10-29","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-1","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.1","text":"Removed internal files longer used Added documentation creating user defined observation functions running parameter estimation Updated reporting template work development version onbrand Changed terminal messaging use cli Added termination criteria estimation output Fixed wrapping issue Fortran output unwrappable strings resulted infinite loop Added system-testing.txt example Added nlmxir output target Added template creation NONMEM, Monolix, nlmixr Fixed R command compilation use R.home() Fixed broken tests Updated CITATION use bibentry Fixing error building systems windows","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-200","dir":"Changelog","previous_headings":"","what":"ubiquity 2.0.0","title":"ubiquity 2.0.0","text":"CRAN release: 2021-09-03","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-0","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.0","text":"Lots small updates function documentation vignettes Completely replaced reporting functionality. Now using onbrand package templated reporting. Note: break reporting version 1 R package. Old Word PowerPoint templates work, need create yaml mapping file. detailed Reporting vignette. Reporting changes added following functions system_rpt_add_slide() system_rpt_add_doc_content() system_rpt_read_template() system_rpt_save_report() system_rpt_template_details() system_fetch_rpt_officer_object() system_fetch_rpt_onbrand_object() system_set_rpt_officer_object() system_set_rpt_onbrand_object() Reporting changes removed following functions: system_report_doc_add_content() system_report_doc_format_section() system_report_doc_set_ph() system_report_estimation() system_report_glp() system_report_init() system_report_nca() system_report_ph_content() system_report_save() system_report_set() system_report_slide_content() system_report_slide_section() system_report_slide_title() system_report_slide_two_col() system_report_view_layout() system_fetch_report() system_fetch_report_format() md_to_officer() md_to_oo() Reporting changes updated vignettes, example scripts function templates","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-104","dir":"Changelog","previous_headings":"","what":"ubiquity 1.0.4","title":"ubiquity 1.0.4","text":"CRAN release: 2021-04-18","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-1-0-4","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 1.0.4","text":"Renamed system_report_fetch system_fetch_report Added reporting scripts unit tests Added import officer functions starting body_end_ Changed table figure captions numbered Word reporting Created testthat scripts run workshop functions","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"new-features-1-0-4","dir":"Changelog","previous_headings":"","what":"New Features","title":"ubiquity 1.0.4","text":"Added shaded region observed AUC NCA reporting Added cohort-specific output times option estimation workflow Updated references documentation templates point r.ubiquity.tools Added checks estimation routines check reasonable bounds global optimizer notify users estimates near bounds Added sessionInfo() estimation Word reporting Added system_fetch_report_format Integrated markdown (md) header format option flextable outputs Added default cfg$reporting$enabled (FALSE) Added ability use markdown NCA summary tables generated system_nca_summary Fixed placeholder text, now delimiters ===either side text Added system_set_option general group output_directory option markdown Word reporting, default font properties defined ability specify org_functions.R template added. Moved annotated layout generation PowerPoint files system_report_view_layout() annotate_base() command officer Added optional key fields tables figures Word reporting Added ability pass PKNCA.options system_nca_run Added verbose option system_view command Allowing pass dataset columns summary NCA output Updated system_report_ph_content system_report_doc_add_content allow inclusion flextable objects Updated system_view include nca results system_fetch_nca - function fetch NCA results system_fetch_nca_columns - function fetch column descriptors specific analysis system_nca_parameters_meta - list standard NCA parameters system_nca_summary - creates summary tables NCA results Adding checks simulate_subjects ensure required columns present Added ability read xlsx data sets system_load_data","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"bug-fixes-1-0-4","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"ubiquity 1.0.4","text":"CRAN erroring tic() function. Removed tic() toc() functions Fixed bug dataset given system_run_nca enough valid data actually run NCA Fixed “Coordinate system already present…” warning gg_axis Fixed location table generation example script analysis_nca_md.R table styles picked properly Added scales package requirement Fixed missing rptname inputs system_report_ph_content Fixed Bug system view cohort-specific parameters defined Fixed figure generation errors estimation workflow Fixed bug system_report_save() Removed aberrant gdata require calls templates Fixed bug system_nca_run DOSE factor Fixed bug system_nca_run back extrapolation done doses skipped due insufficient points. causing error. Removed coercion warnings: tmpsumhalflife=NCA.reshalflife = NCA.resresult[NCA.resresultresultPPTESTCD == “half.life”, : Coercing LHS list Removed digits input system_nca_run (now handled system_nca_summary ) Fixed coercion warnings covariates building system Using explicit declaration officer functions specifying importFrom prevent namespace issues readxl allow function readxl::read_xlsx","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-103","dir":"Changelog","previous_headings":"","what":"ubiquity 1.0.3","title":"ubiquity 1.0.3","text":"CRAN release: 2020-09-13","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-1-0-3","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 1.0.3","text":"Removed gdata dependency Removed URL redirects documentation resolve CRAN submission warnings","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"new-features-1-0-3","dir":"Changelog","previous_headings":"","what":"New Features","title":"ubiquity 1.0.3","text":"Added option simulate subjects specify secondary parameters saved","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"bug-fixes-1-0-3","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"ubiquity 1.0.3","text":"Converted system_nca_run() using $ mostly using [[“”]] Fixed NCA template Fixed bug ShinyApp template iiv tab displayed even system iiv elements","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-102","dir":"Changelog","previous_headings":"","what":"ubiquity 1.0.2","title":"ubiquity 1.0.2","text":"CRAN release: 2020-07-05","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"bug-fixes-1-0-2","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"ubiquity 1.0.2","text":"Updated components fix issues encountered R 4.0","code":""}] +[{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Model Deployment","text":"model developed may useful provide easy way run simulations automate specific analyses. , ubiquity provides ShinyApp allows model run easy use interface highly customizable. App can run locally (useful meetings answer quick questions) deployed Shiny server allow others access model. demonstrate interface can begin PK model mAbs humans (Davda etal. mAbs, 6(4), 1094-1102) : Use ?system_new see list available system file examples. building system can create ShinyApp template: create following three files: ubiquity_app.R - Script run control ubiquity ShinyApp server.R - Server script ui.R- UI script","code":"library(ubiquity) system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE) cfg = build_system(system_file = \"system.txt\") system_fetch_template(cfg, template = \"ShinyApp\", overwrite = TRUE)"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"running-the-model","dir":"Articles","previous_headings":"","what":"Running the model","title":"Model Deployment","text":"Next simply open ubiquity_app.R RStudio source , RStudio open window associated application. ShinyApp tends work better run within browser. starting App load default dosing file run model. first model output plotted. make changes App, changes reflected user log bottom screen. can change outputs plotted, axis limits, aspects plot using plot controls figure. intent provide quick method get model running default behaviors provide users need. behavior ShinyApp can customized (described ). First discuss default interface:","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"altering-dosing","dir":"Articles","previous_headings":"Running the model","what":"Altering dosing","title":"Model Deployment","text":"list bolus times values can specified comma-separated values. dose repeated fashion check ``Repeat last dose’’ box, provide dosing interval (units dosing times), give number doses administer. example repeat 400 mg dose every two weeks two doses. Rates infusion specified set switching times corresponding infusion rates (separated commas). infusion rates held constant next switching time. example infuse drug 800mg/min starting time 0, infusion turned (set 0) 30 minutes.","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"population-simulations","dir":"Articles","previous_headings":"Running the model","what":"Population simulations","title":"Model Deployment","text":"variability system parameters specified (? ?) “Variability” tab visible. Simply check “Simulate variability” box, alter number subjects, prediction interval, elements variance-covariance matrix simulate desired population response. select “Update Plot”, selected output plotted (mean – solid line, selected confidence interval – shaded region).","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"saving-model-results","dir":"Articles","previous_headings":"","what":"Saving model results","title":"Model Deployment","text":"save model results need provide descriptive name analysis, push save button, click link generated. select time stamp, appended name zip file. default following files saved: analysis_single_dose_400_mg_lib.r, analysis_single_dose_400_mg.r - two files can used recreate results ShinyApp. analysis_single_dose_400_mg_timecourse.png - Time-course simulation results analysis_single_dose_400_mg.csv - Predictions containing timescale model, every state, output analysis_single_dose_400_mg_RX.html - file report (X) specified ubiquity_app.R (See ) system.txt - system file describing model ubiquity_log.txt - log file user done","code":""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"model-scripts","dir":"Articles","previous_headings":"Saving model results","what":"Model scripts","title":"Model Deployment","text":"files analysis_NAME.r analysis_NAME_lib.r can used two ways. First, two files can used stand-alone files recreate simulation results ShinyApp. Creating Simulation Scripts main script (analysis_NAME.r) can used starting point create simulation scripts. necessary modify First comment sourcing standalone library: Next (script system.txt file) uncommenting following lines force system rebuilt changes system file loaded.","code":"#source(\"analysis_NAME_lib.r\"); if(!require(ubiquity)){ source(file.path('library', 'r_general', 'ubiquity.R')) } cfg = build_system(system_file=\"system.txt\")"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"controlling-what-is-saved","dir":"Articles","previous_headings":"Saving model results","what":"Controlling what is saved","title":"Model Deployment","text":"certain instances may want allow user access everything saved default. edit ubiquity_app.R can alter pushed user setting relevant fields FALSE.","code":"cfg$gui$save$system_txt = TRUE cfg$gui$save$user_log = TRUE"},{"path":[]},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"model-diagram","dir":"Articles","previous_headings":"Model documentation","what":"Model diagram","title":"Model Deployment","text":"can difficult user look set parameters, dosing inputs, outputs determine model works. aid user can useful create model diagram. utilize majority screen space, image roughly twice wide tall. can create image favorite drawing program. Inkscape free vector drawing program available inkscape.org. run following: create file system.svg. can edit save portable network graphics (png) file named system.png directory ubiquity_app.R file. start ShinyApp find file create tab plotting area App.","code":"system_fetch_template(cfg, template=\"Model Diagram\")"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"model-reports","dir":"Articles","previous_headings":"Model documentation","what":"Model reports","title":"Model Deployment","text":"Sometimes need detail annotated model diagram. may need perform calculations based results simulation. may better present information tabulated format. scenarios can create RMarkdown file. Create copy report template (system_report.Rmd) script test (test_system_report.r): called ’ll access ubiquity model object (cfg) simulation results som. simulation results take form deterministic simulation (see output ?run_simulation_ubiquity) , variability checked, stochastic simulation (see output ?simulate_subjects) tell ShinyApp load report (named system_report.Rmd), following lines need added ubiquity_app.R. title field title tab ShinyApp file name file created. can create five reports way, differentiated list name (R1, R2, … R5). file test_system_report.r can used debug model report file. First run model ShinyApp reports disabled. App runs stores state (cfg) current simulation results (som) following data files: cfg \\rightarrow transient/rgui/default/gui_state.RData som \\rightarrow transient/rgui/default/gui_som.RData Next load test script, modify report name accordingly, run : generate report HTML format. can insert debugging commands report test add information. working, can enable report described appear tab viewable user. reports may depend user input. example, RMarkdown file documents modeling assumptions model construction process content change user interacts App. use pre-rendered report simply replace .Rmd .html: tell App read html, prevent rendering report, speed things user.","code":"system_fetch_template(cfg, template=\"Shiny Rmd Report\") cfg$gui$modelreport_files$R1$title = \"Tab Title\" cfg$gui$modelreport_files$R1$file = \"system_report.Rmd\" load(\"transient/rgui/default/gui_som.RData\") load(\"transient/rgui/default/gui_state.RData\") params = list() params$cfg = cfg params$som = som rmarkdown::render(\"system_report.Rmd\", params = params, output_format = \"html_document\") cfg$gui$modelreport_files$R1$title = \"Tab Title\" cfg$gui$modelreport_files$R1$file = \"system_report.html\""},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"user-definable-functions","dir":"Articles","previous_headings":"","what":"User definable functions","title":"Model Deployment","text":"customize simulation plotting within ShinyApp necessary create custom functions. need placed file. example placed mylibs.r main template directory. Lastly, need tell ShinyApp load file. need edit ubiquity_app.R add following line:","code":"cfg$gui$functions$user_def = 'mylibs.r'"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"custom-simulation-commands","dir":"Articles","previous_headings":"User definable functions","what":"Custom simulation commands","title":"Model Deployment","text":"default ShinyApp run simulations using run_simulation_ubiquity (individual) simulate_subjects (population). take inputs parameters vector containing current parameter set changes made interface cfg data structure. can create functions overwrite defining following: Individual Simulations Population Simulations Note order use default plotting functionality functions need return values format default functions individual (run_simulation_ubiquity) population (simulate_subjects) simulations.","code":"cfg$gui$functions$sim_ind = 'function_name(parameters, cfg)' cfg$gui$functions$sim_var = 'function_name(parameters, cfg)'"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"custom-plotting-commands","dir":"Articles","previous_headings":"User definable functions","what":"Custom plotting commands","title":"Model Deployment","text":"customize plotting output need create functions can utilize simulation output som. individual population simulations output run_simulation_ubiquity simulate_subjects, respectively. Unless user-specified simulation functions used. case som can format needed. possible also access parameters vector containing current parameter set changes made interface cfg data structure. can create plotting functions overwrite defining following ubiquity_app.R: Indiviudal Plot Population Plot","code":"cfg$gui$functions$plot_ind = 'function_name(cfg, parameters,som)' cfg$gui$functions$plot_var = 'function_name(cfg, parameters,som)'"},{"path":"https://r.ubiquity.tools/articles/Deployment.html","id":"deployment-on-a-shiny-server","dir":"Articles","previous_headings":"","what":"Deployment on a Shiny Server","title":"Model Deployment","text":"deploy ShinyApp shiny server need indicate modifying ubiquity_app.R changing deploying variable TRUE: ShinyApp needs initialized server. can two ways. First can create empty file called REBUILD needs deployed along side app files. can touch command nat.utils package: force initialization first time app loaded. works well using rsconnect deploy app. Alternatively, can manually sync files run following shiny user server. App fails run Shiny Server check following: Make sure correct packages installed available user Shiny Server running . Make sure ownership permissions server files correct. test deployment can install shinyVM","code":"deploying = TRUE nat.utils::touch(\"REBUILD\") R -e \"source('ubiquity_app.R')\""},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Naive-Pooled Parameter Estimation","text":"workshop (workshop.ubiquity.tools) provides several examples performing parameter estimation ubiquity. make copy scripts supporting files current working directory run following: analysis_parent.r - Least squares estimation single output analysis_parent_metabolite.r - Maximum likelihood estimation two outputs analysis_parent_metabolite_global.r - Using global optimization packages analysis_parent_metabolite_nm_data.r - Reading cohorts NONMEM file scripts build previous one demonstrate different features ubiquity parameter estimation routines. examples use system (shown figure ) contains three differential equations tracking mass parent drug blood (Mpb) tissue space (Mpt). blood parent can form (fmKp) metabolite (Mmb) subsequent elimination (Km). parent/metabolite model adapted ADAPT5 Users Manual (https://bmsr.usc.edu/files/2013/02/ADAPT5-User-Guide.pdf). Using system_new (use ?system_new see list available system file examples) can copy template file current directory build system: system built, can create local copy estimation template system: create file: analysis_estimate.R working directory. beginning script three variables created control script format output. variable analysis_name defines prefix prepended output generated script. Archiving analysis results controlled Boolean variable archive_results. Lastly, script controlled using flowctl variable (possible options listed commented ). estimation script following main components: Select parameter set subset parameters estimate Set options (simulation, estimation, etc) Load datasets Define cohorts Estimate parameters Plot results explored using scripts .","code":"library(ubiquity) fr = workshop_fetch(section=\"Estimation\", overwrite=TRUE) library(ubiquity) system_new(file_name=\"system.txt\", system_file=\"adapt\", overwrite = TRUE) cfg = build_system(system_file = \"system.txt\") system_fetch_template(cfg, template=\"Estimation\")"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"least-squares-estimationsingle-output-analysis_parent-r","dir":"Articles","previous_headings":"","what":"Least squares estimation/single output (analysis_parent.r)","title":"Naive-Pooled Parameter Estimation","text":"first example (analysis_parent.r) begins specifying want perform parameter estimation archive results using name1 parent_d1030 indicate analyzing parent PK 10 30 mg dosing cohorts: Next select parameters estimate. ’re estimating parent data, names parameters relevant parent PK (pnames) selected. estimate parameters simply exclude third argument. system parameters estimated weighted least squares objective used2. Next set options relevant estimation underlying simulation routines. example simulation output times specified, relevant parameters can set. template generated several common options commented . can uncommented modified needed. dataset (shown table ) included ubiquity package accessed using system.file. example script referenced explicitly. format requirements datasets flat files header row. format flexible requires time/observation information columns required filter data isolate cohorts received treatment. inputs defined cohorts defined. Data files loaded using system_load_data() name3 assigned dataset. Data can read files (csv, xls, xlsx, tab) existing data frame. name (pm_data ) used reference dataset later script. dataset column observation time (TIME), subject id (ID), concentrations parent (PT) metabolite (MT), BLQ flag nominal dose (DOSE). columns used (TIME, PT, MT DOSE), others (BQL) ignored. intended example general guide dataset format. necessary different outputs different columns (wide format). dataset loaded tall skinny format well. example going analyze parent data individuals given 10 30 mg using least squares objective. Next need identify data inputs associated data. done defining cohorts, groups data receive treatment model inputs (bolus dosing, infusion rates, covariates) associated cohorts. example define cohort dosing group. make sure starting blank slate can use system_clear_cohorts() remove previously defined information. cohort define list information cohort. cohort unique name field4 dataset field pointing dataset (pm_data) loaded . optional cohort filter (cf) field used reduce entire dataset records associated cohort. See help system_define_cohort() information construct cohort filters. Next necessary define inputs cohort. inputs refers model inputs may include dosing well covariates, estimation template (generated using system_fetch_template() ) contain placeholders defined system file. Note: bolus infusion inputs, necessary define inputs nonzero, covariates necessary define differ definitions system file. input AMT field TIME field units specified system file (AMT TIME internal indentifiers taken dataset). Next need match outputs model outputs dataset. cohort$outputs field used group output. cohort output mapping blood PK parent output Parent. times observations dataset found 'TIME’ column ’PT’ column (missing data specified -1 dropped). mapped model timescale ('hours', specified ) model output (’Cpblood’, specified ). Note units dataset must model: output grouping cohort marker color, shape line type can specified (controlling plotted output). Finally cohort defined using system_define_cohort(): thing 30 mg dose group: cohorts defined call estimation function (system_estimate_parameters()). flowctl set 'plot previous estimate' 'plot guess' values just returned. one estimation options selected flowctl several files generated output folder analysis_name prefix: output/parent_d1030-report.txt - Text file summary estimation results. output/parent_d1030-parameters_all.csv - Summary table parameters (estimated fixed) output/parent_d1030-parameters_est.csv - Summary table estimated parameters output/parent_d1030-system_update.txt - Text update system.txt file new parameter estimates output/parent_d1030-sessionInfo.RData - output sessionInfo() stored SI object data file Next system simulated estimate data stored erp. information variable used generate standard plots , may desirable save information generate figures. necessary understand structure erp. list two different fields. TIME - Time units data OBS - Observations (SMOOTH = FALSE), -1 (SMOOTH=TRUE) PRED - Predictions (SMOOTH = FALSE) VAR - Variance (SMOOTH = FALSE), -1 (SMOOTH=TRUE) SMOOTH - FALSE observation times, TRUE observations OUTPUT - name output COHORT - name cohort ts.time - Simulation time scale ts.TS - entry timescale TS pred - Simulated predictions name - State model output cohort - Cohort name Lastly predictions overlaying data observed vs predicted plots generated using system_plot_cohorts(). Basic formatting figures controlled using plot_opts list (see ?system_plot_cohorts details). called, system_plot_cohorts() write png pdf output time course observed vs predicted files. also return list ggplot objects relative paths files well. example following generated: output/parent_d1030_time course_Parent.pdf output/parent_d1030_time course_Parent.png output/parent_d1030_obs_pred_Parent.pdf output/parent_d1030_obs_pred_Parent.png","code":"flowctl = 'estimate' archive_results = TRUE analysis_name = 'parent_d1030' pnames = c('Vp', 'Vt', 'CLp', 'Q') cfg = system_select_set(cfg, \"default\", pnames) cfg=system_set_option(cfg, group = \"simulation\", option = \"output_times\", seq(0,100,1)) cfg = system_load_data(cfg, dsname = \"pm_data\", data_file = system.file(\"ubinc\", \"csv\", \"pm_data.csv\", package = \"ubiquity\")) cfg = system_clear_cohorts(cfg) cohort = list( name = \"dose_10\", cf = list(DOSE = c(10)), inputs = NULL, outputs = NULL, dataset = \"pm_data\") cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"TIME\"]] = c( 0) # hours cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"AMT\"]] = c(10) # mpk cohort[[\"outputs\"]][[\"Parent\"]] = list() # Mapping to data set cohort[[\"outputs\"]][[\"Parent\"]][[\"obs\"]] = list( time = \"TIME\", value = \"PT\", missing = -1) # Mapping to system file cohort[[\"outputs\"]][[\"Parent\"]][[\"model\"]] = list( time = \"hours\", value = \"Cpblood\", variance = \"1\") # Plot formatting cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list( marker_color = \"black\", marker_shape = 1, marker_line = 2 ) cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list( marker_color = \"black\", marker_shape = 1, marker_line = 2 ) cfg = system_define_cohort(cfg, cohort) cohort = list( name = \"dose_30\", cf = list(DOSE = c(30)), dataset = \"pm_data\", inputs = NULL, outputs = NULL) # Bolus inputs for the cohort cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"TIME\"]] = c( 0) # hours cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"AMT\"]] = c(30) # mpk # Defining Parent output cohort[[\"outputs\"]][[\"Parent\"]] = list() # Mapping to data set cohort[[\"outputs\"]][[\"Parent\"]][[\"obs\"]] = list( time = \"TIME\", value = \"PT\", missing = -1) # Mapping to system file cohort[[\"outputs\"]][[\"Parent\"]][[\"model\"]] = list( time = \"hours\", value = \"Cpblood\", variance = \"1\") # Plot formatting cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list( marker_color = \"red\", marker_shape = 2, marker_line = 2 ) cfg = system_define_cohort(cfg, cohort) pest = system_estimate_parameters(cfg, flowctl = flowctl, analysis_name = analysis_name, archive_results = archive_results) cfg=system_set_option(cfg, group = \"simulation\", option = \"output_times\", seq(0,100,5)) erp = system_simulate_estimation_results(pest = pest, cfg = cfg) plot_opts = c() plot_opts$outputs$Parent$yscale = 'log' plinfo = system_plot_cohorts(erp, plot_opts, cfg, analysis_name=analysis_name)"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"automated-reporting","dir":"Articles","previous_headings":"Least squares estimation/single output (analysis_parent.r)","what":"Automated Reporting","title":"Naive-Pooled Parameter Estimation","text":"outputs provide components generating presentations documents. Coping pasting figures tables documents can tedious. can convenient automate process accomplished function system_rpt_estimation().","code":""},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"powerpoint","dir":"Articles","previous_headings":"Least squares estimation/single output (analysis_parent.r) > Automated Reporting","what":"PowerPoint","title":"Naive-Pooled Parameter Estimation","text":"append results analysis PowerPoint document simply initialize new report (template=\"PowerPoint\"), call system_rpt_estimation() appropriate analysis_name, results analysis attached slides. save analysis results output directory.","code":"cfg = system_rpt_read_template(cfg, template=\"PowerPoint\") cfg = system_rpt_estimation(cfg=cfg, analysis_name=analysis_name) system_rpt_save_report(cfg=cfg, output_file=file.path(\"output\",paste(analysis_name, \"-report.pptx\", sep=\"\")))"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"word","dir":"Articles","previous_headings":"Least squares estimation/single output (analysis_parent.r) > Automated Reporting","what":"Word","title":"Naive-Pooled Parameter Estimation","text":"process Word document . Just make sure template set \"Word\" report initialized: information integrated report generation see Reporting vignette.","code":"cfg = system_rpt_read_template(cfg, template=\"Word\") cfg = system_rpt_estimation(cfg=cfg, analysis_name=analysis_name) system_rpt_save_report(cfg=cfg, output_file=file.path(\"output\",paste(analysis_name, \"-report.docx\", sep=\"\")))"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"maximum-likelihoodtwo-outputs-analysis_parent_metabolite-r","dir":"Articles","previous_headings":"","what":"Maximum likelihood/two outputs (analysis_parent_metabolite.r)","title":"Naive-Pooled Parameter Estimation","text":"example similar last except analyzing two different outputs (parent metabolite) proportional variance model. now can estimate parameters associated outputs well variance parameters: parameters estimated contain variance parameters (slope_parent slope_metabolite) maximum likelihood objective used. cohort definitions look much except variance model defined 'slope_parent*PRED^2', separate output named Metabolite. Similar modifications made 30 mg dosing cohort.","code":"pnames = c('Vp', 'Vt', 'Vm', 'CLp', 'Q', 'CLm', 'slope_parent', 'slope_metabolite'); cfg = system_select_set(cfg, \"default\", pnames) cohort = list( name = \"dose_10\", cf = list(DOSE = c(10)), inputs = NULL, outputs = NULL, dataset = \"pm_data\") # Bolus inputs for the cohort cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"TIME\"]] = c( 0) # hours cohort[[\"inputs\"]][[\"bolus\"]][[\"Mpb\"]][[\"AMT\"]] = c(10) # mpk # Defining Parent output cohort[[\"outputs\"]][[\"Parent\"]] = list() # Mapping to data set cohort[[\"outputs\"]][[\"Parent\"]][[\"obs\"]] = list( time = \"TIME\", value = \"PT\", missing = -1) # Mapping to system file cohort[[\"outputs\"]][[\"Parent\"]][[\"model\"]] = list( time = \"hours\", value = \"Cpblood\", variance = \"slope_parent*PRED^2\") # Plot formatting cohort[[\"outputs\"]][[\"Parent\"]][[\"options\"]] = list( marker_color = \"black\", marker_shape = 1, marker_line = 1 ) # Defining Metabolite output cohort[[\"outputs\"]][[\"Metabolite\"]] = list() # Mapping to data set cohort[[\"outputs\"]][[\"Metabolite\"]][[\"obs\"]] = list( time = \"TIME\", value = \"MT\", missing = -1) # Mapping to system file cohort[[\"outputs\"]][[\"Metabolite\"]][[\"model\"]] = list( time = \"hours\", value = \"Cmblood\", variance = \"slope_metabolite*PRED^2\") # Plot formatting cohort[[\"outputs\"]][[\"Metabolite\"]][[\"options\"]] = list( marker_color = \"blue\", marker_shape = 1, marker_line = 1 ) cfg = system_define_cohort(cfg, cohort)"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"global-estimation-routines-analysis_parent_metabolite_global-r","dir":"Articles","previous_headings":"","what":"Global estimation routines (analysis_parent_metabolite_global.r)","title":"Naive-Pooled Parameter Estimation","text":"Now build previous example demonstrate select different optimization routines. default, parameter estimation carried using Nelder-Mead optimization method optim library. can specify different functions library. See documentation optim (?optim) valid values method elements control. example, use simulated annealing change method SANN. also global optimization libraries R, two can readily used ubiquity: Particle Swarm Optimizer (pso package) Genetic Algorithms (GA package). use pso package set following options: use GA package set following options: Note: Optimizers like SANN global optimizers (pso GA) good identifying parameter sets outside region initial guess. However, one consequence algorithms can quickly approach bounds. Consequently important provide realistic upper lower bounds parameters (

    descriptor system file using system_set_guess() scripting level). use default value machine precision (eps) lower bound infinity (Inf) upper bound optimization routines can choose parameter values can cause internal simulations fail.","code":"cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"SANN\") library(pso) cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"pso\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"psoptim\") library(GA) cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"control\", value = list(maxiter = 10000, optimArgs = list(method = \"Nelder-Mead\", maxiter = 1000)))"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"cohorts-from-nonmem-dataset-analysis_parent_metabolite_nm_data-r","dir":"Articles","previous_headings":"","what":"Cohorts from NONMEM dataset (analysis_parent_metabolite_nm_data.r)","title":"Naive-Pooled Parameter Estimation","text":"examples , cohorts defined manually. Sometimes may data NONMEM dataset dosing information located dataset. may convenient simply define cohort subject dataset. function system_define_cohorts_nm can used. differences script analysis_parent_metabolite.r now highlighted: First load NONMEM dataset clear cohorts: Next define filter use dataset (include 10 30 mg doses): information filtering datasets see help nm_select_records(). Now define maps different outputs. output specify variance, compartment (CMT) number, model output missing number flag: Lastly define map model inputs. case bolus Mpb compartment: Unused columns dataset ignored. filter, input observation maps defined, now add cohorts","code":"cfg = system_load_data(cfg, dsname = \"nm_pm_data\", data_file = system.file(\"ubinc\", \"csv\", \"nm_data.csv\", package = \"ubiquity\")) cfg = system_clear_cohorts(cfg); filter = list() filter$DOSE = c(10, 30) OBSMAP = list() OBSMAP$PT = list(variance = 'slope_parent*PRED^2', CMT = 1, output = 'Cpblood', missing = -1 ) OBSMAP$MT = list(variance = 'slope_metabolite*PRED^2', CMT = 2, output = 'Cmblood', missing = -1 ) INPUTMAP = list() INPUTMAP$bolus$Mpb$CMT_NUM = 1 cfg = system_define_cohorts_nm(cfg, DS = 'nm_pm_data', col_ID = 'ID', col_CMT = 'CMT', col_DV = 'DV', col_TIME = 'TIME', col_AMT = 'AMT', col_RATE = 'RATE', col_EVID = 'EVID', col_GROUP= 'DOSE', filter = filter, INPUTS = INPUTMAP, OBS = OBSMAP, group = FALSE)"},{"path":"https://r.ubiquity.tools/articles/Estimation.html","id":"contents-of-system-txt","dir":"Articles","previous_headings":"","what":"Contents of system.txt","title":"Naive-Pooled Parameter Estimation","text":"","code":"# # Parent/Metabolite example taken from Section 9.3 of the ADAPT5 Users Manual # # https://bmsr.usc.edu/files/2013/02/ADAPT5-User-Guide.pdf #

    Vp 10.0 1e-5 100 L yes System

    Vt 10.0 1e-5 100 L yes System

    Vm 30.0 1e-5 100 L yes System

    CLp 1.0 1e-5 100 L/hr yes System

    CLm 1.0 1e-5 100 L/hr yes System

    Q 0.3 1e-5 100 L/hr yes System Original Estimates slope_parent 0.1 1e-9 10 -- no Variance slope_metabolite 0.1 1e-9 10 -- no Variance ; [ 0 ]; 1; hours ; Mpb; [ 0 ]; 70; mpk -(CLp/Vp + Q/Vp)*Mpb + Q/Vt*Mpt Q/Vp*Mpb - Q/Vt*Mpt CLp/Vp*Mpb - CLm/Vm*Mmb Cpblood = Mpb/Vp Cmblood = Mmb/Vm 1.0 1.0/24.0 0.08 Vp 0.08 Vt 0.08 CLp 0.08 CLm SIMINT_SEQ[0][100][1] "},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"working-with-rxode2-nlmixr2-nonmem-and-monolix","dir":"Articles","previous_headings":"","what":"Working with rxode2, nlmixr2, NONMEM, and Monolix","title":"Howtos","text":"Say model ubiquity want use nlmixr2. perhaps want try simulation engine rxode2, want hand model someone using Monolix. provide way easily convert model different formats automated fashion.","code":""},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"getting-your-model-in-rxode2-format","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Getting your model in rxode2 format","title":"Howtos","text":"example consider system file two compartment model (system_2cmt.txt ). build system rxode2 output target created. can use system_fetch_template() function access file. ’m placing script temporary directory. script generate rxode2 model function store function object my_model. default input nlmixr2. can use function piping methodology things like add IIV terms parameters. can use ubiquity build structural model piping, rxode2, nlmixr2 analysis. can see contents system_nlmixr2.R my_model object looks like . Note include output ubiquity need error model. along Descriptor need define variance parameters () also output error model ().","code":"cfg = build_system(system_file = sf_2cmt_full, temporary_directory = file.path(tempdir(), \"transient\")) fr = system_fetch_template(cfg, template = \"nlmixr2\", output_directory = tempdir(), overwrite = TRUE) library(rxode2) source(file.path(tempdir(), \"system_nlmixr2.R\"))"},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"getting-your-model-in-nonmem-format","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Getting your model in NONMEM format","title":"Howtos","text":"model rxode2 format can convert NONMEM format babelmixr2 package (via ruminate package). need least one inter-individual variability term. can system file delimiter. example using model piping. specify typical value Vc, parameter TV_Vc, error lognormally distributed. add IIV term eta_Vc. Next just need load ruminate package (>=0.2.4) use rx2other() function create NONMEM control stream:","code":"my_model = my_model |> model({Vc = exp(TV_Vc + eta_Vc)}) library(ruminate) my_model_nm = rx2other(my_model, out_type=\"nonmem\")"},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"getting-your-model-in-monolix-format","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Getting your model in Monolix format","title":"Howtos","text":"can also get model Monolix specifying monolix output type:","code":"my_model_mlx = rx2other(my_model, out_type=\"monolix\")"},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"further-reading","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Further reading","title":"Howtos","text":"discussion topic see following: https://github.com/nlmixr2/babelmixr2/issues/107","code":""},{"path":"https://r.ubiquity.tools/articles/Howto.html","id":"models-in-different-formats","dir":"Articles","previous_headings":"Working with rxode2, nlmixr2, NONMEM, and Monolix","what":"Models in different formats","title":"Howtos","text":"ubiquity rxode2 script rxode2 object NONMEM Monolix Contents system_2cmt.txt file: Contents system_nlmixr2.R file produced system_fetch_template(): my_model object: file containing control stream found : my_model_nm$files$ctl$fn_full. file containing mlxtran output found : my_model_mlx$files$mlxtran$fn_full","code":"# Two compartment model with absorption compartment (At). The central # compartment (Cc) had a volume (Vc), and the tissue compartment (Cp) has a # volume (Vt). The system is parameterized in terms of macro constants (Q and # CL) # # While the the default dosing is a 1 mg IV dose into the central compartment, # the model is written to accept dosing into an absorption compartment and # through continuous IV infusion. # _________ # | | # | At | # | | # |_________| # | # | ka, fb # | # V # _________ _________ # | | Q | | # | Cc |------>| Cp | # | Vc |<------| Vt | # |_________| |_________| # | # | CL # | # V # # System Units: # # mass [=] mg # volume [=] ml # concentration [=] mg/ml # time [=] hr # #-------------# # | Parameters | # #-------------# # # System parameters # name value lower upper units editable grouping # bound bound

    Vc 1.0 eps Inf ml yes System

    Vt 1.0 eps Inf ml yes System

    CL 1.0 eps Inf ml/hr yes System

    Q 1.0 eps Inf ml/hr yes System

    ka 1.0 eps Inf 1/hr yes System

    fb 1.0 eps Inf -- yes System # Bolus Events # ------------ # times/events state values scale units ; [ 0 ]; 1; hours ; Cc; [1.0 ]; 1/Vc; mg ; At; [0.0 ]; 1; mg # Infusion Rates # ------------ # name time/levels values scale units ; times; [0]; 1; hours ; levels; [0]; 1; mg/hour -ka*At ka*At*fb/Vc - CL/Vc*Cc -Q*(Cc-Cp)/Vc + Dinf/Vc +Q*(Cc-Cp)/Vt Cc_mg_ml = Cc prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf ng/ml yes Variance add=add_err; prop=prop_err 1.0 1.0/24 # # # my_model <- function() { ini({ # Typical Value of System Parameters TV_Vc = c(.Machine$double.eps, 1.0, Inf) TV_Vt = c(.Machine$double.eps, 1.0, Inf) TV_CL = c(.Machine$double.eps, 1.0, Inf) TV_Q = c(.Machine$double.eps, 1.0, Inf) TV_ka = c(.Machine$double.eps, 1.0, Inf) TV_fb = c(.Machine$double.eps, 1.0, Inf) # Between-subject variability: # Error model parameters prop_err = c(.Machine$double.eps, 0.1, .Machine$double.xmax) add_err = c(.Machine$double.eps, 0.1, .Machine$double.xmax) }) model({ # System Parameters Vc = TV_Vc Vt = TV_Vt CL = TV_CL Q = TV_Q ka = TV_ka fb = TV_fb # Placeholders for infusion rates. # These should be defined in the dataset. # time scale: 1 units: (hours) # mass scale: 1 units: (mg/hour) Dinf = 0.0 # Defining ODEs d/dt(At) = (-ka*At) d/dt(Cc) = (ka*At*fb/Vc - CL/Vc*Cc -Q*(Cc-Cp)/Vc + Dinf/Vc) d/dt(Cp) = (+Q*(Cc-Cp)/Vt) # Outputs and error models Cc_mg_ml = Cc Cc_mg_ml ~ add(add_err) + prop(prop_err) }) } 
[36m──
[39m 
[1mrxode2-based free-form 3-cmt ODE model
[22m 
[36m──────────────────────────────────────
[39m ── 
[1m
[1mInitalization:
[1m
[22m ── 
[1mFixed Effects
[22m (
[1m
[34m$theta
[39m
[22m): TV_Vc TV_Vt TV_CL TV_Q TV_ka TV_fb prop_err add_err 1.0 1.0 1.0 1.0 1.0 1.0 0.1 0.1 
[1mOmega
[22m (
[1m
[34m$omega
[39m
[22m): eta_Vc eta_Vc 1 
[1m States
[22m (
[1m
[34m$state
[39m
[22m or 
[1m
[34m$stateDf
[39m
[22m): Compartment Number Compartment Name 1 1 At 2 2 Cc 3 3 Cp ── 
[1m
[1m
[1m
[1mμ-referencing
[1m
[1m (
[1m
[1m
[34m$muRefTable
[39m
[1m
[1m):
[1m
[22m ── theta eta level 1 TV_Vc eta_Vc id ── 
[1m
[1mModel (Normalized Syntax):
[1m
[22m ── function() { ini({ TV_Vc <- c(2.22044604925031e-16, 1) TV_Vt <- c(2.22044604925031e-16, 1) TV_CL <- c(2.22044604925031e-16, 1) TV_Q <- c(2.22044604925031e-16, 1) TV_ka <- c(2.22044604925031e-16, 1) TV_fb <- c(2.22044604925031e-16, 1) prop_err <- c(2.22044604925031e-16, 0.1) add_err <- c(2.22044604925031e-16, 0.1) eta_Vc ~ 1 }) model({ Vc <- exp(TV_Vc + eta_Vc) Vt = TV_Vt CL = TV_CL Q = TV_Q ka = TV_ka fb = TV_fb Dinf = 0 d/dt(At) = (-ka * At) d/dt(Cc) = (ka * At * fb/Vc - CL/Vc * Cc - Q * (Cc - Cp)/Vc + Dinf/Vc) d/dt(Cp) = (+Q * (Cc - Cp)/Vt) Cc_mg_ml = Cc Cc_mg_ml ~ add(add_err) + prop(prop_err) }) } $PROBLEM translated from babelmixr2 ; comments show mu referenced model in ui$getSplitMuModel $DATA my_model.csv IGNORE=@ $INPUT ID TIME EVID AMT DV CMT RXROW $SUBROUTINES ADVAN13 TOL=6 ATOL=12 SSTOL=6 SSATOL=12 $MODEL NCOMPARTMENTS=3 COMP(AT, DEFDOSE) ; At COMP(CC) ; Cc COMP(CP) ; Cp $PK MU_1=THETA(1) VC=DEXP(MU_1+ETA(1)) ; Vc <- exp(TV_Vc) VT=THETA(2) ; Vt <- TV_Vt CL=THETA(3) ; CL <- TV_CL RXR1=THETA(4) ; Q <- TV_Q KA=THETA(5) ; ka <- TV_ka FB=THETA(6) ; fb <- TV_fb $DES DINF=0 ; Dinf = 0 DADT(1) = (- KA*A(1)) ; d/dt(At) = (-ka * At) DADT(2) = (KA*A(1)*FB/VC-CL/VC*A(2)-RXR1*(A(2)-A(3))/VC+DINF/VC) ; d/dt(Cc) = (ka * At * fb/Vc - CL/Vc * Cc - Q * (Cc - Cp)/Vc + Dinf/Vc) DADT(3) = (RXR1*(A(2)-A(3))/VT) ; d/dt(Cp) = (Q * (Cc - Cp)/Vt) CC_MG_ML=A(2) ; Cc_mg_ml = Cc $ERROR ;Redefine LHS in $DES by prefixing with on RXE_ for $ERROR RXE_DINF=0 ; Dinf = 0 RXE_CC_MG_ML=A(2) ; Cc_mg_ml = Cc RX_PF1=RXE_CC_MG_ML ; rx_pf1 ~ Cc_mg_ml ; Write out expressions for ipred and w RX_IP1 = RX_PF1 RX_P1 = RX_IP1 W1=DSQRT((THETA(8))**2+(RX_PF1)**2*(THETA(7))**2) ; W1 ~ sqrt((add_err)^2 + (rx_pred_f_)^2 * (prop_err)^2) IF (W1 .EQ. 0.0) W1 = 1 IPRED = RX_IP1 W = W1 Y = IPRED + W*EPS(1) $THETA (2.2204e-16, 1 ) ; 1 - TV_Vc (2.2204e-16, 1 ) ; 2 - TV_Vt (2.2204e-16, 1 ) ; 3 - TV_CL (2.2204e-16, 1 ) ; 4 - TV_Q (2.2204e-16, 1 ) ; 5 - TV_ka (2.2204e-16, 1 ) ; 6 - TV_fb (2.2204e-16, 0.1) ; 7 - prop_err (2.2204e-16, 0.1) ; 8 - add_err $OMEGA 1 ; eta_Vc $SIGMA 1 FIX $ESTIMATION METHOD=1 INTER MAXEVALS=100000 SIGDIG=3 SIGL=12 PRINT=1 NOABORT $COVARIANCE $TABLE ID ETAS(1:LAST) OBJI FIRSTONLY ONEHEADER NOPRINT FORMAT=s1PE17.9 NOAPPEND FILE=my_model.eta $TABLE ID TIME IPRED PRED RXROW ONEHEADER NOPRINT FORMAT=s1PE17.9 NOAPPEND FILE=my_model.pred [FILEINFO] file='my_model-monolix.csv' delimiter = comma header = {ID, TIME, EVID, AMT, DV, ADM, nlmixrRowNums} [CONTENT] ID = {use=identifier} TIME = {use=time} EVID = {use=eventidentifier} AMT = {use=amount} DV = {use=observation, name=rx_prd_Cc_mg_ml, type=continuous} ADM = {use=administration} [INDIVIDUAL] input={Vc_pop, omega_Vc, Vt_pop, CL_pop, Q_pop, ka_pop, fb_pop} DEFINITION: Vc = {distribution=logNormal, typical=Vc_pop, sd=omega_Vc} Vt = {distribution=normal, typical=Vt_pop, no-variability} CL = {distribution=normal, typical=CL_pop, no-variability} Q = {distribution=normal, typical=Q_pop, no-variability} ka = {distribution=normal, typical=ka_pop, no-variability} fb = {distribution=normal, typical=fb_pop, no-variability} [LONGITUDINAL] input={add_err, prop_err} file='my_model-monolix.txt' DEFINITION: rx_prd_Cc_mg_ml={distribution = normal, prediction = rx_pred_Cc_mg_ml, errorModel=combined2(add_err,prop_err)} data={rx_prd_Cc_mg_ml} model={rx_prd_Cc_mg_ml} Vc_pop={value=2.71828182845905, method=MLE} Vt_pop={value=1, method=MLE} CL_pop={value=1, method=MLE} Q_pop={value=1, method=MLE} ka_pop={value=1, method=MLE} fb_pop={value=1, method=MLE} prop_err={value=0.1, method=MLE} add_err={value=0.1, method=MLE} omega_Vc={value=1, method=MLE} [TASKS] populationParameters() individualParameters(method = {conditionalMode}) fim(method = StochasticApproximation) logLikelihood(method = ImportanceSampling) plotResult(method = {outputplot, indfits, obspred, residualsscatter, residualsdistribution, parameterdistribution, covariatemodeldiagnosis, randomeffects, covariancemodeldiagnosis, saemresults}) [SETTINGS] GLOBAL: exportpath = 'my_model-monolix' POPULATION: exploratoryautostop = no smoothingautostop = no burniniterations = 5 exploratoryiterations = 250 simulatedannealingiterations = 250 smoothingiterations = 200 exploratoryalpha = 0 exploratoryinterval = 200 omegatau = 0.95 errormodeltau = 0.95"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Analysis of Static In Vitro System","text":"tutorial requires ubiquity 2.04 greater. Currently available using development version github Sometimes need analyze data independent variable time. can ubiquity tutorial highlight done. done already, please review naive-pooled parameter estimation tutorial build concepts covered . workshop (workshop.ubiquity.tools) provides example analyize static vitro data. make copy scripts supporting files current working directory run following: create following files current working direcotry: system-in_vitro.txt - System file can run vivo vitro in_vitro_er_data.csv- vitro data file mk_data_in_vitro.R- Script generate vitro data analysis_in_vitro.R- Script perform parameter estimation using vitro data example uses system Chakraborty Jusko. J Pharm Sci 91(5), 1334-1342. Specifically equation 5 article effect two drugs, B, driven concentrations (C_A, C_B): E = 100 \\left( 1- \\frac{ \\frac{I_{max,}(C_A) ^{\\gamma_A}}{(\\Psi IC_{50,})^{\\gamma_A}} + \\frac{I_{max,B}(\\xi C_B)^{\\gamma_B}}{(\\Psi IC_{50,B})^{\\gamma_B}} \\\\ + (I_{max,} + I_{max,B} + I_{max,} I_{max,B}) \\\\ \\times \\frac{(C_A) ^{\\gamma_A}}{(\\Psi IC_{50,})^{\\gamma_A}} \\times \\frac{(\\xi C_B)^{\\gamma_B}}{(\\Psi IC_{50,B})^{\\gamma_B}} \\\\ }{ \\frac{(C_A) ^{\\gamma_A}}{(\\Psi IC_{50,})^{\\gamma_A}} + \\frac{(\\xi C_B)^{\\gamma_B}}{(\\Psi IC_{50,B})^{\\gamma_B}} \\\\ +\\frac{(C_A) ^{\\gamma_A}}{(\\Psi IC_{50,})^{\\gamma_A}} \\times \\frac{(\\xi C_B)^{\\gamma_B}}{(\\Psi IC_{50,B})^{\\gamma_B}} +1 } \\right) \\xi = \\frac{IC_{50,}}{IC_{50,B}} implemented PKPD system file (system-in_vitro.txt) shown bottom. implementation dynamic meaning effect changes PK drug. However effect considered instantaneous typically analyzed vitro data using algebraic relationships. system consider following data: concentrations drug B altered (independent variable) Effect measured (dependent variable).","code":"library(ubiquity) fr = workshop_fetch(section=\"In Vitro\", overwrite=TRUE)"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"the-sysem-file-system-in_vitro-txt","dir":"Articles","previous_headings":"","what":"The sysem file: system-in_vitro.txt","title":"Analysis of Static In Vitro System","text":"First lets discuss way system file structured. bolus dosing PK specified, initial conditions effect compartments also defined terms system parameters: system parameters (C_A0 C_B0) default value zero. default system run like vivo PKPD system. initial condition placeholders used performing vitro analyses. allows use system file vitro vivo analyses. useful static vitro analysis one system file copy paste vivo dynamic system.","code":" Cp_A = C_A0 Cp_B = C_B0"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"the-dataset-in_vitro_er_data-csv","dir":"Articles","previous_headings":"","what":"The dataset: in_vitro_er_data.csv","title":"Analysis of Static In Vitro System","text":"table contains snapshot relevant columns dataset: C_A0 C_B0 Effect treat samp_time 0.001 0.1 102.15401 A_0_001_B_0_1 1 0.001 0.1 100.78589 A_0_001_B_0_1 1 0.001 0.1 91.14621 A_0_001_B_0_1 1 0.001 100 93.38012 A_0_001_B_100 1 0.001 100 91.03467 A_0_001_B_100 1 0.001 100 86.20118 A_0_001_B_100 1 0.001 500 51.76744 A_0_001_B_500 1 0.001 500 48.95016 A_0_001_B_500 1 0.001 500 52.68611 A_0_001_B_500 1 0.001 1000 28.46122 A_0_001_B_1000 1 C_A0 C_B0 columns correspond concentrations elicit Effect. treat column unique name combination two drug combinations. letters numbers underscores. intentional can use cohort name ’m constructing estimation script . samp_time column set 1. arbitrary mapping cohort definitions requires time column. ’ll see arbitrary .","code":""},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"the-analysis-script-analysis_in_vitro-r","dir":"Articles","previous_headings":"","what":"The analysis script: analysis_in_vitro.R","title":"Analysis of Static In Vitro System","text":"analysis scripts aspects unique vitro analysis performed.","code":""},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"output-times","dir":"Articles","previous_headings":"The analysis script: analysis_in_vitro.R","what":"Output times","title":"Analysis of Static In Vitro System","text":"First output times. run simulations (happens performing parameter estimation) output times results slower simulations. important include ncesssary output times. case two output times (0 1): final value 1 chosen corresponds time column (samp_time) analysis dataset.","code":"cfg=system_set_option(cfg, group = \"simulation\", option = \"output_times\", seq(0,1,1))"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"making-a-dynamic-simulation-static","dir":"Articles","previous_headings":"The analysis script: analysis_in_vitro.R","what":"Making a dynamic simulation static:","title":"Analysis of Static In Vitro System","text":"Next set simulation option dynamic FALSE: fix values differential equations 0 purposes subsequent simulations.","code":"cfg=system_set_option(cfg, group = \"simulation\", option = \"dynamic\", value = FALSE)"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"datasets","dir":"Articles","previous_headings":"The analysis script: analysis_in_vitro.R","what":"Datasets","title":"Analysis of Static In Vitro System","text":"dataset reading dataframe loading way. done dataset used internally ubiqiuty also construct analysis :","code":"er_data = readr::read_csv(\"in_vitro_er_data.csv\") cfg = system_load_data(cfg, dsname = \"er_data\", data_file = er_data)"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"defining-cohorts","dir":"Articles","previous_headings":"The analysis script: analysis_in_vitro.R","what":"Defining cohorts","title":"Analysis of Static In Vitro System","text":"estimation tutorial cohorts defined individually. rather tedious. See need cohort every unique combination C_A0 C_B0 dataset. going loop unique value treat column create cohort. variable tmp_treat contains value current treatment first thing get records current treatment: subset data used define initial condition parameters current cohort using cp field (see help system_define_cohort() information option). way treat column constructed can use cohort name. allow us link simulated output original dataset post processing section . inputs set NULL change dosing. set simulation option dynamic FALSE, initial condition set values current treatment, inputs, system effectively behaving like vitro system.","code":"treat_recs = dplyr::filter(er_data, treat == tmp_treat) cohort = list( name = tmp_treat, cf = list( treat = c(tmp_treat)), cp = list( C_A0 = treat_recs$C_A0[1], C_B0 = treat_recs$C_B0[1]), inputs = NULL, outputs = NULL, dataset = \"er_data\")"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"postprocessing","dir":"Articles","previous_headings":"The analysis script: analysis_in_vitro.R","what":"Postprocessing","title":"Analysis of Static In Vitro System","text":"rely normal figure generation reporting elements. example can take simulated output estimation erp original data dataset er_data create meaningful VPCs. can link two datasets using treat column original dataset COHORT column erp$pred:","code":"df_orig = er_data |> dplyr::select(C_A0, C_B0, ave_eff, treat) |> dplyr::distinct() df_est = erp$pred |> dplyr::filter(!SMOOTH) |> dplyr::rename(treat = COHORT) df_plot = dplyr::full_join(df_est, df_orig, by=\"treat\") |> dplyr::mutate(C_B0 = as.factor(C_B0)) library(ggplot2) p = ggplot(data=df_plot) + geom_point(aes(x=C_A0, y=OBS, group=C_B0, color=C_B0)) + geom_line(aes(x=C_A0, y=PRED, group=C_B0, color=C_B0)) + scale_x_log10()"},{"path":"https://r.ubiquity.tools/articles/In_Vitro.html","id":"contents-of-system-in_vitro-txt","dir":"Articles","previous_headings":"","what":"Contents of system-in_vitro.txt","title":"Analysis of Static In Vitro System","text":"","code":"# Author: John Harrold # # Analysis of an in vitro system. The system below was taken from: # # Chakraborty A, Jusko WJ. Pharmacodynamic interaction of recombinant human # interleukin-10 and prednisolone using in vitro whole blood lymphocyte # proliferation. J Pharm Sci. 2002 May;91(5):1334-42. doi: 10.1002/jps.3000. # PMID: 11977109. # # #-------------# # | Parameters | # #-------------# # # System parameters # name value lower upper units editable grouping # bound bound

    IC50_A 1.0 eps Inf ----- yes Efficacy

    IC50_B 50.0 eps Inf ----- yes Efficacy

    Imax_A 1.0 eps Inf ----- yes Efficacy

    Imax_B 1.0 eps Inf ----- yes Efficacy

    PSI 10.0 eps Inf ----- yes Efficacy

    G_A 0.6 eps Inf ----- yes Efficacy

    G_B 1.4 eps Inf ----- yes Efficacy

    Vp_A 1.0 eps Inf ml yes PK

    CL_A 1.0 eps Inf ml/hr yes PK

    Vp_B 1.0 eps Inf ml yes PK

    CL_B 1.0 eps Inf ml/hr yes PK

    C_A0 0.0 eps Inf ----- yes IC

    C_B0 0.0 eps Inf ----- yes IC # #-------------------# # |Input Information | # #-------------------# # # Bolus Events # ------------ # times/events state values scale units ; [ 0 ]; 1.0; hours ; Cp_A; [1.0 ]; 1.0/Vp_A; mg ; Cp_B; [1.0 ]; 1.0/Vp_B; mg # By default these values are zero but can be overwritten when # doing analysis of in vitro data. Cp_A = C_A0 Cp_B = C_B0 XI = IC50_A/IC50_B COMP_A = SIMINT_POWER[Cp_A][G_A]/(SIMINT_POWER[PSI*IC50_A][G_A]) COMP_B = SIMINT_POWER[XI*Cp_B][G_B]/(SIMINT_POWER[PSI*IC50_A][G_B]) COMP_Imax = Imax_A + Imax_B - Imax_A*Imax_B EFF_num = Imax_A*COMP_A + Imax_B*COMP_B + COMP_Imax*COMP_A*COMP_B EFF_den = COMP_A + COMP_B + COMP_A*COMP_B + 1.0 EFF = 100.0*(1.0-EFF_num/EFF_den) # #-----------------------------# # | ODEs, and State Information | # #-----------------------------# CL_A/Vp_A*Cp_A CL_B/Vp_B*Cp_B # #---------# # | Outputs | # #---------# Cp_A_mg_ml = Cp_A Cp_B_mg_ml = Cp_B Effect = EFF # #---------# # | Options # # #---------# # specify different time scales 1.0"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Modeling Language","text":"core, ubiquity modeling language set scripts meant facilitate model development deployment. focus document model description language. plain text file, referred system file. line contains descriptor (e.g. 

    ) defines aspect model, comments made hash sign (#). follows overview different components language can used create system file.","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"system-parameters-p","dir":"Articles","previous_headings":"Parameters","what":"System parameters

    ","title":"Modeling Language","text":"system parameter specified name, value, lower bound, upper bound, units, whether editable ShinyApp ‘type’ parameter (grouping ShinyApp). values eps (machine precision, smallest value zero) inf (infinity) can used. example specify parameter koffR value .1 positive parameter KDR value .04 also positive following used:","code":"# name value lb ub units editable type

    koffR 0.1 eps inf 1/hr yes Target

    KDR 0.04 eps inf nM yes Target"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"parameter-sets","dir":"Articles","previous_headings":"Parameters","what":"Parameter sets","title":"Modeling Language","text":"Often model developed incorporate different situations scenarios. example, model may used describe healthy diseased individuals. differences simply parametric nature, can cumbersome code model multiple times (parameterization). framework provides mechanism including multiple parameterizations withing system file. Consider system want describe antibody disposition. humans described two compartment model, mice single compartment needed. First create set parameters describing human scenario. mean parameters taken literature [DM]: parameter created using

    descriptor part default parameter set. short name1 parameter set. longer verbose name can given well, seen ShinyApp. human parameter set can labeled using PSET descriptor following way: default parameter set short name name, “mAb Human” value shown user ShinyApp. Next, add parameterization mice simply create new set following way: alone create new parameter set short name mouse, exact copy default parameter set. identify parametric differences mouse human use PSET following way: Consider clearance parameter entry want murine half-life antibody [VR]: use set name (mouse) parameter name (CL) overwrite default specified value 7.71e-6. aspects parameter (bounds, edit flag, etc.) default value.","code":"

    Weight 70.0 eps inf kg yes System # Organism weight

    CL 0.0129 eps inf L/hr yes System # Systemic Clearance

    Q 0.0329 eps inf L/hr yes System # Inter-compartmental clearance

    Vp 3.1 eps inf L yes System # Vol. central compartment

    Vt 2.8 eps inf L yes System # Vol. peripheral compartment mAb in Human mAb in Mouse 0.020 # 20 gram mouse 7.71e-6 0.0 1.6e-3 1 # arbitrary 7.71e-6"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"secondary-parameters-as-and-ad","dir":"Articles","previous_headings":"Parameters","what":"Secondary parameters and ","title":"Modeling Language","text":"static secondary parameter refers parameter change simulation. specified using <> descriptor can written terms system parameters previously defined static secondary parameters. can used differential equations, defining initial conditions, input scaling model outputs. similar secondary parameters defined $PK block NONMEM. example, wanted define rate elimination terms system parameters clearance CL volume distribution Vp following used: dynamic secondary parameters refers parameter can change simulation. typically means defined, using descriptor, terms state another dynamic secondary parameter. can used differential equations model outputs. similar parameters defined $DES block NONMEM. example wanted use concentration central compartment Cp dependent amount compartment Ap volume compartment Vp following used:","code":" kel = CL/Vp Cp = Ap/Vp"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"variance-parameters-vp","dir":"Articles","previous_headings":"Parameters","what":"Variance parameters ","title":"Modeling Language","text":"Variance parameters specified using format system parameters (

    ) : difference descriptor used grouping set Variance. used performing parameter estimation simulating residual variability.","code":"# name value lower_bound upper_bound units editable grouping SLOPE 0.01 eps inf 1/hr yes Variance"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"parameter-estimation-information-est","dir":"Articles","previous_headings":"Parameters","what":"Parameter estimation information ?","title":"Modeling Language","text":"Currently applies nlmixr2/rxode2. Essentially parameters listed fixed. descriptor specifies information parameters estimation. Sometimes necessary estimate parameters log space. can specify parmaeters log transform (LT). wanted log transform parameters P1, P2, P3 following: NOTE Monolix outputs work correctly need logtransform parameters log-normal IIV assigned. default parameters specified estimation. want estimate subset parameters (P), say P1 P2, can use following:","code":" P1; P2; P3 P1; P2"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"output-error-model-oe","dir":"Articles","previous_headings":"Parameters","what":"Output error model ?","title":"Modeling Language","text":"Current applies nlmixr2/rxode2 output. defines output error model format: OUTPUT can name output defined . expression model type (add additive, prop proportional) equal sign name variance paramter () use. use one error model type separate statments ; example define variance parameters add_err prop_err want use proportional error model output Cp use: use additive proportional error following work:","code":"` expression` prop=prop_err add=add_err; prop=prop_err"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"variability-defining-the-variancecovariance-matrix-iiv-iivcor","dir":"Articles","previous_headings":"Parameters","what":"Variability: defining the variance/covariance Matrix ? & ?","title":"Modeling Language","text":"variable name assigned inter-individual variability (IIV) correlation/covariance (IIVCOR) term makes sense user may used. following sample codes variable names (eg: ETACL) likely make sense population modeler NONMEM user. define IIV term named ETACL variance 0.15 use following: next need associate IIV term system parameter. associate IIV term clearance (system parameter CL) specify log normal distribution (LN) simply write: Alternatively normal (N) distribution can used. Next specify IIV term ETAV variance 0.1. IIV term also log normal distribution applied parameter V: Now can define covariance (-diagonal elements) CL V 0.01 using: order isn’t important IIV terms can reversed","code":" 0.15 CL 0.10 V 0.01"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"iiv-and-parameter-sets-iivset-iivcorset","dir":"Articles","previous_headings":"Parameters","what":"IIV and parameter sets ? & ?","title":"Modeling Language","text":"default parameter sets inter individual variability specified using descriptors. associate specific set IIVs parameter set use descriptors. set descriptors operate differently parameter set descriptors (). just overwrites default values inherits default variance/covariance information. alter IIV information parameter set reset IIV information parameter set. entire variance covariance matrix need specified parameter set. parameter set MYPSET defined following used define IIV parameters Q CL: system parameters IIV information parameter set.","code":" 0.05 Q 0.25 CL 0.01"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"differential-equations","dir":"Articles","previous_headings":"","what":"Differential equations","title":"Modeling Language","text":"differential equations system can defined simply writing . Alternative can ‘built’ using different descriptors provided . Part flexibility ubiquity lies ability combine different notations. construct model (see section : Bringing together) combination five following methods can used: Differential equations Reaction rates =?=> Equilibrium relationships <=kforward:kreverse=> Sources sinks Movement compartments ","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"writing-odes-ode","dir":"Articles","previous_headings":"Differential equations","what":"Writing ODEs ","title":"Modeling Language","text":"Portions differential equations can specified ? state compartment. define dA/dT koffR*C - konR**B write: might convenient specify ODE across several lines, making things readable. Just use multiple statements appended together. give result example :","code":" koffR*C - konR*A*B koffR*C - konR*A*B"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"rate-equations","dir":"Articles","previous_headings":"Differential equations","what":"Rate equations =?=>","title":"Modeling Language","text":"may convenient write chemical reactions rather differential equations. can done using general form: stoichiometric coefficients, beginning CR CP , brackets need specified one. reaction order assumed equal stoichiometric coefficient reactant. specific example Consider decomposition hydrogen peroxide water oxygen: H_2O_2 \\xrightarrow{k_{deg}} H_2O + \\frac{1}{2}O_2 system format written following manner: translated following differential equations: \\frac{dH_2O_2}{dt}=-k_{deg}H_2O_2 \\\\ \\frac{dH_2O}{dt}= k_{deg}H_2O_2 \\\\ \\frac{dO_2}{dt}= 0.5k_{deg}H_2O_2 also defined differential equations using ?. equivalent: rates (e.g. kdeg) need defined either system secondary parameter. can put saturable terms, Michaelis-Menten kinetics.","code":"[CR1]Reactant1 + [CR2]Reactant2 + ... =kf=> [CP1]Product1 + [CP2]Product2 + ... H2O2 =kdeg=> H2O + [0.5]O2 - kdeg*H2O2 kdeg*H2O2 0.5*kdeg*H2O2"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"equilibrium-relationships-kforwardkreverse","dir":"Articles","previous_headings":"Differential equations","what":"Equilibrium relationships <=kforward:kreverse=>","title":"Modeling Language","text":"Forward reverse reaction rates can written separately: can written equilibrium equations forward (konR) reverse (koffR) rates specified : specify reaction differential equations, following also used: stoichiometric coefficients also define reaction order . example, create following equilibrium reaction: 2A + 3B \\mathop{\\rightleftarrows}^{\\mathrm{k_f}}_{\\mathrm{k_r}} 4C rate notation used system file: produce following terms differential equations: \\frac{dA}{dt} = 2k_rC^4 - 2k_fA^2B^3 \\\\ \\frac{dB}{dt} = 3k_rC^4 - 3k_fA^2B^3 \\\\ \\frac{dC}{dt} =-4k_rC^4 + 4k_fA^2B^3 write equilibrium reaction differential equations following used: See generic functions SIMINT_POWER[][].","code":"A + B =konR=> C C =koffR=> A + B A + B <=konR:koffR=> C koffR*C - konR*A*B koffR*C - konR*A*B -koffR*C + konR*A*B [2]A + [3]B <=kf:kr=> [4]C = 2*kr*SIMINT_POWER[C][4] - 2*kf*SIMINT_POWER[A][2]*SIMINT_POWER[B][3] = 3*kr*SIMINT_POWER[C][4] - 3*kf*SIMINT_POWER[A][2]*SIMINT_POWER[B][3] = -4*kr*SIMINT_POWER[C][4] + 4*kf*SIMINT_POWER[A][2]*SIMINT_POWER[B][3]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"sources-and-sinks-s","dir":"Articles","previous_headings":"Differential equations","what":"Sources and sinks ","title":"Modeling Language","text":"method allows turnover described terms synthesis degradation terms. produced rate ksynA (mass quantities), degraded rate kdegA, modeled concentration units sources specified left hand side sinks (elimination) specified left hand side . Multiple sources sinks can separated semicolons. example compartment volume V writing differential equation:","code":"ksynA/V kdeg*A koffR*C - konR*A*B + ksynA/V - kdeg*A"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"movement-between-compartments-c","dir":"Articles","previous_headings":"Differential equations","what":"Movement between compartments ","title":"Modeling Language","text":"mass moves two physical spaces different volumes need specify, compartment, species, volume rate transport. descriptor allows us just identify compartment information separated semicolons (order important) movement central compartment volume V tissue space volume Vt rates kps ksp respectively specified following manner: equivalent following differential equation:","code":"Species; Volume; Rate Species; Volume; Rate A; V; kps At; Vt; ksp -kps*A + ksp*At*Vt/V +kps*A*V/Vt - ksp*At"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"bringing-it-all-together","dir":"Articles","previous_headings":"","what":"Bringing it all together","title":"Modeling Language","text":"final example consider target-mediated drug disposition system . system can defined set ODES: simply defined terms underlying processes:","code":" Cp*kpt*Vp/Vt - Ct*ktp -Cp*kpt + Ct*ktp*Vt/Vp - kel*Cp + koff*CpTp - kon*Cp*Tp + ksyn/Vp - kint*Tp + koff*CpTp - kon*Cp*Tp - kint*CpTp - koff*CpTp + kon*Cp*Tp # tissue distribution Ct; Vt; ktp Cp; Vp; kpt # equilibrium Cp + Tp <=kon:koff=> CpTp # Turnover ksyn/Vp kint*Tp kel*Cp kint*CpTp"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"initial-conditions-i","dir":"Articles","previous_headings":"Bringing it all together","what":"Initial conditions ","title":"Modeling Language","text":"default initial conditions zero. can specify non-zero initial condition using <> string set ‘state’ ‘value’ Value can combination numbers, system parameters

    static secondary parameters <. Consider turnover system value ksyn kdeg specified parameters: can calculate initial value target : can specify initial value target :","code":" state = value

    ksyn 0.1 eps inf 1/hr yes Target

    kdeg 0.04 eps inf nM yes Target T_IC = ksyn/kdeg T = T_IC"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Modeling Language","text":"Inputs model include typical interventions bolus dosing continuous infusions. However inputs refers mathematical inputs. Typically covariates may attributes system (gender, specific genotype), treated inputs. defining inputs necessary provide typical/placeholder values. provide default values ShinyApp interface well scripting level (Matlab R) can overwritten user.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"bolus-dosing-btimes-bevents","dir":"Articles","previous_headings":"Model inputs","what":"Bolus dosing , ","title":"Modeling Language","text":" descriptor used define bolus dosing. Dosing information broken list times bolus injections occur list events containing amount specified compartment receive. scale used convert bolus dosing information proscribed units (mg daily) units system coded (mg/mL hours). dosing done days 0, 1, 2… simulation time hours, scale dosing times 24.events contain magnitude bolus given time. want dose central compartment Cp mg/kg central compartment mg/mL need scale body weight (e.g. 70 kg) volume central compartment (system static secondary parameter Vp) scale 70/Vp. just want create palceholder can following: want setup default dosing shiny app scripts, can somethign complicated. multiple compartments receiving bolus, times must include times bolus may applied system. state receive bolus particular time, magnitude time 0. illustrate consider following dosing schedule: example want dose two different drugs two different states/compartments. Drug 1 (D1) dosed Cp1 drug 2 (D2) Cp2. Dosing mg/kg concentrations mg/ml. dosing time days, simulation time units hours. dosing D1 8 & 2 mpk days 0 & 6. D2 dosed 5 mpk day 9. Assume V1 V2 compartmental volumes D1 D2 ml, subject body weight 70 kg. convert doses mpk mg/ml. default doses can overwritten ShinyApp within scripts.","code":"# type state values scale units ; [0]; 24; days ; Cp; [0]; 70/Vc; mpk # type state values scale units ; [0 6 9]; 24; days ; Cp1; [8 2 0]; 70/V1; mpk ; Cp2; [0 0 5]; 70/V2; mpk"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"continuous-infusions-r","dir":"Articles","previous_headings":"Model inputs","what":"Continuous infusions ","title":"Modeling Language","text":"Rates infusion defined using descriptor. Like bolus values, infusion rates two components. component specifies switching times (e.g. switching 10 mg/hr 0). switching time corresponding rate infusion. infusion rate held constant next time. Also like bolus specification scale associated infusion times levels converts proscriptive units units simulation. Consider following example: two entries create infusion rate called myrate. can used system specifications (e.g., myrate/Vp). first row specifies times rate changed (0 30 minutes). system coded terms hours, scale 1/60 must used. levels indicate rate 1 mg/min switched 30 minutes. converted mg/hr using scale 60. can add many paired rate entries need describe many infusion interventions necessary. Note: just want placeholder can just set values [0].","code":"# name time/levels values scale units ; times; [0 30]; 1/60; min ; levels; [1 0]; 60; mg/min"},{"path":[]},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"simple-covariates","dir":"Articles","previous_headings":"Model inputs","what":"Simple covariates","title":"Modeling Language","text":"simulation purposes covariates (normally found dataset) need defined. Covariates can either constant change time. times values must scale system. following defines value covariate RACE: Covariates can also change time. case consider subject weight (WGT). begins 70 measurements made several time points. Next can alter simulations interpret values setting type covariate. default weight linearly interpolated (type = linear), however can hold weight constant next measurement encountered (last value carried forward) declaring type step Now model parameterized male female subjects can define two parameter sets (described ) account : values covariate can changed set ‘female’:","code":"; times; [0]; hours ; values; [1]; ethnicity ; times; [ 0 1680 3360 5040 10080]; hours ; values; [70 65 60 58 56]; kg step Male Female ; times; [ 0 1680 3360 10080] ; values; [60 55 52 50]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"complicated-covariates","dir":"Articles","previous_headings":"Model inputs","what":"Complicated covariates","title":"Modeling Language","text":"Detailed time course profiles can created well. example, create covariate profile zero time 0-1 time 1 jumps 8 decreases rate 1 per unit time time 5 stays value 4 time 12. might profile like following:","code":"# name time/values values units ; times; [0 .999 1 5 12]; hours ; values; [0 0 8 4 4 ]; -- linear"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"model-outputs","dir":"Articles","previous_headings":"","what":"Model outputs","title":"Modeling Language","text":"Outputs defined terms states, parameters, secondary parameters, input rates, covariates listed . format used : example: Outputs begin QC, like QC_CLtot , displayed ShinyApp. intended make available scripting level quality control (QC) purposes.","code":" name = expression A_obs = A Coverage = A/(KD + A) QC_CLtot = Cp*CL/Vp + Cp*Vmax/(Km+Cp)"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"functions-and-operators","dir":"Articles","previous_headings":"","what":"Functions and operators","title":"Modeling Language","text":"standard operators behave expected (+, -, *, & /) languages use consistently. however certain operators functions differ languages. example, consider power function (^b). FORTRAN **b, Matlab ^b, C pow(,b). Given objectives (write create multiple formats), can quite challenging. solution used convert language specific functions operators generic functions. power operator : converted appropriate output format depending output target. following generic functions can used:","code":"SIMINT_POWER[a][b]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"current-simulation-time","dir":"Articles","previous_headings":"Functions and operators","what":"Current simulation time","title":"Modeling Language","text":"systems want access simulation time. can use internal variable SIMINT_TIME.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"modeling-quasi-equilibrium-of-target-mediated-drugs","dir":"Articles","previous_headings":"Functions and operators","what":"Modeling quasi-equilibrium of target-mediated drugs","title":"Modeling Language","text":"free amount drug Cfree binding receptor affinity KD given total values Ctot Rtot following can calculated using following equation: C_{free}=\\frac{1}{2} \\left[ (C_{tot}-R_{tot}-K_D) + \\sqrt{(C_{tot}-R_{tot}-K_D)^2 + 4K_DC_{tot}} \\right] can tedious, especially using generic functions . make easier can use following generic function: get Rfree, just switch first two arguments:","code":" Cfree = SIMINT_QEQ[Ctot][Rtot][KD] Rfree = SIMINT_QEQ[Rtot][Ctot][KD]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"timescales","dir":"Articles","previous_headings":"","what":"Timescales","title":"Modeling Language","text":"system default units constructed, indicated comments model. can useful (generating figures example) show simulations different time scales. Now can achieved multiplying time outputs correct scaling factor. However requires end user (1) remember original timescale (2) correctly scale value. Now particularly challenging mathematical perspective, introduces chance error. possible, instead, specify time scale information using descriptor. system coded hours, following define timescales default (hours), days, weeks months: used ShinyApp command line Matlab R","code":" 1.0 1.0/24.0 1.0/24.0/7.0 1.0/24.0/7.0/4.0"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"mathematical-sets","dir":"Articles","previous_headings":"","what":"Mathematical sets","title":"Modeling Language","text":"Consider following systems: PBPK: organs systems mathematically identical, variations parameters. However coding organs modifying existing system (say incorporate presences target organ) can become tedious. Anti-drug antibody generation: consider ADAs generated response therapeutic proteins, response consist distribution ADAs terms concentration separate distribution terms affinity. Modeling maturation process interactions ADAs, therapeutic protein, drug targets becomes unmanageable quickly. question : can make difficult problems easy intractable problems possible? solution implemented allows system defined terms mathematical sets","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"set-notation-set","dir":"Articles","previous_headings":"Mathematical sets","what":"Set notation ?","title":"Modeling Language","text":"Consider interactions occurring assay designed detect drug (D) present serum. assay biotinylated target (TB) used pull drug labeled target (TL) signaling molecule used. assay provide signal complex containing TB TL present (TB:D:TL TL:D:TB). Samples can contain soluble target well (TS) can interfere assay. model assay, following interactions considered: Several options available construct system. ODEs simply typed every possible combination. ’s also possible use equilibrium <=kon:koff=> interactions well. However, another option handle enumeration easily. First define two mathematical sets TSi TSk: defined can use curly brace notation ({ }) descriptors used construct system. example, initial conditions target states defined parameters (T0_TL, T0_TS, T0_TB) model. identified initial conditions using <> notation, can done single statement. line: Expands : Similar initial condition, equilibrium monomeric drug different targets can defined using single statement: uses one sets (TSi) expanded element set. account formation complexes contain drug molecule two different target molecules, following statement used: statement contains two different sets (TSi TSk). multiple sets encountered, every possible combination evaluated","code":" TL; TB; TS TL; TB; TS {TSi} = T0_{TSi} TL = T0_TL TB = T0_TB TS = T0_TS D + {TSi} <=kon:koff=> D_{TSi} D_{TSi} + {TSk} <=kon:koff=> {TSk}_D_{TSi}"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"aligning-sets","dir":"Articles","previous_headings":"Mathematical sets > Set notation ?","what":"Aligning Sets","title":"Modeling Language","text":"default sets interpreted evaluating every possible permutation shown . However, may desirable pair align sets. Take example transit compartments implemented Lobo Balthasar delay onset drug effect cancer cells [LB]. transit compartment implemented using series differential equations: \\frac{dK1}{dt} = (K-K1)\\frac{1}{\\tau} \\\\ \\frac{dK2}{dt} = (K1-K2)\\frac{1}{\\tau} \\\\ \\frac{dK3}{dt} = (K2-K3)\\frac{1}{\\tau} \\\\ \\frac{dK4}{dt} = (K3-K4)\\frac{1}{\\tau} ’s possible code individually, ’s also possible define using mathematical set notation. see first equation K paired aligned K1, second ’s K1 K2, etc. first define two sets equal length whose elements aligned: Next write ? statement terms sets, use SIMINT_SET_ALIGN function: first argument names sets align separated semicolon ; second argument system file descriptor written terms sets. expanded internally :","code":" K; K1; K2; K3 K1; K2; K3; K4 SIMINT_SET_ALIGN[TRIN;TROUT][ 1.0/tau*({TRIN}-{TROUT})] 1.0/tau*(K-K1) 1.0/tau*(K1-K2) 1.0/tau*(K2-K3) 1.0/tau*(K3-K4)"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"set-functions","dir":"Articles","previous_headings":"Mathematical sets > Set notation ?","what":"Set Functions","title":"Modeling Language","text":"can useful perform operations sets. can use following functions: SIMINT_SET_SUM mathematical equivalent \\sum_{SET} SIMINT_SET_PRODUCT mathematical equivalent \\prod_{SET} functions take two bracketed arguments. first argument set name second argument mathematical relationship expanded. example, consider system parameterized several species. variable EN_Mouse 1 species mouse 0 otherwise. Similarly EN_Human, EN_Monkey, etc. also defined body weights system parameters: BW_Mouse mouse, BW_Human human, etc. Now want assign BW value currently selected species (EN species 1). First define species parameter set: Next define secondary parameter BW summing product Boolean species parameter body weight species:","code":" Mouse; Rat; Monkey; Human BW = SIMINT_SET_SUM[SP][EN_{SP}*BW_{SP}]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"set-evaluation","dir":"Articles","previous_headings":"Mathematical sets > Set notation ?","what":"Set Evaluation","title":"Modeling Language","text":"Sets evaluated following order: First set functions (SIMINT_SET_SUM SIMINT_SET_PRODUCT) evaluated. Next aligned sets applied (SIMINT_SET_ALIGN) Lastly, remaining sets evaluated every permutation","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"piecewise-continuous-functionsparameters-if","dir":"Articles","previous_headings":"","what":"Piecewise-continuous functions/parameters ","title":"Modeling Language","text":"specify conditional assignment use statement: name name secondary parameter defined COND indicates Boolean condition needs satisfied. condition (boolean) can , , greater , etc. relationships. parameter assigned value Boolean relationship true. conditions can function different elements system depending whether name refers static dynamic secondary parameter: <> function system parameters, previously defined static secondary parameters covariates change given subject. function system parameters, static secondary parameters, states, previously defined dynamic secondary parameters covariates. important include default ELSE condition:","code":" boolean; value value"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"constructing-a-piece-wise-continuous-functionparameter","dir":"Articles","previous_headings":"Piecewise-continuous functions/parameters ","what":"Constructing a piece-wise continuous function/parameter","title":"Modeling Language","text":"see example use following command (use ?system_new see list available system file examples): system_new(system_file=\"pwc\", file_name=\"system-pwc.txt\") example specify fast (kelf) slow (kels) rates elimination. want fast rate active drug concentration Cth time Tf. system parameters look like: Now need define rate elimination constraints followed. First define kel dynamic secondary parameter value 0.0. define different conditions relevant values:","code":"

    kelf 1.0 eps inf 1/time yes System

    kels 0.01 eps inf 1/time yes System

    Cth 10 eps inf conc yes System

    Tf 10 eps inf time yes System kel = 0.0 SIMINT_AND[SIMINT_LT[SIMINT_TIME][Tf]][ SIMINT_GT[Cp][Cth]]; kelf kels"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"controlling-indices","dir":"Articles","previous_headings":"","what":"Controlling indices","title":"Modeling Language","text":"default, build script construct odes, parameter sets, etc. automatically. means order states/compartments going arbitrary. Sometimes necessary specify order states outputs. example using NONMEM order control stream must correlate values dataset. specify state Cp compartment 3, following used: general notation output state name assigned number :","code":" 3 number number"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"output-error-oe","dir":"Articles","previous_headings":"Controlling indices","what":"Output error ?","title":"Modeling Language","text":"links parameters defined using specific outputs defined using . can define either add additive /prop proportional error.","code":" prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf conc yes Variance Cp = expression add=add_error; prop=prop_error"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"concentrations-vs-amounts","dir":"Articles","previous_headings":"","what":"Concentrations vs amounts","title":"Modeling Language","text":"’s convenient model systems terms concentrations. However software allow scaling inputs. inputs provided mass units, need differential equation also mass units. can use descriptor system.txt tell ubiquity generate perform conversion differential equations. example, defined state Cc want Ac within nlmixr2 model target. related Cc = Ac/Vc Vc parameter following used:","code":" Cc; Ac; Vc"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"options","dir":"Articles","previous_headings":"","what":"Options","title":"Modeling Language","text":"Several options can specified using ? can used timescale plotting ShinyApp using: define default output times ShinyApp simulation scripts use following:","code":" days SIMINT_SEQ[0][100][1]"},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"example-system-files","dir":"Articles","previous_headings":"","what":"Example system files","title":"Modeling Language","text":"example system files can found examples directory stand-alone analysis template (ubiquity_template.zip). can also loaded form R package (see help ?system_new). system-adapt.txt - Parent/metabolite structural model taken ADAPT5 Users Manual [ADAPT]. system used estimation examples ubiquity workshop. system-glp_study.txt - PK model parameterized humans NHPs, used example GLP tox study design. system-mab_pk.txt - Linear model mAb PK humans taken [DM]. model used simulation examples ubiquity workshop. system-one_cmt_cl.txt - One compartment model parameterized terms clearances volumes. system-one_cmt_micro.txt - One compartment model parameterized micro constants (rates). system-pbpk.txt - Implementation large molecule PBPK model Shah Betts [SB]. model provides good examples use mathematical set notation. system-pbpk_template.txt - Template containing species parameter [SB]. can used construct systems parameterized multiple species. system-pwc.txt - Example construct piece-wise secondary parameters (.e. using //else statements). system-sets.txt - Example parameterized systems multiple parameter sets. system-tmdd.txt - Example code TMDD model using either ODEs process descriptors. system-tumor.txt - Implementation transit effect model cancer cell inhibition [LB]. demonstrates use aligned mathematical sets. system-two_cmt_cl.txt - Two compartment model parameterized terms clearances volumes system-two_cmt_micro.txt - Two compartment model parameterized terms micro constants (rates)","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"templates","dir":"Articles","previous_headings":"","what":"Templates","title":"Modeling Language","text":"system built, multiple files generated temporary directory (transient) support different software. R package can access templates programatically (see help ?system_fetch_template). list supporting software generated.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"r-workflow","dir":"Articles","previous_headings":"Templates","what":"R workflow","title":"Modeling Language","text":"auto_simulation_driver.R: R-Script named placeholders used run simulations. auto_analysis_estimation.R: R-Script named placeholders used perform naive-pooled parameter estimation.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"matlab-workflow","dir":"Articles","previous_headings":"Templates","what":"Matlab workflow","title":"Modeling Language","text":"auto_simulation_driver.m: M-file named placeholders used run simulations. auto_analysis_estimation.m: M-file named placeholders used perform naive-pooled parameter estimation.","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"other-software-targets","dir":"Articles","previous_headings":"Templates","what":"Other Software Targets","title":"Modeling Language","text":"target_adapt_5.target_adapt_5-PSET.prm: system defined Adapt Fortran parameter (prm) file parameter set PSET. target_berkely_madonna-PSET.txt: text file containing system parameter set PSET run Berkeley Madonna. target_mrgsolve-PSET.cpp: C++ file containing system parameter set PSET run using mrgsolve package R. target_nlmixr-PSET.R: R script defines system analysis nlmixr2 parameter set PSET. Note: nlmixr2 target can used create input model files NONMEM Monolix","code":""},{"path":"https://r.ubiquity.tools/articles/Language.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Modeling Language","text":"[ADAPT] Adapt 5 Users Guide [DM] Dirks & Meibohm Clin. PK (2010) Oct 1;49(10):633-59 [LB] Lobo, E.D. & Balthasar, J.P. AAPS J (2002) 4, 212-222 [MK] Mager, D.E. & Krzyzanski, W. Pharm Res (2005) 22: 1589. [SB] Shah, D.K. & Betts, .M. JPKPD (2012) 39 (1), 67-86 [VR] Vieira & Rajewsky Eur J Immunol. (1988) Feb;18(2):313-6","code":""},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Noncompartmental Analysis","text":"Non-compartmental analysis (NCA) simple quick method evaluating exposure drug. allows evaluate things like linearity vivo exposure. illustrate consider antibody given subcutaneous injection. actual profile patient might experience given solid black line. don’t yet ability sample continuous fashion. might observer given blue points. Generally NCA determine following directly data: Cmax - Maximum observed concentration (units=concentration) Tmax - time maximum concentration observed (units=time) AUC - area curve (units=time \\times concentration) AUMC - area first moment curve (units=time^2 \\times concentration) properties based observational data. Cmax Tmax certainly actual maximum concentration long sample judiciously give us good approximation. Similarly, calculated AUC AUMC different actual values. calculate areas need dig back calculus text books trapezoid method. Basically sampling interval trapezoid area calculated added n samples: AUC = \\int_0^{t_f} Cdt \\approx \\sum_{=1}^{n-1}{\\frac{C_i+C_{+1}}{2}\\times (t_{+1}-t_{})} AUMC = \\int_0^{t_f} t\\times Cdt \\approx \\sum_{=1}^{n-1}{\\frac{t_iC_i+t_{+1}C_{+1}}{2}\\times (t_{+1}-t_{})} can done Excel pretty easily. Depending data analysis properties can calculated. example can calculate clearance, steady-state volume distribution terminal half-life: Clearance: CL = \\frac{Dose}{AUC} Mean residence time: MRT = \\frac{AUMC}{AUC} Steady state volume distribution: V_{ss} = MRT \\times CL Half-life: Terminal slope natural log data Properties like AUC AUMC can also calculated using extrapolation last time point infinity account data beyond observations hand. subsequent values clearance, volumes distribution, etc can also change extrapolation. lot nuance associated calculations, good rely software focuses type analysis. PKNCA package developed mind. Ubiquity provides set functions automate NCA reporting preclinical data. functions act wrapper PKNCA package heavy lifting. small subset PKNCA functionality used . extensive analysis necessary PKNCA can used directly. vignette contains series examples perform NCA ubiquity. make copy scripts supporting files current working directory run following: creates several files working directory. First data sets: pk_all_sd.csv - PK data multiple subjects dosed either IV SC different levels pk_all_md.csv - Multiple dose data intensive sampling first last dose pk_sparse_sd.csv - Single dose data sparse sampling Next following scripts demonstrate perform NCA: analysis_nca_sd.R - Single dose data individuals analysis_nca_md.R - Multiple dose data individuals analysis_nca_sparse.R- Average NCA analyzing sparsely sampled data","code":"library(ubiquity) fr = workshop_fetch(section=\"NCA\", overwrite=TRUE)"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"quick-template-for-running-nca","dir":"Articles","previous_headings":"","what":"Quick Template for Running NCA","title":"Noncompartmental Analysis","text":"read rest vignette understand required data format functions work. returning just want template running NCA can use following: create file analysis_nca.R current working directory. can just uncomment/edit script get started.","code":"library(ubiquity) cfg = build_system() fr = system_fetch_template(cfg, template = \"NCA\")"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"single-dose-data","dir":"Articles","previous_headings":"","what":"Single Dose Data","title":"Noncompartmental Analysis","text":"example follows script analysis_nca_sd.R, uses dataset pk_all_sd.csv.","code":""},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"expected-format-of-data","dir":"Articles","previous_headings":"Single Dose Data","what":"Expected Format of Data","title":"Noncompartmental Analysis","text":"First build system load dataset. NCA functions ubiquity expect data certain format. columns required, optional depend kind analysis performed columns can also present. context consider following dataset: required columns names dataset provided parenthesis : ID - Unique subject identifier (ID) TIME - Time since first dose (TIME_HR) NTIME - Nominal time since last recent dose (since dealing single dose data also TIME_HR) CONC - Observed concentration record (C_ng_ml ng/ml) DOSE - Dose given (DOSE mg) ROUTE - Route administration (ROUTE); can either: iv bolus, iv infusion extra-vascular Optional columns include: DOSENUM - analyzing multiple dose data (example ), column used associate records doses BACKEXTRAP - Back-extrapolation IV data can done generally entire dataset column can used specify number points use individual basis SPARSEGROUP - Grouping sparse sampling data want average data time point","code":"cfg = build_system(system_file=\"system.txt\") cfg = system_load_data(cfg, dsname = \"PKDATA\", data_file = \"pk_all_sd.csv\")"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"nca-and-outputs","dir":"Articles","previous_headings":"Single Dose Data","what":"NCA and Outputs","title":"Noncompartmental Analysis","text":"Next perform NCA using system_nca_run: link analysis dataset specifying dataset name (dsname) used load dataset. Data can filtered either ’s loaded using optional dsfilter input (used ). dosing dataset mg (.e. 30 mg dose), mass units concentration values ng (.e. ng/ml). dscale input converts mass units dose mass units observed concentration. analysis_name 1 used refer analysis reporting function well files generated analysis. default initial concentration (nominal time zero) back-extrapolated can disabled setting extrap_C0 FALSE. Next map columns dataset names used analysis (dsmap). Note actual time (TIME) nominal time (NTIME) use column dataset (TIME_HR). Lastly, NCA_options can used specify analysis options used PKNCA. example maximum percent AUCinf extrapolation specified 10%. change option remaining defaults PKCNA used. Either omit argument set NULL use PKNCA defaults. Running function produce following files: output/pk_single_dose-nca_summary-pknca.csv Summary level output analysis (see table ) output/pk_single_dose-nca_data.RData R objects used downstream reporting output/pk_single_dose-pknca_raw.csv Raw output PKNCA may useful carry forward values certain columns PK dataset output. can use dsinc argument provide list columns input dataset appended summary table. can access summary table using function system_fetch_nca analysis_name: get explanation columns NCA output can use system_fetch_nca_columns function passing NCA analysis name function. list output contains data frame NCA_col_summary outputs description meaning:","code":"cfg = system_nca_run(cfg, dsname = \"PKDATA\", dscale = 1e6, analysis_name = \"pk_single_dose\", extrap_C0 = FALSE, dsmap = list(TIME = \"TIME_HR\", NTIME = \"TIME_HR\", CONC = \"C_ng_ml\", DOSE = \"DOSE\", ROUTE = \"ROUTE\", ID = \"ID\"), NCA_options = list(max.aucinf.pext = 10) ) NCA_results = system_fetch_nca(cfg, analysis_name = \"pk_single_dose\") nca_cols = system_fetch_nca_columns(cfg, \"pk_single_dose\") rhandsontable(nca_cols[[\"NCA_col_summary\"]], width=\"100%\", height=200)"},{"path":[]},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"powerpoint","dir":"Articles","previous_headings":"Single Dose Data > Automated Reporting","what":"PowerPoint","title":"Noncompartmental Analysis","text":"NCA run, results can appended open PowerPoint report. initialize empty report use function system_rpt_nca() analysis name assigned analysis (pk_single_dose) attach results. can write file: dose summary slide produced full timecourse created showing data subject/group dataset: Actual data gray Data used NCA green Initial extrapolated concentrations orange (solid) Points used extrapolating “iv bolus” data shown orange open circles shows slides generated individual subject first set summary slides analysis. Notice extrap_C0 set FALSE C0 calculated (-1). individual received SC dose estimate Vp also calculated (-1). Also note data individual allow extrapolation AUC infinity (NA). result parameters depend value also resulted (NA). timecourse figure shows data dataset (gray closed symbols, solid line) data used NCA (green open symbols, dashed line). way can visually confirm subject level data used.","code":"cfg = system_rpt_read_template(cfg, template=\"PowerPoint\") cfg = system_rpt_add_slide(cfg, template = \"title_slide\", elements = list( title= list(content = \"NCA Single Dose PK\", type = \"text\"))) cfg = system_rpt_nca(cfg=cfg, analysis_name=\"pk_single_dose\") system_rpt_save_report(cfg=cfg, output_file=file.path(\"output\",\"pk_single_dose-report.pptx\"))"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"word","dir":"Articles","previous_headings":"Single Dose Data > Automated Reporting","what":"Word","title":"Noncompartmental Analysis","text":"Similarly, Word report can generated appending results already initialized Word report. done setting template \"Word\" calling system_rpt_read_template(). attach content report PowerPoint report . information integrated report generation see Reporting vignette.","code":"cfg = system_rpt_read_template(cfg, template=\"Word\") cfg = system_rpt_nca(cfg=cfg, analysis_name=\"pk_single_dose\") system_rpt_save_report(cfg=cfg, output_file=file.path(\"output\",\"pk_single_dose-report.docx\"))"},{"path":"https://r.ubiquity.tools/articles/NCA.html","id":"summarizing-data","dir":"Articles","previous_headings":"Single Dose Data","what":"Summarizing Data","title":"Noncompartmental Analysis","text":"automated reporting intended generate results quickly easily digestible way (Word PowerPoint). may decided need control presented. function system_fetch_nca() mentioned give access NCA output. want filter, select columns summarize results function system_nca_summary() can used. first argument (analysis_name) indicates NCA analysis want summarize. parameters summarized order table specified params_include. default internal headers used, can overwrite alter defaults optional params_header input. cmax overwritten internally predefined label (\"

    F1 0.744 eps inf --- yes System

    ka 0.282 eps inf 1/day yes System

    CL 0.200 eps inf L/day yes System

    Vc 3.61 eps inf L yes System

    Vp 2.75 eps inf L yes System

    Q 0.747 eps inf L/day yes System

    MW 140 eps inf kD yes System mAb in Humans # Interindividual Variability # Taken from Table 3 0.416 ka 0.09875 CL 0.116 Vc 0.0789 Vp 0.699 Q 0.0786 0.0619 0.0377 # Covariates ; times; [ 0 ]; day ; values; [400]; mg step ; times; [ 0 ]; day ; values; [ 60]; kg step # static secondary parameters kel = CL/Vc kcp = Q/Vc kpc = Q/Vp # #-------------------# # |Input Information | # #-------------------# # # 1e6 ng 1 nmole 1 # X mg x ------ x ----------------- x --- => X*1e3/MW/Vc # 1 mg MW (KDA) * 1000 V(L) # # Bolus Events # times/events state values scale units ; [ 0.0, 7, 14 ]; 1; days ; At; [400.0, 0, 0 ]; 1e3/MW; mg ; Cc; [ 0.0, 0, 0 ]; 1e3/MW/Vc; mg ; times; [0, 30]; 1/60/24; min ; levels; [0, 0]; 60*24*1e3/MW; mg/min # ODEs -ka*At ka*At*F1/Vc -kel*Cc - kcp*Cc + kpc*Cp*Vp/Vc + Dinf/Vc kcp*Cc*Vc/Vp - kpc*Cp # #---------# # | Outputs | # #---------# # Outputs that begin with QC will not be displayed in the GUI # Convert nM to ng/ml # # X nM ===> X*MW(KDA) # # Convert nM to ug/ml/mg(dose) # # X nM ===> X*MW(KDA)/1000/dose # C_ng_ml = Cc*MW C_DOSE = Cc*MW/DOSE/1000 prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf ng/ml yes Variance Vp; Vc; CL; Q; ka Vp; Vc; CL; Q; ka; add_err; prop_err add=add_err; prop=prop_err Cp; Ap; Vp # #---------# # | Options # # #---------# # General Options: # specify different time scales 24.0*60.0 1.0 24.0 1.0/7.0 1.0/7.0/4.0"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Titration/Rule-Based Simulations","text":"Simulation vignette several examples provided using fixed dosing regimens. works well compounds relatively safe, PK consistent time, drug concentrations required achieve efficacy consistent. fact restrictions apply many different compounds. However, many scenarios necessary adjust dosing based periodic clinical visits: compounds narrow therapeutic index, disease progression alters drug PK requires increases dose amount, etc. possible manually current simulation tools provided, section outlines generalized framework make easier users. workshop provides several examples running titration rule-based simulations. make copy scripts supporting files current working directory run following: provide following scripts: analysis_repeat_dosing.r - Implement fixed bolus dosing using titration framework analysis_repeat_infusion.r - Implement fixed infusion rates using titration framework analysis_visit_dosing_titration.r - Alter dosing based predictions specified time points (individual) analysis_visit_dosing_titration_stochastic.r - Alter dosing based predictions specified time points (population) analysis_state_reset.r - Combine multiple rules dose drug perform state reset Titration rule-based simulations run using following functions: system_new_tt_rule() - Defines new rule times evaluated system_set_tt_cond() - Adds condition rule associated action perform condition true run_simulation_titrate() - Runs individual simulation using titration rules","code":"library(ubiquity) fr = workshop_fetch(section=\"Titration\", overwrite=TRUE)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"repeated-bolus-dosing-analysis_repeat_dosing-r","dir":"Articles","previous_headings":"","what":"Repeated Bolus Dosing (analysis_repeat_dosing.r)","title":"Titration/Rule-Based Simulations","text":"example shows implement dosing regimen using fixed-dosing methodologies titration functions . meant means bridge two concepts. First use model Simulation vignette (Davda etal. mAbs, 6(4), 1094-1102), simulate five doses 500 mg IV given every two weeks: use rule-based control simulation enable titration option: Next need define rule using system_new_tt_rule(). rule contains set times (timescale) want evaluate rule. create rule called \"ivdose\" evaluate rule weeks 0, 2, 4, 6 8. timescale defined using system file can used: rule created can attach conditions rule using system_set_tt_cond(). name passed function name rule condition applies. cond argument string evaluated internally. put kind Boolean argument want , even create user definable function returns Boolean argument (eg, 'myfunction(arguments)'). condition evaluates true string action evaluated. string SI_TT_BOLUS prototype function used modify dosing titration points. See help (?system_set_tt_cond) details prototype functions variables available titration environment. action define dosing specified state (defined system file) values times shown. units specified system file times relative titration time point. Next simulate system using titration function: Now can overlay predictions using methods show produce result: output run_simulation_titrate() similar run_simulation_ubiquity() two extra elements list returned: tt.tname.value - Value rule active condition -1 triggered tt.tname.simtime - Simulation time last condition became active tt.tname.timescale - Simulation time time scale rule specified fields tname - Titration rule name value - Value rule active condition simtime - Simulation time last condition became active timescale - Simulation time time scale rule specified ","code":"cfg = build_system() cfg = system_select_set(cfg, \"default\") parameters = system_fetch_parameters(cfg) cfg=system_set_option(cfg,group = \"simulation\", option = \"solver\", value = \"lsoda\") cfg=system_set_option(cfg, group = \"simulation\", option = \"output_times\", seq(0,10*7,1)) cfg = system_zero_inputs(cfg) cfg = system_set_bolus(cfg, state = \"Cc\", times = c(0, 14, 28, 42, 56), values = c(500, 500, 500, 500, 500)) som_fix = run_simulation_ubiquity(parameters, cfg) cfg=system_set_option(cfg, group = \"titration\", option = \"titrate\", value = TRUE) cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 2, 4, 6, 8), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"TRUE\", action = \"SI_TT_BOLUS[state='Cc', values=500, times=0]\", value = \"1\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_fix$simout, aes(x=ts.days, y=Cc, color=\"Fixed Dosing\"), linetype=1) + geom_line(data=som_tt$simout, aes(x=ts.days, y=Cc, color=\"Titration\" ), linetype=2) + scale_colour_manual(values=c(\"Fixed Dosing\"=\"darkblue\", \"Titration\"=\"firebrick3\")) + theme(legend.title = element_blank()) + theme(legend.position = 'bottom') myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"repeated-infusions-analysis_repeat_infusion-r","dir":"Articles","previous_headings":"","what":"Repeated Infusions (analysis_repeat_infusion.r)","title":"Titration/Rule-Based Simulations","text":"example want give 30 minute infusion 15 mg/min every two weeks. Similar previous example first using fixed dosing methods: Now use rule-based dosing enable titration, create rule (\"ivdose\") hold dosing times, create conditions resulting dosing. similar previous example except use SI_TT_RATE prototype function. rate units times levels specified system file (). times also relative titration time.","code":"cfg = system_zero_inputs(cfg) cfg = system_set_rate(cfg, rate = \"Dinf\", times = c( 0, 30, 20160, 20190, 40320, 40350, 60480, 60510, 80640, 80670), levels = c(15 , 0, 15, 0, 15, 0, 15, 0, 15, 0)) som_fix = run_simulation_ubiquity(parameters, cfg) cfg=system_set_option(cfg, group = \"titration\", option = \"titrate\", value = TRUE) cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 2, 4, 6, 8), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"TRUE\", action = \"SI_TT_RATE[rate='Dinf', times=c(0,30), levels=c(15,0)]\", value = \"1\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_fix$simout, aes(x=ts.days, y=Cc, color=\"Fixed Dosing\"), linetype=1) + geom_line(data=som_tt$simout, aes(x=ts.days, y=Cc, color=\"Titration\" ), linetype=2) + scale_colour_manual(values=c(\"Fixed Dosing\"=\"darkblue\", \"Titration\"=\"firebrick3\")) + theme(legend.title = element_blank()) + theme(legend.position = 'bottom') myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"titrated-dosing-analysis_visit_dosing_titration-r","dir":"Articles","previous_headings":"","what":"Titrated Dosing (analysis_visit_dosing_titration.r)","title":"Titration/Rule-Based Simulations","text":"following example want administer subcutaneous dose () every two weeks (interval=14) 12 weeks. dose level evaluated every 6 months. serum concentration (Cc) less 900, dose 700 mg. Cc greater 900 dose 600 mg. relevant code implement shown : Initially concentration serum 0 (Cc < 900), dosing starts 700. six months titration rule triggered . point serum concentration greater greater 900 dose level reduced 600. subsequent measurements greater 900 dose remains 600. Titration output: som_tt$titration Titration output: som_tt$titration_history","code":"cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 6, 12, 18, 24), timescale = \"months\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"Cc < 900\", action = \"SI_TT_BOLUS[state='At', values=700, times=0, repdose='last', number=11, interval=14]\", value = \"700\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = \"Cc > 900\", action = \"SI_TT_BOLUS[state='At', values=600, times=0, repdose='last', number=11, interval=14]\", value = \"600\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_tt$simout, aes(x=ts.weeks, y=Cc), color=\"blue\") myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"monte-carlo-simulations-analysis_visit_dosing_titration_stochastic-r","dir":"Articles","previous_headings":"","what":"Monte Carlo Simulations (analysis_visit_dosing_titration_stochastic.r)","title":"Titration/Rule-Based Simulations","text":"example similar last except performing population simulations (20 subjects). function (simulate_subjects()) used setting 'titrate' option TRUE tells function use rule-based dosing. add data list element called som$titration three fields titration rule (tname): tt.tname.value - Value rule active condition tt.tname.simtime - Simulation time last condition became active tt.tname.timescale - Simulation time time scale rule specified fields matrix entry simulation time (column) subject (row). example accessed following list elements: som$titration$tt.ivdose.simtime som$titration$tt.ivdose.value som$titration$tt.ivdose.timescaletimescale data structure (som) can collapsed data frame using som_to_df function. titration simulations column added rule giving value rule indicated time (first 100 rows shown):","code":"cfg = system_set_option(cfg, group=\"stochastic\", option=\"nsub\", value=20) som= simulate_subjects(parameters, cfg) sdf = som_to_df(cfg, som)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"performing-statecompartment-resets-analysis_state_reset-r","dir":"Articles","previous_headings":"","what":"Performing State/Compartment Resets (analysis_state_reset.r)","title":"Titration/Rule-Based Simulations","text":"Along changing dosing titration time points, may also necessary directly alter state compartment values. last example dose every two weeks week 3 drop total drug system 1/2. portion covers IV dosing component: portion reduces amount drug Cc Cp 1/2 week 3:","code":"cfg=system_new_tt_rule(cfg, name = \"ivdose\", times = c(0, 2, 4, 6, 8), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"ivdose\", cond = 'TRUE', action = \"SI_TT_BOLUS[state='Cc', values=500, times=0]\", value = \"5\") cfg=system_new_tt_rule(cfg, name = \"state_reset\", times = c(3), timescale = \"weeks\") cfg=system_set_tt_cond(cfg, name = \"state_reset\", cond = 'TRUE', action = \"SI_TT_STATE[Cc][0.5*Cc]\", value = \"0\") cfg=system_set_tt_cond(cfg, name = \"state_reset\", cond = 'TRUE', action = \"SI_TT_STATE[Cp][0.5*Cp]\", value = \"0\") som_tt = run_simulation_titrate(parameters, cfg) myfig = ggplot() + geom_line(data=som_tt$simout, aes(x=ts.weeks, y=Cc), color=\"red\") myfig = prepare_figure('present', myfig) print(myfig)"},{"path":"https://r.ubiquity.tools/articles/Titration.html","id":"contents-of-system-txt","dir":"Articles","previous_headings":"","what":"Contents of system.txt","title":"Titration/Rule-Based Simulations","text":"","code":"# Implementation of the two compartment model from Davda 2014 # # Davda, J. P., Dodds, M. G., Gibbs, M. A., Wisdom, W., & Gibbs, J. (2014). A # model-based meta-analysis of monoclonal antibody pharmacokinetics to guide # optimal first-in-human study design. mAbs, 6(4), 1094-1102. # http://doi.org/10.4161/mabs.29095 # # System Units: # mass [=] nmoles # volume [=] L # concentration [=] nM # time [=] day # # #-------------# # | Parameters | # #-------------# # System parameters #name value lower upper units editable grouping # bound bound

    F1 0.744 eps inf --- yes System

    ka 0.282 eps inf 1/day yes System

    CL 0.200 eps inf L/day yes System

    Vc 3.61 eps inf L yes System

    Vp 2.75 eps inf L yes System

    Q 0.747 eps inf L/day yes System

    MW 140 eps inf kD yes System mAb in Humans # Interindividual Variability # Taken from Table 3 0.416 ka 0.09875 CL 0.116 Vc 0.0789 Vp 0.699 Q 0.0786 0.0619 0.0377 # Covariates ; times; [ 0 ]; day ; values; [400]; mg step ; times; [ 0 ]; day ; values; [ 60]; kg step # static secondary parameters kel = CL/Vc kcp = Q/Vc kpc = Q/Vp # #-------------------# # |Input Information | # #-------------------# # # 1e6 ng 1 nmole 1 # X mg x ------ x ----------------- x --- => X*1e3/MW/Vc # 1 mg MW (KDA) * 1000 V(L) # # Bolus Events # times/events state values scale units ; [ 0.0, 7, 14 ]; 1; days ; At; [400.0, 0, 0 ]; 1e3/MW; mg ; Cc; [ 0.0, 0, 0 ]; 1e3/MW/Vc; mg ; times; [0, 30]; 1/60/24; min ; levels; [0, 0]; 60*24*1e3/MW; mg/min # ODEs -ka*At ka*At*F1/Vc -kel*Cc - kcp*Cc + kpc*Cp*Vp/Vc + Dinf/Vc kcp*Cc*Vc/Vp - kpc*Cp # #---------# # | Outputs | # #---------# # Outputs that begin with QC will not be displayed in the GUI # Convert nM to ng/ml # # X nM ===> X*MW(KDA) # # Convert nM to ug/ml/mg(dose) # # X nM ===> X*MW(KDA)/1000/dose # C_ng_ml = Cc*MW C_DOSE = Cc*MW/DOSE/1000 prop_err 0.1 eps inf -- yes Variance add_err 0.1 eps inf ng/ml yes Variance Vp; Vc; CL; Q; ka Vp; Vc; CL; Q; ka; add_err; prop_err add=add_err; prop=prop_err Cp; Ap; Vp # #---------# # | Options # # #---------# # General Options: # specify different time scales 24.0*60.0 1.0 24.0 1.0/7.0 1.0/7.0/4.0"},{"path":"https://r.ubiquity.tools/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"John Harrold. Author, maintainer.","code":""},{"path":"https://r.ubiquity.tools/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Harrold, J.M., Abraham, .K. Ubiquity: framework physiological/mechanism-based pharmacokinetic/pharmacodynamic model development deployment. J Pharmacokinet Pharmacodyn 41, 141–151 (2014). https://doi.org/10.1007/s10928-014-9352-6","code":"@Article{, title = {Ubiquity: a framework for physiological/mechanism-based pharmacokinetic/pharmacodynamic model development and deployment}, author = {J.M. Harrold and A.K. Abraham}, journal = {Journal of Pharmacokinetics and Pharmacodynamics}, year = {2014}, volume = {41}, number = {2}, pages = {141-151}, url = {https://doi.org/10.1007/s10928-014-9352-6}, }"},{"path":[]},{"path":"https://r.ubiquity.tools/index.html","id":"overview","dir":"","previous_headings":"ubiquity R Workflow","what":"Overview","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"Provides interface R workflow ubiquity: set modeling tools created accelerate development deployment models drug disposition efficacy within organization institution. designed make model development easier, reduce pain moving modeling software, provide simple customizable interface allow scientists interrogate models. provide free BSD license source code available GitHub (R-package, ubiquity project).","code":""},{"path":"https://r.ubiquity.tools/index.html","id":"installing-ubiquity","dir":"","previous_headings":"ubiquity R Workflow","what":"Installing ubiquity","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"detailed software requirements installation instructions see page: (https://ubiquity.tools/rworkflow) Briefly, install following: R RStudio Perl (Windows) Rtools (Windows) can install ubiquity CRAN install development version GitHub: Note may need install development version onbrand GitHub well","code":"install.packages(\"ubiquity\", dependencies=TRUE) # Installing devtools if it's not already installed if(system.file(package=\"devtools\") == \"\"){ install.packages(\"devtools\") } devtools::install_github(\"john-harrold/ubiquity\", dependencies=TRUE)"},{"path":"https://r.ubiquity.tools/index.html","id":"getting-started","dir":"","previous_headings":"ubiquity R Workflow","what":"Getting started","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"full documentation ubiquity vignettes manuals available. information specific tasks see following vignettes: Language: Constructing ODE-based systems using ubiquity language Simulation: Running individual population simulations Estimation: Naive-pooled parameter estimation Titration: Rule-based/titration simulations Deployment: ShinyApp running deploying models Reporting: Inline generation PowerPoint Word reports NCA: Automated non-compartmental analysis PKNCA","code":""},{"path":"https://r.ubiquity.tools/index.html","id":"changes-and-updates","dir":"","previous_headings":"ubiquity R Workflow","what":"Changes and Updates","title":"PKPD, PBPK, and Systems Pharmacology Modeling Tools","text":"See NEWS.md details differences updates.","code":""},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate AUC for Sparse Data — AUC_Bailers_method","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"implementation Bailors method calculating AUCs sparse sampling. taken following publication: Nedelman, J. R., Gibiansky, E., & Lau, D. T. (1995). Applying Bailer's method AUC confidence intervals sparse sampling Pharmaceutical Research, 12(1), 124-128.","code":""},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"","code":"AUC_Bailers_method( conc_data = NULL, dsmap = list(NTIME = \"NTIME\", CONC = \"CONC\", ID = \"ID\") )"},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"conc_data data frame containing sparse data dsmap list names specifying columns: NTIME Nominal time since last dose; \"NTIME\" (default) CONC Concentration data; \"CONC\" (default) ID Subject ID; (\"ID\" (default)","code":""},{"path":"https://r.ubiquity.tools/reference/AUC_Bailers_method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate AUC for Sparse Data — AUC_Bailers_method","text":"list following elements isgood Boolean value indicating result function call AUC Mean AUC var_AUC Variance AUC msgs Sequence strings contianing description problems obss Internal observations times Sequence time corresponding rows obs r number observations time point (rows correspond rows obs)","code":""},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"Called ShinyApp add log entry \"App\" prepended log entry","code":""},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"","code":"GUI_log_entry(cfg, text)"},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"cfg ubiquity system object text string print/log","code":""},{"path":"https://r.ubiquity.tools/reference/GUI_log_entry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper for system_log_entry Used in ShinyApp — GUI_log_entry","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"function used stochastic simulations performed using data file subject level information. data file contains covariate information, function update system subjects covariates.","code":""},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"","code":"apply_sub_file_COV( tmpcfg, cov_found, sub_dataset, sub_ID_col, sub_TIME_col, file_ID )"},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"tmpcfg ubiquity system object cov_found list covariates found dataset sub_dataset name dataset subject parameters sub_ID_col name column dataset subject IDs sub_TIME_col name column dataset simulation time file_ID subject ID extract covariates ","code":""},{"path":"https://r.ubiquity.tools/reference/apply_sub_file_COV.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts Covariates for a Subject from a Subject Data File — apply_sub_file_COV","text":"ubiquity system object covariates set current subject","code":""},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":null,"dir":"Reference","previous_headings":"","what":"Archive Estimation Results — archive_estimation","title":"Archive Estimation Results — archive_estimation","text":"Archives estimation results moving output files file names 'name' prepended . prevents overwritten different analysis script following files archived: output/parameters_all.csv output/parameters_est.csv output/report.txt Example: archive_estimation('mysoln', cfg) rename files output/mysoln-parameters_all.csv output/mysoln-parameters_est.csv output/mysoln-report.txt","code":""},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Archive Estimation Results — archive_estimation","text":"","code":"archive_estimation(name, cfg)"},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Archive Estimation Results — archive_estimation","text":"name analysis name cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/archive_estimation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Archive Estimation Results — archive_estimation","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":null,"dir":"Reference","previous_headings":"","what":"Build the System File — build_system","title":"Build the System File — build_system","text":"Builds specified system file creating targets R languages well templates performing simulations estimations.","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build the System File — build_system","text":"","code":"build_system( system_file = \"system.txt\", distribution = \"automatic\", perlcmd = \"perl\", output_directory = file.path(\".\", \"output\"), temporary_directory = file.path(\".\", \"transient\"), verbose = TRUE, ubiquity_app = FALSE, debug = TRUE )"},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build the System File — build_system","text":"system_file name file defining system ubiquity format (default = 'system.txt'), file exist template created compiled. distribution indicates weather using 'package' 'stand alone' distribution ubiquity. set 'automatic' build script first look see ubiquity R package installed. installed use package. Otherwise, assume \"sand alone\" distribution. perlcmd system command run perl (\"perl\") output_directory location store analysis outputs (file.path(\".\", \"output\")) temporary_directory location templates otehr files building system (file.path(\".\", \"transient\")) verbose enable verbose messaging (TRUE) ubiquity_app set TRUE building system used ubiquty App (FALSE) debug Boolean variable indicating debugging information displayed (TRUE)","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Build the System File — build_system","text":"initialized ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/build_system.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Build the System File — build_system","text":"","code":"# \\donttest{ fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Creating output directory #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # }"},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the halflife of data — calculate_halflife","title":"Calculate the halflife of data — calculate_halflife","text":"Determines terminal halflife sequence corresponding times values optional minimum maximum times censor data.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the halflife of data — calculate_halflife","text":"","code":"calculate_halflife(times = NULL, values = NULL, tmin = NULL, tmax = NULL)"},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the halflife of data — calculate_halflife","text":"times - sequence times values - corresponding sequence values tmin - minimum time include (NULL) tmax - maximum time include (NULL)","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the halflife of data — calculate_halflife","text":"List following names thalf Halflife units times mod Result lm used fit log transformed data df Dataframe data predicted values time within tmin tmax","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_halflife.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the halflife of data — calculate_halflife","text":"","code":"x = c(0:100) y = exp(-.1*x) th = calculate_halflife(times=x, values=y) #> Warning: essentially perfect fit: summary may be unreliable #> Warning: essentially perfect fit: summary may be unreliable thalf = th$thalf"},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates the Value of the Specified Objective Function — calculate_objective","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"given set system parameters objective function calculated based defined cohorts variance models.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"","code":"calculate_objective(parameters, cfg, estimation = TRUE)"},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"parameters system parameters cfg ubiquity system object estimation boolean variable indicate objective function called parameter estimation","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates the Value of the Specified Objective Function — calculate_objective","text":"estimation TRUE return objective function value, FALSE return list element value containing objective function value element named isgood TRUE objective function successful.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":null,"dir":"Reference","previous_headings":"","what":"GA Wrapper for calculate_objective — calculate_objective_ga","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"Converts parameter vector named list returns negative objective (turning maximization minimization)","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"","code":"calculate_objective_ga(pvect, cfg)"},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"pvect system parameters cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_ga.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"GA Wrapper for calculate_objective — calculate_objective_ga","text":"objective function value","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":null,"dir":"Reference","previous_headings":"","what":"pso Wrapper for calculate_objective — calculate_objective_pso","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"psoptim objective function assumes parameters vector function converts named list consistent ubiquity optmization routines.","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"","code":"calculate_objective_pso(pvect, cfg)"},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"pvect system parameters cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_objective_pso.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"pso Wrapper for calculate_objective — calculate_objective_pso","text":"objective function value","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates the Variance in od_general — calculate_variance","title":"Calculates the Variance in od_general — calculate_variance","text":"Takes variance specified string evaluates locally, returns value","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates the Variance in od_general — calculate_variance","text":"","code":"calculate_variance( SIMINT_parameters, SIMINT_varstr, SIMINT_odchunk, SIMINT_cfg )"},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates the Variance in od_general — calculate_variance","text":"SIMINT_parameters system parameters SIMINT_varstr string containing variance calculation SIMINT_odchunk chunk observation details containing predictions, observations time SIMINT_cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/calculate_variance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates the Variance in od_general — calculate_variance","text":"Variance calculated given set parameters model","code":""},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify System Steady State — check_steady_state","title":"Verify System Steady State — check_steady_state","text":"Takes output run_simulation_ubiquity verifies system running steady state analyzing timecourse states system","code":""},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify System Steady State — check_steady_state","text":"","code":"check_steady_state(cfg, som)"},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify System Steady State — check_steady_state","text":"cfg ubiquity system object som output run_simulation_ubiquity","code":""},{"path":"https://r.ubiquity.tools/reference/check_steady_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify System Steady State — check_steady_state","text":"list name steady_state (boolean indicating weather system steady state) states vector states steady state offset.","code":""},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares Estimate to Bounds — compare_estimate","title":"Compares Estimate to Bounds — compare_estimate","text":"Compares parameter estimate bounds indicates estimate near bound.","code":""},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares Estimate to Bounds — compare_estimate","text":"","code":"compare_estimate(cfg, parameters, pname)"},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares Estimate to Bounds — compare_estimate","text":"cfg ubiquity system object parameters list parameter estimates pname name parameter compare","code":""},{"path":"https://r.ubiquity.tools/reference/compare_estimate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares Estimate to Bounds — compare_estimate","text":"L - near lower bound, U - near upper bound","code":""},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Performs parameter estimation — estimate_parameters","title":"Performs parameter estimation — estimate_parameters","text":"Performs actual parameter estimation","code":""},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Performs parameter estimation — estimate_parameters","text":"","code":"estimate_parameters(cfg)"},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Performs parameter estimation — estimate_parameters","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/estimate_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Performs parameter estimation — estimate_parameters","text":"list elements: estimate - vector parameter estimates raw - raw output underlying optimization routine conv - list convergence criteria keys num (numeric) text (text description) obj - objective function value statistics_est - solution statistics sysup - Text update system file parameter estimates estimate - Names list parameter estiamtes report - Named list elements reporting cohorts - Cohort elements cfg file cohort_view - Cohort view system_view() system_file - Contents system file estimation run","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"Can used take subset parameters (estimated returned ' system_estimate_parameters) full list system parameters.","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"","code":"fetch_full_parameters(pest, cfg)"},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"pest list containing subset parameters estimated cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"Full list parameters default values currently selected parameter set values pest merged","code":""},{"path":"https://r.ubiquity.tools/reference/fetch_full_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create Full Parameter Vector from Estimation Subset — fetch_full_parameters","text":"function used build full parameter set subset, normally used parameter estimation observation details function entire parameter vector needed simulate system. function select_set pulls parameter set can optionally select subset estimation: default values subset can accessed following way: estimation routines work reduced parameter set, run simulations full set needed. full values can retrieved using following:","code":"pnames = c('Vp', 'CL') cfg = system_select_set(cfg, \"default\", pnames) pest = system_fetch_guess(cfg) parameters = fetch_full_parameters(pest, cfg)"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Prototype Functions for Arguments — find_bracketed_arguments","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"Parses strings find abstract functions (format SIFUNC[ARG1][ARG2][ARG3] extract arguments function replace actual functions additional arguments needed","code":""},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"","code":"find_bracketed_arguments(str, pattern, replace = \"\", narg, op = \"[\", cp = \"]\")"},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"str string containing prototype function call pattern string indicating start function eg. \"SI_TT_BOLUS[\" replace string replace pattern narg number arguments prototype function op string used indicating open parenthesis cp string used indicating close parenthesis","code":""},{"path":"https://r.ubiquity.tools/reference/find_bracketed_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Prototype Functions for Arguments — find_bracketed_arguments","text":"string containing actual function call/code built prototype function","code":""},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates a Parameter Based on in the System File — generate_parameter","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"Internal function used generate parameters based IIV information","code":""},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"","code":"generate_parameter( SIMINT_parameters, SIMINT_cfg, SIMINT_PARAMETER_TV, SIMINT_IIV_VALUE, SIMINT_equation )"},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"SIMINT_parameters parameters vector containing typical values SIMINT_cfg ubiquity system object SIMINT_PARAMETER_TV Typical value parameter question SIMINT_IIV_VALUE sample mvr distribution SIMINT_equation equation relating IIV typical value parameter value variability","code":""},{"path":"https://r.ubiquity.tools/reference/generate_parameter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates a Parameter Based on in the System File — generate_parameter","text":"parameter value variability applied","code":""},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Text Report with Estimation Results — generate_report","title":"Generate Text Report with Estimation Results — generate_report","text":"Internal function used generate report estimation results","code":""},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Text Report with Estimation Results — generate_report","text":"","code":"generate_report(parameters, ss, cfg, conv_desc)"},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Text Report with Estimation Results — generate_report","text":"parameters list parameter estimates ss output solution_statistics cfg ubiquity system object conv_desc description convergence criteria","code":""},{"path":"https://r.ubiquity.tools/reference/generate_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Text Report with Estimation Results — generate_report","text":"List following elements: report_file name report file report_file_contents contents report file parameters_all_file name CSV file parameters parameters_est_file name CSV file estimates","code":""},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Subject — generate_subject","title":"Generate Subject — generate_subject","text":"Generates subject variability specified using descriptor system file","code":""},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Subject — generate_subject","text":"","code":"generate_subject(parameters, cfg)"},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Subject — generate_subject","text":"parameters vector nominal parameter values cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/generate_subject.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Subject — generate_subject","text":"List field named parameters containing sample representing subject","code":""},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":null,"dir":"Reference","previous_headings":"","what":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"used convert x y-axis ggplot log 10 scale visually satisfying ggplot default.","code":""},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"","code":"gg_axis( fo, yaxis_scale = TRUE, xaxis_scale = TRUE, ylim_min = NULL, ylim_max = NULL, xlim_min = NULL, xlim_max = NULL, x_tick_label = TRUE, y_tick_label = TRUE )"},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"fo ggplot figure object yaxis_scale TRUE indicates y-axis log10 scaled xaxis_scale TRUE indicates x-axis log10 scaled ylim_min set number define lower bound y-axis ylim_max set number define upper bound y-axis xlim_min set number define lower bound x-axis xlim_max set number define upper bound x-axis x_tick_label TRUE show x tick labels, FALSE hide x tick labels y_tick_label TRUE show y tick labels, FALSE hide y tick labels","code":""},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"ggplot object formatted axis","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/gg_axis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make Pretty ggplot x- or y-Axis Log 10 Scale — gg_axis","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":null,"dir":"Reference","previous_headings":"","what":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"Wrapper gg_axis create log 10 x-axis","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"","code":"gg_log10_xaxis( fo, xlim_min = NULL, xlim_max = NULL, y_tick_label = TRUE, x_tick_label = TRUE )"},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"fo ggplot figure object xlim_min set number define lower bound x-axis xlim_max set number define upper bound x-axis y_tick_label TRUE show y tick labels, FALSE hide y tick labels x_tick_label TRUE show x tick labels, FALSE hide x tick labels","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"ggplot object formatted axis","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/gg_log10_xaxis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make Pretty ggplot x-Axis Log 10 Scale — gg_log10_xaxis","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":null,"dir":"Reference","previous_headings":"","what":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"Wrapper gg_axis create log 10 y-axis","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"","code":"gg_log10_yaxis( fo, ylim_min = NULL, ylim_max = NULL, y_tick_label = TRUE, x_tick_label = TRUE )"},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"fo ggplot figure object ylim_min set number define lower bound y-axis ylim_max set number define upper bound y-axis y_tick_label TRUE show y tick labels, FALSE hide y tick labels x_tick_label TRUE show x tick labels, FALSE hide x tick labels","code":""},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"ggplot object formatted axis","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/gg_log10_yaxis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make Pretty ggplot y-Axis Log 10 Scale — gg_log10_yaxis","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of the linspace Function from Matlab — linspace","title":"Implementation of the linspace Function from Matlab — linspace","text":"Creates vector n elements equally spaced apart.","code":""},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of the linspace Function from Matlab — linspace","text":"","code":"linspace(a, b, n = 100)"},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Implementation of the linspace Function from Matlab — linspace","text":"initial number b final number n number elements (integer >= 2)","code":""},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of the linspace Function from Matlab — linspace","text":"vector numbers b n linearly spaced apart","code":""},{"path":"https://r.ubiquity.tools/reference/linspace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of the linspace Function from Matlab — linspace","text":"","code":"linspace(0,100, 20) #> [1] 0.000000 5.263158 10.526316 15.789474 21.052632 26.315789 #> [7] 31.578947 36.842105 42.105263 47.368421 52.631579 57.894737 #> [13] 63.157895 68.421053 73.684211 78.947368 84.210526 89.473684 #> [19] 94.736842 100.000000"},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of the logspace Function from Matlab — logspace","title":"Implementation of the logspace Function from Matlab — logspace","text":"Creates vector n elements logarithmically spaced apart.","code":""},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of the logspace Function from Matlab — logspace","text":"","code":"logspace(a, b, n = 100)"},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Implementation of the logspace Function from Matlab — logspace","text":"initial number b final number n number elements (integer >=2)","code":""},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of the logspace Function from Matlab — logspace","text":"vector numbers b n logarithmically (base 10) spaced apart","code":""},{"path":"https://r.ubiquity.tools/reference/logspace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of the logspace Function from Matlab — logspace","text":"","code":"logspace(-2, 3,20) #> [1] 1.000000e-02 1.832981e-02 3.359818e-02 6.158482e-02 1.128838e-01 #> [6] 2.069138e-01 3.792690e-01 6.951928e-01 1.274275e+00 2.335721e+00 #> [11] 4.281332e+00 7.847600e+00 1.438450e+01 2.636651e+01 4.832930e+01 #> [16] 8.858668e+01 1.623777e+02 2.976351e+02 5.455595e+02 1.000000e+03"},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Makes Forcing Function From Times and Values — make_forcing_function","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"Takes list times, values, interpolation method","code":""},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"","code":"make_forcing_function( times, values, type, output_times, sample_delta_mult = 0.001 )"},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"times time values forcing function values magnitude time (length time) type string indicating type forcing function can one following: \"step\" constant values switch new values times \"linear\" linearly interpolate points output_times vector simulation output times sample_delta_mult multiplier used control magnitude spacing around event times","code":""},{"path":"https://r.ubiquity.tools/reference/make_forcing_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Makes Forcing Function From Times and Values — make_forcing_function","text":"matrix two columns: first column vector times second column vector values","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":null,"dir":"Reference","previous_headings":"","what":"Select Records from NONMEM-ish Data Set — nm_select_records","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"Retrieves subset NONMEM-ish data set based list containing filtering information.","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"","code":"nm_select_records(cfg, values, filter)"},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"cfg ubiquity system object values dataframe containing dataset column headers filter list element names headers values values header 'd values across headers 'd","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"subset dataset","code":""},{"path":"https://r.ubiquity.tools/reference/nm_select_records.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select Records from NONMEM-ish Data Set — nm_select_records","text":"dataset headings ID, DOSE SEX filter following format: translated boolean filter:","code":"filter = list() filter$ID = c(1:4) filter$DOSE = c(5,10) filter$SEX = c(1) ((ID==1) | (ID==2) | (ID==3) | (ID==4)) & ((DOSE == 5) | (DOSE==10)) & (SEX == 1)"},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Pad String with Spaces — pad_string","title":"Pad String with Spaces — pad_string","text":"Adds spaces beginning end strings reaches maxlength. Used aligning text.","code":""},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pad String with Spaces — pad_string","text":"","code":"pad_string(str, maxlength = 1, location = \"beginning\")"},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pad String with Spaces — pad_string","text":"str string maxlength length pad location either \"beginning\" pad left \"end\" pad right","code":""},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pad String with Spaces — pad_string","text":"Padded string","code":""},{"path":"https://r.ubiquity.tools/reference/pad_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pad String with Spaces — pad_string","text":"","code":"pad_string(\"bob\", maxlength=10) #> [1] \" bob\" pad_string(\"bob\", maxlength=10, location=\"end\") #> [1] \"bob \""},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse String for Prototype Functions — parse_patterns","title":"Parse String for Prototype Functions — parse_patterns","text":"string can contain number prototype functions, function find replace actual R code.","code":""},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse String for Prototype Functions — parse_patterns","text":"","code":"parse_patterns(cfg, str)"},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse String for Prototype Functions — parse_patterns","text":"cfg ubiquity system object str string","code":""},{"path":"https://r.ubiquity.tools/reference/parse_patterns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse String for Prototype Functions — parse_patterns","text":"String prototype functions replaced","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":null,"dir":"Reference","previous_headings":"","what":"Make ggplot Figure Pretty — prepare_figure","title":"Make ggplot Figure Pretty — prepare_figure","text":"Takes ggplot object alters line thicknesses makes cosmetic changes make appropriate exporting.","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make ggplot Figure Pretty — prepare_figure","text":"","code":"prepare_figure( purpose = \"present\", fo, y_tick_minor = FALSE, y_tick_major = FALSE, x_tick_minor = FALSE, x_tick_major = FALSE )"},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make ggplot Figure Pretty — prepare_figure","text":"purpose either \"present\" (default), \"print\" \"shiny\" fo ggplot figure object y_tick_minor Boolean value control grid lines y_tick_major Boolean value control grid lines x_tick_minor Boolean value control grid lines x_tick_major Boolean value control grid lines","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make ggplot Figure Pretty — prepare_figure","text":"ggplot object","code":""},{"path":"https://r.ubiquity.tools/reference/prepare_figure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make ggplot Figure Pretty — prepare_figure","text":"","code":"library(\"ggplot2\") df = data.frame(x = seq(0.01,10,.01), y = seq(0.01,10,.01)^2) p = ggplot(df, aes(x=x, y=y)) + geom_line() # pretty up the axes p = prepare_figure(fo=p, purpose=\"print\") # pretty log10 y-axis p_logy = gg_log10_yaxis(fo=p) # pretty log10 x-axis p_logx = gg_log10_xaxis(fo=p) # pretty log10 yx-axis p_logxy = gg_axis(fo=p)"},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"Provides interface run_simulation_ubiquity start stop simulations apply rules control dosing state-resets.","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"","code":"run_simulation_titrate(SIMINT_p, SIMINT_cfg, SIMINT_dropfirst = TRUE)"},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"SIMINT_p list system parameters SIMINT_cfg ubiquity system object SIMINT_dropfirst TRUE drop first sample point (prevents bolus doses starting 0)","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_titrate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate With Titration or Rule-Based Inputs — run_simulation_titrate","text":"som","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate Individual Response — run_simulation_ubiquity","title":"Simulate Individual Response — run_simulation_ubiquity","text":"Controls execution individual simulations deSolve using either R scripts loadable C libraries.","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate Individual Response — run_simulation_ubiquity","text":"","code":"run_simulation_ubiquity(SIMINT_parameters, SIMINT_cfg, SIMINT_dropfirst = TRUE)"},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate Individual Response — run_simulation_ubiquity","text":"SIMINT_parameters vector parameters SIMINT_cfg ubiquity system object SIMINT_dropfirst TRUE drop first sample point (prevents bolus doses starting 0)","code":""},{"path":"https://r.ubiquity.tools/reference/run_simulation_ubiquity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate Individual Response — run_simulation_ubiquity","text":"simulation output mapped (som) list. time-course stored simout element. first column (time) contains simulation time units simulation. Next column : State, output system parameter Models covariate contain initial value (prefix: SIMINT_CVIC_) well values time point static dynamic system parameter also passed column timescale returned \"ts.\" prefix.","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Sample Times Around Events — sample_around","title":"Define Sample Times Around Events — sample_around","text":"events, bolus doses, applied system rapid changes can occur. system sampled heavily around times, changes may missed output profiles. Based total duration sample times, extra samples can added near events.","code":""},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Sample Times Around Events — sample_around","text":"","code":"sample_around(tvals, ot, sample_delta_mult = 1e-06)"},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Sample Times Around Events — sample_around","text":"tvals vector event times ot simualtion output times sample_delta_mult multiplier used control magnitude spacing around following event times","code":""},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Sample Times Around Events — sample_around","text":"vector event times added samples","code":""},{"path":"https://r.ubiquity.tools/reference/sample_around.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Sample Times Around Events — sample_around","text":"information setting options population simulation see stochastic section system_set_option help file.","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Population Simulations — simulate_subjects","title":"Run Population Simulations — simulate_subjects","text":"Used run Population/Monte Carlo simulations subjects generated either provided variance/covariance information dataset.","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Population Simulations — simulate_subjects","text":"","code":"simulate_subjects( parameters, cfg, show_progress = TRUE, progress_message = \"Simulating Subjects:\" )"},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Population Simulations — simulate_subjects","text":"parameters list containing typical value parameters cfg ubiquity system object show_progress Boolean value controlling display progress indicator (TRUE) progress_message text string prepend called ShinyApp","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Population Simulations — simulate_subjects","text":"Mapped simulation output individual predictions, individual parameters, summary statistics parameters. Vignettes details format output.","code":""},{"path":"https://r.ubiquity.tools/reference/simulate_subjects.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run Population Simulations — simulate_subjects","text":"Failures due numerical instability integration errors captured within function. Data subjects removed output. IDs displayed messages stored output. information setting options population simulation see stochastic section system_set_option help file.","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Solution Statistics — solution_statistics","title":"Calculate Solution Statistics — solution_statistics","text":"Attempts determine variance/covariance matrix, confidence intervals CV percent list parameter estimates parameters. method taken ADAPT 5 User's Guide chapter 3.","code":""},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Solution Statistics — solution_statistics","text":"","code":"solution_statistics(parameters, cfg)"},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Solution Statistics — solution_statistics","text":"parameters list parameter estimates cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Solution Statistics — solution_statistics","text":"list containing information provided estimates","code":""},{"path":"https://r.ubiquity.tools/reference/solution_statistics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Solution Statistics — solution_statistics","text":"returned list following format: objective - objective function value num_observations - number observations degrees_of_freedom - degrees freedom aic - Akaike information criterion bic - Bayesian (Schwarz) information criterion covariance - variance covariance matrix wls - defined weighted least squares objective following elements: jacobian - Jacobian matrix weights - diagonal matrix weights error_variance - diagonal matrix variances ml - defined maximum likelihood objective following elements: M - Jacobian matrix block variance parameters coefficient_of_variation$pname - CV percent parameter pname confidence_interval$lower_bound$pname - Lower bound confidence interval pname confidence_interval$upper_bound$pname - Upper bound confidence interval pname","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"functions run_simulation_ubiquity, simulate_subjects, run_simulation_titrate provide outputs structured format, may useful convert \"wide\" format tall/skinny format.","code":""},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"","code":"som_to_df(cfg, som)"},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"cfg ubiquity system object som simulation output run_simulation_ubiquity, simulate_subjects, run_simulation_titrate","code":""},{"path":"https://r.ubiquity.tools/reference/som_to_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts the Wide/Verbose Output Simulation Functions into Data Frames — som_to_df","text":"Data frame format: applied output run_simulation_ubiquity run_simulation_titrate ts.time - timescale system ts.ts1, ... ts.tsn - timescales defined system () pred - predicted/simulated response tt.ti1.x - titration event information (*) name - state output () name corresponding prediction applied output simulate_subjects ID - subject ID ts.time - timescale system ts.ts1, ... ts.tsn - timescales defined system () pred - predicted/simulated response tt.ti1.x - titration event information (*) P1, P2, ... Pn - system parameters subject (

    ) name - state output () name corresponding prediction (* - field present titration enabled)","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":null,"dir":"Reference","previous_headings":"","what":"Check For Perl and C Tools — system_check_requirements","title":"Check For Perl and C Tools — system_check_requirements","text":"Check local installation perl verify C compiler installed working.","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check For Perl and C Tools — system_check_requirements","text":"","code":"system_check_requirements( checklist = list(perl = list(check = TRUE, perlcmd = \"perl\"), C = list(check = TRUE)), verbose = TRUE )"},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check For Perl and C Tools — system_check_requirements","text":"checklist list names corresponding elements system check. verbose enable verbose messaging","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check For Perl and C Tools — system_check_requirements","text":"List fn result packages","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_requirements.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check For Perl and C Tools — system_check_requirements","text":"","code":"# \\donttest{ invisible(system_check_requirements()) #> #> system_check_requirements() #> #> Testing perl, looking for a perl interpreter #> #> Perl interpreter found, now testing it #> #> > Success: Perl runs, everything should be good #> #> Attempting to compile C file #> #> > Success: C file compiled #> #> Loading the library #> #> > Success: C library loaded # }"},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify System Steady State — system_check_steady_state","title":"Verify System Steady State — system_check_steady_state","text":"Takes ubiquity system object optional inputs verify system running steady state. also provides information can helpful debugging systems running steady state.","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify System Steady State — system_check_steady_state","text":"","code":"system_check_steady_state( cfg, parameters = NULL, zero_rates = TRUE, zero_bolus = TRUE, output_times = seq(0, 100, 1), offset_tol = .Machine$double.eps * 100, derivative_tol = .Machine$double.eps * 100, derivative_time = 0 )"},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify System Steady State — system_check_steady_state","text":"cfg ubiquity system object parameters optional set parameters (NULL) check steady state (set NULL parameters currently selected parameter set used) zero_rates Boolean value control removing rate inputs (TRUE) zero_bolus Boolean value control removing bolus inputs (TRUE) output_times sequence output times simulate offset determination (seq(0,100,1)) offset_tol maximum percent offset considered zero (.Machine$double.eps*100) derivative_tol maximum derivative value considered zero (.Machine$double.eps*100) derivative_time time evaluate derivatives identify deviations (0), set NULL skip derivative evaluation","code":""},{"path":"https://r.ubiquity.tools/reference/system_check_steady_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify System Steady State — system_check_steady_state","text":"List following names steady_state Boolean indicating weather system steady state states_derivative Derivatives values greater derivative_tol states_simulation States values greater offset_tol som Simulated output derivatives Derivatives states_derivative_NA_NaN States derivatives evaluated either NA NaN states_simulation_NA_NaN States simulation values either NA NaN derivative_tc Data frame timecourse states derivative found greater tolerance (states_derivative)","code":""},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear all Cohorts — system_clear_cohorts","title":"Clear all Cohorts — system_clear_cohorts","text":"Clear previously defined cohorts","code":""},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear all Cohorts — system_clear_cohorts","text":"","code":"system_clear_cohorts(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear all Cohorts — system_clear_cohorts","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_clear_cohorts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear all Cohorts — system_clear_cohorts","text":"ubiquity system object cohorts defined","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Estimation Cohort — system_define_cohort","title":"Define Estimation Cohort — system_define_cohort","text":"Define cohort include parameter estimation","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Estimation Cohort — system_define_cohort","text":"","code":"system_define_cohort(cfg, cohort)"},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Estimation Cohort — system_define_cohort","text":"cfg ubiquity system object cohort list cohort information","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Estimation Cohort — system_define_cohort","text":"ubiquity system object cohort defined","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Estimation Cohort — system_define_cohort","text":"cohort name (eg d5mpk), dataset containing information cohort identified (name defined system_load_data) Next portion dataset applies current cohort, can define filter (cf field). applied dataset return values relevant cohort. example, want records column DOSE 5 (5 mpk cohort). can use following: dataset headings ID, DOSE SEX cohort filter following format: translated boolean filter: Optionally may want fix system parameter different value given cohort. can done using cohort parameter (cp) field. example body weight defined system parameter (BW), wanted fix body weight 70 current cohort following: Note can fix parameters estimated. default underlying simulation output times taken general output_times option (see system_set_option). However may also necessary specify simulation output times specific cohort. output_times field can used . Simply provide vector output times: Next define dosing cohort. necessary define inputs non-zero. data generated animals given single 5 mpk IV time 0. Bolus dosing defined using . Cp central compartment, pass information cohort following manner: Inputs can also include infusion rates (infusion_rates) covariates (covariates). Covariates default value specified system file unless overwritten . units system file Next need map outputs model observation data dataset. outputs field field output. field ONAME can replaced something useful (like PK). want filter dataset. Say example two outputs cf applied reduces dataset outputs. can use \"\" field apply \"output filter\" filter records apply current output ONAME. need filtering data, can can just omit field. Next need identify columns dataset contain times observations. found obs field current observation: times observations dataset found ’TIMECOL’ column ’OBSCOL’ column (optional missing data option specified -1). observations dataset need mapped appropriate elements model defined system file. done model field: First system time scale indicated TS placeholder must specfied. time scale must correspond data found TIMECOL . Next model output indicated MODOUTPUT placeholder needs specified. defined system file using correspond OBSCOL dataset. Lastly variance field specifies variance model. can use keyword PRED (model predicted output) variance parameters. examples include: variance = \"1\" - Least squares variance = \"PRED^2\" - Weighted least squares proportional prediction squared variance = \"(SLOPE*PRED)^2\" Maximum likelihood estimation SLOPE defined variance parameter () following controls plotting aspects associated output. color, shape line values values used ggplot functions. cohort multiple outputs, simply repeat process . additional cohorts. estimation vignettes contains examples . Note: Output names consistent cohorts grouped together plotting results.","code":"cohort = list( name = \"d5mpk\", dataset = \"pm_data\", inputs = NULL, outputs = NULL) cohort[[\"cf\"]] = list(DOSE = c(5)) cohort[[\"cf\"]] = list(ID = c(1:4), DOSE = c(5,10), SEX = c(1)) (ID==1) | (ID==2) | (ID==3) | (ID==4)) & ((DOSE == 5) | (DOSE==10)) & (SEX == 1) cohort[[\"cp\"]] = list(BW = c(70)) cohort[[\"output_times\"]] = seq(0,100,2) cohort[[\"inputs\"]][[\"bolus\"]] = list() cohort[[\"inputs\"]][[\"bolus\"]][[\"Cp\"]] = list(TIME=NULL, AMT=NULL) cohort[[\"inputs\"]][[\"bolus\"]][[\"Cp\"]][[\"TIME\"]] = c( 0) cohort[[\"inputs\"]][[\"bolus\"]][[\"Cp\"]][[\"AMT\"]] = c( 5) cohort[[\"outputs\"]][[\"ONAME\"]] = list() cohort[[\"outputs\"]][[\"ONAME\"]][[\"of\"]] = list( COLNAME = c(), COLNAME = c()) cohort[[\"outputs\"]][[\"ONAME\"]][[\"obs\"]] = list( time = \"TIMECOL\", value = \"OBSCOL\", missing = -1) cohort[[\"outputs\"]][[\"ONAME\"]][[\"model\"]] = list( time = \"TS\", value = \"MODOUTPUT\", variance = \"PRED^2\") cohort[[\"outputs\"]][[\"ONAME\"]][[\"options\"]] = list( marker_color = \"black\", marker_shape = 16, marker_line = 1 )"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"function allows user define cohorts automatically NONMEM dataset","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"","code":"system_define_cohorts_nm( cfg, DS = \"DSNAME\", col_ID = \"ID\", col_CMT = \"CMT\", col_DV = \"DV\", col_TIME = \"TIME\", col_AMT = \"AMT\", col_RATE = \"RATE\", col_EVID = \"EVID\", col_GROUP = NULL, filter = NULL, INPUTS = NULL, OBS = NULL )"},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"cfg ubiquity system object DS Name dataset loaded using system_load_data col_ID Column unique subject identifier col_CMT Compartment column col_DV Column observations ’.’ input col_TIME Column system time record col_AMT Infusion/dose amounts (need units specified system.txt file) col_RATE Rate infusion ’.’ bolus col_EVID EVID (0 - observation, 1 dose) col_GROUP Column name use defining similar cohorts generating figures. filter List used filter dataset NULL whole dataset used (see filter rules nm_select_records description use option) INPUTS List mapping input information dataset names used system.txt file OBS List mapping obseravation information dataset nams used system.txt file","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"ubiquity system object cohorts defined.","code":""},{"path":"https://r.ubiquity.tools/reference/system_define_cohorts_nm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Cohorts from NONMEM Input File — system_define_cohorts_nm","text":"NOTE: use function necessary timescale define system time scale. example, system time scale days, something like following needed: Include records dataset Include records matching following filter Mapping information: inputs mapping information (INPUTMAP) alist field type input: input: bolus List name bolus state dataset (): bolus name CMT_NUM field indicating compartment number state infusion_rates List name rate dataset (): rate name CMT_NUM field indicating compartment number state covariates List covariate dataset (): covariate name col_COV indicating column database contains covariate coding perspective looks like : observation mapping information (OBSMAP) list elements output described system_define_cohort. output list following names: variance Variance model output CMT Compartment number mapping observations output output Name output () corresponding observations missing Value indicating missing observation NULL coding perspective looks like :","code":" 1 filter = NULL filter = list() filter$COLNAME = c() INPUTMAP = list() INPUTMAP$bolus$SPECIES$CMT_NUM = 1 INPUTMAP$infusion_rates$RATE$CMT_NUM = 1 INPUTMAP$covariates$CVNAME$col_COV = 'CNAME' OBSMAP = list() OBSMAP$ONAME=list(variance = 'PRED^2', CMT = 1, output = '', missing = NULL )"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Control Estimation Process — system_estimate_parameters","title":"Control Estimation Process — system_estimate_parameters","text":"Manages flow parameter estimation using data specified system_define_cohort.","code":""},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Control Estimation Process — system_estimate_parameters","text":"","code":"system_estimate_parameters( cfg, flowctl = \"plot guess\", analysis_name = \"my_analysis\", archive_results = TRUE )"},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Control Estimation Process — system_estimate_parameters","text":"cfg ubiquity system object flowctl string control flow function analysis_name string containing name analysis archive_results boolean variable control whether results archived","code":""},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Control Estimation Process — system_estimate_parameters","text":"parameter estimates","code":""},{"path":"https://r.ubiquity.tools/reference/system_estimate_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Control Estimation Process — system_estimate_parameters","text":"flowctl argument can following values \"plot guess\" return initial guess \"estimate\" perform estimation \"previous estimate guess\" load previous estimate analysis_name use initial guess \"plot previous estimate\" return previous estimate analysis_name","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch System Timescale — system_fetch_TSsys","title":"Fetch System Timescale — system_fetch_TSsys","text":"Reads system information tries determine system time scale (timescale value 1)","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch System Timescale — system_fetch_TSsys","text":"","code":"system_fetch_TSsys(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch System Timescale — system_fetch_TSsys","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_TSsys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch System Timescale — system_fetch_TSsys","text":"Name system timescale NULL found","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Current Parameter Guesses — system_fetch_guess","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"Fetch list guesses current parameter set parameters selected estimation","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"","code":"system_fetch_guess(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_guess.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Current Parameter Guesses — system_fetch_guess","text":"list current parameter gauesses","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Variability Terms — system_fetch_iiv","title":"Fetch Variability Terms — system_fetch_iiv","text":"Extract elements current variance/covariance matrix specified system file ?, ?, ?, ?","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Variability Terms — system_fetch_iiv","text":"","code":"system_fetch_iiv(cfg, IIV1, IIV2)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Variability Terms — system_fetch_iiv","text":"cfg ubiquity system object IIV1 row name variance/covariance matrix IIV2 column name variance/covariance matrix","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Variability Terms — system_fetch_iiv","text":"Value variance/covariance matrix","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_iiv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Variability Terms — system_fetch_iiv","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Covariance term for ETACL and ETAVc val = system_fetch_iiv(cfg, IIV1=\"ETACL\", IIV2=\"ETAVc\") # }"},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch NCA Results — system_fetch_nca","title":"Fetch NCA Results — system_fetch_nca","text":"Fetches NCA summary ubiquity system object.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch NCA Results — system_fetch_nca","text":"","code":"system_fetch_nca(cfg, analysis_name = \"analysis\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch NCA Results — system_fetch_nca","text":"cfg ubiquity system object analysis_name string containing name NCA analysis (default 'analysis')","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch NCA Results — system_fetch_nca","text":"List data frame NCA results (NCA_summary), raw output PKNCA (PKNCA_results), also list element indicating overall success function call (isgood)","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Columns in NCA Analysis — system_fetch_nca_columns","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"Show columns available given NCA analysis","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"","code":"system_fetch_nca_columns(cfg, analysis_name = \"analysis\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"cfg ubiquity system object analysis_name string containing name NCA analysis (default 'analysis')","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_nca_columns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Columns in NCA Analysis — system_fetch_nca_columns","text":"list following elements: isgood Boolean variable identify function executed properly (TRUE) errors (FALSE) NCA_col_summary dataframe columns analysis analysis_name (col_name - NCA short name, - parameter derived , label - verbose text label column, description, verbose text description parameter. len_NCA_col maximum length col_name column len_from maximum length column len_label maximum length label column len_description maximum length description column","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch System Parameters — system_fetch_parameters","title":"Fetch System Parameters — system_fetch_parameters","text":"Fetch parameters currently selected parameter set. switch parameter sets use system_select_set","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch System Parameters — system_fetch_parameters","text":"","code":"system_fetch_parameters(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch System Parameters — system_fetch_parameters","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch System Parameters — system_fetch_parameters","text":"List parameters selected parameter set","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch System Parameters — system_fetch_parameters","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Fetching the default parameter set parameters = system_fetch_parameters(cfg) # }"},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"extract officer object ubiqiuty system object specified report name.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"","code":"system_fetch_rpt_officer_object(cfg, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"cfg ubiquity system object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_officer_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts the officer Object From the Specified ubiquity Report — system_fetch_rpt_officer_object","text":"officer report object","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"extract onbrand object ubiqiuty system object specified report name.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"","code":"system_fetch_rpt_onbrand_object(cfg, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"cfg ubiquity system object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_rpt_onbrand_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts the onbrand Object From the Specified ubiquity Report — system_fetch_rpt_onbrand_object","text":"onbrand report object","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Mathematical Set — system_fetch_set","title":"Fetch Mathematical Set — system_fetch_set","text":"Fetch elements specified mathematical set defined system file.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Mathematical Set — system_fetch_set","text":"","code":"system_fetch_set(cfg, set_name = NULL)"},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Mathematical Set — system_fetch_set","text":"cfg ubiquity system object set_name name mathematical set","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Mathematical Set — system_fetch_set","text":"sequence containing elements parameter set NULL problem.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Mathematical Set — system_fetch_set","text":"","code":"# \\donttest{ # Creating a system file from the pbpk example fr = system_new(file_name = \"system.txt\", system_file = \"pbpk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Fetching the contents of the ORG mathematical set ORG_elements = system_fetch_set(cfg, \"ORG\") # }"},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":null,"dir":"Reference","previous_headings":"","what":"Create New Analysis Template — system_fetch_template","title":"Create New Analysis Template — system_fetch_template","text":"Building system file produce templates R languages. function provides method make local copies templates.","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create New Analysis Template — system_fetch_template","text":"","code":"system_fetch_template( cfg, template = \"Simulation\", overwrite = FALSE, output_directory = getwd() )"},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create New Analysis Template — system_fetch_template","text":"cfg ubiquity system object template template type overwrite TRUE new system file overwrite existing files present output_directory directory workshop files placed (getwd())","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create New Analysis Template — system_fetch_template","text":"List vectors template sources, destinations corresponding write success (write_file), also list element indicating overall success function call (isgood)","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create New Analysis Template — system_fetch_template","text":"template argument can following values R workflow: \"Simulation\" produces analysis_simulate.R: R-Script named placeholders used run simulations \"Estimation\" produces analysis_estimate.R: R-Script named placeholders used perform naive-pooled parameter estimation \"NCA\" produces analysis_nca.R: R-Script perform non-compartmental analysis (NCA) report results \"ShinyApp\" produces ubiquity_app.R, server.R ui.R: files needed run model Shiny App either locally Shiny Server \"Model Diagram\" produces system.svg: SVG template producing model diagram (Goto https://inkscape.org free SVG editor) \"Shiny Rmd Report\" produces system_report.Rmd test_system_report.R: R-Markdown file used generate report tabs Shiny App script test create files use software: \"Adapt\" produces system_adapt.system_adapt.prm: Fortran parameter files currently selected parameter set Adapt format. \"Berkeley Madonna\" produces system_berkeley_madonna.txt: text file model currently selected parameter set Berkeley Madonna format \"nlmixr\" produces system_nlmixr.R currently selected parameter set define system `nlmixr` format. \"NONMEM\" produces system_nonmem.ctl currently selected parameter set NONMEM conntrol stream. \"Monolix\" produces system_monolix.txt system_monolix.mlxtran currently selected parameter set. \"mrgsolve\" produces system_mrgsolve.cpp: text file model currently selected parameter set mrgsolve format","code":""},{"path":"https://r.ubiquity.tools/reference/system_fetch_template.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create New Analysis Template — system_fetch_template","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Creating a simulation template fr = system_fetch_template(cfg, template = \"Simulation\", output_directory = tempdir()) #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_simulate.R # }"},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize GLP study design — system_glp_init","title":"Initialize GLP study design — system_glp_init","text":"Creates new GLP study design","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize GLP study design — system_glp_init","text":"","code":"system_glp_init(cfg, study_title = \"Study Title\", study_name = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize GLP study design — system_glp_init","text":"cfg ubiquity system object study_title String containing descriptive information study study_name short name used identify study functions (\"default\")","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initialize GLP study design — system_glp_init","text":"cfg ubiquity system object study initialized","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":null,"dir":"Reference","previous_headings":"","what":"Design GLP Study For a Scenario — system_glp_scenario","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"Identifies top dose required GLP tox study order match human metrics (Cmax AUCs) within specified multiplier. given set human parameters human doses required hit target Cmin AUC (one) identified. Cmax AUC associated largest doses determined corresponding doses tox species (provided parameters) determined specific tox multipliers. Optionally, simulations can run specifying doses either/human tox species. Sample times can also specified generate annotated figures tables given analysts facilitate assay design. system file requires following components: - Output drug concentration - Output cumulative AUC - Bolus dosing defined specific compartment - Timescale specified system timescale (e.g. timescale hours need hours = 1.0)","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"","code":"system_glp_scenario( cfg, output_Conc = NULL, output_AUC = NULL, timescale = NULL, units_Conc = \"\", units_AUC = \"\", study_scenario = \"Tox Study\", human_sim_times = NULL, study_name = \"default\", human_parameters = NULL, human_bolus = NULL, human_ndose = 1, human_dose_interval = 1, human_Cmin = NULL, human_AUC = NULL, human_sample_interval = NULL, human_sim_doses = NULL, human_sim_samples = NULL, tox_species = \"Tox\", tox_sim_times = NULL, tox_parameters = NULL, tox_bolus = NULL, tox_ndose = 1, tox_dose_interval = 1, tox_Cmax_multiple = 10, tox_AUC_multiple = 10, tox_sample_interval = NULL, tox_sim_doses = NULL, tox_sim_samples = NULL, annotate_plots = TRUE )"},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"cfg ubiquity system object output_Conc model output specified containing concentration associated drug exposure. output_AUC model output specified containing cumulative exposure timescale system timescale specified used AUC comparisons plotting units_Conc units concentration ('') units_AUC units AUC ('') study_scenario string containing descriptive name tox study human_sim_times user-specified simulation output times humans (timescale system) study_name name study append scenario set 'system_glp_init()' ('default'): report initialized using system_rpt_read_template report name 'default' unless otherwise specified. disable reporting set NULL, use different report specify name . human_parameters list containing human parameters human_bolus string containing dosing state human doses (specified ) human_ndose number human doses simulate human_dose_interval dosing interval humans (time units specified ) human_Cmin target Cmin humans (corresponding output_Conc ) human_AUC target AUC humans (corresponding output_AUC ) human_sample_interval time interval units specified timescale evaluate trough concentration AUC (e.g c(1.99, 4.001) consider interval 2 4) human_sim_doses optional list doses human_bolus simulate (see Details ) human_sim_samples optional list sample times units specified timescale label plots simulated doses (default NULL disable labels) tox_species optional name tox species (\"Tox\") tox_sim_times user-specified simulation output times tox species (timescale system) tox_parameters list containing parameters tox species tox_bolus string containing dosing state tox species doses (specified ) tox_ndose number tox doses simulate tox_dose_interval dosing interval tox species (time units specified ) tox_Cmax_multiple target (Cmin AUC) dose tox species found cover multiple projected Cmax humans (10) tox_AUC_multiple target (Cmin AUC) dose tox species found cover multiple projected AUC humans (10) tox_sample_interval interval consider AUC Cmax comparing human prediction tox multiple tox_sim_doses optional list doses tox_bolus simulate (see Details ) tox_sim_samples optional list sample times units specified timescale label plots simulated doses (default NULL disable labels) annotate_plots Boolean switch indicate human_sim_samples tox_sim_samples labeled respective plots (TRUE)","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"cfg ubiquity system object scenario added successful","code":""},{"path":"https://r.ubiquity.tools/reference/system_glp_scenario.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Design GLP Study For a Scenario — system_glp_scenario","text":"human_sim_doses tox_sim_doses lists names corresponding label dose. element AMT TIME element corresponds dosing times amounts units specified system file. example wanted simulate four weekly doses 20 mg 70 kg person units bolus doses days mg/kg times amounts following:","code":"human_sim_doses = list() human_sim_doses[[\"20 mg QW\"]]$TIME = c( 0, 7, 14, 21) human_sim_doses[[\"20 mg QW\"]]$AMT = c(0.2857, 0.2857, 0.2857, 0.2857)"},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Loading Datasets — system_load_data","title":"Loading Datasets — system_load_data","text":"Loads datasets scripting level variable data_file data.frame following formats (based file extension) csv - comma delimited tab - tab delimited xls xlsx - excel spread sheet Multiple datasets can loaded long given different names. Datasets NONMEM-ish format first row containing column header names.","code":""},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Loading Datasets — system_load_data","text":"","code":"system_load_data(cfg, dsname, data_file, data_sheet)"},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Loading Datasets — system_load_data","text":"cfg ubiquity system object dsname short name dataset used link dataset different operations data_file file name dataset data frame containing data data_sheet argument identifying name sheet excel file","code":""},{"path":"https://r.ubiquity.tools/reference/system_load_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Loading Datasets — system_load_data","text":"Ubiquity system object dataset loaded","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":null,"dir":"Reference","previous_headings":"","what":"Save variables to files — system_log_debug_save","title":"Save variables to files — system_log_debug_save","text":"Triggered debugging enabled, function save contents values specified file name ubiquity temporary directory.","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save variables to files — system_log_debug_save","text":"","code":"system_log_debug_save(cfg, file_name = \"my_file\", values = NULL)"},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save variables to files — system_log_debug_save","text":"cfg ubiquity system object file_name name save file without \".RData\" extension values named list variables save","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Save variables to files — system_log_debug_save","text":"Boolean variable indicating success","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_debug_save.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save variables to files — system_log_debug_save","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # enable debugging: cfg=system_set_option(cfg,group = \"logging\", option = \"debug\", value = TRUE) # Saving the cfg variable system_log_debug_save(cfg, file_name = 'my_file', values = list(cfg=cfg)) #> [1] TRUE # }"},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Log Entry — system_log_entry","title":"Add Log Entry — system_log_entry","text":"Appends specified line analysis log","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Log Entry — system_log_entry","text":"","code":"system_log_entry(cfg, entry)"},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Log Entry — system_log_entry","text":"cfg ubiquity system object entry string containing log entry","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Log Entry — system_log_entry","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_entry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Log Entry — system_log_entry","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Initialzing the log file system_log_entry(cfg, \"Text of log entry\") #> NULL # }"},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize System Log File — system_log_init","title":"Initialize System Log File — system_log_init","text":"Initializes currently specified system log file.","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize System Log File — system_log_init","text":"","code":"system_log_init(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize System Log File — system_log_init","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initialize System Log File — system_log_init","text":"ubiquity system object logging enabled","code":""},{"path":"https://r.ubiquity.tools/reference/system_log_init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Initialize System Log File — system_log_init","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Initialzing the log file cfg = system_log_init(cfg) # }"},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"Provides verbose information NCA parameters","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"","code":"system_nca_parameters_meta(cfg)"},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"cfg ubiquity system object","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_parameters_meta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List NCA parameters, text names and descriptions — system_nca_parameters_meta","text":"List following elements: isgood Boolean value indicating success function call. parameters List element names standard column header NCA output. element name list following elements: label Textual descriptor parameter. description Verbose description parameter. Text indicating source parameter (either PKNCA ubiquity).","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":null,"dir":"Reference","previous_headings":"","what":"Automatic NCA — system_nca_run","title":"Automatic NCA — system_nca_run","text":"Performs NCA automated fashion","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automatic NCA — system_nca_run","text":"","code":"system_nca_run( cfg, dsname = \"PKDS\", dscale = 1, NCA_options = NULL, NCA_min = 4, analysis_name = \"analysis\", dsfilter = NULL, extrap_C0 = TRUE, extrap_N = 2, sparse = FALSE, dsmap = list(TIME = \"TIME\", NTIME = \"NTIME\", CONC = \"CONC\", DOSE = \"DOSE\", ID = \"ID\", ROUTE = \"ROUTE\", DOSENUM = NULL, BACKEXTRAP = NULL, SPARSEGROUP = NULL), dsinc = NULL )"},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automatic NCA — system_nca_run","text":"cfg ubiquity system object dsname name dataset loaded (system_load_data) dscale factor multiply dose get units concentration (default 1): dosing mg/kg concentrations ng/ml, dscale = 1e6 NCA_options specify list options PKNCA overwrite defaults (default NULL use defaults). example want set maximum extrapolation AUCinf 10 half-life half-life 0.8 use: list(max.aucinf.pext=10, min.hl.r.squared=.9) NCA_min minimum number points required perform NCA given subset (default 4) analysis_name string containing name analysis (default 'analysis') archive files reference results later dsfilter list names corresponding column names dataset values sequence indicating values keep (default NULL. Multiple names -ed together. example following keep records dose 1, 2, 5 dose_number 1 extrap_C0 Boolean variable enable automatic determination initial drug concentration value specified; rules used WinNonlin used: route \"iv infusion\" \"extra-vascular\" data single dose data, concentration zero used. repeat dosing used, minimum value previous dosing interval used. route \"iv bolus\" log-linear regression number observations specified extrap_N used. slope points positive first positive observation used estimate C0 extrap_N number points use back extrapolation (default 2); number can overwritten subject using BACKEXTRAP column dataset sparse Boolean variable used indicate data used sparse sampling analysis use average time point (SPARSEGROUP column must specified dsmap ) dsmap list names specifying columns dataset (* required): TIME* Time since first dose; \"TIME\" (default) NTIME* Nominal time since last dose; \"NTIME\" (default) CONC* Concentration data; \"CONC\" (default) DOSE* Dose given; (\"DOSE\" (default) ID* Subject ID; (\"ID\" (default) ROUTE* Route administration; \"ROUTE\" (default), can either \"iv bolus\", \"iv infusion\" \"extra-vascular\". Variants \"IV_bolus\" \"extravascular\" work well. DOSENUM Numeric dose (starting 1) used grouping multiple dose data; optional, NULL (default) single dose data) BACKEXTRAP Specifying number points use extrapolate initial concentration \"iv bolus\" dosing; optoinal f NULL (default) use value defined extrap_N (note value must <= NCA_min) SPARSEGROUP Column containing unique value grouping cohorts pooling data. Needed sparse set TRUE; optional, NULL (default) dsinc (CURRENTLY IMPLEMENTED) optional character vector columns dataset include output summary (default NULL)","code":"dsfilter = list(dose=c(1,2,5), dose_number = c(1))"},{"path":"https://r.ubiquity.tools/reference/system_nca_run.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Automatic NCA — system_nca_run","text":"cfg ubiquity system object NCA results analysis name specified: output/analysis_name-nca_summary-pknca.csv NCA summary output/analysis_name-pknca_summary.csv Raw output PKNCA subject dose number columns appended output/analysis_name-nca_data.RData objects containing NCA summary list ggplot grobs","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_nca_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize NCA Results in Tabular Format — system_nca_summary","title":"Summarize NCA Results in Tabular Format — system_nca_summary","text":"Creates tabular summaries NCA results","code":""},{"path":"https://r.ubiquity.tools/reference/system_nca_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize NCA Results in Tabular Format — system_nca_summary","text":"","code":"system_nca_summary( cfg, analysis_name = \"analysis\", treat_as_factor = c(\"ID\", \"Dose_Number\", \"Dose\"), params_include = c(\"ID\", \"cmax\", \"tmax\", \"auclast\"), params_header = NULL, rptname = \"default\", label_format = NULL, summary_stats = NULL, summary_labels = list(MEAN = \"Mean\", STD = \"Std Dev\", MEDIAN = \"Median\", N = \"N obs\", SE = \"Std Err.\"), summary_location = NULL, ds_wrangle = NULL, digits = 3, table_theme = \"theme_zebra\" )"},{"path":"https://r.ubiquity.tools/reference/system_nca_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize NCA Results in Tabular Format — system_nca_summary","text":"cfg ubiquity system object analysis_name string containing name analysis (default 'analysis') previously run treat_as_factor sequence column names treated factors (default c(\"ID\", \"Dose_Number\", \"Dose\")). Use report values without added decimals. params_include vector names parameters include (default c(\"ID\", \"cmax\", \"tmax\", \"auclast\")) params_header list names parameters followed vector headers. can use placeholder \"

    ) reassigned parameter set (?). can altered scripting level using function.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"","code":"system_set_guess(cfg, pname, value, lb = NULL, ub = NULL)"},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"cfg ubiquity system object pname name parameter set value value assign lb optionally change lower bound (NULL) ub optionally change upper bound (NULL)","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"cfg ubiquity system object guess bounds assigned","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_guess.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter Initial Guess and Parameter Bounds — system_set_guess","text":"performing parameter estimation, initial guess value specified system.txt file currently selected parameter set. following command can used parameter set selected specify value (VALUE) parameter PNAME optionally lower (lb) upper (ub) bounds: set initial guess parameter Vc value 3, following used: specify guess overwrite upper bound Vc set 5","code":"cfg = system_set_guess(cfg, pname=\"PNAME\", value=VALUE, lb=NULL, ub=NULL) cfg = system_set_guess(cfg, \"Vc\", value=3) cfg = system_set_guess(cfg, \"Vc\", value=3, ub=5)"},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Variability Terms — system_set_iiv","title":"Set Variability Terms — system_set_iiv","text":"Set elements current variance covariance matrix specified system file ?, ?, ?, ?","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Variability Terms — system_set_iiv","text":"","code":"system_set_iiv(cfg, IIV1, IIV2, value)"},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Variability Terms — system_set_iiv","text":"cfg ubiquity system object IIV1 row name variance/covariance matrix IIV2 column name variance/covariance matrix element value value assign variance/covariance matrix element","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Variability Terms — system_set_iiv","text":"Ubiquity system object IIV information set","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_iiv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Variability Terms — system_set_iiv","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Clearing all inputs cfg = system_zero_inputs(cfg) # Setting the covariance element for CL and Vc to 0.03 cfg = system_set_iiv(cfg, IIV1 = \"ETACL\", IIV2 = \"ETAVc\", value=0.03) # }"},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":null,"dir":"Reference","previous_headings":"","what":"Setting Analysis Options — system_set_option","title":"Setting Analysis Options — system_set_option","text":"Different options associated performing analyses (e.g running simulations, performing parameter estimation, logging, etc.) can set function","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setting Analysis Options — system_set_option","text":"","code":"system_set_option(cfg, group, option, value)"},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setting Analysis Options — system_set_option","text":"cfg ubiquity system object group options grouped together underlying activity performed: \"estimation\", \"general\", \"logging\", \"simulation\", \"solver\", \"stochastic\", \"titration\" option group set options value corresponding value option","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setting Analysis Options — system_set_option","text":"Ubiquity system object option set","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_option.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Setting Analysis Options — system_set_option","text":"group=\"estimation\" default estimation R performed using either optim optimx libraries. selected setting optimizer option: optimization routine specified using method. default option set Nelder-Mead. different attributes selected using control. different methods control options, see documentation optim optimx libraries. perform global optimization can install either particle swarm (pso) genetic algorithm (GA) libraries. use particle swarm set optimizer method: control option list described pso documentation. use genetic algorithm set optimizer method: control option list list elements named options GA documentation. Use following example: alter initial guesses see: system_set_guess performing parameter estimation, internal function system_od_general used. function simulates system conditions defined different cohorts. pretty flexible want go beyond can set observation_function option: instruct optimziation routines use user defined function my_od. need construct function input/output format system_od_general. group=general \"output_directory\" = String analysis outputs placed. Generally wont want change , can useful Shiny apps need shiny user generate output users directory : file.path(\".\", \"output\") group=logging default ubiquity prints different information console logs information log file. following options can used control behavior: \"enabled\" = Boolean variable control logging: TRUE \"file\" = String containing name log file: file.path(\"transient\", \"ubiquity_log.txt\") \"timestamp\" = Boolean switch control appending time stamp log entries: TRUE \"ts_str\" = String format timestamp: \" \"debug\" = Boolean switch control debugging (see ): FALSE \"verbose\" = Boolean switch control printing console FALSE enable debugging different functions (like performing esitmation), set debug option TRUE. Important function calls trapped information logged reported console. group=\"simulation\" \"dynamic\" - Set TRUE (default) simulations behave normally. Set FALSE ODES evaulate zero. useful steady-state anslysis. \"include_important_output_times\" - Automatically add bolus, infusion rate switching times, etc: \"yes\"(default), \"\". \"integrate_with\" - Specify ODE solver use Rscript (\"r-file\") compiled C (\"c-file\"), build process can compile load C version default otherwise switch R script. \"output_times\" - Vector times evaulate simulation (default seq(0,100,1)). \"solver\" - Selects ODE solver: \"lsoda\" (default), \"lsode\", \"vode\", etc.; see documentation deSolve exhaustive list. \"sample_bolus_delta\" - Spacing used sampling around bolus events (default 1e-6). \"sample_forcing_delta\" - Spacing used sampling around forcing functions (infusion rates, covariates, etc) (default 1e-3). group=solver Depending solver, different options can set. documentation deSolve lists different solvers. full list options, see documentation specific solver (e.g. ?lsoda). common options consider : \"atol\" - Relative error tolerance \"rtol\" - Absolute error tolerance \"hmin\" - Minimum integration step size \"hmax\" - Maximum integration step size select vode solver set maximum step size 0.01, following used: group=\"stochastic\" running stochastic simulations (inter-individual variability applied system parameters) can useful specify following: \"ci\" - Confidence interval (default 95) \"nsub\" - Number subjects (default 100) \"seed\" - Seed random numebr generator (default 8675309) \"ponly\" - generate subject parameters run simulations (default FALSE) \"ssp\" - list calculated static secondary parameters include (default parameters defined <>) \"outputs\" - list predicted outputs include (default outputs defined ) \"states\" - list predicted states include(default states) \"sub_file\" - Name data set loaded (system_load_data) containing subject level parameters coviariates \"sub_file_sample\" - Controls subjects sampled dataset wanted generate 1000 subjects wanted parameters, use following: wanted exclude states secondary parameters, including output Cp_nM, following: pull subject information data file instead generating subject parameters IIV information sub_file option can used. value SUBFILE_NAME name given dataset loaded (system_load_data): Sampling dataset can controlled using sub_file_sample option: Sampling can done sequentially (\"sequential\"), replacement (\"replacement\"), without replacement (\"without replacement\") group=\"titration\" \"titrate\" - default titration disable (set FALSE). going use titration, enable setting option TRUE. force #' simulate_subjects use run_simulation_titrate internally running simulations.","code":"cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"optim\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"Nelder-Mead\") cfg = system_set_option(cfg, group = \"estimation\", option = \"control\", value = list(trace = TRUE, maxit = 500, REPORT = 10)) cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"pso\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"psoptim\") cfg = system_set_option(cfg, group = \"estimation\", option = \"optimizer\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"method\", value = \"ga\") cfg = system_set_option(cfg, group = \"estimation\", option = \"control\", value = list(maxiter = 10000, optimArgs = list( method = \"Nelder-Mead\", maxiter = 1000))) cfg = system_set_option(cfg, group = \"estimation\", option = \"observation_function\", value = \"my_od\") cfg = system_set_option(cfg, group = \"estimation\", option = \"debug\", value = FALSE) cfg=system_set_option(cfg, group = \"simulation\", option = \"solver\", value = \"vode\") cfg=system_set_option(cfg, group = \"solver\", option = \"hmax\", value = 0.01) cfg = system_set_option(cfg, group = \"stochastic\", option = \"nsub \", value = 1000) cfg = system_set_option(cfg, group = \"stochastic\", option = \"ponly\", value = TRUE ) cfg = system_set_option (cfg, group = \"stochastic\", option = \"ssp\", value = list()) cfg = system_set_option (cfg, group = \"stochastic\", option = \"states\", value = list()) cfg = system_set_option (cfg, group = \"stochastic\", option = \"outputs\", value = c(\"Cp_nM\")) cfg=system_set_option(cfg, group = \"stochastic\", option = \"sub_file\", value = \"SUBFILE_NAME\") cfg=system_set_option(cfg, group = \"stochastic\", option = \"sub_file_sample\", value = \"with replacement\")"},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Value for Parameter — system_set_parameter","title":"Set Value for Parameter — system_set_parameter","text":"Assigns value named parameter parameter list.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Value for Parameter — system_set_parameter","text":"","code":"system_set_parameter(cfg, parameters, pname, value)"},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Value for Parameter — system_set_parameter","text":"cfg ubiquity system object parameters vector parameters pname parameter name value value","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Value for Parameter — system_set_parameter","text":"parameters vector pname set value","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_parameter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Value for Parameter — system_set_parameter","text":"set parameter Vc value 3, following used:","code":"parameters = system_fetch_parameters(cfg) parameters = system_set_parameter(cfg, parameters, pname = 'Vc', value = 3)"},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Infusion Rate Inputs — system_set_rate","title":"Set Infusion Rate Inputs — system_set_rate","text":"Defines infusion rates specified system file using ","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Infusion Rate Inputs — system_set_rate","text":"","code":"system_set_rate(cfg, rate, times, levels)"},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Infusion Rate Inputs — system_set_rate","text":"cfg ubiquity system object rate name infusion rate times list time values levels corresponding list infusion values","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Infusion Rate Inputs — system_set_rate","text":"Ubiquity system object infusion rate set","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_rate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Infusion Rate Inputs — system_set_rate","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Clearing all inputs cfg = system_zero_inputs(cfg) # 5 minute infusion at 10 mg/min cfg = system_set_rate(cfg, rate = \"Dinf\", times = c(0, 5), levels = c(10, 0)) # }"},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"replace officer object ubiqiuty system object specified report name value supplied.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"","code":"system_set_rpt_officer_object(cfg, rpt = NULL, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"cfg ubiquity system object rpt officer report object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_officer_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sets the officer Object for the Specified ubiquity Report — system_set_rpt_officer_object","text":"ubiquity system object replaced officer object","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"reset onbrand object ubiqiuty system object specified report name.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"","code":"system_set_rpt_onbrand_object(cfg, obnd = NULL, rptname = \"default\")"},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"cfg ubiquity system object obnd onbrand report object rptname ubiquity report name","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_rpt_onbrand_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sets the onbrand Object for the Specified ubiquity Report — system_set_rpt_onbrand_object","text":"ubiquity system object onbrand report set","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":null,"dir":"Reference","previous_headings":"","what":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"prototype function SI_TT_BOLUS provides interface function. Based input SI_TT_BOLUS bolus inputs updated current titration time.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"","code":"system_set_tt_bolus( cfg, state, values, times, tt_ts, tsinfo, repdose = \"none\", interval = 1, number = 0 )"},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"cfg ubiquity system object state dosing state/compartment (Defined ) values vector dosing amounts (dosing units defined ) times vector dosing times relative current titration time (# time units defiend ) tt_ts list timescale values current titration time tsinfo list timescale information inputs (bolus, rates, etc) repdose \"none\", \"last\", \"\" interval interval repeat units defined number number times repeat","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_bolus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Actual Function Called by SI_TT_BOLUS — system_set_tt_bolus","text":"ubiquity system object bolus dosing updated.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Titration Triggers and Actions — system_set_tt_cond","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"rule defined using system_new_tt_rule, can used specifying checks titration time points , true, perform actions.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"","code":"system_set_tt_cond(cfg, name, cond, action, value = \"-1\")"},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"cfg ubiquity system object name string containing name titration rule condition applies cond string evaluates boolean value TRUE action triggered action stringing evaluates done condition met (e.g. changing dose, state change, etc) value code stored titration history track condition triggered","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"Ubiquity system object titration condition defined","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_cond.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Titration Triggers and Actions — system_set_tt_cond","text":"general syntax setting new condition : name input associate condition previously defined rule. time defined rule created, condition (cond) evaluated. condition evaluates TRUE action evaluated. Lastly, condition action evaluated, value stored titration history. Multiple conditions can associated rule. internal titration history track one condition evaluated true, simulation output show last condition evaluated true. cond field string , evaluated, produce boolean value (TRUE FALSE). simply want force action times given rule can use: cond = \"TRUE\". Alternatively can provide mathematical expressions even complicated user defined functions. action field evaluated cond true. modify simulation going performed, want modify SIMINT_cfgtt variable using different system commands. Certain common tasks prototype functions created make easier user: SI_TT_BOLUS - Set bolus dosing SI_TT_RATE - Set infusion inputs SI_TT_STATE - Reset system states Note: Protype functions strings sometimes necessary specify strings within string. main string use double quotes (\") internal strings use single quotes (') SI_TT_BOLUS simplest way apply bolus condition true use following: values times vectors numbers equal length. dosing time units specified system.txt file delimiter. times relative titration time. 0 means titration time. ’s possible specify interval number times repeat last dose using following: give dose 5 titration point 2 time units later. dose 10 time 4 repeated 7 times every 4 time units. total 8 (7 + 1) doses 10 administered. Remember time units defined . input repdose can either ’last’ ’none’. Note: main string double quotes \" \" strings protype argument (e.g. ’last’) single quotes ’ ’. SI_TT_RATE created infusion named Dinf using infusion units min (times) mg/min (rates). 60 minute infusion 20 mg/min following: wanted every day 9 days (total 10 days) can repeat sequence: input repdose can either ’sequence’ ’none’. Note: time units dosing rate specified using . SI_TT_STATE provide fine control states titration points state reset prototype provided. example, modeling assay wash step want drop concentration zero. state named Cc defined system.txt want set 0.0 condition following action work. value number can use mathematical combination variables available titration environment. Also can create user function place function call within brackets . Titration Environment cond, action, value statements can use variables available titration environment. want perform complicated actions, can simply create user defined functions pass variables titration environment need. include named variables model well internal variables used control titration. States Parameters System parameters (

    ), static secondary parameters (<>) initial value covariates available. Also state values (current titration time) can used. available names specified system.txt file. Since system resets (SI_TT_STATE) processed first, changes made states values active actions. Internal Simulation Variables Internal variables used control titration activities. variables can also used conditions actions. SIMINT_p - list system parameters SIMINT_cfg - system configuration sent titration routine SIMINT_cfgtt- system configuration current titration event time SIMINT_ttimes - vector titration times (simulation units) SIMINT_ttime - current titration time (simulation units) SIMINT_tt_ts - list time scales current titration SIMINT_history - data frame tracking history conditions evaluated true following structure: tname - name titration rule value - value indicating condition satisfied simtime - simulation time rule/value triggered timescale - time rule timescale rule/value triggered Individual Simulations run individual titration simulation use following: provides output run_simulation_ubiquity two extra fields. first, som$titration, contains three columns titration rule. columns length equal corresponding simulation times. rule name rname, column headers following names meanings: tt.rname.value - Value rule active condition -1 triggered tt.rname.simtime - Simulation time last condition became active tt.rname.timescale - Simulation time time scale rule specified second field som$titration_history contains summary list titration events triggered. tname - Titration rule name value - Value rule active condition -1 triggered simtime - Simulation time last condition became active timescale - Simulation time time scale rule specified convert structured list data frame som_to_df command can used: run stochastic titration simulations, function used: add data list element called som$titration three fields titration rule: tt.rname.value - Value rule active condition -1 triggered tt.rname.simtime - Simulation time last condition became active tt.rname.timescale - Simulation time time scale rule specified fields matrix entry simulation time (column) subject (row). data structure can also converted data frame using som_to_df.","code":"cfg = system_new_tt_cond(cfg, name = \"rname\", cond = \"BOOLEAN EXPRESSION\", action = \"EXPRESSION\", value = \"VALUE\") action = \"SI_TT_BOLUS[state=’At’, values=c(10, 10, 10), times=c(0, 1, 2)]\" action = \"SI_TT_BOLUS[state = ’At’, values = c(5, 5, 10), times = c(0, 2, 4), repdose = ’last’, number = 7, interval = 4]\" action = \"SI_TT_RATE[rate=’Dinf’, times=c(0, 60), levels=c(20.0, 0)]\" action = \"SI_TT_RATE[rate = ’Dinf’, times = c(0, 60), levels = c(20, 0), repdose = ’sequence’, number = 9, interval = 24*60]\" action = \"SI_TT_STATE[Cc][0.0]\" som = run_simulation_titrate(parameters, cfg) sdf = som_to_df(cfg, som) som = simulate_subjects(parameters, cfg)"},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":null,"dir":"Reference","previous_headings":"","what":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"prototype function SI_TT_RATE provides abstract interface function. Based input SI_TT_RATE infusion rate inputs updated current titration time.","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"","code":"system_set_tt_rate( cfg, rate, times, levels, tt_ts, tsinfo, repdose = \"none\", interval = 1, number = 0 )"},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"cfg ubiquity system object rate name infusion rate update(Defined ) times vector switching times relative current titration time (time units defined ) levels vector infusion rates (dosing units defined ) tt_ts list timescale values current titration time tsinfo list timescale information inputs (bolus, rates, etc) repdose \"none\" \"sequence\" interval interval repeat units defined number number times repeat","code":""},{"path":"https://r.ubiquity.tools/reference/system_set_tt_rate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Actual Function Called by SI_TT_RATE — system_set_tt_rate","text":"ubiquity system object infusion rates updated.","code":""},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate Results at Estimates — system_simulate_estimation_results","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"Simulates system parameter estimates pest creating diagnostic plots","code":""},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"","code":"system_simulate_estimation_results(pest, cfg, details = FALSE)"},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"pest vector parameters cfg ubiquity system object details set TRUE display information cohorts simulated (useful debugging)","code":""},{"path":"https://r.ubiquity.tools/reference/system_simulate_estimation_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate Results at Estimates — system_simulate_estimation_results","text":"observations list, see system_od_general estimation=FALSE","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"converts time specified defined timescale (say weeks) timescale simulation (say hours rates 1/hr units)","code":""},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"","code":"system_ts_to_simtime(cfg, tstime, ts)"},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"cfg ubiquity system object tstime numeric time timescale ts string containing timescale","code":""},{"path":"https://r.ubiquity.tools/reference/system_ts_to_simtime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Time in Timescale to Simulation Time — system_ts_to_simtime","text":"tstime system timescale units","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":null,"dir":"Reference","previous_headings":"","what":"View Information About the System — system_view","title":"View Information About the System — system_view","text":"Displays information (dosing, simulation options, covariates, etc) system.","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"View Information About the System — system_view","text":"","code":"system_view(cfg, field = \"all\", verbose = FALSE)"},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"View Information About the System — system_view","text":"cfg ubiquity system object field string indicating aspect system display verbose Boolean variable set true echo information screen","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"View Information About the System — system_view","text":"sequence strings system formation (one line per element) field \"\" show information system \"parameters\" summary parameter information \"bolus\" currently set bolus dosing \"rate\" infusion rate dosing \"covariate\" covariates \"iiv\" variance/covariance information \"datasets\" loaded datasets \"simulation\" simulation options \"estimation\" estimation options \"nca\" non-compartmental analyses performed","code":""},{"path":"https://r.ubiquity.tools/reference/system_view.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"View Information About the System — system_view","text":"","code":"# To log and display the current system information: # \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") msgs = system_view(cfg, verbose=TRUE) #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' %s, %s(%s)' #> Warning: one argument not used by format ' ' #> → Parameter Information #> → Parameter set selected: #> → Short Name: default #> → Description: mAb in Humans #> → Default parameters for current set: #> → name | value | units #> → ---------------------------------------------------- #> → F1 | 0.7440 | --- #> → ka | 0.2820 | 1/day #> → CL | 0.2000 | L/day #> → Vc | 3.6100 | L #> → Vp | 2.7500 | L #> → Q | 0.7470 | L/day #> → MW | 140.0000 | kD #> → prop_err | 0.1000 | -- #> → add_err | 0.1000 | ng/ml #> → ---------------------------------------------------- #> → #> → Bolus dosing details #> → field | values | scaling | units #> → -------------------------------------------------- #> → times | 0 7 14 | 1 | days #> → Cc | 0 0 0 | 1e3/MW/Vc | mg #> → At | 400 0 0 | 1e3/MW | mg #> → -------------------------------------------------- #> → Infusion rate details #> → Rate | field | values | scaling | units #> → ----------------------------------------------------------------- #> → Dinf | time | 0 30 | 1/60/24 | min #> → | levels | 0 0 | 60*24*1e3/MW | mg/min #> → ----------------------------------------------------------------- #> → #> → Covariate details #> → Covariate | field | values | units #> → -------------------------------------------------- #> → DOSE | time | 0 | day #> → (step) | levels | 400 | mg #> → WT | time | 0 | day #> → (step) | levels | 60 | kg #> → -------------------------------------------------- #> → #> → IIV details #> → IIV/Parameter set: #> → Short Name: default #> → Variance/covariance matrix #> → #> → ETAka ETACL ETAVc ETAVp ETAQ #> → ETAka 0.4160 0 0 0 0 #> → ETACL 0 0.0988 0.0786 0.0619 0 #> → ETAVc 0 0.0786 0.1160 0.0377 0 #> → ETAVp 0 0.0619 0.0377 0.0789 0 #> → ETAQ 0 0 0 0 0.6990 #> → #> → On parameters #> → CL, ETACL(LN) #> → Vp, ETAVp(LN) #> → ka, ETAka(LN) #> → Vc, ETAVc(LN) #> → Q, ETAQ(LN) #> → #> → integrate_with c-file #> → output_times min = 0; max = 10.0; length = 101 #> → No datasets loaded #> → #> → Estimation details #> → Parameter set: default #> → Parameters estimated: F1, ka, CL, Vc, Vp, Q, MW, prop_err, add_err #> → objective_type ml #> → observation_function system_od_general #> → No cohort information found #> → No NCA has been performed # }"},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":null,"dir":"Reference","previous_headings":"","what":"Zero All Model Inputs — system_zero_inputs","title":"Zero All Model Inputs — system_zero_inputs","text":"Multiple default inputs can specified system file. scripting level function can used set inputs zero. subsequently specified inputs applied.","code":""},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Zero All Model Inputs — system_zero_inputs","text":"","code":"system_zero_inputs(cfg, bolus = TRUE, rates = TRUE)"},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Zero All Model Inputs — system_zero_inputs","text":"cfg ubiquity system object bolus Boolean value indicating weather bolus inputs set zero rates Boolean value indicating weather infusion rate inputs set zero","code":""},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Zero All Model Inputs — system_zero_inputs","text":"Ubiquity system object specified inputs set zero","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/system_zero_inputs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Zero All Model Inputs — system_zero_inputs","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Clear only infusion rates cfg = system_zero_inputs(cfg, bolus=TRUE, rates=FALSE) # Clear all inputs: cfg = system_zero_inputs(cfg) # }"},{"path":"https://r.ubiquity.tools/reference/tic.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of Matlab tic() command — tic","title":"Implementation of Matlab tic() command — tic","text":"Used conjunction toc() find elapsed time code executed.","code":""},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of Matlab tic() command — tic","text":"","code":"tic(type = c(\"elapsed\", \"user.self\", \"sys.self\"))"},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Implementation of Matlab tic() command — tic","text":"type can either \"elapsed\" \"user.self\" \"sys.self\"","code":""},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of Matlab tic() command — tic","text":"time tic called","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/tic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of Matlab tic() command — tic","text":"","code":"tic() Sys.sleep(3) toc() #> elapsed #> 3.007"},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"Given matrix (d) time courses (row individual column time point) confidence interval (ci) calculate mean, median, confidence intervals vector values creating patches.","code":""},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"","code":"timecourse_stats(d, ci)"},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"d matrix responses (row individual column time point) ci confidence interval percent (eg, 95)","code":""},{"path":"https://r.ubiquity.tools/reference/timecourse_stats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Timecourse Statistics for a Matrix of Responses — timecourse_stats","text":"List following elements: stats$ub_ci vector confidence interval upper bound stats$lb_ci vector confidence interval lower bound stats$mean vector mean values stats$median vector median values","code":""},{"path":"https://r.ubiquity.tools/reference/toc.html","id":null,"dir":"Reference","previous_headings":"","what":"Implementation of Matlab toc() command — toc","title":"Implementation of Matlab toc() command — toc","text":"Used conjunction tic() find elapsed time code executed.","code":""},{"path":"https://r.ubiquity.tools/reference/toc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Implementation of Matlab toc() command — toc","text":"","code":"toc()"},{"path":"https://r.ubiquity.tools/reference/toc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Implementation of Matlab toc() command — toc","text":"time seconds since tic() called","code":""},{"path":[]},{"path":"https://r.ubiquity.tools/reference/toc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Implementation of Matlab toc() command — toc","text":"","code":"tic() Sys.sleep(3) toc() #> elapsed #> 3.007"},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"Checks names specified different analysis aspects (cohorts, analyses, reports, etc.) make sure start letter contain letters, numbers _","code":""},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"","code":"ubiquity_name_check(test_name)"},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"test_name string containing name tested","code":""},{"path":"https://r.ubiquity.tools/reference/ubiquity_name_check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Names of Cohorts, Analyses, Reports, etc. — ubiquity_name_check","text":"List Boolean element isgood TRUE name tests correct, FALSE fails. element msgs contains verbose message fails.","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts Numeric Variables into Padded Strings — var2string","title":"Converts Numeric Variables into Padded Strings — var2string","text":"Mechanism converting numeric variables strings reporting.","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts Numeric Variables into Padded Strings — var2string","text":"","code":"var2string(vars, maxlength = 0, nsig_e = 3, nsig_f = 4)"},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts Numeric Variables into Padded Strings — var2string","text":"vars numeric variable vector numeric variables maxlength value greater zero spaces added beginning string total length equal maxlength nsig_e number significant figures scientific notation nsig_f number significant figures numbers (2.123)","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts Numeric Variables into Padded Strings — var2string","text":"Number string padded","code":""},{"path":"https://r.ubiquity.tools/reference/var2string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Converts Numeric Variables into Padded Strings — var2string","text":"","code":"var2string(pi, nsig_f=20) #> [1] \"3.14159265358979311600\" var2string(.0001121, nsig_e=2, maxlength=10) #> [1] \" 1.12e-04\""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert R Objects to Strings — var2string_gen","title":"Convert R Objects to Strings — var2string_gen","text":"Mechanism converting R objects strings reporting.","code":""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert R Objects to Strings — var2string_gen","text":"","code":"var2string_gen(var)"},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert R Objects to Strings — var2string_gen","text":"var R variable","code":""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert R Objects to Strings — var2string_gen","text":"Variable string form","code":""},{"path":"https://r.ubiquity.tools/reference/var2string_gen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert R Objects to Strings — var2string_gen","text":"","code":"var2string_gen(c(1,2,3)) #> [1] \"min = 1.0; max = 3.0; length = 3 \""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":null,"dir":"Reference","previous_headings":"","what":"Print and Log Messages — vp","title":"Print and Log Messages — vp","text":"Used print messages screen log file.","code":""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print and Log Messages — vp","text":"","code":"vp(cfg, str, fmt = \"alert\")"},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print and Log Messages — vp","text":"cfg ubiquity system object str sequence strings print fmt string format one following: \"h1\", \"h2\", \"h3\", \"verbatim\", \"alert\" (default), \"warning\", \"danger\".","code":""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print and Log Messages — vp","text":"Boolean variable indicating success (TRUE) failure (FALSE)","code":""},{"path":"https://r.ubiquity.tools/reference/vp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print and Log Messages — vp","text":"","code":"# \\donttest{ # Creating a system file from the mab_pk example fr = system_new(file_name = \"system.txt\", system_file = \"mab_pk\", overwrite = TRUE, output_directory = tempdir()) # Building the system cfg = build_system(system_file = file.path(tempdir(), \"system.txt\"), output_directory = file.path(tempdir(), \"output\"), temporary_directory = tempdir()) #> #> ── Building the system: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8 #> → ubiquity: https://r.ubiquity.tools #> → Distribution: package (2.0.4) #> → Compiling C version of system #> → Loading the shared C library #> ✔ System built #> ℹ To fetch a new analysis template use `system_fetch_template` #> ℹ For example: #> ℹ fr = system_fetch_template(cfg, template = \"Simulation\") #> ℹ fr = system_fetch_template(cfg, template = \"Estimation\") # Initialzing the log file vp(cfg, \"Message that will be logged\") #> → Message that will be logged #> [1] TRUE # }"},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Ubiquity Workshop Sections — workshop_fetch","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"ubiquity package function can used fetch example files different sections workshop.","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"","code":"workshop_fetch( section = \"Simulation\", overwrite = FALSE, copy_files = TRUE, output_directory = getwd() )"},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"section Name section workshop retrieve (\"Simulation\") overwrite TRUE new workshop files overwrite existing files present (FALSE) copy_files TRUE files written output_directory, FALSE names locations files returned (TRUE) output_directory directory workshop files placed (getwd())","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"list","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"Valid sections \"Simulation\", \"Estimation\", \"Vitro\", \"Titration\" \"Reporting\", \"NCA\"","code":""},{"path":"https://r.ubiquity.tools/reference/workshop_fetch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Ubiquity Workshop Sections — workshop_fetch","text":"","code":"# \\donttest{ workshop_fetch(\"Estimation\", output_directory=tempdir(), overwrite=TRUE) #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent_metabolite.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent_metabolite_global.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/analysis_parent_metabolite_nm_data.r #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/system.txt #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/pm_data.csv #> → Creating file: /var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//Rtmpj8OjSf/nm_data.csv #> $sources #> [1] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent.r\" #> [2] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent_metabolite.r\" #> [3] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent_metabolite_global.r\" #> [4] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/scripts/analysis_parent_metabolite_nm_data.r\" #> [5] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/systems/system-adapt.txt\" #> [6] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/csv/pm_data.csv\" #> [7] \"/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/Rtmpcdc9d8/temp_libpath185e70fcfe2d/ubiquity/ubinc/csv/nm_data.csv\" #> #> $destinations #> [1] \"analysis_parent.r\" #> [2] \"analysis_parent_metabolite.r\" #> [3] \"analysis_parent_metabolite_global.r\" #> [4] \"analysis_parent_metabolite_nm_data.r\" #> [5] \"system.txt\" #> [6] \"pm_data.csv\" #> [7] \"nm_data.csv\" #> #> $write_file #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> #> $isgood #> [1] TRUE #> # }"},{"path":[]},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-4","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.4 (development version)","text":"Removed NONMEM Monolix outputs Added translation rxode2 output NONMEM Monolix outputs Added simulation option dynamic set TRUE default set FALSE fix ODEs 0 allow vitro analysis.","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-203","dir":"Changelog","previous_headings":"","what":"ubiquity 2.0.3","title":"ubiquity 2.0.3","text":"CRAN release: 2024-03-08","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-3","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.3","text":"Fixed IIV comments breaking nlmixr2 output Fixed bug spaces breaking compilation C output Fixed bug CRAN flextable/officer update broke saved values vignettes","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-201","dir":"Changelog","previous_headings":"","what":"ubiquity 2.0.1","title":"ubiquity 2.0.1","text":"CRAN release: 2023-10-29","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-1","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.1","text":"Removed internal files longer used Added documentation creating user defined observation functions running parameter estimation Updated reporting template work development version onbrand Changed terminal messaging use cli Added termination criteria estimation output Fixed wrapping issue Fortran output unwrappable strings resulted infinite loop Added system-testing.txt example Added nlmxir output target Added template creation NONMEM, Monolix, nlmixr Fixed R command compilation use R.home() Fixed broken tests Updated CITATION use bibentry Fixing error building systems windows","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-200","dir":"Changelog","previous_headings":"","what":"ubiquity 2.0.0","title":"ubiquity 2.0.0","text":"CRAN release: 2021-09-03","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-2-0-0","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 2.0.0","text":"Lots small updates function documentation vignettes Completely replaced reporting functionality. Now using onbrand package templated reporting. Note: break reporting version 1 R package. Old Word PowerPoint templates work, need create yaml mapping file. detailed Reporting vignette. Reporting changes added following functions system_rpt_add_slide() system_rpt_add_doc_content() system_rpt_read_template() system_rpt_save_report() system_rpt_template_details() system_fetch_rpt_officer_object() system_fetch_rpt_onbrand_object() system_set_rpt_officer_object() system_set_rpt_onbrand_object() Reporting changes removed following functions: system_report_doc_add_content() system_report_doc_format_section() system_report_doc_set_ph() system_report_estimation() system_report_glp() system_report_init() system_report_nca() system_report_ph_content() system_report_save() system_report_set() system_report_slide_content() system_report_slide_section() system_report_slide_title() system_report_slide_two_col() system_report_view_layout() system_fetch_report() system_fetch_report_format() md_to_officer() md_to_oo() Reporting changes updated vignettes, example scripts function templates","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-104","dir":"Changelog","previous_headings":"","what":"ubiquity 1.0.4","title":"ubiquity 1.0.4","text":"CRAN release: 2021-04-18","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-1-0-4","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 1.0.4","text":"Renamed system_report_fetch system_fetch_report Added reporting scripts unit tests Added import officer functions starting body_end_ Changed table figure captions numbered Word reporting Created testthat scripts run workshop functions","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"new-features-1-0-4","dir":"Changelog","previous_headings":"","what":"New Features","title":"ubiquity 1.0.4","text":"Added shaded region observed AUC NCA reporting Added cohort-specific output times option estimation workflow Updated references documentation templates point r.ubiquity.tools Added checks estimation routines check reasonable bounds global optimizer notify users estimates near bounds Added sessionInfo() estimation Word reporting Added system_fetch_report_format Integrated markdown (md) header format option flextable outputs Added default cfg$reporting$enabled (FALSE) Added ability use markdown NCA summary tables generated system_nca_summary Fixed placeholder text, now delimiters ===either side text Added system_set_option general group output_directory option markdown Word reporting, default font properties defined ability specify org_functions.R template added. Moved annotated layout generation PowerPoint files system_report_view_layout() annotate_base() command officer Added optional key fields tables figures Word reporting Added ability pass PKNCA.options system_nca_run Added verbose option system_view command Allowing pass dataset columns summary NCA output Updated system_report_ph_content system_report_doc_add_content allow inclusion flextable objects Updated system_view include nca results system_fetch_nca - function fetch NCA results system_fetch_nca_columns - function fetch column descriptors specific analysis system_nca_parameters_meta - list standard NCA parameters system_nca_summary - creates summary tables NCA results Adding checks simulate_subjects ensure required columns present Added ability read xlsx data sets system_load_data","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"bug-fixes-1-0-4","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"ubiquity 1.0.4","text":"CRAN erroring tic() function. Removed tic() toc() functions Fixed bug dataset given system_run_nca enough valid data actually run NCA Fixed “Coordinate system already present…” warning gg_axis Fixed location table generation example script analysis_nca_md.R table styles picked properly Added scales package requirement Fixed missing rptname inputs system_report_ph_content Fixed Bug system view cohort-specific parameters defined Fixed figure generation errors estimation workflow Fixed bug system_report_save() Removed aberrant gdata require calls templates Fixed bug system_nca_run DOSE factor Fixed bug system_nca_run back extrapolation done doses skipped due insufficient points. causing error. Removed coercion warnings: tmpsumhalflife = NCA.resresult[NCA.resresultPPTESTCD == “half.life”, : Coercing LHS list Removed digits input system_nca_run (now handled system_nca_summary ) Fixed coercion warnings covariates building system Using explicit declaration officer functions specifying importFrom prevent namespace issues readxl allow function readxl::read_xlsx","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-103","dir":"Changelog","previous_headings":"","what":"ubiquity 1.0.3","title":"ubiquity 1.0.3","text":"CRAN release: 2020-09-13","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"notes-1-0-3","dir":"Changelog","previous_headings":"","what":"Notes","title":"ubiquity 1.0.3","text":"Removed gdata dependency Removed URL redirects documentation resolve CRAN submission warnings","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"new-features-1-0-3","dir":"Changelog","previous_headings":"","what":"New Features","title":"ubiquity 1.0.3","text":"Added option simulate subjects specify secondary parameters saved","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"bug-fixes-1-0-3","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"ubiquity 1.0.3","text":"Converted system_nca_run() using $ mostly using [[“”]] Fixed NCA template Fixed bug ShinyApp template iiv tab displayed even system iiv elements","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"ubiquity-102","dir":"Changelog","previous_headings":"","what":"ubiquity 1.0.2","title":"ubiquity 1.0.2","text":"CRAN release: 2020-07-05","code":""},{"path":"https://r.ubiquity.tools/news/index.html","id":"bug-fixes-1-0-2","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"ubiquity 1.0.2","text":"Updated components fix issues encountered R 4.0","code":""}] diff --git a/docs/sitemap.xml b/docs/sitemap.xml index cb7528e..2c8fd3f 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,6 +4,7 @@ https://r.ubiquity.tools/articles/Deployment.html https://r.ubiquity.tools/articles/Estimation.html https://r.ubiquity.tools/articles/Howto.html +https://r.ubiquity.tools/articles/In_Vitro.html https://r.ubiquity.tools/articles/Language.html https://r.ubiquity.tools/articles/NCA.html https://r.ubiquity.tools/articles/Reporting.html diff --git a/inst/ubinc/csv/in_vitro_er_data.csv b/inst/ubinc/csv/in_vitro_er_data.csv new file mode 100644 index 0000000..5a8cfeb --- /dev/null +++ b/inst/ubinc/csv/in_vitro_er_data.csv @@ -0,0 +1,121 @@ +C_A0,C_B0,Effect,ave_eff,treat,samp_time +0.001,0.1,102.15400900758084,98.02870065558105,A_0_001_B_0_1,1 +0.001,0.1,100.78588687034238,98.02870065558105,A_0_001_B_0_1,1 +0.001,0.1,91.14620608881994,98.02870065558105,A_0_001_B_0_1,1 +0.001,100,93.38011531406228,90.20532172534753,A_0_001_B_100,1 +0.001,100,91.0346713406603,90.20532172534753,A_0_001_B_100,1 +0.001,100,86.20117852132002,90.20532172534753,A_0_001_B_100,1 +0.001,500,51.7674372966993,51.13457188691008,A_0_001_B_500,1 +0.001,500,48.95016347403721,51.13457188691008,A_0_001_B_500,1 +0.001,500,52.686114889993725,51.13457188691008,A_0_001_B_500,1 +0.001,1000,28.461222305353512,27.66928604387977,A_0_001_B_1000,1 +0.001,1000,27.22216963440402,27.66928604387977,A_0_001_B_1000,1 +0.001,1000,27.324466191881776,27.66928604387977,A_0_001_B_1000,1 +0.005994842503189409,0.1,99.45980320497786,96.01638316254777,A_0_00599484250318941_B_0_1,1 +0.005994842503189409,0.1,95.45561336146656,96.01638316254777,A_0_00599484250318941_B_0_1,1 +0.005994842503189409,0.1,93.13373292119887,96.01638316254777,A_0_00599484250318941_B_0_1,1 +0.005994842503189409,100,96.03629651745987,93.6093019260545,A_0_00599484250318941_B_100,1 +0.005994842503189409,100,88.38370139467602,93.6093019260545,A_0_00599484250318941_B_100,1 +0.005994842503189409,100,96.4079078660276,93.6093019260545,A_0_00599484250318941_B_100,1 +0.005994842503189409,500,51.528986698152444,48.65116310842182,A_0_00599484250318941_B_500,1 +0.005994842503189409,500,46.10741858720636,48.65116310842182,A_0_00599484250318941_B_500,1 +0.005994842503189409,500,48.31708403990665,48.65116310842182,A_0_00599484250318941_B_500,1 +0.005994842503189409,1000,26.09664844320711,27.280715222080065,A_0_00599484250318941_B_1000,1 +0.005994842503189409,1000,27.556531263252637,27.280715222080065,A_0_00599484250318941_B_1000,1 +0.005994842503189409,1000,28.188965959780454,27.280715222080065,A_0_00599484250318941_B_1000,1 +0.03593813663804628,0.1,104.1691753174516,99.3823108754723,A_0_0359381366380463_B_0_1,1 +0.03593813663804628,0.1,96.33756416271186,99.3823108754723,A_0_0359381366380463_B_0_1,1 +0.03593813663804628,0.1,97.64019314625342,99.3823108754723,A_0_0359381366380463_B_0_1,1 +0.03593813663804628,100,82.7417718719603,86.81982560896813,A_0_0359381366380463_B_100,1 +0.03593813663804628,100,89.54031753451557,86.81982560896813,A_0_0359381366380463_B_100,1 +0.03593813663804628,100,88.17738742042854,86.81982560896813,A_0_0359381366380463_B_100,1 +0.03593813663804628,500,49.92400537216353,48.971013306570136,A_0_0359381366380463_B_500,1 +0.03593813663804628,500,44.84714479837532,48.971013306570136,A_0_0359381366380463_B_500,1 +0.03593813663804628,500,52.141889749171554,48.971013306570136,A_0_0359381366380463_B_500,1 +0.03593813663804628,1000,28.028804103683797,26.23159305165701,A_0_0359381366380463_B_1000,1 +0.03593813663804628,1000,25.415709526272426,26.23159305165701,A_0_0359381366380463_B_1000,1 +0.03593813663804628,1000,25.250265525014807,26.23159305165701,A_0_0359381366380463_B_1000,1 +0.21544346900318845,0.1,88.95499281620435,88.58924814714432,A_0_215443469003188_B_0_1,1 +0.21544346900318845,0.1,85.29272504968093,88.58924814714432,A_0_215443469003188_B_0_1,1 +0.21544346900318845,0.1,91.52002657554767,88.58924814714432,A_0_215443469003188_B_0_1,1 +0.21544346900318845,100,86.10202952135197,82.42443785299452,A_0_215443469003188_B_100,1 +0.21544346900318845,100,83.68567127427426,82.42443785299452,A_0_215443469003188_B_100,1 +0.21544346900318845,100,77.48561276335732,82.42443785299452,A_0_215443469003188_B_100,1 +0.21544346900318845,500,42.07819520906585,42.894505541393265,A_0_215443469003188_B_500,1 +0.21544346900318845,500,43.36448698664583,42.894505541393265,A_0_215443469003188_B_500,1 +0.21544346900318845,500,43.24083442846811,42.894505541393265,A_0_215443469003188_B_500,1 +0.21544346900318845,1000,25.809477742298604,25.091941731199487,A_0_215443469003188_B_1000,1 +0.21544346900318845,1000,25.129360171341645,25.091941731199487,A_0_215443469003188_B_1000,1 +0.21544346900318845,1000,24.336987279958212,25.091941731199487,A_0_215443469003188_B_1000,1 +1.291549665014884,0.1,76.06062755586466,75.5440908052452,A_1_29154966501488_B_0_1,1 +1.291549665014884,0.1,76.03589928088601,75.5440908052452,A_1_29154966501488_B_0_1,1 +1.291549665014884,0.1,74.53574557898494,75.5440908052452,A_1_29154966501488_B_0_1,1 +1.291549665014884,100,76.4443219672603,70.0725865856299,A_1_29154966501488_B_100,1 +1.291549665014884,100,66.73341588205683,70.0725865856299,A_1_29154966501488_B_100,1 +1.291549665014884,100,67.04002190757258,70.0725865856299,A_1_29154966501488_B_100,1 +1.291549665014884,500,37.49937933897383,37.5898966189027,A_1_29154966501488_B_500,1 +1.291549665014884,500,38.79305344510715,37.5898966189027,A_1_29154966501488_B_500,1 +1.291549665014884,500,36.47725707262711,37.5898966189027,A_1_29154966501488_B_500,1 +1.291549665014884,1000,20.72032032133157,20.43174346122871,A_1_29154966501488_B_1000,1 +1.291549665014884,1000,20.407418114658014,20.43174346122871,A_1_29154966501488_B_1000,1 +1.291549665014884,1000,20.167491947696544,20.43174346122871,A_1_29154966501488_B_1000,1 +7.742636826811269,0.1,58.11814742803048,54.688507509194054,A_7_74263682681127_B_0_1,1 +7.742636826811269,0.1,50.95801156777465,54.688507509194054,A_7_74263682681127_B_0_1,1 +7.742636826811269,0.1,54.98936353177704,54.688507509194054,A_7_74263682681127_B_0_1,1 +7.742636826811269,100,48.274540162701925,45.053671915299184,A_7_74263682681127_B_100,1 +7.742636826811269,100,44.159729469589486,45.053671915299184,A_7_74263682681127_B_100,1 +7.742636826811269,100,42.72674611360613,45.053671915299184,A_7_74263682681127_B_100,1 +7.742636826811269,500,26.637282620997286,26.55284519570769,A_7_74263682681127_B_500,1 +7.742636826811269,500,26.295602026510768,26.55284519570769,A_7_74263682681127_B_500,1 +7.742636826811269,500,26.725650939615015,26.55284519570769,A_7_74263682681127_B_500,1 +7.742636826811269,1000,16.1637568778078,14.68119719087402,A_7_74263682681127_B_1000,1 +7.742636826811269,1000,13.811672521385836,14.68119719087402,A_7_74263682681127_B_1000,1 +7.742636826811269,1000,14.068162173428423,14.68119719087402,A_7_74263682681127_B_1000,1 +46.41588833612782,0.1,28.009315155796706,28.611684599468568,A_46_4158883361278_B_0_1,1 +46.41588833612782,0.1,28.205672988448704,28.611684599468568,A_46_4158883361278_B_0_1,1 +46.41588833612782,0.1,29.62006565416029,28.611684599468568,A_46_4158883361278_B_0_1,1 +46.41588833612782,100,23.33463233347834,24.46626811827178,A_46_4158883361278_B_100,1 +46.41588833612782,100,24.054033213725774,24.46626811827178,A_46_4158883361278_B_100,1 +46.41588833612782,100,26.010138807611234,24.46626811827178,A_46_4158883361278_B_100,1 +46.41588833612782,500,12.877203650779249,13.57566760481911,A_46_4158883361278_B_500,1 +46.41588833612782,500,13.382231319412156,13.57566760481911,A_46_4158883361278_B_500,1 +46.41588833612782,500,14.467567844265924,13.57566760481911,A_46_4158883361278_B_500,1 +46.41588833612782,1000,8.004986923164905,7.971732404006556,A_46_4158883361278_B_1000,1 +46.41588833612782,1000,8.021901444123072,7.971732404006556,A_46_4158883361278_B_1000,1 +46.41588833612782,1000,7.88830884473169,7.971732404006556,A_46_4158883361278_B_1000,1 +278.2559402207126,0.1,11.8780625728727,11.866734356970325,A_278_255940220713_B_0_1,1 +278.2559402207126,0.1,12.315260028570478,11.866734356970325,A_278_255940220713_B_0_1,1 +278.2559402207126,0.1,11.406880469467795,11.866734356970325,A_278_255940220713_B_0_1,1 +278.2559402207126,100,10.851246520903272,10.783361952153692,A_278_255940220713_B_100,1 +278.2559402207126,100,10.615887003853775,10.783361952153692,A_278_255940220713_B_100,1 +278.2559402207126,100,10.882952331704027,10.783361952153692,A_278_255940220713_B_100,1 +278.2559402207126,500,5.580363248277241,5.872028422546178,A_278_255940220713_B_500,1 +278.2559402207126,500,6.146152281437655,5.872028422546178,A_278_255940220713_B_500,1 +278.2559402207126,500,5.8895697379236385,5.872028422546178,A_278_255940220713_B_500,1 +278.2559402207126,1000,3.390661497862454,3.318019810765492,A_278_255940220713_B_1000,1 +278.2559402207126,1000,3.407042100507813,3.318019810765492,A_278_255940220713_B_1000,1 +278.2559402207126,1000,3.156355833926209,3.318019810765492,A_278_255940220713_B_1000,1 +1668.100537200059,0.1,4.340282835834138,4.387660038553349,A_1668_10053720006_B_0_1,1 +1668.100537200059,0.1,4.51537233410578,4.387660038553349,A_1668_10053720006_B_0_1,1 +1668.100537200059,0.1,4.307324945720131,4.387660038553349,A_1668_10053720006_B_0_1,1 +1668.100537200059,100,3.757587978769353,3.949087325088515,A_1668_10053720006_B_100,1 +1668.100537200059,100,3.862642643531858,3.949087325088515,A_1668_10053720006_B_100,1 +1668.100537200059,100,4.2270313529643335,3.949087325088515,A_1668_10053720006_B_100,1 +1668.100537200059,500,2.1927738307240547,2.2886402158201746,A_1668_10053720006_B_500,1 +1668.100537200059,500,2.390705335174166,2.2886402158201746,A_1668_10053720006_B_500,1 +1668.100537200059,500,2.2824414815623033,2.2886402158201746,A_1668_10053720006_B_500,1 +1668.100537200059,1000,1.3048859630319138,1.2355399155257847,A_1668_10053720006_B_1000,1 +1668.100537200059,1000,1.187033105991497,1.2355399155257847,A_1668_10053720006_B_1000,1 +1668.100537200059,1000,1.2147006775539433,1.2355399155257847,A_1668_10053720006_B_1000,1 +10000,0.1,1.5311250002380656,1.5495208190636383,A_10000_B_0_1,1 +10000,0.1,1.5018448882704487,1.5495208190636383,A_10000_B_0_1,1 +10000,0.1,1.6155925686824006,1.5495208190636383,A_10000_B_0_1,1 +10000,100,1.3767376913911207,1.3638329692369948,A_10000_B_100,1 +10000,100,1.4038963763701604,1.3638329692369948,A_10000_B_100,1 +10000,100,1.3108648399497036,1.3638329692369948,A_10000_B_100,1 +10000,500,0.8370160084373347,0.7939449250176218,A_10000_B_500,1 +10000,500,0.7527511684986276,0.7939449250176218,A_10000_B_500,1 +10000,500,0.7920675981169031,0.7939449250176218,A_10000_B_500,1 +10000,1000,0.446744157402259,0.4280650890561554,A_10000_B_1000,1 +10000,1000,0.40101066816344555,0.4280650890561554,A_10000_B_1000,1 +10000,1000,0.4364404416027618,0.4280650890561554,A_10000_B_1000,1 diff --git a/inst/ubinc/scripts/analysis_in_vitro.R b/inst/ubinc/scripts/analysis_in_vitro.R new file mode 100644 index 0000000..3467ef6 --- /dev/null +++ b/inst/ubinc/scripts/analysis_in_vitro.R @@ -0,0 +1,152 @@ +#clearing the workspace +rm(list=ls()) +graphics.off() +options(show.error.locations = TRUE) + +# If we cannot load the ubiquity package we try the stand alone distribution +if("ubiquity" %in% rownames(installed.packages())){require(ubiquity)} else +{source(file.path("library", "r_general", "ubiquity.R")) } + +# ------------------------------------------------------------------------- + +# flowctl = "plot previous estimate" +# flowctl = "previous estimate as guess" + flowctl = "estimate" +# flowctl = "plot guess" +analysis_name = "ANAME" +archive_results = TRUE + +# For documentation explaining how to modify the commands below see +# the estimation vignette: +# vignette(package="ubiquity", topic="Estimation") +# Or the estimation tutorial at the bottom of this page: +# http://r.ubiquity.tools/ + +# ------------------------------------------------------------------------- +# Rebuilding the system (R scripts and compiling C code) +cfg = build_system(system_file="system-in_vitro.txt", + output_directory = file.path(".", "output"), + temporary_directory = file.path(".", "transient")) + + +# Initializing the log file ./transient/ubiquity.log +cfg = system_log_init(cfg) + +# To fix parameters, simply specify only those you want to estimate here: +pnames = c("PSI") +cfg = system_select_set(cfg, "default", pnames) + +cfg = system_set_guess(cfg, pname="PSI", value=1.0, lb=NULL, ub=NULL) + +# ------------------------------------------------------------------------- +# Setting options +# +# Specify output times here using sparse sampling (large time steps) to make +# the estimation quick. See down below where you can specify the sampling to +# generate smooth profiles when plotting. This will be the +# default output times unless overwritten at the cohort level: +cfg=system_set_option(cfg, group = "simulation", + option = "output_times", + seq(0,1,1)) + +# We're doing an in vitro analysis so we set dynamic to +# FALSE to turn off the ODES +cfg=system_set_option(cfg,group = "simulation", + option = "dynamic", + value = FALSE) + +# ------------------------------------------------------------------------- +# Loading Datasets + +# Below you'll see how we add a cohort for each treatment group. To do that I'm loading +# the dataset here so it will be available to in both this environment and in +# the estimation environment +er_data = readr::read_csv("in_vitro_er_data.csv") + +# This loads the data for estimation +cfg = system_load_data(cfg, dsname = "er_data", + data_file = er_data) + + +# ------------------------------------------------------------------------- +# Defining the cohorts +# Clearing all of the cohorts +cfg = system_clear_cohorts(cfg) + + +# Each treatment group in this dataset is a cohort. So I'm going +# to process it group by group: +for(tmp_treat in unique(er_data$treat)){ + + treat_recs = dplyr::filter(er_data, treat == tmp_treat) + + # Here we just assign the cohort name to the treatment name. And then we + # setup the cohort filter (cf) to only include records with the current + # treatment group. We need to add the cohort parameters (cp) field here as + # well. This will fix the specified parameters here at the value for the + # current treatment group. + cohort = list( + name = tmp_treat, + cf = list( + treat = c(tmp_treat)), + cp = list( + C_A0 = treat_recs$C_A0[1], + C_B0 = treat_recs$C_B0[1]), + inputs = NULL, + outputs = NULL, + dataset = "er_data") + + # There are no inputs so we just leave them as NULL above and we just need + # to define the output Effect. + cohort[["outputs"]][["Effect"]] = list() + + # Here samp_time is just an arbitrary value because we are analyzing a + # static system. It only has to be within the simulated output times defined + # above. + cohort[["outputs"]][["Effect"]][["obs"]] = list( + time = "samp_time", + value = "Effect", + missing = -1) + + # Again timescale here is unimportant because of the static nature. You just + # have to define a legitimate timescale in the model + cohort[["outputs"]][["Effect"]][["model"]] = list( + time = "hours", + value = "Effect", + variance = "PRED^2") + + cfg = system_define_cohort(cfg, cohort) +} +# ------------------------------------------------------------------------- +# performing estimation or loading guess/previous results +pest = system_estimate_parameters(cfg, + flowctl = flowctl, + analysis_name = analysis_name, + archive_results = archive_results) + +# ------------------------------------------------------------------------- + +# Simulating the system at the estimates +erp = system_simulate_estimation_results(pest = pest, cfg = cfg) +# ------------------------------------------------------------------------- + + +# This will merge the simulated results at the estimate (erp) with the +# observation dataset (er_data) to make some plots: +df_orig = er_data |> + dplyr::select(C_A0, C_B0, ave_eff, treat) |> + dplyr::distinct() + +df_est = erp$pred |> + dplyr::filter(!SMOOTH) |> + dplyr::rename(treat = COHORT) + +df_plot = dplyr::full_join(df_est, df_orig, by="treat") |> + dplyr::mutate(C_B0 = as.factor(C_B0)) + +library(ggplot2) +p = ggplot(data=df_plot) + + geom_point(aes(x=C_A0, y=OBS, group=C_B0, color=C_B0)) + + geom_line(aes(x=C_A0, y=PRED, group=C_B0, color=C_B0)) + + scale_x_log10() +p diff --git a/inst/ubinc/scripts/mk_data_in_vitro.R b/inst/ubinc/scripts/mk_data_in_vitro.R new file mode 100644 index 0000000..b9646bb --- /dev/null +++ b/inst/ubinc/scripts/mk_data_in_vitro.R @@ -0,0 +1,124 @@ +#clearing the workspace +rm(list=ls()) +graphics.off() +options(show.error.locations = TRUE) + +# If we cannot load the ubiquity package we try the stand alone distribution +if("ubiquity" %in% rownames(installed.packages())){require(ubiquity)} else +{source(file.path("library", "r_general", "ubiquity.R")) } + +# For documentation explaining how to modify the commands below see +# the simulation vignette: +# vignette(package="ubiquity", topic="Simulation") +# Or the simulation tutorial at the bottom of this page: +# http://r.ubiquity.tools/ + + +# Rebuilding the system (R scripts and compiling C code) +cfg = build_system(system_file="system-in_vitro.txt", + output_directory = file.path(".", "output"), + temporary_directory = file.path(".", "transient")) + +# set name | Description +# ------------------------------------------------------- +# default | default + +cfg = system_select_set(cfg, "default") + +# fetching the parameter values +parameters = system_fetch_parameters(cfg) + +# The following applies to both individual and stochastic simulations: +# Define the solver to use +cfg=system_set_option(cfg,group = "simulation", option = "solver", value = "lsoda") + +# To overwrite solver options use the following: +# cfg=system_set_option(cfg,group = "solver", +# option = "atol", +# value = 1e-10) +# cfg=system_set_option(cfg,group = "solver", +# option = "rtol", +# value = 1e-10) + +# By default, important times will be included in the simulation output +# e.g., bolus times, sampling before and after rate switches, etc. +# uncomment to only evaluate at the output times specified above +# cfg=system_set_option(cfg, group = "simulation", +# option = "include_important_output_times", +# value = "no") +# Uncomment to specify ode file to use +# cfg=system_set_option(cfg, group = "simulation", +# option = "integrate_with", +# value = "r-file") + +# To overwrite the default dosing uncomment the following +# Setting all dosing to zero +# cfg = system_set_bolus(cfg, state ="Cp_A", +# times = c(0), # hours +# values = c(1.0)) # mg +# cfg = system_set_bolus(cfg, state ="Cp_B", +# times = c(0), # hours +# values = c(1.0)) # mg + + +# We're doing an in vitro analysis so we set dynamic to +# FALSE to turn off the ODES +cfg=system_set_option(cfg,group = "simulation", + option = "dynamic", + value = FALSE) + +# The more output times the slower the simulation, so here we just specify two +# output times (you have to have a start and stop time): +cfg=system_set_option(cfg, group = "simulation", + option = "output_times", + seq(0,1, 1)) + +# Here we zero out the default inputs: +cfg = system_zero_inputs(cfg) + +# Here we are creating the different experimental conditions. I'm going to +# create a smooth range of A values and just 3 B values +C_A0s = logspace(-3,4,10) +C_B0s= c(.1,100, 500, 1000) + + +set.seed(5446) +er_data = NULL +for(C_A0 in C_A0s){ + for(C_B0 in C_B0s){ + # 3 samples per point + for(nsam in c(1:3)){ + ptmp = parameters + ptmp$C_A0 = C_A0 + ptmp$C_B0 = C_B0 + som = run_simulation_ubiquity(ptmp, cfg) + # Adding a little noise to make it more realistic + tmp_Effect = som$simout$Effect[1]*exp(rnorm(1, mean=0, sd=.05)) + er_data = rbind(er_data, + data.frame( + C_A0 = C_A0, + C_B0 = C_B0, + Effect = tmp_Effect + ) + ) + } + } +} + +er_data = dplyr::mutate(er_data, C_B0 = as.factor(C_B0)) |> + dplyr::group_by(C_A0, C_B0) |> + dplyr::mutate(ave_eff = mean(Effect)) |> + dplyr::mutate(treat = paste0("A_", C_A0, "_B_", C_B0)) |> + dplyr::mutate(treat = stringr::str_replace_all(treat, "\\.", "_")) |> + dplyr::mutate(samp_time = 1) + + +readr::write_csv(er_data, file="in_vitro_er_data.csv") + +library(ggplot2) +p = ggplot(data=er_data) + + geom_point(aes(x=C_A0, y=Effect, group=C_B0, color=C_B0)) + + geom_line(aes(x=C_A0, y=ave_eff, group=C_B0, color=C_B0)) + + scale_x_log10() + +print(p) diff --git a/inst/ubinc/scripts/ubiquity_fcns.R b/inst/ubinc/scripts/ubiquity_fcns.R index aa98c6d..8596577 100644 --- a/inst/ubinc/scripts/ubiquity_fcns.R +++ b/inst/ubinc/scripts/ubiquity_fcns.R @@ -292,7 +292,7 @@ return(cfg)} #'@param overwrite if \code{TRUE} the new workshop files will overwrite any existing files present (\code{FALSE}) #'@param copy_files if \code{TRUE} the files will be written to the output_directory, if \code{FALSE} only the names and locations of the files will be returned (\code{TRUE}) #'@param output_directory directory where workshop files will be placed (getwd()) -#'@details Valid sections are "Simulation", "Estimation", "Titration" "Reporting", and "NCA" +#'@details Valid sections are "Simulation", "Estimation", "In Vitro", "Titration" "Reporting", and "NCA" #' #'@return list #'@examples @@ -304,7 +304,7 @@ workshop_fetch <- function(section = "Simulation", copy_files = TRUE, output_directory = getwd()){ res = list() - allowed = c("Simulation", "Estimation", "Titration", "Reporting", "Testing", "NCA") + allowed = c("Simulation", "Estimation", "In Vitro", "Titration", "Reporting", "Testing", "NCA") isgood = TRUE # This function only works if we're using the package @@ -379,6 +379,16 @@ workshop_fetch <- function(section = "Simulation", "analysis_visit_infusion_dosing.r", "system.txt") write_file = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) + } else if(section=="In Vitro") { + sources = c(file.path(src_dir, "analysis_in_vitro.R" ), + file.path(src_dir, "mk_data_in_vitro.R" ), + file.path(csv_dir, "in_vitro_er_data.csv" ), + file.path(sys_dir, "system-in_vitro.txt" )) + destinations = c("analysis_in_vitro.R", + "mk_data_in_vitro.R", + "in_vitro_er_data.csv", + "system-in_vitro.txt") + write_file = c(TRUE, TRUE, TRUE, TRUE) } else if(section=="Testing") { sources = c(file.path(src_dir, "workshop_test.R")) destinations = c("workshop_test.R") diff --git a/inst/ubinc/systems/system-in_vitro.txt b/inst/ubinc/systems/system-in_vitro.txt new file mode 100644 index 0000000..44c051d --- /dev/null +++ b/inst/ubinc/systems/system-in_vitro.txt @@ -0,0 +1,80 @@ +# Author: John Harrold +# +# Analysis of an in vitro system. The system below was taken from: +# +# Chakraborty A, Jusko WJ. Pharmacodynamic interaction of recombinant human +# interleukin-10 and prednisolone using in vitro whole blood lymphocyte +# proliferation. J Pharm Sci. 2002 May;91(5):1334-42. doi: 10.1002/jps.3000. +# PMID: 11977109. +# + +# #-------------# +# | Parameters | +# #-------------# +# +# System parameters +# name value lower upper units editable grouping +# bound bound +

    IC50_A 1.0 eps Inf ----- yes Efficacy +

    IC50_B 50.0 eps Inf ----- yes Efficacy +

    Imax_A 1.0 eps Inf ----- yes Efficacy +

    Imax_B 1.0 eps Inf ----- yes Efficacy +

    PSI 10.0 eps Inf ----- yes Efficacy +

    G_A 0.6 eps Inf ----- yes Efficacy +

    G_B 1.4 eps Inf ----- yes Efficacy + +

    Vp_A 1.0 eps Inf ml yes PK +

    CL_A 1.0 eps Inf ml/hr yes PK +

    Vp_B 1.0 eps Inf ml yes PK +

    CL_B 1.0 eps Inf ml/hr yes PK + +

    C_A0 0.0 eps Inf ----- yes IC +

    C_B0 0.0 eps Inf ----- yes IC + +# #-------------------# +# |Input Information | +# #-------------------# +# +# Bolus Events +# ------------ +# times/events state values scale units +; [ 0 ]; 1.0; hours +; Cp_A; [1.0 ]; 1.0/Vp_A; mg +; Cp_B; [1.0 ]; 1.0/Vp_B; mg + + +# By default these values are zero but can be overwritten when +# doing analysis of in vitro data. + Cp_A = C_A0 + Cp_B = C_B0 + + XI = IC50_A/IC50_B + + COMP_A = SIMINT_POWER[Cp_A][G_A]/(SIMINT_POWER[PSI*IC50_A][G_A]) + COMP_B = SIMINT_POWER[XI*Cp_B][G_B]/(SIMINT_POWER[PSI*IC50_A][G_B]) + COMP_Imax = Imax_A + Imax_B - Imax_A*Imax_B + + EFF_num = Imax_A*COMP_A + Imax_B*COMP_B + COMP_Imax*COMP_A*COMP_B + EFF_den = COMP_A + COMP_B + COMP_A*COMP_B + 1.0 + EFF = 100.0*(1.0-EFF_num/EFF_den) + +# #-----------------------------# +# | ODEs, and State Information | +# #-----------------------------# + + CL_A/Vp_A*Cp_A + CL_B/Vp_B*Cp_B + +# #---------# +# | Outputs | +# #---------# + + Cp_A_mg_ml = Cp_A + Cp_B_mg_ml = Cp_B + Effect = EFF + +# #---------# +# | Options # +# #---------# +# specify different time scales + 1.0 diff --git a/man/workshop_fetch.Rd b/man/workshop_fetch.Rd index d509f2d..3a7a640 100644 --- a/man/workshop_fetch.Rd +++ b/man/workshop_fetch.Rd @@ -28,7 +28,7 @@ With the ubiquity package this function can be used to fetch example files for different sections of the workshop. } \details{ -Valid sections are "Simulation", "Estimation", "Titration" "Reporting", and "NCA" +Valid sections are "Simulation", "Estimation", "In Vitro", "Titration" "Reporting", and "NCA" } \examples{ \donttest{ diff --git a/vignettes/In_Vitro.Rmd b/vignettes/In_Vitro.Rmd new file mode 100644 index 0000000..826a28d --- /dev/null +++ b/vignettes/In_Vitro.Rmd @@ -0,0 +1,201 @@ +--- +title: 'Analysis of Static In Vitro System' +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{In Vitro} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE, message=FALSE, eval=FALSE) +require(ubiquity) +#require(deSolve) +require(ggplot2) +#require(foreach) +#require(doParallel) +#require(rhandsontable) +``` + +## Introduction + +**This tutorial requires ubiquity 2.04 or greater. Currently this is only available using the development version off of github** + +Sometimes we need to analyze data where the independent variable is not time. You can do this with ubiquity and this tutorial will highlight how that is done. If you have not done so already, please review the naive-pooled parameter estimation tutorial because this will build on the concepts covered there. The workshop ([workshop.ubiquity.tools](https://ubiquity-pkpd.s3-us-west-1.amazonaws.com/files/ubiquity_workshop.zip)) provides an example of how to analyize static in vitro data. To make a copy of these scripts and other supporting files in the current working directory run the following: + +```{r eval=FALSE} +library(ubiquity) +fr = workshop_fetch(section="In Vitro", overwrite=TRUE) +``` + +This should create the following files in your current working direcotry: + +* `system-in_vitro.txt` - System file that can be run both *in vivo* and *in vitro* +* `in_vitro_er_data.csv`- In vitro data file +* `mk_data_in_vitro.R`- Script to generate in vitro data +* `analysis_in_vitro.R`- Script to perform parameter estimation using the in vitro data + +This example uses a system from [Chakraborty and Jusko. J Pharm Sci 91(5), 1334-1342](https://jpharmsci.org/article/S0022-3549(16)31001-2/abstract). Specifically equation 5 from that article where the effect of two drugs, A and B, is driven by their concentrations ($C_A$, and $C_B$): + +$$ +E = 100 \left( 1- + \frac{ + \frac{I_{max,A}(C_A) ^{\gamma_A}}{(\Psi IC_{50,A})^{\gamma_A}} + + \frac{I_{max,B}(\xi C_B)^{\gamma_B}}{(\Psi IC_{50,B})^{\gamma_B}} \\ + + (I_{max,A} + + I_{max,B} + + I_{max,A} + I_{max,B}) \\ + \times + \frac{(C_A) ^{\gamma_A}}{(\Psi IC_{50,A})^{\gamma_A}} \times + \frac{(\xi C_B)^{\gamma_B}}{(\Psi IC_{50,B})^{\gamma_B}} \\ +}{ + \frac{(C_A) ^{\gamma_A}}{(\Psi IC_{50,A})^{\gamma_A}} + + \frac{(\xi C_B)^{\gamma_B}}{(\Psi IC_{50,B})^{\gamma_B}} \\ + +\frac{(C_A) ^{\gamma_A}}{(\Psi IC_{50,A})^{\gamma_A}} \times + \frac{(\xi C_B)^{\gamma_B}}{(\Psi IC_{50,B})^{\gamma_B}} +1 +} +\right) +$$ + + +$$ +\xi = \frac{IC_{50,A}}{IC_{50,B}} +$$ + +This has been implemented in the PKPD system file (`system-in_vitro.txt`) shown at the bottom. This implementation is dynamic meaning the effect changes with the PK of the drug. However the effect is considered instantaneous and typically analyzed from in vitro data using algebraic relationships. For this system consider the following data: + +```{r echo=FALSE, comment='', message=FALSE, echo=FALSE, eval=TRUE, fig.width=7, fig.height=5} +er_data = read.csv(system.file("ubinc", "csv","in_vitro_er_data.csv", package="ubiquity")) +er_data$C_B0 = as.factor(er_data$C_B0) +p = ggplot(data=er_data) + + geom_point(aes(x=C_A0, y=Effect, group=C_B0, color=C_B0)) + + geom_line(aes(x=C_A0, y=ave_eff, group=C_B0, color=C_B0)) + + xlab("CA (ng/ml)") + + scale_color_discrete(name="CB (ng/ml)") + + theme_minimal() +p = gg_log10_xaxis(p) +p = prepare_figure(p, purpose="shiny") +print(p) +``` +Here both the concentrations of drug A and B are altered (independent variable) and the Effect is measured (dependent variable). + + +## The sysem file: `system-in_vitro.txt` + +First lets discuss the way the system file is structured. There is bolus dosing for the PK specified, but the initial conditions of the effect compartments are also defined in terms of system parameters: + +``` + Cp_A = C_A0 + Cp_B = C_B0 +``` + +These system parameters (`C_A0` and `C_B0`) have a default value of zero. So by default the system would run like any in vivo PKPD system. But these initial condition placeholders will be used when performing in vitro analyses. **This allows you to use the same system file for both in vitro and in vivo analyses. This is useful because you do not have to do your static in vitro analysis in one system file and then copy and paste to your in vivo dynamic system.** + +## The dataset: `in_vitro_er_data.csv` + +This table contains a snapshot of the relevant columns of the dataset: + +```{r echo=FALSE, comment='', message=TRUE, eval=TRUE} +tmpdata = head(er_data, n=10) +tmpdata[["ave_eff"]] = NULL + +flextable::flextable(tmpdata) |> flextable::autofit() +``` + +The `C_A0` and `C_B0` columns correspond to the concentrations that elicit the `Effect`. The `treat` column is a unique name for the combination of the two drug combinations. It has only letters numbers and underscores. This is intentional so I can use this as a cohort name when I'm constructing the estimation script below. The `samp_time` column is set to 1. This is arbitrary because the mapping in the cohort definitions requires a time column. You'll see why it is arbitrary below. + +## The analysis script: `analysis_in_vitro.R` + +This analysis scripts has some aspects that are unique to the in vitro analysis being performed. + +### Output times + +First is the output times. When you run simulations (which is what happens when performing a parameter estimation) more output times results in slower simulations. So it is important to only include the ncesssary output times. In this case we only have two output times (0 and 1): + + +```{r echo=TRUE, comment='', message=TRUE, eval=FALSE} +cfg=system_set_option(cfg, group = "simulation", + option = "output_times", + seq(0,1,1)) +``` + +The final value of 1 was chosen because that corresponds to the time column (`samp_time`) in the analysis dataset. + +### Making a dynamic simulation static: + +Next we set the `simulation` option `dynamic` to `FALSE`: + +```{r echo=TRUE, comment='', message=TRUE, eval=FALSE} +cfg=system_set_option(cfg, group = "simulation", + option = "dynamic", + value = FALSE) +``` + +What this does is fix the values of the differential equations to 0 for the purposes of the subsequent simulations. + +### Datasets + +For the dataset we are reading it into a dataframe and loading it that way. This was done so the dataset could be used internally with ubiqiuty and also to construct the analysis below: + +```{r echo=TRUE, comment='', message=TRUE, eval=FALSE} +er_data = readr::read_csv("in_vitro_er_data.csv") +cfg = system_load_data(cfg, dsname = "er_data", + data_file = er_data) +``` + +### Defining cohorts + +In the estimation tutorial cohorts are defined individually. We could do that here too but it would be rather tedious. See we need a cohort for every unique combination of `C_A0` and `C_B0` in the dataset. To do this we are going to loop through each unique value in the `treat` column and create a cohort. The variable `tmp_treat` contains the value of the current treatment so the first thing we do is get the records for the current treatment: + + +```{r echo=TRUE, comment='', message=TRUE, eval=FALSE} +treat_recs = dplyr::filter(er_data, treat == tmp_treat) +``` + +This subset of the data is used to define the initial condition parameters for the current cohort using the `cp` field (see the help for `system_define_cohort()` for more information about this option). Because of the way the `treat` column was constructed we can use this as the cohort name. This will allow us to link the simulated output below to the original dataset in the post processing section below. The inputs are set to `NULL` here and we do not have to change them +because there is no dosing. + +```{r echo=TRUE, comment='', message=TRUE, eval=FALSE} +cohort = list( + name = tmp_treat, + cf = list( + treat = c(tmp_treat)), + cp = list( + C_A0 = treat_recs$C_A0[1], + C_B0 = treat_recs$C_B0[1]), + inputs = NULL, + outputs = NULL, + dataset = "er_data") +``` + +Because we set the simulation option `dynamic` to `FALSE`, the initial condition is set to the values for the current treatment, and there are no inputs, then the system is effectively behaving like an in vitro system. + +### Postprocessing + +You cannot rely on the normal figure generation and reporting elements. In this example we can take the simulated output at the estimation `erp` and the original data dataset `er_data` to create meaningful VPCs. This is because we can link the two datasets using the `treat` column from the original dataset to the `COHORT` column in `erp$pred`: + +```{r echo=TRUE, comment='', message=TRUE, eval=FALSE} +df_orig = er_data |> + dplyr::select(C_A0, C_B0, ave_eff, treat) |> + dplyr::distinct() + +df_est = erp$pred |> + dplyr::filter(!SMOOTH) |> + dplyr::rename(treat = COHORT) + +df_plot = dplyr::full_join(df_est, df_orig, by="treat") |> + dplyr::mutate(C_B0 = as.factor(C_B0)) + +library(ggplot2) +p = ggplot(data=df_plot) + + geom_point(aes(x=C_A0, y=OBS, group=C_B0, color=C_B0)) + + geom_line(aes(x=C_A0, y=PRED, group=C_B0, color=C_B0)) + + scale_x_log10() +``` + +## Contents of ``system-in_vitro.txt`` +```{r echo=FALSE, comment='', message=TRUE, eval=TRUE} +cat(readLines(system.file("ubinc", "systems","system-in_vitro.txt", package="ubiquity")), sep="\n") +``` + diff --git a/vignettes/NCA.Rmd b/vignettes/NCA.Rmd index 797a292..63b06ff 100644 --- a/vignettes/NCA.Rmd +++ b/vignettes/NCA.Rmd @@ -130,7 +130,9 @@ Generally NCA will determine the following directly from the data: These properties are all based on observational data. So the ``Cmax`` and ``Tmax`` will most certainly not be at the actual maximum concentration but as long as we sample judiciously it will give us a good approximation. Similarly, the calculated ``AUC`` and ``AUMC`` will be different than the actual values. To calculate the areas you need to dig back into your calculus text books to the trapezoid method. Basically each sampling interval is a trapezoid and the area of each is calculated and added up for all of the ``n`` samples: $$ -AUC = \int_0^{t_f} Cdt \approx \sum_{i=1}^{n-1}{\frac{C_i+C_{i+1}}{2}\times (t_{i+1}-t_{i})}, \ \ \ \ \ +AUC = \int_0^{t_f} Cdt \approx \sum_{i=1}^{n-1}{\frac{C_i+C_{i+1}}{2}\times (t_{i+1}-t_{i})} +$$ +$$ AUMC = \int_0^{t_f} t\times Cdt \approx \sum_{i=1}^{n-1}{\frac{t_iC_i+t_{i+1}C_{i+1}}{2}\times (t_{i+1}-t_{i})} $$