ocaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

first cut at self-contained app

authored by

Kento Okura and committed by
Jon Sterling
befdefbf b18beff1

+4043 -205
+56
bin/forester/App.ml
··· 1 + open Brr 2 + 3 + let htmx = Jv.get Jv.global "htmx" 4 + 5 + let ajax o = Jv.call o "ajax" 6 + let on_load o = Jv.call o "onLoad" 7 + 8 + let katex = Jv.get Jv.global "katex" 9 + 10 + let render o = Jv.call o "render" 11 + 12 + let () = 13 + ignore @@ 14 + on_load 15 + htmx 16 + [| 17 + let f = fun root -> 18 + El.fold_find_by_selector 19 + ~root 20 + (fun elt _ -> 21 + ignore @@ 22 + render 23 + katex 24 + [| 25 + Jv.get (El.to_jv elt) "textContent"; 26 + El.to_jv elt; 27 + |] 28 + ) 29 + (Jstr.v ".math") 30 + () 31 + in 32 + Jv.repr f 33 + |] 34 + 35 + let () = 36 + ignore @@ 37 + Ev.listen 38 + Ev.keydown 39 + (fun e -> 40 + let ev = Ev.as_type e in 41 + Ev.( 42 + if Keyboard.ctrl_key ev && Keyboard.key ev = Jstr.v "k" then 43 + begin 44 + prevent_default e; 45 + ignore @@ 46 + ajax 47 + htmx 48 + [| 49 + Jv.of_string "GET"; 50 + Jv.of_string "/searchmenu"; 51 + Jv.of_string "#modal-container"; 52 + |] 53 + end 54 + ) 55 + ) 56 + (Document.as_target G.document)
+53 -22
bin/forester/dune
··· 2 2 ;;; 3 3 ;;; SPDX-License-Identifier: GPL-3.0-or-later 4 4 5 + (generate_sites_module 6 + (module theme_site) 7 + (sites forester)) 8 + 9 + (install 10 + (section 11 + (site 12 + (forester theme))) 13 + (files 14 + min.js 15 + (glob_files_rec theme/*))) 16 + 5 17 (executable 6 18 (public_name forester) 7 19 (name main) 8 - (flags (:standard -g)) 9 - (link_flags (:standard -g)) 20 + (flags 21 + (:standard -g)) 22 + (link_flags 23 + (:standard -g)) 10 24 (preprocess 11 25 (pps ppx_deriving.show)) 12 - (libraries 13 - forester.prelude 14 - forester.core 15 - forester.frontend 16 - forester.language_server 17 - forester.compiler 18 - logs 19 - logs.fmt 20 - logs.cli 21 - cmdliner 22 - dune-build-info 23 - asai 24 - eio 25 - eio.core 26 - eio.unix 27 - bwd 28 - eio_main 29 - fmt 30 - fmt.cli 31 - fmt.tty)) 26 + (modules main theme_site) 27 + (libraries 28 + forester.prelude 29 + forester.core 30 + forester.frontend 31 + forester.language_server 32 + forester.server 33 + forester.compiler 34 + logs 35 + logs.fmt 36 + logs.cli 37 + cmdliner 38 + dune-build-info 39 + dune-site 40 + asai 41 + eio 42 + eio.core 43 + eio.unix 44 + bwd 45 + eio_main 46 + fmt 47 + fmt.cli 48 + fmt.tty)) 49 + 50 + ;; Javascript 51 + 52 + (executable 53 + (name app) 54 + (modules app) 55 + (modes js) 56 + (libraries brr)) 57 + 58 + (rule 59 + (targets min.js) 60 + (deps app.bc.js) 61 + (action 62 + (run cp %{deps} %{targets})))
+38
bin/forester/main.ml
··· 8 8 open Forester_core 9 9 open Forester_frontend 10 10 open Forester_compiler 11 + open Forester_server 11 12 open Cmdliner 12 13 13 14 module EP = Eio.Path 15 + 16 + let theme_location : string list = Theme_site.Sites.theme 14 17 15 18 let setup_logs style_renderer level = 16 19 Fmt_tty.setup_std_outputs ?style_renderer (); ··· 372 375 $ arg_config 373 376 ) 374 377 378 + let server ~env _ port config = 379 + let config = Config_parser.parse_forest_config_file config in 380 + let forest = State_machine.batch_run ~env ~config ~dev: true in 381 + Server.run ~env ~port ~forest theme_location 382 + 383 + let app_cmd ~env = 384 + let open Cmdliner in 385 + let man = [ 386 + `S Manpage.s_description; 387 + `P "The $(tname) starts the hypermedia server."; 388 + ] 389 + in 390 + let arg_port = 391 + let doc = "the port on which the HTTP server should listen" in 392 + Arg.( 393 + required @@ 394 + opt (some int) (Some 8080) @@ 395 + info ["port"] ~docv: "XXX" ~doc 396 + ) 397 + in 398 + let doc 399 + = 400 + "Serve the forest via HTTP" 401 + in 402 + let info = Cmd.info "serve" ~version ~doc ~man in 403 + Cmd.v 404 + info 405 + Term.( 406 + const (server ~env) 407 + $ arg_logs 408 + $ arg_port 409 + $ arg_config 410 + ) 411 + 375 412 let cmd ~env = 376 413 let doc = "a tool for tending mathematical forests" in 377 414 let man = [ ··· 393 430 query_cmd ~env; 394 431 render_cmd ~env; 395 432 lsp_cmd ~env; 433 + app_cmd ~env; 396 434 ] 397 435 398 436 let () =
+2
bin/forester/theme/.gitignore
··· 1 + node_modules 2 + .DS_Store
+121
bin/forester/theme/LICENSES/CC0-1.0.txt
··· 1 + Creative Commons Legal Code 2 + 3 + CC0 1.0 Universal 4 + 5 + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 + HEREUNDER. 13 + 14 + Statement of Purpose 15 + 16 + The laws of most jurisdictions throughout the world automatically confer 17 + exclusive Copyright and Related Rights (defined below) upon the creator 18 + and subsequent owner(s) (each and all, an "owner") of an original work of 19 + authorship and/or a database (each, a "Work"). 20 + 21 + Certain owners wish to permanently relinquish those rights to a Work for 22 + the purpose of contributing to a commons of creative, cultural and 23 + scientific works ("Commons") that the public can reliably and without fear 24 + of later claims of infringement build upon, modify, incorporate in other 25 + works, reuse and redistribute as freely as possible in any form whatsoever 26 + and for any purposes, including without limitation commercial purposes. 27 + These owners may contribute to the Commons to promote the ideal of a free 28 + culture and the further production of creative, cultural and scientific 29 + works, or to gain reputation or greater distribution for their Work in 30 + part through the use and efforts of others. 31 + 32 + For these and/or other purposes and motivations, and without any 33 + expectation of additional consideration or compensation, the person 34 + associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 + is an owner of Copyright and Related Rights in the Work, voluntarily 36 + elects to apply CC0 to the Work and publicly distribute the Work under its 37 + terms, with knowledge of his or her Copyright and Related Rights in the 38 + Work and the meaning and intended legal effect of CC0 on those rights. 39 + 40 + 1. Copyright and Related Rights. A Work made available under CC0 may be 41 + protected by copyright and related or neighboring rights ("Copyright and 42 + Related Rights"). Copyright and Related Rights include, but are not 43 + limited to, the following: 44 + 45 + i. the right to reproduce, adapt, distribute, perform, display, 46 + communicate, and translate a Work; 47 + ii. moral rights retained by the original author(s) and/or performer(s); 48 + iii. publicity and privacy rights pertaining to a person's image or 49 + likeness depicted in a Work; 50 + iv. rights protecting against unfair competition in regards to a Work, 51 + subject to the limitations in paragraph 4(a), below; 52 + v. rights protecting the extraction, dissemination, use and reuse of data 53 + in a Work; 54 + vi. database rights (such as those arising under Directive 96/9/EC of the 55 + European Parliament and of the Council of 11 March 1996 on the legal 56 + protection of databases, and under any national implementation 57 + thereof, including any amended or successor version of such 58 + directive); and 59 + vii. other similar, equivalent or corresponding rights throughout the 60 + world based on applicable law or treaty, and any national 61 + implementations thereof. 62 + 63 + 2. Waiver. To the greatest extent permitted by, but not in contravention 64 + of, applicable law, Affirmer hereby overtly, fully, permanently, 65 + irrevocably and unconditionally waives, abandons, and surrenders all of 66 + Affirmer's Copyright and Related Rights and associated claims and causes 67 + of action, whether now known or unknown (including existing as well as 68 + future claims and causes of action), in the Work (i) in all territories 69 + worldwide, (ii) for the maximum duration provided by applicable law or 70 + treaty (including future time extensions), (iii) in any current or future 71 + medium and for any number of copies, and (iv) for any purpose whatsoever, 72 + including without limitation commercial, advertising or promotional 73 + purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 + member of the public at large and to the detriment of Affirmer's heirs and 75 + successors, fully intending that such Waiver shall not be subject to 76 + revocation, rescission, cancellation, termination, or any other legal or 77 + equitable action to disrupt the quiet enjoyment of the Work by the public 78 + as contemplated by Affirmer's express Statement of Purpose. 79 + 80 + 3. Public License Fallback. Should any part of the Waiver for any reason 81 + be judged legally invalid or ineffective under applicable law, then the 82 + Waiver shall be preserved to the maximum extent permitted taking into 83 + account Affirmer's express Statement of Purpose. In addition, to the 84 + extent the Waiver is so judged Affirmer hereby grants to each affected 85 + person a royalty-free, non transferable, non sublicensable, non exclusive, 86 + irrevocable and unconditional license to exercise Affirmer's Copyright and 87 + Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 + maximum duration provided by applicable law or treaty (including future 89 + time extensions), (iii) in any current or future medium and for any number 90 + of copies, and (iv) for any purpose whatsoever, including without 91 + limitation commercial, advertising or promotional purposes (the 92 + "License"). The License shall be deemed effective as of the date CC0 was 93 + applied by Affirmer to the Work. Should any part of the License for any 94 + reason be judged legally invalid or ineffective under applicable law, such 95 + partial invalidity or ineffectiveness shall not invalidate the remainder 96 + of the License, and in such case Affirmer hereby affirms that he or she 97 + will not (i) exercise any of his or her remaining Copyright and Related 98 + Rights in the Work or (ii) assert any associated claims and causes of 99 + action with respect to the Work, in either case contrary to Affirmer's 100 + express Statement of Purpose. 101 + 102 + 4. Limitations and Disclaimers. 103 + 104 + a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 + surrendered, licensed or otherwise affected by this document. 106 + b. Affirmer offers the Work as-is and makes no representations or 107 + warranties of any kind concerning the Work, express, implied, 108 + statutory or otherwise, including without limitation warranties of 109 + title, merchantability, fitness for a particular purpose, non 110 + infringement, or the absence of latent or other defects, accuracy, or 111 + the present or absence of errors, whether or not discoverable, all to 112 + the greatest extent permissible under applicable law. 113 + c. Affirmer disclaims responsibility for clearing rights of other persons 114 + that may apply to the Work or any use thereof, including without 115 + limitation any person's Copyright and Related Rights in the Work. 116 + Further, Affirmer disclaims responsibility for obtaining any necessary 117 + consents, permissions or other rights required for any use of the 118 + Work. 119 + d. Affirmer understands and acknowledges that Creative Commons is not a 120 + party to this document and has no duty or obligation with respect to 121 + this CC0 or use of the Work.
+21
bin/forester/theme/LICENSES/MIT.txt
··· 1 + The MIT License (MIT) 2 + 3 + Copyright (c) 2013-2020 Khan Academy and other contributors 4 + 5 + Permission is hereby granted, free of charge, to any person obtaining a copy 6 + of this software and associated documentation files (the "Software"), to deal 7 + in the Software without restriction, including without limitation the rights 8 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 + copies of the Software, and to permit persons to whom the Software is 10 + furnished to do so, subject to the following conditions: 11 + 12 + The above copyright notice and this permission notice shall be included in all 13 + copies or substantial portions of the Software. 14 + 15 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 + SOFTWARE.
+93
bin/forester/theme/LICENSES/OFL-1.1.txt
··· 1 + Copyright 2017 The Inria Sans Project Authors (https://github.com/BlackFoundryCom/InriaFonts) 2 + 3 + This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 + This license is copied below, and is also available with a FAQ at: 5 + http://scripts.sil.org/OFL 6 + 7 + 8 + ----------------------------------------------------------- 9 + SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 + ----------------------------------------------------------- 11 + 12 + PREAMBLE 13 + The goals of the Open Font License (OFL) are to stimulate worldwide 14 + development of collaborative font projects, to support the font creation 15 + efforts of academic and linguistic communities, and to provide a free and 16 + open framework in which fonts may be shared and improved in partnership 17 + with others. 18 + 19 + The OFL allows the licensed fonts to be used, studied, modified and 20 + redistributed freely as long as they are not sold by themselves. The 21 + fonts, including any derivative works, can be bundled, embedded, 22 + redistributed and/or sold with any software provided that any reserved 23 + names are not used by derivative works. The fonts and derivatives, 24 + however, cannot be released under any other type of license. The 25 + requirement for fonts to remain under this license does not apply 26 + to any document created using the fonts or their derivatives. 27 + 28 + DEFINITIONS 29 + "Font Software" refers to the set of files released by the Copyright 30 + Holder(s) under this license and clearly marked as such. This may 31 + include source files, build scripts and documentation. 32 + 33 + "Reserved Font Name" refers to any names specified as such after the 34 + copyright statement(s). 35 + 36 + "Original Version" refers to the collection of Font Software components as 37 + distributed by the Copyright Holder(s). 38 + 39 + "Modified Version" refers to any derivative made by adding to, deleting, 40 + or substituting -- in part or in whole -- any of the components of the 41 + Original Version, by changing formats or by porting the Font Software to a 42 + new environment. 43 + 44 + "Author" refers to any designer, engineer, programmer, technical 45 + writer or other person who contributed to the Font Software. 46 + 47 + PERMISSION & CONDITIONS 48 + Permission is hereby granted, free of charge, to any person obtaining 49 + a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 + redistribute, and sell modified and unmodified copies of the Font 51 + Software, subject to the following conditions: 52 + 53 + 1) Neither the Font Software nor any of its individual components, 54 + in Original or Modified Versions, may be sold by itself. 55 + 56 + 2) Original or Modified Versions of the Font Software may be bundled, 57 + redistributed and/or sold with any software, provided that each copy 58 + contains the above copyright notice and this license. These can be 59 + included either as stand-alone text files, human-readable headers or 60 + in the appropriate machine-readable metadata fields within text or 61 + binary files as long as those fields can be easily viewed by the user. 62 + 63 + 3) No Modified Version of the Font Software may use the Reserved Font 64 + Name(s) unless explicit written permission is granted by the corresponding 65 + Copyright Holder. This restriction only applies to the primary font name as 66 + presented to the users. 67 + 68 + 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 + Software shall not be used to promote, endorse or advertise any 70 + Modified Version, except to acknowledge the contribution(s) of the 71 + Copyright Holder(s) and the Author(s) or with their explicit written 72 + permission. 73 + 74 + 5) The Font Software, modified or unmodified, in part or in whole, 75 + must be distributed entirely under this license, and must not be 76 + distributed under any other license. The requirement for fonts to 77 + remain under this license does not apply to any document created 78 + using the Font Software. 79 + 80 + TERMINATION 81 + This license becomes null and void if any of the above conditions are 82 + not met. 83 + 84 + DISCLAIMER 85 + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 + OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 + COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 + INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 + DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 + FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 + OTHER DEALINGS IN THE FONT SOFTWARE.
bin/forester/theme/android-chrome-192x192.png

This is a binary file and will not be displayed.

bin/forester/theme/android-chrome-512x512.png

This is a binary file and will not be displayed.

bin/forester/theme/apple-touch-icon.png

This is a binary file and will not be displayed.

+7
bin/forester/theme/bundle-js.sh
··· 1 + #!/bin/bash 2 + 3 + npm install 4 + 5 + ./node_modules/.bin/esbuild --minify --bundle javascript-source/forester.js --outfile=forester.js 6 + 7 +
+130
bin/forester/theme/core.xsl
··· 1 + <?xml version="1.0"?> 2 + <!-- SPDX-License-Identifier: CC0-1.0 --> 3 + <xsl:stylesheet version="1.0" 4 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 + xmlns:f="http://www.jonmsterling.com/jms-005P.xml" 6 + xmlns:mml="http://www.w3.org/1998/Math/MathML" 7 + xmlns:html="http://www.w3.org/1999/xhtml"> 8 + 9 + <!-- The following ensures that node not matched by a template will show up as an error. --> 10 + <xsl:template match="node()|@*"> 11 + <xsl:copy> 12 + <span style="background-color:red"> 13 + <xsl:text>[</xsl:text> 14 + <xsl:value-of select="name(.)" /> 15 + <xsl:text>]</xsl:text> 16 + </span> 17 + <span style="background-color:red"> 18 + <xsl:apply-templates select="node()|@*" /> 19 + </span> 20 + </xsl:copy> 21 + </xsl:template> 22 + 23 + <!-- HTML and MathML nodes should be copied with namespace prefixes stripped.--> 24 + <xsl:template match="html:*"> 25 + <xsl:element namespace="http://www.w3.org/1999/xhtml" name="{local-name()}"> 26 + <xsl:apply-templates select="@* | node()" /> 27 + </xsl:element> 28 + </xsl:template> 29 + 30 + <xsl:template match="mml:*"> 31 + <xsl:element namespace="http://www.w3.org/1998/Math/MathML" name="{local-name()}"> 32 + <xsl:apply-templates select="@* | node()" /> 33 + </xsl:element> 34 + </xsl:template> 35 + 36 + <xsl:template match="f:figure"> 37 + <figure> 38 + <xsl:apply-templates /> 39 + </figure> 40 + </xsl:template> 41 + 42 + <xsl:template match="f:figcaption"> 43 + <figcaption> 44 + <xsl:apply-templates /> 45 + </figcaption> 46 + </xsl:template> 47 + 48 + <xsl:template match="f:p"> 49 + <p> 50 + <xsl:apply-templates /> 51 + </p> 52 + </xsl:template> 53 + 54 + <xsl:template match="f:code"> 55 + <code> 56 + <xsl:apply-templates /> 57 + </code> 58 + </xsl:template> 59 + 60 + <xsl:template match="f:pre"> 61 + <pre> 62 + <xsl:apply-templates /> 63 + </pre> 64 + </xsl:template> 65 + 66 + <xsl:template match="f:em"> 67 + <em> 68 + <xsl:apply-templates /> 69 + </em> 70 + </xsl:template> 71 + 72 + <xsl:template match="f:strong"> 73 + <strong> 74 + <xsl:apply-templates /> 75 + </strong> 76 + </xsl:template> 77 + 78 + <xsl:template match="f:ol"> 79 + <ol> 80 + <xsl:apply-templates /> 81 + </ol> 82 + </xsl:template> 83 + 84 + <xsl:template match="f:ul"> 85 + <ul> 86 + <xsl:apply-templates /> 87 + </ul> 88 + </xsl:template> 89 + 90 + <xsl:template match="f:li"> 91 + <li> 92 + <xsl:apply-templates /> 93 + </li> 94 + </xsl:template> 95 + 96 + <xsl:template match="f:blockquote"> 97 + <blockquote> 98 + <xsl:apply-templates /> 99 + </blockquote> 100 + </xsl:template> 101 + 102 + <xsl:template match="f:img[@src]"> 103 + <img src="{@src}" /> 104 + </xsl:template> 105 + 106 + <xsl:template match="f:error | f:info"> 107 + <span class="error"> 108 + <xsl:apply-templates /> 109 + </span> 110 + </xsl:template> 111 + 112 + <xsl:template match="f:info"> 113 + <span class="info"> 114 + <xsl:apply-templates /> 115 + </span> 116 + </xsl:template> 117 + 118 + <xsl:template match="f:tex[@display='block']"> 119 + <xsl:text>\[</xsl:text> 120 + <xsl:value-of select="." /> 121 + <xsl:text>\]</xsl:text> 122 + </xsl:template> 123 + 124 + <xsl:template match="f:tex[not(@display='block')]"> 125 + <xsl:text>\(</xsl:text> 126 + <xsl:value-of select="." /> 127 + <xsl:text>\)</xsl:text> 128 + </xsl:template> 129 + 130 + </xsl:stylesheet>
+14
bin/forester/theme/default.xsl
··· 1 + <?xml version="1.0"?> 2 + <!-- SPDX-License-Identifier: CC0-1.0 --> 3 + <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 4 + 5 + <xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="" doctype-system="" /> 6 + 7 + <xsl:include href="core.xsl" /> 8 + <xsl:include href="metadata.xsl" /> 9 + <xsl:include href="links.xsl" /> 10 + <xsl:include href="tree.xsl" /> 11 + 12 + <!-- <xsl:template match="pause"></xsl:template> --> 13 + 14 + </xsl:stylesheet>
bin/forester/theme/favicon-16x16.png

This is a binary file and will not be displayed.

bin/forester/theme/favicon-32x32.png

This is a binary file and will not be displayed.

bin/forester/theme/favicon.ico

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_AMS-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_AMS-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_AMS-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Caligraphic-Bold.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Caligraphic-Bold.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Caligraphic-Bold.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Caligraphic-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Caligraphic-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Caligraphic-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Fraktur-Bold.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Fraktur-Bold.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Fraktur-Bold.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Fraktur-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Fraktur-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Fraktur-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Bold.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Bold.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Bold.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-BoldItalic.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-BoldItalic.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-BoldItalic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Italic.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Italic.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Italic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Main-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Math-BoldItalic.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Math-BoldItalic.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Math-BoldItalic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Math-Italic.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Math-Italic.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Math-Italic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Bold.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Bold.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Bold.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Italic.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Italic.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Italic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_SansSerif-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Script-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Script-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Script-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size1-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size1-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size1-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size2-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size2-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size2-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size3-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size3-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size3-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size4-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size4-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Size4-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Typewriter-Regular.ttf

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Typewriter-Regular.woff

This is a binary file and will not be displayed.

bin/forester/theme/fonts/KaTeX_Typewriter-Regular.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/inria-sans-v14-latin_latin-ext-300.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/inria-sans-v14-latin_latin-ext-300italic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/inria-sans-v14-latin_latin-ext-700.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/inria-sans-v14-latin_latin-ext-700italic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/inria-sans-v14-latin_latin-ext-italic.woff2

This is a binary file and will not be displayed.

bin/forester/theme/fonts/inria-sans-v14-latin_latin-ext-regular.woff2

This is a binary file and will not be displayed.

+876
bin/forester/theme/forester.js
··· 1 + (()=>{var ht=window,ct=ht.ShadowRoot&&(ht.ShadyCSS===void 0||ht.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,or=Symbol(),ba=new WeakMap,qe=class{constructor(e,t,a){if(this._$cssResult$=!0,a!==or)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ct&&e===void 0){let a=t!==void 0&&t.length===1;a&&(e=ba.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),a&&ba.set(t,e))}return e}toString(){return this.cssText}},xa=r=>new qe(typeof r=="string"?r:r+"",void 0,or),j0=(r,...e)=>{let t=r.length===1?r[0]:e.reduce((a,n,i)=>a+(l=>{if(l._$cssResult$===!0)return l.cssText;if(typeof l=="number")return l;throw Error("Value passed to 'css' function must be a 'css' function result: "+l+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+r[i+1],r[0]);return new qe(t,r,or)},ur=(r,e)=>{ct?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{let a=document.createElement("style"),n=ht.litNonce;n!==void 0&&a.setAttribute("nonce",n),a.textContent=t.cssText,r.appendChild(a)})},dt=ct?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let a of e.cssRules)t+=a.cssText;return xa(t)})(r):r;var hr,mt=window,wa=mt.trustedTypes,Ii=wa?wa.emptyScript:"",ka=mt.reactiveElementPolyfillSupport,dr={toAttribute(r,e){switch(e){case Boolean:r=r?Ii:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},Sa=(r,e)=>e!==r&&(e==e||r==r),cr={attribute:!0,type:String,converter:dr,reflect:!1,hasChanged:Sa},mr="finalized",F0=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach((t,a)=>{let n=this._$Ep(a,t);n!==void 0&&(this._$Ev.set(n,a),e.push(n))}),e}static createProperty(e,t=cr){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){let a=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,a,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,a){return{get(){return this[t]},set(n){let i=this[e];this[t]=n,this.requestUpdate(e,i,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||cr}static finalize(){if(this.hasOwnProperty(mr))return!1;this[mr]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let t=this.properties,a=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(let n of a)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let a=new Set(e.flat(1/0).reverse());for(let n of a)t.unshift(dt(n))}else e!==void 0&&t.push(dt(e));return t}static _$Ep(e,t){let a=t.attribute;return a===!1?void 0:typeof a=="string"?a:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,a;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((a=e.hostConnected)===null||a===void 0||a.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;let t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return ur(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var a;return(a=t.hostConnected)===null||a===void 0?void 0:a.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var a;return(a=t.hostDisconnected)===null||a===void 0?void 0:a.call(t)})}attributeChangedCallback(e,t,a){this._$AK(e,a)}_$EO(e,t,a=cr){var n;let i=this.constructor._$Ep(e,a);if(i!==void 0&&a.reflect===!0){let l=(((n=a.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?a.converter:dr).toAttribute(t,a.type);this._$El=e,l==null?this.removeAttribute(i):this.setAttribute(i,l),this._$El=null}}_$AK(e,t){var a;let n=this.constructor,i=n._$Ev.get(e);if(i!==void 0&&this._$El!==i){let l=n.getPropertyOptions(i),u=typeof l.converter=="function"?{fromAttribute:l.converter}:((a=l.converter)===null||a===void 0?void 0:a.fromAttribute)!==void 0?l.converter:dr;this._$El=i,this[i]=u.fromAttribute(t,l.type),this._$El=null}}requestUpdate(e,t,a){let n=!0;e!==void 0&&(((a=a||this.constructor.getPropertyOptions(e)).hasChanged||Sa)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),a.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,a))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,i)=>this[i]=n),this._$Ei=void 0);let t=!1,a=this._$AL;try{t=this.shouldUpdate(a),t?(this.willUpdate(a),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var i;return(i=n.hostUpdate)===null||i===void 0?void 0:i.call(n)}),this.update(a)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(a)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(a=>{var n;return(n=a.hostUpdated)===null||n===void 0?void 0:n.call(a)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,a)=>this._$EO(a,this[a],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};F0[mr]=!0,F0.elementProperties=new Map,F0.elementStyles=[],F0.shadowRootOptions={mode:"open"},ka?.({ReactiveElement:F0}),((hr=mt.reactiveElementVersions)!==null&&hr!==void 0?hr:mt.reactiveElementVersions=[]).push("1.6.3");var fr,ft=window,Ce=ft.trustedTypes,Aa=Ce?Ce.createPolicy("lit-html",{createHTML:r=>r}):void 0,pt="$lit$",V0=`lit$${(Math.random()+"").slice(9)}$`,vr="?"+V0,Pi=`<${vr}>`,me=document,Pe=()=>me.createComment(""),Le=r=>r===null||typeof r!="object"&&typeof r!="function",Da=Array.isArray,$a=r=>Da(r)||typeof r?.[Symbol.iterator]=="function",pr=`[ 2 + \f\r]`,Ie=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ma=/-->/g,Ta=/>/g,ce=RegExp(`>|${pr}(?:([^\\s"'>=/]+)(${pr}*=${pr}*(?:[^ 3 + \f\r"'\`<>=]|("|')|))|$)`,"g"),za=/'/g,Ca=/"/g,Na=/^(?:script|style|textarea|title)$/i,Oa=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),r0=Oa(1),ol=Oa(2),o0=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Ea=new WeakMap,de=me.createTreeWalker(me,129,null,!1);function Ra(r,e){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Aa!==void 0?Aa.createHTML(e):e}var _a=(r,e)=>{let t=r.length-1,a=[],n,i=e===2?"<svg>":"",l=Ie;for(let u=0;u<t;u++){let h=r[u],m,v,g=-1,b=0;for(;b<h.length&&(l.lastIndex=b,v=l.exec(h),v!==null);)b=l.lastIndex,l===Ie?v[1]==="!--"?l=Ma:v[1]!==void 0?l=Ta:v[2]!==void 0?(Na.test(v[2])&&(n=RegExp("</"+v[2],"g")),l=ce):v[3]!==void 0&&(l=ce):l===ce?v[0]===">"?(l=n??Ie,g=-1):v[1]===void 0?g=-2:(g=l.lastIndex-v[2].length,m=v[1],l=v[3]===void 0?ce:v[3]==='"'?Ca:za):l===Ca||l===za?l=ce:l===Ma||l===Ta?l=Ie:(l=ce,n=void 0);let x=l===ce&&r[u+1].startsWith("/>")?" ":"";i+=l===Ie?h+Pi:g>=0?(a.push(m),h.slice(0,g)+pt+h.slice(g)+V0+x):h+V0+(g===-2?(a.push(void 0),u):x)}return[Ra(r,i+(r[t]||"<?>")+(e===2?"</svg>":"")),a]},je=class r{constructor({strings:e,_$litType$:t},a){let n;this.parts=[];let i=0,l=0,u=e.length-1,h=this.parts,[m,v]=_a(e,t);if(this.el=r.createElement(m,a),de.currentNode=this.el.content,t===2){let g=this.el.content,b=g.firstChild;b.remove(),g.append(...b.childNodes)}for(;(n=de.nextNode())!==null&&h.length<u;){if(n.nodeType===1){if(n.hasAttributes()){let g=[];for(let b of n.getAttributeNames())if(b.endsWith(pt)||b.startsWith(V0)){let x=v[l++];if(g.push(b),x!==void 0){let k=n.getAttribute(x.toLowerCase()+pt).split(V0),A=/([.?@])?(.*)/.exec(x);h.push({type:1,index:i,name:A[2],strings:k,ctor:A[1]==="."?gt:A[1]==="?"?yt:A[1]==="@"?bt:pe})}else h.push({type:6,index:i})}for(let b of g)n.removeAttribute(b)}if(Na.test(n.tagName)){let g=n.textContent.split(V0),b=g.length-1;if(b>0){n.textContent=Ce?Ce.emptyScript:"";for(let x=0;x<b;x++)n.append(g[x],Pe()),de.nextNode(),h.push({type:2,index:++i});n.append(g[b],Pe())}}}else if(n.nodeType===8)if(n.data===vr)h.push({type:2,index:i});else{let g=-1;for(;(g=n.data.indexOf(V0,g+1))!==-1;)h.push({type:7,index:i}),g+=V0.length-1}i++}}static createElement(e,t){let a=me.createElement("template");return a.innerHTML=e,a}};function fe(r,e,t=r,a){var n,i,l,u;if(e===o0)return e;let h=a!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[a]:t._$Cl,m=Le(e)?void 0:e._$litDirective$;return h?.constructor!==m&&((i=h?._$AO)===null||i===void 0||i.call(h,!1),m===void 0?h=void 0:(h=new m(r),h._$AT(r,t,a)),a!==void 0?((l=(u=t)._$Co)!==null&&l!==void 0?l:u._$Co=[])[a]=h:t._$Cl=h),h!==void 0&&(e=fe(r,h._$AS(r,e.values),h,a)),e}var vt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;let{el:{content:a},parts:n}=this._$AD,i=((t=e?.creationScope)!==null&&t!==void 0?t:me).importNode(a,!0);de.currentNode=i;let l=de.nextNode(),u=0,h=0,m=n[0];for(;m!==void 0;){if(u===m.index){let v;m.type===2?v=new Ee(l,l.nextSibling,this,e):m.type===1?v=new m.ctor(l,m.name,m.strings,this,e):m.type===6&&(v=new xt(l,this,e)),this._$AV.push(v),m=n[++h]}u!==m?.index&&(l=de.nextNode(),u++)}return de.currentNode=me,i}v(e){let t=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(e,a,t),t+=a.strings.length-2):a._$AI(e[t])),t++}},Ee=class r{constructor(e,t,a,n){var i;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=a,this.options=n,this._$Cp=(i=n?.isConnected)===null||i===void 0||i}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=fe(this,e,t),Le(e)?e===G||e==null||e===""?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==o0&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):$a(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==G&&Le(this._$AH)?this._$AA.nextSibling.data=e:this.$(me.createTextNode(e)),this._$AH=e}g(e){var t;let{values:a,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=je.createElement(Ra(n.h,n.h[0]),this.options)),n);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===i)this._$AH.v(a);else{let l=new vt(i,this),u=l.u(this.options);l.v(a),this.$(u),this._$AH=l}}_$AC(e){let t=Ea.get(e.strings);return t===void 0&&Ea.set(e.strings,t=new je(e)),t}T(e){Da(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,a,n=0;for(let i of e)n===t.length?t.push(a=new r(this.k(Pe()),this.k(Pe()),this,this.options)):a=t[n],a._$AI(i),n++;n<t.length&&(this._$AR(a&&a._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var a;for((a=this._$AP)===null||a===void 0||a.call(this,!1,!0,t);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},pe=class{constructor(e,t,a,n,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,a,n){let i=this.strings,l=!1;if(i===void 0)e=fe(this,e,t,0),l=!Le(e)||e!==this._$AH&&e!==o0,l&&(this._$AH=e);else{let u=e,h,m;for(e=i[0],h=0;h<i.length-1;h++)m=fe(this,u[a+h],t,h),m===o0&&(m=this._$AH[h]),l||(l=!Le(m)||m!==this._$AH[h]),m===G?e=G:e!==G&&(e+=(m??"")+i[h+1]),this._$AH[h]=m}l&&!n&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},gt=class extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}},Li=Ce?Ce.emptyScript:"",yt=class extends pe{constructor(){super(...arguments),this.type=4}j(e){e&&e!==G?this.element.setAttribute(this.name,Li):this.element.removeAttribute(this.name)}},bt=class extends pe{constructor(e,t,a,n,i){super(e,t,a,n,i),this.type=5}_$AI(e,t=this){var a;if((e=(a=fe(this,e,t,0))!==null&&a!==void 0?a:G)===o0)return;let n=this._$AH,i=e===G&&n!==G||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,l=e!==G&&(n===G||i);i&&this.element.removeEventListener(this.name,this,n),l&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,a;typeof this._$AH=="function"?this._$AH.call((a=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&a!==void 0?a:this.element,e):this._$AH.handleEvent(e)}},xt=class{constructor(e,t,a){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(e){fe(this,e)}},Ha={O:pt,P:V0,A:vr,C:1,M:_a,L:vt,R:$a,D:fe,I:Ee,V:pe,H:yt,N:bt,U:gt,F:xt},Ba=ft.litHtmlPolyfillSupport;Ba?.(je,Ee),((fr=ft.litHtmlVersions)!==null&&fr!==void 0?fr:ft.litHtmlVersions=[]).push("2.8.0");var qa=(r,e,t)=>{var a,n;let i=(a=t?.renderBefore)!==null&&a!==void 0?a:e,l=i._$litPart$;if(l===void 0){let u=(n=t?.renderBefore)!==null&&n!==void 0?n:null;i._$litPart$=l=new Ee(e.insertBefore(Pe(),u),u,void 0,t??{})}return l._$AI(r),l};var gr,yr;var g0=class extends F0{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;let a=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=a.firstChild),a}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=qa(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return o0}};g0.finalized=!0,g0._$litElement$=!0,(gr=globalThis.litElementHydrateSupport)===null||gr===void 0||gr.call(globalThis,{LitElement:g0});var Ia=globalThis.litElementPolyfillSupport;Ia?.({LitElement:g0});((yr=globalThis.litElementVersions)!==null&&yr!==void 0?yr:globalThis.litElementVersions=[]).push("3.3.3");var ae=r=>e=>typeof e=="function"?((t,a)=>(customElements.define(t,a),a))(r,e):((t,a)=>{let{kind:n,elements:i}=a;return{kind:n,elements:i,finisher(l){customElements.define(t,l)}}})(r,e);var ji=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,r)}},Fi=(r,e,t)=>{e.constructor.createProperty(t,r)};function W(r){return(e,t)=>t!==void 0?Fi(r,e,t):ji(r,e)}function U0(r){return W({...r,state:!0})}var br,Nl=((br=window.HTMLSlotElement)===null||br===void 0?void 0:br.prototype.assignedElements)!=null?(r,e)=>r.assignedElements(e):(r,e)=>r.assignedNodes(e).filter(t=>t.nodeType===Node.ELEMENT_NODE);var c0={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},D0=r=>(...e)=>({_$litDirective$:r,values:e}),S0=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:Vi}=Ha;var wt=r=>r.strings===void 0,Pa=()=>document.createComment(""),Be=(r,e,t)=>{var a;let n=r._$AA.parentNode,i=e===void 0?r._$AB:e._$AA;if(t===void 0){let l=n.insertBefore(Pa(),i),u=n.insertBefore(Pa(),i);t=new Vi(l,u,r,r.options)}else{let l=t._$AB.nextSibling,u=t._$AM,h=u!==r;if(h){let m;(a=t._$AQ)===null||a===void 0||a.call(t,r),t._$AM=r,t._$AP!==void 0&&(m=r._$AU)!==u._$AU&&t._$AP(m)}if(l!==i||h){let m=t._$AA;for(;m!==l;){let v=m.nextSibling;n.insertBefore(m,i),m=v}}}return t},ne=(r,e,t=r)=>(r._$AI(e,t),r),Ui={},kt=(r,e=Ui)=>r._$AH=e,La=r=>r._$AH,St=r=>{var e;(e=r._$AP)===null||e===void 0||e.call(r,!1,!0);let t=r._$AA,a=r._$AB.nextSibling;for(;t!==a;){let n=t.nextSibling;t.remove(),t=n}};var ja=(r,e,t)=>{let a=new Map;for(let n=e;n<=t;n++)a.set(r[n],n);return a},Fa=D0(class extends S0{constructor(r){if(super(r),r.type!==c0.CHILD)throw Error("repeat() can only be used in text expressions")}ct(r,e,t){let a;t===void 0?t=e:e!==void 0&&(a=e);let n=[],i=[],l=0;for(let u of r)n[l]=a?a(u,l):l,i[l]=t(u,l),l++;return{values:i,keys:n}}render(r,e,t){return this.ct(r,e,t).values}update(r,[e,t,a]){var n;let i=La(r),{values:l,keys:u}=this.ct(e,t,a);if(!Array.isArray(i))return this.ut=u,l;let h=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],m=[],v,g,b=0,x=i.length-1,k=0,A=l.length-1;for(;b<=x&&k<=A;)if(i[b]===null)b++;else if(i[x]===null)x--;else if(h[b]===u[k])m[k]=ne(i[b],l[k]),b++,k++;else if(h[x]===u[A])m[A]=ne(i[x],l[A]),x--,A--;else if(h[b]===u[A])m[A]=ne(i[b],l[A]),Be(r,m[A+1],i[b]),b++,A--;else if(h[x]===u[k])m[k]=ne(i[x],l[k]),Be(r,i[b],i[x]),x--,k++;else if(v===void 0&&(v=ja(u,k,A),g=ja(h,b,x)),v.has(h[b]))if(v.has(h[x])){let C=g.get(u[k]),D=C!==void 0?i[C]:null;if(D===null){let R=Be(r,i[b]);ne(R,l[k]),m[k]=R}else m[k]=ne(D,l[k]),Be(r,i[b],D),i[C]=null;k++}else St(i[x]),x--;else St(i[b]),b++;for(;k<=A;){let C=Be(r,m[A+1]);ne(C,l[k]),m[k++]=C}for(;b<=x;){let C=i[b++];C!==null&&St(C)}return this.ut=u,kt(r,m),o0}});var Va=D0(class extends S0{constructor(r){if(super(r),r.type!==c0.PROPERTY&&r.type!==c0.ATTRIBUTE&&r.type!==c0.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!wt(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===o0||e===G)return e;let t=r.element,a=r.name;if(r.type===c0.PROPERTY){if(e===t[a])return o0}else if(r.type===c0.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(a))return o0}else if(r.type===c0.ATTRIBUTE&&t.getAttribute(a)===e+"")return o0;return kt(r),e}});var Ve=(r,e)=>{var t,a;let n=r._$AN;if(n===void 0)return!1;for(let i of n)(a=(t=i)._$AO)===null||a===void 0||a.call(t,e,!1),Ve(i,e);return!0},At=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},Ua=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),Wi(e)}};function Gi(r){this._$AN!==void 0?(At(this),this._$AM=r,Ua(this)):this._$AM=r}function Ki(r,e=!1,t=0){let a=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(a))for(let i=t;i<a.length;i++)Ve(a[i],!1),At(a[i]);else a!=null&&(Ve(a,!1),At(a));else Ve(this,r)}var Wi=r=>{var e,t,a,n;r.type==c0.CHILD&&((e=(a=r)._$AP)!==null&&e!==void 0||(a._$AP=Ki),(t=(n=r)._$AQ)!==null&&t!==void 0||(n._$AQ=Gi))},Mt=class extends S0{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,a){super._$AT(e,t,a),Ua(this),this.isConnected=e._$AU}_$AO(e,t=!0){var a,n;e!==this.isConnected&&(this.isConnected=e,e?(a=this.reconnected)===null||a===void 0||a.call(this):(n=this.disconnected)===null||n===void 0||n.call(this)),t&&(Ve(this,e),At(this))}setValue(e){if(wt(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var Tt=()=>new wr,wr=class{},xr=new WeakMap,zt=D0(class extends Mt{render(r){return G}update(r,[e]){var t;let a=e!==this.G;return a&&this.G!==void 0&&this.ot(void 0),(a||this.rt!==this.lt)&&(this.G=e,this.dt=(t=r.options)===null||t===void 0?void 0:t.host,this.ot(this.lt=r.element)),G}ot(r){var e;if(typeof this.G=="function"){let t=(e=this.dt)!==null&&e!==void 0?e:globalThis,a=xr.get(t);a===void 0&&(a=new WeakMap,xr.set(t,a)),a.get(this.G)!==void 0&&this.G.call(this.dt,void 0),a.set(this.G,r),r!==void 0&&this.G.call(this.dt,r)}else this.G.value=r}get rt(){var r,e,t;return typeof this.G=="function"?(e=xr.get((r=this.dt)!==null&&r!==void 0?r:globalThis))===null||e===void 0?void 0:e.get(this.G):(t=this.G)===null||t===void 0?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var Ue=D0(class extends S0{constructor(r){var e;if(super(r),r.type!==c0.ATTRIBUTE||r.name!=="class"||((e=r.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){var t,a;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(let i in e)e[i]&&!(!((t=this.nt)===null||t===void 0)&&t.has(i))&&this.it.add(i);return this.render(e)}let n=r.element.classList;this.it.forEach(i=>{i in e||(n.remove(i),this.it.delete(i))});for(let i in e){let l=!!e[i];l===this.it.has(i)||!((a=this.nt)===null||a===void 0)&&a.has(i)||(l?(n.add(i),this.it.add(i)):(n.remove(i),this.it.delete(i)))}return o0}});var kr=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Sr(r,e,t){r.addEventListener?r.addEventListener(e,t,!1):r.attachEvent&&r.attachEvent("on".concat(e),function(){t(window.event)})}function Xa(r,e){for(var t=e.slice(0,e.length-1),a=0;a<t.length;a++)t[a]=r[t[a].toLowerCase()];return t}function Za(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");for(var e=r.split(","),t=e.lastIndexOf("");t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}function Yi(r,e){for(var t=r.length>=e.length?r:e,a=r.length>=e.length?e:r,n=!0,i=0;i<t.length;i++)a.indexOf(t[i])===-1&&(n=!1);return n}var Ja={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":kr?173:189,"=":kr?61:187,";":kr?59:186,"'":222,"[":219,"]":221,"\\":220},ve={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},Ga={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},h0={16:!1,18:!1,17:!1,91:!1},u0={};for(Ge=1;Ge<20;Ge++)Ja["f".concat(Ge)]=111+Ge;var Ge,Y=[],Qa="all",en=[],Et=function(e){return Ja[e.toLowerCase()]||ve[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function tn(r){Qa=r||"all"}function Ke(){return Qa||"all"}function Xi(){return Y.slice(0)}function Zi(r){var e=r.target||r.srcElement,t=e.tagName,a=!0;return(e.isContentEditable||(t==="INPUT"||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(a=!1),a}function Ji(r){return typeof r=="string"&&(r=Et(r)),Y.indexOf(r)!==-1}function Qi(r,e){var t,a;r||(r=Ke());for(var n in u0)if(Object.prototype.hasOwnProperty.call(u0,n))for(t=u0[n],a=0;a<t.length;)t[a].scope===r?t.splice(a,1):a++;Ke()===r&&tn(e||"all")}function es(r){var e=r.keyCode||r.which||r.charCode,t=Y.indexOf(e);if(t>=0&&Y.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&Y.splice(0,Y.length),(e===93||e===224)&&(e=91),e in h0){h0[e]=!1;for(var a in ve)ve[a]===e&&(G0[a]=!1)}}function ts(r){if(!r)Object.keys(u0).forEach(function(l){return delete u0[l]});else if(Array.isArray(r))r.forEach(function(l){l.key&&Ar(l)});else if(typeof r=="object")r.key&&Ar(r);else if(typeof r=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];var n=t[0],i=t[1];typeof n=="function"&&(i=n,n=""),Ar({key:r,scope:n,method:i,splitKey:"+"})}}var Ar=function(e){var t=e.key,a=e.scope,n=e.method,i=e.splitKey,l=i===void 0?"+":i,u=Za(t);u.forEach(function(h){var m=h.split(l),v=m.length,g=m[v-1],b=g==="*"?"*":Et(g);if(u0[b]){a||(a=Ke());var x=v>1?Xa(ve,m):[];u0[b]=u0[b].map(function(k){var A=n?k.method===n:!0;return A&&k.scope===a&&Yi(k.mods,x)?{}:k})}})};function Ka(r,e,t){var a;if(e.scope===t||e.scope==="all"){a=e.mods.length>0;for(var n in h0)Object.prototype.hasOwnProperty.call(h0,n)&&(!h0[n]&&e.mods.indexOf(+n)>-1||h0[n]&&e.mods.indexOf(+n)===-1)&&(a=!1);(e.mods.length===0&&!h0[16]&&!h0[18]&&!h0[17]&&!h0[91]||a||e.shortcut==="*")&&e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0))}}function Wa(r){var e=u0["*"],t=r.keyCode||r.which||r.charCode;if(G0.filter.call(this,r)){if((t===93||t===224)&&(t=91),Y.indexOf(t)===-1&&t!==229&&Y.push(t),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(x){var k=Ga[x];r[x]&&Y.indexOf(k)===-1?Y.push(k):!r[x]&&Y.indexOf(k)>-1?Y.splice(Y.indexOf(k),1):x==="metaKey"&&r[x]&&Y.length===3&&(r.ctrlKey||r.shiftKey||r.altKey||(Y=Y.slice(Y.indexOf(k))))}),t in h0){h0[t]=!0;for(var a in ve)ve[a]===t&&(G0[a]=!0);if(!e)return}for(var n in h0)Object.prototype.hasOwnProperty.call(h0,n)&&(h0[n]=r[Ga[n]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(Y.indexOf(17)===-1&&Y.push(17),Y.indexOf(18)===-1&&Y.push(18),h0[17]=!0,h0[18]=!0);var i=Ke();if(e)for(var l=0;l<e.length;l++)e[l].scope===i&&(r.type==="keydown"&&e[l].keydown||r.type==="keyup"&&e[l].keyup)&&Ka(r,e[l],i);if(t in u0){for(var u=0;u<u0[t].length;u++)if((r.type==="keydown"&&u0[t][u].keydown||r.type==="keyup"&&u0[t][u].keyup)&&u0[t][u].key){for(var h=u0[t][u],m=h.splitKey,v=h.key.split(m),g=[],b=0;b<v.length;b++)g.push(Et(v[b]));g.sort().join("")===Y.sort().join("")&&Ka(r,h,i)}}}}function rs(r){return en.indexOf(r)>-1}function G0(r,e,t){Y=[];var a=Za(r),n=[],i="all",l=document,u=0,h=!1,m=!0,v="+";for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(l=e.element),e.keyup&&(h=e.keyup),e.keydown!==void 0&&(m=e.keydown),typeof e.splitKey=="string"&&(v=e.splitKey)),typeof e=="string"&&(i=e);u<a.length;u++)r=a[u].split(v),n=[],r.length>1&&(n=Xa(ve,r)),r=r[r.length-1],r=r==="*"?"*":Et(r),r in u0||(u0[r]=[]),u0[r].push({keyup:h,keydown:m,scope:i,mods:n,shortcut:a[u],method:t,key:a[u],splitKey:v});typeof l<"u"&&!rs(l)&&window&&(en.push(l),Sr(l,"keydown",function(g){Wa(g)}),Sr(window,"focus",function(){Y=[]}),Sr(l,"keyup",function(g){Wa(g),es(g)}))}var Mr={setScope:tn,getScope:Ke,deleteScope:Qi,getPressedKeyCodes:Xi,isPressed:Ji,filter:Zi,unbind:ts};for(Ct in Mr)Object.prototype.hasOwnProperty.call(Mr,Ct)&&(G0[Ct]=Mr[Ct]);var Ct;typeof window<"u"&&(Ya=window.hotkeys,G0.noConflict=function(r){return r&&window.hotkeys===G0&&(window.hotkeys=Ya),G0},window.hotkeys=G0);var Ya,y0=G0;var We=function(r,e,t,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,a);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(i=(n<3?l(i):n>3?l(e,t,i):l(e,t))||i);return n>3&&i&&Object.defineProperty(e,t,i),i},ge=class extends g0{constructor(){super(...arguments),this.placeholder="",this.hideBreadcrumbs=!1,this.breadcrumbHome="Home",this.breadcrumbs=[],this._inputRef=Tt()}render(){let e="";if(!this.hideBreadcrumbs){let t=[];for(let a of this.breadcrumbs)t.push(r0`<button 4 + tabindex="-1" 5 + @click=${()=>this.selectParent(a)} 6 + class="breadcrumb" 7 + > 8 + ${a} 9 + </button>`);e=r0`<div class="breadcrumb-list"> 10 + <button 11 + tabindex="-1" 12 + @click=${()=>this.selectParent()} 13 + class="breadcrumb" 14 + > 15 + ${this.breadcrumbHome} 16 + </button> 17 + ${t} 18 + </div>`}return r0` 19 + ${e} 20 + <div part="ninja-input-wrapper" class="search-wrapper"> 21 + <input 22 + part="ninja-input" 23 + type="text" 24 + id="search" 25 + spellcheck="false" 26 + autocomplete="off" 27 + @input="${this._handleInput}" 28 + ${zt(this._inputRef)} 29 + placeholder="${this.placeholder}" 30 + class="search" 31 + /> 32 + </div> 33 + `}setSearch(e){this._inputRef.value&&(this._inputRef.value.value=e)}focusSearch(){requestAnimationFrame(()=>this._inputRef.value.focus())}_handleInput(e){let t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{search:t.value},bubbles:!1,composed:!1}))}selectParent(e){this.dispatchEvent(new CustomEvent("setParent",{detail:{parent:e},bubbles:!0,composed:!0}))}firstUpdated(){this.focusSearch()}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}};ge.styles=j0` 34 + :host { 35 + flex: 1; 36 + position: relative; 37 + } 38 + .search { 39 + padding: 1.25em; 40 + flex-grow: 1; 41 + flex-shrink: 0; 42 + margin: 0px; 43 + border: none; 44 + appearance: none; 45 + font-size: 1.125em; 46 + background: transparent; 47 + caret-color: var(--ninja-accent-color); 48 + color: var(--ninja-text-color); 49 + outline: none; 50 + font-family: var(--ninja-font-family); 51 + } 52 + .search::placeholder { 53 + color: var(--ninja-placeholder-color); 54 + } 55 + .breadcrumb-list { 56 + padding: 1em 4em 0 1em; 57 + display: flex; 58 + flex-direction: row; 59 + align-items: stretch; 60 + justify-content: flex-start; 61 + flex: initial; 62 + } 63 + 64 + .breadcrumb { 65 + background: var(--ninja-secondary-background-color); 66 + text-align: center; 67 + line-height: 1.2em; 68 + border-radius: var(--ninja-key-border-radius); 69 + border: 0; 70 + cursor: pointer; 71 + padding: 0.1em 0.5em; 72 + color: var(--ninja-secondary-text-color); 73 + margin-right: 0.5em; 74 + outline: none; 75 + font-family: var(--ninja-font-family); 76 + } 77 + 78 + .search-wrapper { 79 + display: flex; 80 + border-bottom: var(--ninja-separate-border); 81 + } 82 + `;We([W()],ge.prototype,"placeholder",void 0);We([W({type:Boolean})],ge.prototype,"hideBreadcrumbs",void 0);We([W()],ge.prototype,"breadcrumbHome",void 0);We([W({type:Array})],ge.prototype,"breadcrumbs",void 0);ge=We([ae("ninja-header")],ge);var Ye=class extends S0{constructor(e){if(super(e),this.et=G,e.type!==c0.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===G||e==null)return this.ft=void 0,this.et=e;if(e===o0)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;let t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Ye.directiveName="unsafeHTML",Ye.resultType=1;var rn=D0(Ye);function*an(r,e){let t=typeof e=="function";if(r!==void 0){let a=-1;for(let n of r)a>-1&&(yield t?e(a):e),a++,yield n}}function nn(r,e,t,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,a);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(i=(n<3?l(i):n>3?l(e,t,i):l(e,t))||i);return n>3&&i&&Object.defineProperty(e,t,i),i}var sn=j0`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`;var Tr=class extends g0{render(){return r0`<span><slot></slot></span>`}};Tr.styles=[sn];Tr=nn([ae("mwc-icon")],Tr);var Bt=function(r,e,t,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,a);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(i=(n<3?l(i):n>3?l(e,t,i):l(e,t))||i);return n>3&&i&&Object.defineProperty(e,t,i),i},De=class extends g0{constructor(){super(),this.selected=!1,this.hotKeysJoinedView=!0,this.addEventListener("click",this.click)}ensureInView(){requestAnimationFrame(()=>this.scrollIntoView({block:"nearest"}))}click(){this.dispatchEvent(new CustomEvent("actionsSelected",{detail:this.action,bubbles:!0,composed:!0}))}updated(e){e.has("selected")&&this.selected&&this.ensureInView()}render(){let e;this.action.mdIcon?e=r0`<mwc-icon part="ninja-icon" class="ninja-icon" 83 + >${this.action.mdIcon}</mwc-icon 84 + >`:this.action.icon&&(e=rn(this.action.icon||""));let t;this.action.hotkey&&(this.hotKeysJoinedView?t=this.action.hotkey.split(",").map(n=>{let i=n.split("+"),l=r0`${an(i.map(u=>r0`<kbd>${u}</kbd>`),"+")}`;return r0`<div class="ninja-hotkey ninja-hotkeys"> 85 + ${l} 86 + </div>`}):t=this.action.hotkey.split(",").map(n=>{let l=n.split("+").map(u=>r0`<kbd class="ninja-hotkey">${u}</kbd>`);return r0`<kbd class="ninja-hotkeys">${l}</kbd>`}));let a={selected:this.selected,"ninja-action":!0};return r0` 87 + <div 88 + class="ninja-action" 89 + part="ninja-action ${this.selected?"ninja-selected":""}" 90 + class=${Ue(a)} 91 + > 92 + ${e} 93 + <div class="ninja-title">${this.action.title}</div> 94 + ${t} 95 + </div> 96 + `}};De.styles=j0` 97 + :host { 98 + display: flex; 99 + width: 100%; 100 + } 101 + .ninja-action { 102 + padding: 0.75em 1em; 103 + display: flex; 104 + border-left: 2px solid transparent; 105 + align-items: center; 106 + justify-content: start; 107 + outline: none; 108 + transition: color 0s ease 0s; 109 + width: 100%; 110 + } 111 + .ninja-action.selected { 112 + cursor: pointer; 113 + color: var(--ninja-selected-text-color); 114 + background-color: var(--ninja-selected-background); 115 + border-left: 2px solid var(--ninja-accent-color); 116 + outline: none; 117 + } 118 + .ninja-action.selected .ninja-icon { 119 + color: var(--ninja-selected-text-color); 120 + } 121 + .ninja-icon { 122 + font-size: var(--ninja-icon-size); 123 + max-width: var(--ninja-icon-size); 124 + max-height: var(--ninja-icon-size); 125 + margin-right: 1em; 126 + color: var(--ninja-icon-color); 127 + margin-right: 1em; 128 + position: relative; 129 + } 130 + 131 + .ninja-title { 132 + flex-shrink: 0.01; 133 + margin-right: 0.5em; 134 + flex-grow: 1; 135 + font-size: 0.8125em; 136 + white-space: nowrap; 137 + overflow: hidden; 138 + text-overflow: ellipsis; 139 + } 140 + .ninja-hotkeys { 141 + flex-shrink: 0; 142 + width: min-content; 143 + display: flex; 144 + } 145 + 146 + .ninja-hotkeys kbd { 147 + font-family: inherit; 148 + } 149 + .ninja-hotkey { 150 + background: var(--ninja-secondary-background-color); 151 + padding: 0.06em 0.25em; 152 + border-radius: var(--ninja-key-border-radius); 153 + text-transform: capitalize; 154 + color: var(--ninja-secondary-text-color); 155 + font-size: 0.75em; 156 + font-family: inherit; 157 + } 158 + 159 + .ninja-hotkey + .ninja-hotkey { 160 + margin-left: 0.5em; 161 + } 162 + .ninja-hotkeys + .ninja-hotkeys { 163 + margin-left: 1em; 164 + } 165 + `;Bt([W({type:Object})],De.prototype,"action",void 0);Bt([W({type:Boolean})],De.prototype,"selected",void 0);Bt([W({type:Boolean})],De.prototype,"hotKeysJoinedView",void 0);De=Bt([ae("ninja-action")],De);var ln=r0` <div class="modal-footer" slot="footer"> 166 + <span class="help"> 167 + <svg 168 + version="1.0" 169 + class="ninja-examplekey" 170 + xmlns="http://www.w3.org/2000/svg" 171 + viewBox="0 0 1280 1280" 172 + > 173 + <path 174 + d="M1013 376c0 73.4-.4 113.3-1.1 120.2a159.9 159.9 0 0 1-90.2 127.3c-20 9.6-36.7 14-59.2 15.5-7.1.5-121.9.9-255 1h-242l95.5-95.5 95.5-95.5-38.3-38.2-38.2-38.3-160 160c-88 88-160 160.4-160 161 0 .6 72 73 160 161l160 160 38.2-38.3 38.3-38.2-95.5-95.5-95.5-95.5h251.1c252.9 0 259.8-.1 281.4-3.6 72.1-11.8 136.9-54.1 178.5-116.4 8.6-12.9 22.6-40.5 28-55.4 4.4-12 10.7-36.1 13.1-50.6 1.6-9.6 1.8-21 2.1-132.8l.4-122.2H1013v110z" 175 + /> 176 + </svg> 177 + 178 + to select 179 + </span> 180 + <span class="help"> 181 + <svg 182 + xmlns="http://www.w3.org/2000/svg" 183 + class="ninja-examplekey" 184 + viewBox="0 0 24 24" 185 + > 186 + <path d="M0 0h24v24H0V0z" fill="none" /> 187 + <path 188 + d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z" 189 + /> 190 + </svg> 191 + <svg 192 + xmlns="http://www.w3.org/2000/svg" 193 + class="ninja-examplekey" 194 + viewBox="0 0 24 24" 195 + > 196 + <path d="M0 0h24v24H0V0z" fill="none" /> 197 + <path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" /> 198 + </svg> 199 + to navigate 200 + </span> 201 + <span class="help"> 202 + <span class="ninja-examplekey esc">esc</span> 203 + to close 204 + </span> 205 + <span class="help"> 206 + <svg 207 + xmlns="http://www.w3.org/2000/svg" 208 + class="ninja-examplekey backspace" 209 + viewBox="0 0 20 20" 210 + fill="currentColor" 211 + > 212 + <path 213 + fill-rule="evenodd" 214 + d="M6.707 4.879A3 3 0 018.828 4H15a3 3 0 013 3v6a3 3 0 01-3 3H8.828a3 3 0 01-2.12-.879l-4.415-4.414a1 1 0 010-1.414l4.414-4.414zm4 2.414a1 1 0 00-1.414 1.414L10.586 10l-1.293 1.293a1 1 0 101.414 1.414L12 11.414l1.293 1.293a1 1 0 001.414-1.414L13.414 10l1.293-1.293a1 1 0 00-1.414-1.414L12 8.586l-1.293-1.293z" 215 + clip-rule="evenodd" 216 + /> 217 + </svg> 218 + move to parent 219 + </span> 220 + </div>`;var on=j0` 221 + :host { 222 + --ninja-width: 640px; 223 + --ninja-backdrop-filter: none; 224 + --ninja-overflow-background: rgba(255, 255, 255, 0.5); 225 + --ninja-text-color: rgb(60, 65, 73); 226 + --ninja-font-size: 16px; 227 + --ninja-top: 20%; 228 + 229 + --ninja-key-border-radius: 0.25em; 230 + --ninja-accent-color: rgb(110, 94, 210); 231 + --ninja-secondary-background-color: rgb(239, 241, 244); 232 + --ninja-secondary-text-color: rgb(107, 111, 118); 233 + 234 + --ninja-selected-background: rgb(248, 249, 251); 235 + 236 + --ninja-icon-color: var(--ninja-secondary-text-color); 237 + --ninja-icon-size: 1.2em; 238 + --ninja-separate-border: 1px solid var(--ninja-secondary-background-color); 239 + 240 + --ninja-modal-background: #fff; 241 + --ninja-modal-shadow: rgb(0 0 0 / 50%) 0px 16px 70px; 242 + 243 + --ninja-actions-height: 300px; 244 + --ninja-group-text-color: rgb(144, 149, 157); 245 + 246 + --ninja-footer-background: rgba(242, 242, 242, 0.4); 247 + 248 + --ninja-placeholder-color: #8e8e8e; 249 + 250 + font-size: var(--ninja-font-size); 251 + 252 + --ninja-z-index: 1; 253 + } 254 + 255 + :host(.dark) { 256 + --ninja-backdrop-filter: none; 257 + --ninja-overflow-background: rgba(0, 0, 0, 0.7); 258 + --ninja-text-color: #7d7d7d; 259 + 260 + --ninja-modal-background: rgba(17, 17, 17, 0.85); 261 + --ninja-accent-color: rgb(110, 94, 210); 262 + --ninja-secondary-background-color: rgba(51, 51, 51, 0.44); 263 + --ninja-secondary-text-color: #888; 264 + 265 + --ninja-selected-text-color: #eaeaea; 266 + --ninja-selected-background: rgba(51, 51, 51, 0.44); 267 + 268 + --ninja-icon-color: var(--ninja-secondary-text-color); 269 + --ninja-separate-border: 1px solid var(--ninja-secondary-background-color); 270 + 271 + --ninja-modal-shadow: 0 16px 70px rgba(0, 0, 0, 0.2); 272 + 273 + --ninja-group-text-color: rgb(144, 149, 157); 274 + 275 + --ninja-footer-background: rgba(30, 30, 30, 85%); 276 + } 277 + 278 + .modal { 279 + display: none; 280 + position: fixed; 281 + z-index: var(--ninja-z-index); 282 + left: 0; 283 + top: 0; 284 + width: 100%; 285 + height: 100%; 286 + overflow: auto; 287 + background: var(--ninja-overflow-background); 288 + -webkit-font-smoothing: antialiased; 289 + -moz-osx-font-smoothing: grayscale; 290 + -webkit-backdrop-filter: var(--ninja-backdrop-filter); 291 + backdrop-filter: var(--ninja-backdrop-filter); 292 + text-align: left; 293 + color: var(--ninja-text-color); 294 + font-family: var(--ninja-font-family); 295 + } 296 + .modal.visible { 297 + display: block; 298 + } 299 + 300 + .modal-content { 301 + position: relative; 302 + top: var(--ninja-top); 303 + margin: auto; 304 + padding: 0; 305 + display: flex; 306 + flex-direction: column; 307 + flex-shrink: 1; 308 + -webkit-box-flex: 1; 309 + flex-grow: 1; 310 + min-width: 0px; 311 + will-change: transform; 312 + background: var(--ninja-modal-background); 313 + border-radius: 0.5em; 314 + box-shadow: var(--ninja-modal-shadow); 315 + max-width: var(--ninja-width); 316 + overflow: hidden; 317 + } 318 + 319 + .bump { 320 + animation: zoom-in-zoom-out 0.2s ease; 321 + } 322 + 323 + @keyframes zoom-in-zoom-out { 324 + 0% { 325 + transform: scale(0.99); 326 + } 327 + 50% { 328 + transform: scale(1.01, 1.01); 329 + } 330 + 100% { 331 + transform: scale(1, 1); 332 + } 333 + } 334 + 335 + .ninja-github { 336 + color: var(--ninja-keys-text-color); 337 + font-weight: normal; 338 + text-decoration: none; 339 + } 340 + 341 + .actions-list { 342 + max-height: var(--ninja-actions-height); 343 + overflow: auto; 344 + scroll-behavior: smooth; 345 + position: relative; 346 + margin: 0; 347 + padding: 0.5em 0; 348 + list-style: none; 349 + scroll-behavior: smooth; 350 + } 351 + 352 + .group-header { 353 + height: 1.375em; 354 + line-height: 1.375em; 355 + padding-left: 1.25em; 356 + padding-top: 0.5em; 357 + text-overflow: ellipsis; 358 + white-space: nowrap; 359 + overflow: hidden; 360 + font-size: 0.75em; 361 + line-height: 1em; 362 + color: var(--ninja-group-text-color); 363 + margin: 1px 0; 364 + } 365 + 366 + .modal-footer { 367 + background: var(--ninja-footer-background); 368 + padding: 0.5em 1em; 369 + display: flex; 370 + /* font-size: 0.75em; */ 371 + border-top: var(--ninja-separate-border); 372 + color: var(--ninja-secondary-text-color); 373 + } 374 + 375 + .modal-footer .help { 376 + display: flex; 377 + margin-right: 1em; 378 + align-items: center; 379 + font-size: 0.75em; 380 + } 381 + 382 + .ninja-examplekey { 383 + background: var(--ninja-secondary-background-color); 384 + padding: 0.06em 0.25em; 385 + border-radius: var(--ninja-key-border-radius); 386 + color: var(--ninja-secondary-text-color); 387 + width: 1em; 388 + height: 1em; 389 + margin-right: 0.5em; 390 + font-size: 1.25em; 391 + fill: currentColor; 392 + } 393 + .ninja-examplekey.esc { 394 + width: auto; 395 + height: auto; 396 + font-size: 1.1em; 397 + } 398 + .ninja-examplekey.backspace { 399 + opacity: 0.7; 400 + } 401 + `;var a0=function(r,e,t,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,a);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(i=(n<3?l(i):n>3?l(e,t,i):l(e,t))||i);return n>3&&i&&Object.defineProperty(e,t,i),i},J=class extends g0{constructor(){super(...arguments),this.placeholder="Type a command or search...",this.disableHotkeys=!1,this.hideBreadcrumbs=!1,this.openHotkey="cmd+k,ctrl+k",this.navigationUpHotkey="up,shift+tab",this.navigationDownHotkey="down,tab",this.closeHotkey="esc",this.goBackHotkey="backspace",this.selectHotkey="enter",this.hotKeysJoinedView=!1,this.noAutoLoadMdIcons=!1,this.data=[],this.visible=!1,this._bump=!0,this._actionMatches=[],this._search="",this._flatData=[],this._headerRef=Tt()}open(e={}){this._bump=!0,this.visible=!0,this._headerRef.value.focusSearch(),this._actionMatches.length>0&&(this._selected=this._actionMatches[0]),this.setParent(e.parent)}close(){this._bump=!1,this.visible=!1}setParent(e){e?this._currentRoot=e:this._currentRoot=void 0,this._selected=void 0,this._search="",this._headerRef.value.setSearch("")}get breadcrumbs(){var e;let t=[],a=(e=this._selected)===null||e===void 0?void 0:e.parent;if(a)for(t.push(a);a;){let n=this._flatData.find(i=>i.id===a);n?.parent&&t.push(n.parent),a=n?n.parent:void 0}return t.reverse()}connectedCallback(){super.connectedCallback(),this.noAutoLoadMdIcons||document.fonts.load("24px Material Icons","apps").then(()=>{}),this._registerInternalHotkeys()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterInternalHotkeys()}_flattern(e,t){let a=[];return e||(e=[]),e.map(n=>{let i=n.children&&n.children.some(u=>typeof u=="string"),l={...n,parent:n.parent||t};return i||(l.children&&l.children.length&&(t=n.id,a=[...a,...l.children]),l.children=l.children?l.children.map(u=>u.id):[]),l}).concat(a.length?this._flattern(a,t):a)}update(e){e.has("data")&&!this.disableHotkeys&&(this._flatData=this._flattern(this.data),this._flatData.filter(t=>!!t.hotkey).forEach(t=>{y0(t.hotkey,a=>{a.preventDefault(),t.handler&&t.handler(t)})})),super.update(e)}_registerInternalHotkeys(){this.openHotkey&&y0(this.openHotkey,e=>{e.preventDefault(),this.visible?this.close():this.open()}),this.selectHotkey&&y0(this.selectHotkey,e=>{this.visible&&(e.preventDefault(),this._actionSelected(this._actionMatches[this._selectedIndex]))}),this.goBackHotkey&&y0(this.goBackHotkey,e=>{this.visible&&(this._search||(e.preventDefault(),this._goBack()))}),this.navigationDownHotkey&&y0(this.navigationDownHotkey,e=>{this.visible&&(e.preventDefault(),this._selectedIndex>=this._actionMatches.length-1?this._selected=this._actionMatches[0]:this._selected=this._actionMatches[this._selectedIndex+1])}),this.navigationUpHotkey&&y0(this.navigationUpHotkey,e=>{this.visible&&(e.preventDefault(),this._selectedIndex===0?this._selected=this._actionMatches[this._actionMatches.length-1]:this._selected=this._actionMatches[this._selectedIndex-1])}),this.closeHotkey&&y0(this.closeHotkey,()=>{this.visible&&this.close()})}_unregisterInternalHotkeys(){this.openHotkey&&y0.unbind(this.openHotkey),this.selectHotkey&&y0.unbind(this.selectHotkey),this.goBackHotkey&&y0.unbind(this.goBackHotkey),this.navigationDownHotkey&&y0.unbind(this.navigationDownHotkey),this.navigationUpHotkey&&y0.unbind(this.navigationUpHotkey),this.closeHotkey&&y0.unbind(this.closeHotkey)}_actionFocused(e,t){this._selected=e,t.target.ensureInView()}_onTransitionEnd(){this._bump=!1}_goBack(){let e=this.breadcrumbs.length>1?this.breadcrumbs[this.breadcrumbs.length-2]:void 0;this.setParent(e)}render(){let e={bump:this._bump,"modal-content":!0},t={visible:this.visible,modal:!0},n=this._flatData.filter(u=>{var h;let m=new RegExp(this._search,"gi"),v=u.title.match(m)||((h=u.keywords)===null||h===void 0?void 0:h.match(m));return(!this._currentRoot&&this._search||u.parent===this._currentRoot)&&v}).reduce((u,h)=>u.set(h.section,[...u.get(h.section)||[],h]),new Map);this._actionMatches=[...n.values()].flat(),this._actionMatches.length>0&&this._selectedIndex===-1&&(this._selected=this._actionMatches[0]),this._actionMatches.length===0&&(this._selected=void 0);let i=u=>r0` ${Fa(u,h=>h.id,h=>{var m;return r0`<ninja-action 402 + exportparts="ninja-action,ninja-selected,ninja-icon" 403 + .selected=${Va(h.id===((m=this._selected)===null||m===void 0?void 0:m.id))} 404 + .hotKeysJoinedView=${this.hotKeysJoinedView} 405 + @mouseover=${v=>this._actionFocused(h,v)} 406 + @actionsSelected=${v=>this._actionSelected(v.detail)} 407 + .action=${h} 408 + ></ninja-action>`})}`,l=[];return n.forEach((u,h)=>{let m=h?r0`<div class="group-header">${h}</div>`:void 0;l.push(r0`${m}${i(u)}`)}),r0` 409 + <div @click=${this._overlayClick} class=${Ue(t)}> 410 + <div class=${Ue(e)} @animationend=${this._onTransitionEnd}> 411 + <ninja-header 412 + exportparts="ninja-input,ninja-input-wrapper" 413 + ${zt(this._headerRef)} 414 + .placeholder=${this.placeholder} 415 + .hideBreadcrumbs=${this.hideBreadcrumbs} 416 + .breadcrumbs=${this.breadcrumbs} 417 + @change=${this._handleInput} 418 + @setParent=${u=>this.setParent(u.detail.parent)} 419 + @close=${this.close} 420 + > 421 + </ninja-header> 422 + <div class="modal-body"> 423 + <div class="actions-list" part="actions-list">${l}</div> 424 + </div> 425 + <slot name="footer"> ${ln} </slot> 426 + </div> 427 + </div> 428 + `}get _selectedIndex(){return this._selected?this._actionMatches.indexOf(this._selected):-1}_actionSelected(e){var t;if(this.dispatchEvent(new CustomEvent("selected",{detail:{search:this._search,action:e},bubbles:!0,composed:!0})),!!e){if(e.children&&((t=e.children)===null||t===void 0?void 0:t.length)>0&&(this._currentRoot=e.id,this._search=""),this._headerRef.value.setSearch(""),this._headerRef.value.focusSearch(),e.handler){let a=e.handler(e);a?.keepOpen||this.close()}this._bump=!0}}async _handleInput(e){this._search=e.detail.search,await this.updateComplete,this.dispatchEvent(new CustomEvent("change",{detail:{search:this._search,actions:this._actionMatches},bubbles:!0,composed:!0}))}_overlayClick(e){var t;!((t=e.target)===null||t===void 0)&&t.classList.contains("modal")&&this.close()}};J.styles=[on];a0([W({type:String})],J.prototype,"placeholder",void 0);a0([W({type:Boolean})],J.prototype,"disableHotkeys",void 0);a0([W({type:Boolean})],J.prototype,"hideBreadcrumbs",void 0);a0([W()],J.prototype,"openHotkey",void 0);a0([W()],J.prototype,"navigationUpHotkey",void 0);a0([W()],J.prototype,"navigationDownHotkey",void 0);a0([W()],J.prototype,"closeHotkey",void 0);a0([W()],J.prototype,"goBackHotkey",void 0);a0([W()],J.prototype,"selectHotkey",void 0);a0([W({type:Boolean})],J.prototype,"hotKeysJoinedView",void 0);a0([W({type:Boolean})],J.prototype,"noAutoLoadMdIcons",void 0);a0([W({type:Array,hasChanged(){return!0}})],J.prototype,"data",void 0);a0([U0()],J.prototype,"visible",void 0);a0([U0()],J.prototype,"_bump",void 0);a0([U0()],J.prototype,"_actionMatches",void 0);a0([U0()],J.prototype,"_search",void 0);a0([U0()],J.prototype,"_currentRoot",void 0);a0([U0()],J.prototype,"_flatData",void 0);a0([U0()],J.prototype,"breadcrumbs",null);a0([U0()],J.prototype,"_selected",void 0);J=a0([ae("ninja-keys")],J);var A0=class r{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new r(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}},C0=class r{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new r(t,A0.range(this,e))}},T=class r{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,i,l=t&&t.loc;if(l&&l.start<=l.end){var u=l.lexer.input;n=l.start,i=l.end,n===u.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var h=u.slice(n,i).replace(/[^]/g,"$&\u0332"),m;n>15?m="\u2026"+u.slice(n-15,n):m=u.slice(0,n);var v;i+15<u.length?v=u.slice(i,i+15)+"\u2026":v=u.slice(i),a+=m+h+v}var g=new Error(a);return g.name="ParseError",g.__proto__=r.prototype,g.position=n,n!=null&&i!=null&&(g.length=i-n),g.rawMessage=e,g}};T.prototype.__proto__=Error.prototype;var as=function(e,t){return e.indexOf(t)!==-1},ns=function(e,t){return e===void 0?t:e},is=/([A-Z])/g,ss=function(e){return e.replace(is,"-$1").toLowerCase()},ls={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},os=/[&><"']/g;function us(r){return String(r).replace(os,e=>ls[e])}var Pn=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},hs=function(e){var t=Pn(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},cs=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},ds=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},$={contains:as,deflt:ns,escape:us,hyphenate:ss,getBaseElem:Pn,isCharacterBox:hs,protocolFromUrl:ds},jt={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 <type>"},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 <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:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},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:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",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:r=>Math.max(0,r),cli:"-s, --max-size <n>",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:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function ms(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var et=class{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(var t in jt)if(jt.hasOwnProperty(t)){var a=jt[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:ms(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new T("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=$.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}},O0=class{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return R0[fs[this.id]]}sub(){return R0[ps[this.id]]}fracNum(){return R0[vs[this.id]]}fracDen(){return R0[gs[this.id]]}cramp(){return R0[ys[this.id]]}text(){return R0[bs[this.id]]}isTight(){return this.size>=2}},Zr=0,Vt=1,Ne=2,Y0=3,tt=4,z0=5,Oe=6,f0=7,R0=[new O0(Zr,0,!1),new O0(Vt,0,!0),new O0(Ne,1,!1),new O0(Y0,1,!0),new O0(tt,2,!1),new O0(z0,2,!0),new O0(Oe,3,!1),new O0(f0,3,!0)],fs=[tt,z0,tt,z0,Oe,f0,Oe,f0],ps=[z0,z0,z0,z0,f0,f0,f0,f0],vs=[Ne,Y0,tt,z0,Oe,f0,Oe,f0],gs=[Y0,Y0,z0,z0,f0,f0,f0,f0],ys=[Vt,Vt,Y0,Y0,z0,z0,f0,f0],bs=[Zr,Vt,Ne,Y0,Ne,Y0,Ne,Y0],O={DISPLAY:R0[Zr],TEXT:R0[Ne],SCRIPT:R0[tt],SCRIPTSCRIPT:R0[Oe]},Ir=[{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]]}];function xs(r){for(var e=0;e<Ir.length;e++)for(var t=Ir[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Ft=[];Ir.forEach(r=>r.blocks.forEach(e=>Ft.push(...e)));function Ln(r){for(var e=0;e<Ft.length;e+=2)if(r>=Ft[e]&&r<=Ft[e+1])return!0;return!1}var $e=80,ws=function(e,t){return"M95,"+(622+e+t)+` 429 + c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 430 + c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 431 + c44.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 432 + s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 433 + c69,-144,104.5,-217.7,106.5,-221 434 + l`+e/2.075+" -"+e+` 435 + c5.3,-9.3,12,-14,20,-14 436 + H400000v`+(40+e)+`H845.2724 437 + s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 438 + c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z 439 + M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},ks=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 440 + c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 441 + c340,-704.7,510.7,-1060.3,512,-1067 442 + l`+e/2.084+" -"+e+` 443 + c4.7,-7.3,11,-11,19,-11 444 + H40000v`+(40+e)+`H1012.3 445 + s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 446 + c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 447 + s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 448 + c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z 449 + M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ss=function(e,t){return"M983 "+(10+e+t)+` 450 + l`+e/3.13+" -"+e+` 451 + c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` 452 + H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 453 + s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 454 + c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 455 + c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 456 + c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 457 + c53.7,-170.3,84.5,-266.8,92.5,-289.5z 458 + M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},As=function(e,t){return"M424,"+(2398+e+t)+` 459 + c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 460 + c0,-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 461 + s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 462 + s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 463 + l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 464 + v`+(40+e)+`H1014.6 465 + s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 466 + c-2,6,-10,9,-24,9 467 + c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` 468 + h400000v`+(40+e)+"h-400000z"},Ms=function(e,t){return"M473,"+(2713+e+t)+` 469 + c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` 470 + c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 471 + s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 472 + c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 473 + c0,-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 474 + s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 475 + 606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Ts=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},zs=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` 476 + H742v`+n+`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 477 + h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 478 + c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 479 + 219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},Cs=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=ws(t,$e);break;case"sqrtSize1":n=ks(t,$e);break;case"sqrtSize2":n=Ss(t,$e);break;case"sqrtSize3":n=As(t,$e);break;case"sqrtSize4":n=Ms(t,$e);break;case"sqrtTall":n=zs(t,$e,a)}return n},Es=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+" H145z"+("M367 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+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},un={doubleleftarrow:`M262 157 480 + l10-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 481 + 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 482 + 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 483 + c2 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 484 + 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 485 + -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 486 + -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z 487 + m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l 488 + -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 489 + 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 490 + -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 491 + -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 492 + -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 493 + c-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 494 + -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 495 + 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 496 + -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 497 + c-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 498 + 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 499 + 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 500 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 501 + -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 502 + 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 503 + 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 504 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 505 + -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 506 + H435C64 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 507 + 435 0h399565z`,leftgroupunder:`M400000 262 508 + H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 509 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 510 + -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 511 + -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 512 + -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 513 + 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 514 + -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 515 + -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z 516 + m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 517 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 518 + 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 519 + -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 520 + 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 521 + -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 522 + v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 523 + -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 524 + -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 525 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z 526 + M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z 527 + M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 528 + -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 529 + c28.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 530 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z 531 + M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 532 + c-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 533 + -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 534 + 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 535 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 536 + c100.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 537 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 538 + 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 539 + -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 540 + -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z 541 + m368.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 542 + 60.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 543 + -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z 544 + m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 545 + c0 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 546 + -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z 547 + m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 548 + 85.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 549 + -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z 550 + m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 551 + c0 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 552 + -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 553 + 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 554 + 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 555 + -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 556 + -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 557 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l 558 + -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 559 + s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 560 + c124.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 561 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 562 + -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 563 + 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 564 + 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 565 + -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 566 + -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 567 + 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 568 + -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 569 + 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 570 + m0 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 571 + 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 572 + -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 573 + -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 574 + 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 575 + 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 576 + -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z 577 + m0-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 578 + 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 579 + -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 580 + 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 581 + M399960 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 582 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 583 + -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 584 + -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 585 + 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 586 + -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 587 + -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 588 + -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 589 + 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 590 + c-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 591 + 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 592 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 593 + -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 594 + 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 595 + -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 596 + 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 597 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 598 + -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 599 + -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 600 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 601 + c1 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 602 + 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 603 + -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 604 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 605 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 606 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 607 + -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 608 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 609 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 610 + -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 611 + 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 612 + 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 613 + -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 614 + -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 615 + H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 616 + c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 617 + c-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 618 + -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 619 + -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 620 + -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, 621 + -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, 622 + -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, 623 + -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, 624 + -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 625 + c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 626 + c-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 627 + s-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 628 + 121.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 629 + s2.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 630 + c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z 631 + M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 632 + -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 633 + 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 39 634 + -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 635 + -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 636 + -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 637 + 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 638 + c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 639 + c2,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 640 + c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 641 + c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z 642 + M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 643 + c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 644 + -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 645 + c-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 646 + M0 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 647 + c1.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, 648 + 1c0,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, 649 + -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z 650 + M93 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 651 + c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 652 + -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 653 + c-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 654 + M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Bs=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 655 + H403z 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 656 + M347 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 657 + c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 658 + c-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 659 + c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 660 + c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z 661 + M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 662 + c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 663 + c-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 664 + MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z 665 + MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z 666 + M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z 667 + M347 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 668 + c-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, 669 + -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 670 + 949.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 671 + c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, 672 + -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 673 + l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, 674 + -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, 675 + 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 676 + c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` 677 + c-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 678 + c-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 679 + c0,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 680 + c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 681 + l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, 682 + -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.")}},xe=class{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 $.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=t=>t.toText();return this.children.map(e).join("")}},_0={"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]}},Dt={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]},hn={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"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 Ds(r,e){_0[r]=e}function Jr(r,e,t){if(!_0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=_0[e][a];if(!n&&r[0]in hn&&(a=hn[r[0]].charCodeAt(0),n=_0[e][a]),!n&&t==="text"&&Ln(a)&&(n=_0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var zr={};function $s(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!zr[e]){var t=zr[e]={cssEmPerMu:Dt.quad[e]/18};for(var a in Dt)Dt.hasOwnProperty(a)&&(t[a]=Dt[a][e])}return zr[e]}var Ns=[[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]],cn=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dn=function(e,t){return t.size<2?e:Ns[e-1][t.size-1]},Ut=class r{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||r.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=cn[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var 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(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new r(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:dn(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:cn[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=dn(r.BASESIZE,e);return this.size===t&&this.textSize===r.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var 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!==r.BASESIZE?["sizing","reset-size"+this.size,"size"+r.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=$s(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Ut.BASESIZE=6;var Pr={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Os={ex:!0,em:!0,mu:!0},jn=function(e){return typeof e!="string"&&(e=e.unit),e in Pr||e in Os||e==="ex"},t0=function(e,t){var a;if(e.unit in Pr)a=Pr[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new T("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},z=function(e){return+e.toFixed(4)+"em"},le=function(e){return e.filter(t=>t).join(" ")},Fn=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},Vn=function(e){var t=document.createElement(e);t.className=le(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)t.appendChild(this.children[i].toNode());return t},Un=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+$.escape(le(this.classes))+'"');var a="";for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=$.hyphenate(n)+":"+this.style[n]+";");a&&(t+=' style="'+$.escape(a)+'"');for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&(t+=" "+i+'="'+$.escape(this.attributes[i])+'"');t+=">";for(var l=0;l<this.children.length;l++)t+=this.children[l].toMarkup();return t+="</"+e+">",t},we=class{constructor(e,t,a,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,Fn.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $.contains(this.classes,e)}toNode(){return Vn.call(this,"span")}toMarkup(){return Un.call(this,"span")}},rt=class{constructor(e,t,a,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,Fn.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $.contains(this.classes,e)}toNode(){return Vn.call(this,"a")}toMarkup(){return Un.call(this,"a")}},Lr=class{constructor(e,t,a){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=a}hasClass(e){return $.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+$.escape(this.src)+'"'+(' alt="'+$.escape(this.alt)+'"'),t="";for(var a in this.style)this.style.hasOwnProperty(a)&&(t+=$.hyphenate(a)+":"+this.style[a]+";");return t&&(e+=' style="'+$.escape(t)+'"'),e+="'/>",e}},Rs={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},w0=class{constructor(e,t,a,n,i,l,u,h){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=a||0,this.italic=n||0,this.skew=i||0,this.width=l||0,this.classes=u||[],this.style=h||{},this.maxFontSize=0;var m=xs(this.text.charCodeAt(0));m&&this.classes.push(m+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Rs[this.text])}hasClass(e){return $.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=z(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=le(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=$.escape(le(this.classes)),t+='"');var a="";this.italic>0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=$.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+$.escape(a)+'"');var i=$.escape(this.text);return e?(t+=">",t+=i,t+="</span>",t):i}},N0=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+$.escape(this.attributes[t])+'"');e+=">";for(var a=0;a<this.children.length;a++)e+=this.children[a].toMarkup();return e+="</svg>",e}},H0=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",un[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+$.escape(this.alternate)+'"/>':'<path d="'+$.escape(un[this.pathName])+'"/>'}},at=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+$.escape(this.attributes[t])+'"');return e+="/>",e}};function mn(r){if(r instanceof w0)return r;throw new Error("Expected symbolNode but got "+String(r)+".")}function _s(r){if(r instanceof we)return r;throw new Error("Expected span<HtmlDomNode> but got "+String(r)+".")}var Hs={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qs={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},K={math:{},text:{}};function s(r,e,t,a,n,i){K[r][n]={font:e,group:t,replace:a},i&&a&&(K[r][a]=K[r][n])}var o="math",S="text",c="main",f="ams",X="accent-token",B="bin",p0="close",Re="inner",N="mathord",i0="op-token",M0="open",Jt="punct",p="rel",Q0="spacing",y="textord";s(o,c,p,"\u2261","\\equiv",!0);s(o,c,p,"\u227A","\\prec",!0);s(o,c,p,"\u227B","\\succ",!0);s(o,c,p,"\u223C","\\sim",!0);s(o,c,p,"\u22A5","\\perp");s(o,c,p,"\u2AAF","\\preceq",!0);s(o,c,p,"\u2AB0","\\succeq",!0);s(o,c,p,"\u2243","\\simeq",!0);s(o,c,p,"\u2223","\\mid",!0);s(o,c,p,"\u226A","\\ll",!0);s(o,c,p,"\u226B","\\gg",!0);s(o,c,p,"\u224D","\\asymp",!0);s(o,c,p,"\u2225","\\parallel");s(o,c,p,"\u22C8","\\bowtie",!0);s(o,c,p,"\u2323","\\smile",!0);s(o,c,p,"\u2291","\\sqsubseteq",!0);s(o,c,p,"\u2292","\\sqsupseteq",!0);s(o,c,p,"\u2250","\\doteq",!0);s(o,c,p,"\u2322","\\frown",!0);s(o,c,p,"\u220B","\\ni",!0);s(o,c,p,"\u221D","\\propto",!0);s(o,c,p,"\u22A2","\\vdash",!0);s(o,c,p,"\u22A3","\\dashv",!0);s(o,c,p,"\u220B","\\owns");s(o,c,Jt,".","\\ldotp");s(o,c,Jt,"\u22C5","\\cdotp");s(o,c,y,"#","\\#");s(S,c,y,"#","\\#");s(o,c,y,"&","\\&");s(S,c,y,"&","\\&");s(o,c,y,"\u2135","\\aleph",!0);s(o,c,y,"\u2200","\\forall",!0);s(o,c,y,"\u210F","\\hbar",!0);s(o,c,y,"\u2203","\\exists",!0);s(o,c,y,"\u2207","\\nabla",!0);s(o,c,y,"\u266D","\\flat",!0);s(o,c,y,"\u2113","\\ell",!0);s(o,c,y,"\u266E","\\natural",!0);s(o,c,y,"\u2663","\\clubsuit",!0);s(o,c,y,"\u2118","\\wp",!0);s(o,c,y,"\u266F","\\sharp",!0);s(o,c,y,"\u2662","\\diamondsuit",!0);s(o,c,y,"\u211C","\\Re",!0);s(o,c,y,"\u2661","\\heartsuit",!0);s(o,c,y,"\u2111","\\Im",!0);s(o,c,y,"\u2660","\\spadesuit",!0);s(o,c,y,"\xA7","\\S",!0);s(S,c,y,"\xA7","\\S");s(o,c,y,"\xB6","\\P",!0);s(S,c,y,"\xB6","\\P");s(o,c,y,"\u2020","\\dag");s(S,c,y,"\u2020","\\dag");s(S,c,y,"\u2020","\\textdagger");s(o,c,y,"\u2021","\\ddag");s(S,c,y,"\u2021","\\ddag");s(S,c,y,"\u2021","\\textdaggerdbl");s(o,c,p0,"\u23B1","\\rmoustache",!0);s(o,c,M0,"\u23B0","\\lmoustache",!0);s(o,c,p0,"\u27EF","\\rgroup",!0);s(o,c,M0,"\u27EE","\\lgroup",!0);s(o,c,B,"\u2213","\\mp",!0);s(o,c,B,"\u2296","\\ominus",!0);s(o,c,B,"\u228E","\\uplus",!0);s(o,c,B,"\u2293","\\sqcap",!0);s(o,c,B,"\u2217","\\ast");s(o,c,B,"\u2294","\\sqcup",!0);s(o,c,B,"\u25EF","\\bigcirc",!0);s(o,c,B,"\u2219","\\bullet",!0);s(o,c,B,"\u2021","\\ddagger");s(o,c,B,"\u2240","\\wr",!0);s(o,c,B,"\u2A3F","\\amalg");s(o,c,B,"&","\\And");s(o,c,p,"\u27F5","\\longleftarrow",!0);s(o,c,p,"\u21D0","\\Leftarrow",!0);s(o,c,p,"\u27F8","\\Longleftarrow",!0);s(o,c,p,"\u27F6","\\longrightarrow",!0);s(o,c,p,"\u21D2","\\Rightarrow",!0);s(o,c,p,"\u27F9","\\Longrightarrow",!0);s(o,c,p,"\u2194","\\leftrightarrow",!0);s(o,c,p,"\u27F7","\\longleftrightarrow",!0);s(o,c,p,"\u21D4","\\Leftrightarrow",!0);s(o,c,p,"\u27FA","\\Longleftrightarrow",!0);s(o,c,p,"\u21A6","\\mapsto",!0);s(o,c,p,"\u27FC","\\longmapsto",!0);s(o,c,p,"\u2197","\\nearrow",!0);s(o,c,p,"\u21A9","\\hookleftarrow",!0);s(o,c,p,"\u21AA","\\hookrightarrow",!0);s(o,c,p,"\u2198","\\searrow",!0);s(o,c,p,"\u21BC","\\leftharpoonup",!0);s(o,c,p,"\u21C0","\\rightharpoonup",!0);s(o,c,p,"\u2199","\\swarrow",!0);s(o,c,p,"\u21BD","\\leftharpoondown",!0);s(o,c,p,"\u21C1","\\rightharpoondown",!0);s(o,c,p,"\u2196","\\nwarrow",!0);s(o,c,p,"\u21CC","\\rightleftharpoons",!0);s(o,f,p,"\u226E","\\nless",!0);s(o,f,p,"\uE010","\\@nleqslant");s(o,f,p,"\uE011","\\@nleqq");s(o,f,p,"\u2A87","\\lneq",!0);s(o,f,p,"\u2268","\\lneqq",!0);s(o,f,p,"\uE00C","\\@lvertneqq");s(o,f,p,"\u22E6","\\lnsim",!0);s(o,f,p,"\u2A89","\\lnapprox",!0);s(o,f,p,"\u2280","\\nprec",!0);s(o,f,p,"\u22E0","\\npreceq",!0);s(o,f,p,"\u22E8","\\precnsim",!0);s(o,f,p,"\u2AB9","\\precnapprox",!0);s(o,f,p,"\u2241","\\nsim",!0);s(o,f,p,"\uE006","\\@nshortmid");s(o,f,p,"\u2224","\\nmid",!0);s(o,f,p,"\u22AC","\\nvdash",!0);s(o,f,p,"\u22AD","\\nvDash",!0);s(o,f,p,"\u22EA","\\ntriangleleft");s(o,f,p,"\u22EC","\\ntrianglelefteq",!0);s(o,f,p,"\u228A","\\subsetneq",!0);s(o,f,p,"\uE01A","\\@varsubsetneq");s(o,f,p,"\u2ACB","\\subsetneqq",!0);s(o,f,p,"\uE017","\\@varsubsetneqq");s(o,f,p,"\u226F","\\ngtr",!0);s(o,f,p,"\uE00F","\\@ngeqslant");s(o,f,p,"\uE00E","\\@ngeqq");s(o,f,p,"\u2A88","\\gneq",!0);s(o,f,p,"\u2269","\\gneqq",!0);s(o,f,p,"\uE00D","\\@gvertneqq");s(o,f,p,"\u22E7","\\gnsim",!0);s(o,f,p,"\u2A8A","\\gnapprox",!0);s(o,f,p,"\u2281","\\nsucc",!0);s(o,f,p,"\u22E1","\\nsucceq",!0);s(o,f,p,"\u22E9","\\succnsim",!0);s(o,f,p,"\u2ABA","\\succnapprox",!0);s(o,f,p,"\u2246","\\ncong",!0);s(o,f,p,"\uE007","\\@nshortparallel");s(o,f,p,"\u2226","\\nparallel",!0);s(o,f,p,"\u22AF","\\nVDash",!0);s(o,f,p,"\u22EB","\\ntriangleright");s(o,f,p,"\u22ED","\\ntrianglerighteq",!0);s(o,f,p,"\uE018","\\@nsupseteqq");s(o,f,p,"\u228B","\\supsetneq",!0);s(o,f,p,"\uE01B","\\@varsupsetneq");s(o,f,p,"\u2ACC","\\supsetneqq",!0);s(o,f,p,"\uE019","\\@varsupsetneqq");s(o,f,p,"\u22AE","\\nVdash",!0);s(o,f,p,"\u2AB5","\\precneqq",!0);s(o,f,p,"\u2AB6","\\succneqq",!0);s(o,f,p,"\uE016","\\@nsubseteqq");s(o,f,B,"\u22B4","\\unlhd");s(o,f,B,"\u22B5","\\unrhd");s(o,f,p,"\u219A","\\nleftarrow",!0);s(o,f,p,"\u219B","\\nrightarrow",!0);s(o,f,p,"\u21CD","\\nLeftarrow",!0);s(o,f,p,"\u21CF","\\nRightarrow",!0);s(o,f,p,"\u21AE","\\nleftrightarrow",!0);s(o,f,p,"\u21CE","\\nLeftrightarrow",!0);s(o,f,p,"\u25B3","\\vartriangle");s(o,f,y,"\u210F","\\hslash");s(o,f,y,"\u25BD","\\triangledown");s(o,f,y,"\u25CA","\\lozenge");s(o,f,y,"\u24C8","\\circledS");s(o,f,y,"\xAE","\\circledR");s(S,f,y,"\xAE","\\circledR");s(o,f,y,"\u2221","\\measuredangle",!0);s(o,f,y,"\u2204","\\nexists");s(o,f,y,"\u2127","\\mho");s(o,f,y,"\u2132","\\Finv",!0);s(o,f,y,"\u2141","\\Game",!0);s(o,f,y,"\u2035","\\backprime");s(o,f,y,"\u25B2","\\blacktriangle");s(o,f,y,"\u25BC","\\blacktriangledown");s(o,f,y,"\u25A0","\\blacksquare");s(o,f,y,"\u29EB","\\blacklozenge");s(o,f,y,"\u2605","\\bigstar");s(o,f,y,"\u2222","\\sphericalangle",!0);s(o,f,y,"\u2201","\\complement",!0);s(o,f,y,"\xF0","\\eth",!0);s(S,c,y,"\xF0","\xF0");s(o,f,y,"\u2571","\\diagup");s(o,f,y,"\u2572","\\diagdown");s(o,f,y,"\u25A1","\\square");s(o,f,y,"\u25A1","\\Box");s(o,f,y,"\u25CA","\\Diamond");s(o,f,y,"\xA5","\\yen",!0);s(S,f,y,"\xA5","\\yen",!0);s(o,f,y,"\u2713","\\checkmark",!0);s(S,f,y,"\u2713","\\checkmark");s(o,f,y,"\u2136","\\beth",!0);s(o,f,y,"\u2138","\\daleth",!0);s(o,f,y,"\u2137","\\gimel",!0);s(o,f,y,"\u03DD","\\digamma",!0);s(o,f,y,"\u03F0","\\varkappa");s(o,f,M0,"\u250C","\\@ulcorner",!0);s(o,f,p0,"\u2510","\\@urcorner",!0);s(o,f,M0,"\u2514","\\@llcorner",!0);s(o,f,p0,"\u2518","\\@lrcorner",!0);s(o,f,p,"\u2266","\\leqq",!0);s(o,f,p,"\u2A7D","\\leqslant",!0);s(o,f,p,"\u2A95","\\eqslantless",!0);s(o,f,p,"\u2272","\\lesssim",!0);s(o,f,p,"\u2A85","\\lessapprox",!0);s(o,f,p,"\u224A","\\approxeq",!0);s(o,f,B,"\u22D6","\\lessdot");s(o,f,p,"\u22D8","\\lll",!0);s(o,f,p,"\u2276","\\lessgtr",!0);s(o,f,p,"\u22DA","\\lesseqgtr",!0);s(o,f,p,"\u2A8B","\\lesseqqgtr",!0);s(o,f,p,"\u2251","\\doteqdot");s(o,f,p,"\u2253","\\risingdotseq",!0);s(o,f,p,"\u2252","\\fallingdotseq",!0);s(o,f,p,"\u223D","\\backsim",!0);s(o,f,p,"\u22CD","\\backsimeq",!0);s(o,f,p,"\u2AC5","\\subseteqq",!0);s(o,f,p,"\u22D0","\\Subset",!0);s(o,f,p,"\u228F","\\sqsubset",!0);s(o,f,p,"\u227C","\\preccurlyeq",!0);s(o,f,p,"\u22DE","\\curlyeqprec",!0);s(o,f,p,"\u227E","\\precsim",!0);s(o,f,p,"\u2AB7","\\precapprox",!0);s(o,f,p,"\u22B2","\\vartriangleleft");s(o,f,p,"\u22B4","\\trianglelefteq");s(o,f,p,"\u22A8","\\vDash",!0);s(o,f,p,"\u22AA","\\Vvdash",!0);s(o,f,p,"\u2323","\\smallsmile");s(o,f,p,"\u2322","\\smallfrown");s(o,f,p,"\u224F","\\bumpeq",!0);s(o,f,p,"\u224E","\\Bumpeq",!0);s(o,f,p,"\u2267","\\geqq",!0);s(o,f,p,"\u2A7E","\\geqslant",!0);s(o,f,p,"\u2A96","\\eqslantgtr",!0);s(o,f,p,"\u2273","\\gtrsim",!0);s(o,f,p,"\u2A86","\\gtrapprox",!0);s(o,f,B,"\u22D7","\\gtrdot");s(o,f,p,"\u22D9","\\ggg",!0);s(o,f,p,"\u2277","\\gtrless",!0);s(o,f,p,"\u22DB","\\gtreqless",!0);s(o,f,p,"\u2A8C","\\gtreqqless",!0);s(o,f,p,"\u2256","\\eqcirc",!0);s(o,f,p,"\u2257","\\circeq",!0);s(o,f,p,"\u225C","\\triangleq",!0);s(o,f,p,"\u223C","\\thicksim");s(o,f,p,"\u2248","\\thickapprox");s(o,f,p,"\u2AC6","\\supseteqq",!0);s(o,f,p,"\u22D1","\\Supset",!0);s(o,f,p,"\u2290","\\sqsupset",!0);s(o,f,p,"\u227D","\\succcurlyeq",!0);s(o,f,p,"\u22DF","\\curlyeqsucc",!0);s(o,f,p,"\u227F","\\succsim",!0);s(o,f,p,"\u2AB8","\\succapprox",!0);s(o,f,p,"\u22B3","\\vartriangleright");s(o,f,p,"\u22B5","\\trianglerighteq");s(o,f,p,"\u22A9","\\Vdash",!0);s(o,f,p,"\u2223","\\shortmid");s(o,f,p,"\u2225","\\shortparallel");s(o,f,p,"\u226C","\\between",!0);s(o,f,p,"\u22D4","\\pitchfork",!0);s(o,f,p,"\u221D","\\varpropto");s(o,f,p,"\u25C0","\\blacktriangleleft");s(o,f,p,"\u2234","\\therefore",!0);s(o,f,p,"\u220D","\\backepsilon");s(o,f,p,"\u25B6","\\blacktriangleright");s(o,f,p,"\u2235","\\because",!0);s(o,f,p,"\u22D8","\\llless");s(o,f,p,"\u22D9","\\gggtr");s(o,f,B,"\u22B2","\\lhd");s(o,f,B,"\u22B3","\\rhd");s(o,f,p,"\u2242","\\eqsim",!0);s(o,c,p,"\u22C8","\\Join");s(o,f,p,"\u2251","\\Doteq",!0);s(o,f,B,"\u2214","\\dotplus",!0);s(o,f,B,"\u2216","\\smallsetminus");s(o,f,B,"\u22D2","\\Cap",!0);s(o,f,B,"\u22D3","\\Cup",!0);s(o,f,B,"\u2A5E","\\doublebarwedge",!0);s(o,f,B,"\u229F","\\boxminus",!0);s(o,f,B,"\u229E","\\boxplus",!0);s(o,f,B,"\u22C7","\\divideontimes",!0);s(o,f,B,"\u22C9","\\ltimes",!0);s(o,f,B,"\u22CA","\\rtimes",!0);s(o,f,B,"\u22CB","\\leftthreetimes",!0);s(o,f,B,"\u22CC","\\rightthreetimes",!0);s(o,f,B,"\u22CF","\\curlywedge",!0);s(o,f,B,"\u22CE","\\curlyvee",!0);s(o,f,B,"\u229D","\\circleddash",!0);s(o,f,B,"\u229B","\\circledast",!0);s(o,f,B,"\u22C5","\\centerdot");s(o,f,B,"\u22BA","\\intercal",!0);s(o,f,B,"\u22D2","\\doublecap");s(o,f,B,"\u22D3","\\doublecup");s(o,f,B,"\u22A0","\\boxtimes",!0);s(o,f,p,"\u21E2","\\dashrightarrow",!0);s(o,f,p,"\u21E0","\\dashleftarrow",!0);s(o,f,p,"\u21C7","\\leftleftarrows",!0);s(o,f,p,"\u21C6","\\leftrightarrows",!0);s(o,f,p,"\u21DA","\\Lleftarrow",!0);s(o,f,p,"\u219E","\\twoheadleftarrow",!0);s(o,f,p,"\u21A2","\\leftarrowtail",!0);s(o,f,p,"\u21AB","\\looparrowleft",!0);s(o,f,p,"\u21CB","\\leftrightharpoons",!0);s(o,f,p,"\u21B6","\\curvearrowleft",!0);s(o,f,p,"\u21BA","\\circlearrowleft",!0);s(o,f,p,"\u21B0","\\Lsh",!0);s(o,f,p,"\u21C8","\\upuparrows",!0);s(o,f,p,"\u21BF","\\upharpoonleft",!0);s(o,f,p,"\u21C3","\\downharpoonleft",!0);s(o,c,p,"\u22B6","\\origof",!0);s(o,c,p,"\u22B7","\\imageof",!0);s(o,f,p,"\u22B8","\\multimap",!0);s(o,f,p,"\u21AD","\\leftrightsquigarrow",!0);s(o,f,p,"\u21C9","\\rightrightarrows",!0);s(o,f,p,"\u21C4","\\rightleftarrows",!0);s(o,f,p,"\u21A0","\\twoheadrightarrow",!0);s(o,f,p,"\u21A3","\\rightarrowtail",!0);s(o,f,p,"\u21AC","\\looparrowright",!0);s(o,f,p,"\u21B7","\\curvearrowright",!0);s(o,f,p,"\u21BB","\\circlearrowright",!0);s(o,f,p,"\u21B1","\\Rsh",!0);s(o,f,p,"\u21CA","\\downdownarrows",!0);s(o,f,p,"\u21BE","\\upharpoonright",!0);s(o,f,p,"\u21C2","\\downharpoonright",!0);s(o,f,p,"\u21DD","\\rightsquigarrow",!0);s(o,f,p,"\u21DD","\\leadsto");s(o,f,p,"\u21DB","\\Rrightarrow",!0);s(o,f,p,"\u21BE","\\restriction");s(o,c,y,"\u2018","`");s(o,c,y,"$","\\$");s(S,c,y,"$","\\$");s(S,c,y,"$","\\textdollar");s(o,c,y,"%","\\%");s(S,c,y,"%","\\%");s(o,c,y,"_","\\_");s(S,c,y,"_","\\_");s(S,c,y,"_","\\textunderscore");s(o,c,y,"\u2220","\\angle",!0);s(o,c,y,"\u221E","\\infty",!0);s(o,c,y,"\u2032","\\prime");s(o,c,y,"\u25B3","\\triangle");s(o,c,y,"\u0393","\\Gamma",!0);s(o,c,y,"\u0394","\\Delta",!0);s(o,c,y,"\u0398","\\Theta",!0);s(o,c,y,"\u039B","\\Lambda",!0);s(o,c,y,"\u039E","\\Xi",!0);s(o,c,y,"\u03A0","\\Pi",!0);s(o,c,y,"\u03A3","\\Sigma",!0);s(o,c,y,"\u03A5","\\Upsilon",!0);s(o,c,y,"\u03A6","\\Phi",!0);s(o,c,y,"\u03A8","\\Psi",!0);s(o,c,y,"\u03A9","\\Omega",!0);s(o,c,y,"A","\u0391");s(o,c,y,"B","\u0392");s(o,c,y,"E","\u0395");s(o,c,y,"Z","\u0396");s(o,c,y,"H","\u0397");s(o,c,y,"I","\u0399");s(o,c,y,"K","\u039A");s(o,c,y,"M","\u039C");s(o,c,y,"N","\u039D");s(o,c,y,"O","\u039F");s(o,c,y,"P","\u03A1");s(o,c,y,"T","\u03A4");s(o,c,y,"X","\u03A7");s(o,c,y,"\xAC","\\neg",!0);s(o,c,y,"\xAC","\\lnot");s(o,c,y,"\u22A4","\\top");s(o,c,y,"\u22A5","\\bot");s(o,c,y,"\u2205","\\emptyset");s(o,f,y,"\u2205","\\varnothing");s(o,c,N,"\u03B1","\\alpha",!0);s(o,c,N,"\u03B2","\\beta",!0);s(o,c,N,"\u03B3","\\gamma",!0);s(o,c,N,"\u03B4","\\delta",!0);s(o,c,N,"\u03F5","\\epsilon",!0);s(o,c,N,"\u03B6","\\zeta",!0);s(o,c,N,"\u03B7","\\eta",!0);s(o,c,N,"\u03B8","\\theta",!0);s(o,c,N,"\u03B9","\\iota",!0);s(o,c,N,"\u03BA","\\kappa",!0);s(o,c,N,"\u03BB","\\lambda",!0);s(o,c,N,"\u03BC","\\mu",!0);s(o,c,N,"\u03BD","\\nu",!0);s(o,c,N,"\u03BE","\\xi",!0);s(o,c,N,"\u03BF","\\omicron",!0);s(o,c,N,"\u03C0","\\pi",!0);s(o,c,N,"\u03C1","\\rho",!0);s(o,c,N,"\u03C3","\\sigma",!0);s(o,c,N,"\u03C4","\\tau",!0);s(o,c,N,"\u03C5","\\upsilon",!0);s(o,c,N,"\u03D5","\\phi",!0);s(o,c,N,"\u03C7","\\chi",!0);s(o,c,N,"\u03C8","\\psi",!0);s(o,c,N,"\u03C9","\\omega",!0);s(o,c,N,"\u03B5","\\varepsilon",!0);s(o,c,N,"\u03D1","\\vartheta",!0);s(o,c,N,"\u03D6","\\varpi",!0);s(o,c,N,"\u03F1","\\varrho",!0);s(o,c,N,"\u03C2","\\varsigma",!0);s(o,c,N,"\u03C6","\\varphi",!0);s(o,c,B,"\u2217","*",!0);s(o,c,B,"+","+");s(o,c,B,"\u2212","-",!0);s(o,c,B,"\u22C5","\\cdot",!0);s(o,c,B,"\u2218","\\circ",!0);s(o,c,B,"\xF7","\\div",!0);s(o,c,B,"\xB1","\\pm",!0);s(o,c,B,"\xD7","\\times",!0);s(o,c,B,"\u2229","\\cap",!0);s(o,c,B,"\u222A","\\cup",!0);s(o,c,B,"\u2216","\\setminus",!0);s(o,c,B,"\u2227","\\land");s(o,c,B,"\u2228","\\lor");s(o,c,B,"\u2227","\\wedge",!0);s(o,c,B,"\u2228","\\vee",!0);s(o,c,y,"\u221A","\\surd");s(o,c,M0,"\u27E8","\\langle",!0);s(o,c,M0,"\u2223","\\lvert");s(o,c,M0,"\u2225","\\lVert");s(o,c,p0,"?","?");s(o,c,p0,"!","!");s(o,c,p0,"\u27E9","\\rangle",!0);s(o,c,p0,"\u2223","\\rvert");s(o,c,p0,"\u2225","\\rVert");s(o,c,p,"=","=");s(o,c,p,":",":");s(o,c,p,"\u2248","\\approx",!0);s(o,c,p,"\u2245","\\cong",!0);s(o,c,p,"\u2265","\\ge");s(o,c,p,"\u2265","\\geq",!0);s(o,c,p,"\u2190","\\gets");s(o,c,p,">","\\gt",!0);s(o,c,p,"\u2208","\\in",!0);s(o,c,p,"\uE020","\\@not");s(o,c,p,"\u2282","\\subset",!0);s(o,c,p,"\u2283","\\supset",!0);s(o,c,p,"\u2286","\\subseteq",!0);s(o,c,p,"\u2287","\\supseteq",!0);s(o,f,p,"\u2288","\\nsubseteq",!0);s(o,f,p,"\u2289","\\nsupseteq",!0);s(o,c,p,"\u22A8","\\models");s(o,c,p,"\u2190","\\leftarrow",!0);s(o,c,p,"\u2264","\\le");s(o,c,p,"\u2264","\\leq",!0);s(o,c,p,"<","\\lt",!0);s(o,c,p,"\u2192","\\rightarrow",!0);s(o,c,p,"\u2192","\\to");s(o,f,p,"\u2271","\\ngeq",!0);s(o,f,p,"\u2270","\\nleq",!0);s(o,c,Q0,"\xA0","\\ ");s(o,c,Q0,"\xA0","\\space");s(o,c,Q0,"\xA0","\\nobreakspace");s(S,c,Q0,"\xA0","\\ ");s(S,c,Q0,"\xA0"," ");s(S,c,Q0,"\xA0","\\space");s(S,c,Q0,"\xA0","\\nobreakspace");s(o,c,Q0,null,"\\nobreak");s(o,c,Q0,null,"\\allowbreak");s(o,c,Jt,",",",");s(o,c,Jt,";",";");s(o,f,B,"\u22BC","\\barwedge",!0);s(o,f,B,"\u22BB","\\veebar",!0);s(o,c,B,"\u2299","\\odot",!0);s(o,c,B,"\u2295","\\oplus",!0);s(o,c,B,"\u2297","\\otimes",!0);s(o,c,y,"\u2202","\\partial",!0);s(o,c,B,"\u2298","\\oslash",!0);s(o,f,B,"\u229A","\\circledcirc",!0);s(o,f,B,"\u22A1","\\boxdot",!0);s(o,c,B,"\u25B3","\\bigtriangleup");s(o,c,B,"\u25BD","\\bigtriangledown");s(o,c,B,"\u2020","\\dagger");s(o,c,B,"\u22C4","\\diamond");s(o,c,B,"\u22C6","\\star");s(o,c,B,"\u25C3","\\triangleleft");s(o,c,B,"\u25B9","\\triangleright");s(o,c,M0,"{","\\{");s(S,c,y,"{","\\{");s(S,c,y,"{","\\textbraceleft");s(o,c,p0,"}","\\}");s(S,c,y,"}","\\}");s(S,c,y,"}","\\textbraceright");s(o,c,M0,"{","\\lbrace");s(o,c,p0,"}","\\rbrace");s(o,c,M0,"[","\\lbrack",!0);s(S,c,y,"[","\\lbrack",!0);s(o,c,p0,"]","\\rbrack",!0);s(S,c,y,"]","\\rbrack",!0);s(o,c,M0,"(","\\lparen",!0);s(o,c,p0,")","\\rparen",!0);s(S,c,y,"<","\\textless",!0);s(S,c,y,">","\\textgreater",!0);s(o,c,M0,"\u230A","\\lfloor",!0);s(o,c,p0,"\u230B","\\rfloor",!0);s(o,c,M0,"\u2308","\\lceil",!0);s(o,c,p0,"\u2309","\\rceil",!0);s(o,c,y,"\\","\\backslash");s(o,c,y,"\u2223","|");s(o,c,y,"\u2223","\\vert");s(S,c,y,"|","\\textbar",!0);s(o,c,y,"\u2225","\\|");s(o,c,y,"\u2225","\\Vert");s(S,c,y,"\u2225","\\textbardbl");s(S,c,y,"~","\\textasciitilde");s(S,c,y,"\\","\\textbackslash");s(S,c,y,"^","\\textasciicircum");s(o,c,p,"\u2191","\\uparrow",!0);s(o,c,p,"\u21D1","\\Uparrow",!0);s(o,c,p,"\u2193","\\downarrow",!0);s(o,c,p,"\u21D3","\\Downarrow",!0);s(o,c,p,"\u2195","\\updownarrow",!0);s(o,c,p,"\u21D5","\\Updownarrow",!0);s(o,c,i0,"\u2210","\\coprod");s(o,c,i0,"\u22C1","\\bigvee");s(o,c,i0,"\u22C0","\\bigwedge");s(o,c,i0,"\u2A04","\\biguplus");s(o,c,i0,"\u22C2","\\bigcap");s(o,c,i0,"\u22C3","\\bigcup");s(o,c,i0,"\u222B","\\int");s(o,c,i0,"\u222B","\\intop");s(o,c,i0,"\u222C","\\iint");s(o,c,i0,"\u222D","\\iiint");s(o,c,i0,"\u220F","\\prod");s(o,c,i0,"\u2211","\\sum");s(o,c,i0,"\u2A02","\\bigotimes");s(o,c,i0,"\u2A01","\\bigoplus");s(o,c,i0,"\u2A00","\\bigodot");s(o,c,i0,"\u222E","\\oint");s(o,c,i0,"\u222F","\\oiint");s(o,c,i0,"\u2230","\\oiiint");s(o,c,i0,"\u2A06","\\bigsqcup");s(o,c,i0,"\u222B","\\smallint");s(S,c,Re,"\u2026","\\textellipsis");s(o,c,Re,"\u2026","\\mathellipsis");s(S,c,Re,"\u2026","\\ldots",!0);s(o,c,Re,"\u2026","\\ldots",!0);s(o,c,Re,"\u22EF","\\@cdots",!0);s(o,c,Re,"\u22F1","\\ddots",!0);s(o,c,y,"\u22EE","\\varvdots");s(o,c,X,"\u02CA","\\acute");s(o,c,X,"\u02CB","\\grave");s(o,c,X,"\xA8","\\ddot");s(o,c,X,"~","\\tilde");s(o,c,X,"\u02C9","\\bar");s(o,c,X,"\u02D8","\\breve");s(o,c,X,"\u02C7","\\check");s(o,c,X,"^","\\hat");s(o,c,X,"\u20D7","\\vec");s(o,c,X,"\u02D9","\\dot");s(o,c,X,"\u02DA","\\mathring");s(o,c,N,"\uE131","\\@imath");s(o,c,N,"\uE237","\\@jmath");s(o,c,y,"\u0131","\u0131");s(o,c,y,"\u0237","\u0237");s(S,c,y,"\u0131","\\i",!0);s(S,c,y,"\u0237","\\j",!0);s(S,c,y,"\xDF","\\ss",!0);s(S,c,y,"\xE6","\\ae",!0);s(S,c,y,"\u0153","\\oe",!0);s(S,c,y,"\xF8","\\o",!0);s(S,c,y,"\xC6","\\AE",!0);s(S,c,y,"\u0152","\\OE",!0);s(S,c,y,"\xD8","\\O",!0);s(S,c,X,"\u02CA","\\'");s(S,c,X,"\u02CB","\\`");s(S,c,X,"\u02C6","\\^");s(S,c,X,"\u02DC","\\~");s(S,c,X,"\u02C9","\\=");s(S,c,X,"\u02D8","\\u");s(S,c,X,"\u02D9","\\.");s(S,c,X,"\xB8","\\c");s(S,c,X,"\u02DA","\\r");s(S,c,X,"\u02C7","\\v");s(S,c,X,"\xA8",'\\"');s(S,c,X,"\u02DD","\\H");s(S,c,X,"\u25EF","\\textcircled");var Gn={"--":!0,"---":!0,"``":!0,"''":!0};s(S,c,y,"\u2013","--",!0);s(S,c,y,"\u2013","\\textendash");s(S,c,y,"\u2014","---",!0);s(S,c,y,"\u2014","\\textemdash");s(S,c,y,"\u2018","`",!0);s(S,c,y,"\u2018","\\textquoteleft");s(S,c,y,"\u2019","'",!0);s(S,c,y,"\u2019","\\textquoteright");s(S,c,y,"\u201C","``",!0);s(S,c,y,"\u201C","\\textquotedblleft");s(S,c,y,"\u201D","''",!0);s(S,c,y,"\u201D","\\textquotedblright");s(o,c,y,"\xB0","\\degree",!0);s(S,c,y,"\xB0","\\degree");s(S,c,y,"\xB0","\\textdegree",!0);s(o,c,y,"\xA3","\\pounds");s(o,c,y,"\xA3","\\mathsterling",!0);s(S,c,y,"\xA3","\\pounds");s(S,c,y,"\xA3","\\textsterling",!0);s(o,f,y,"\u2720","\\maltese");s(S,f,y,"\u2720","\\maltese");var fn='0123456789/@."';for($t=0;$t<fn.length;$t++)Cr=fn.charAt($t),s(o,c,y,Cr,Cr);var Cr,$t,pn='0123456789!@*()-=+";:?/.,';for(Nt=0;Nt<pn.length;Nt++)Er=pn.charAt(Nt),s(S,c,y,Er,Er);var Er,Nt,Gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(Ot=0;Ot<Gt.length;Ot++)Xe=Gt.charAt(Ot),s(o,c,N,Xe,Xe),s(S,c,y,Xe,Xe);var Xe,Ot;s(o,f,y,"C","\u2102");s(S,f,y,"C","\u2102");s(o,f,y,"H","\u210D");s(S,f,y,"H","\u210D");s(o,f,y,"N","\u2115");s(S,f,y,"N","\u2115");s(o,f,y,"P","\u2119");s(S,f,y,"P","\u2119");s(o,f,y,"Q","\u211A");s(S,f,y,"Q","\u211A");s(o,f,y,"R","\u211D");s(S,f,y,"R","\u211D");s(o,f,y,"Z","\u2124");s(S,f,y,"Z","\u2124");s(o,c,N,"h","\u210E");s(S,c,N,"h","\u210E");var _="";for(d0=0;d0<Gt.length;d0++)Q=Gt.charAt(d0),_=String.fromCharCode(55349,56320+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56372+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56424+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56580+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56684+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56736+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56788+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56840+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56944+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),d0<26&&(_=String.fromCharCode(55349,56632+d0),s(o,c,N,Q,_),s(S,c,y,Q,_),_=String.fromCharCode(55349,56476+d0),s(o,c,N,Q,_),s(S,c,y,Q,_));var Q,d0;_=String.fromCharCode(55349,56668);s(o,c,N,"k",_);s(S,c,y,"k",_);for(ie=0;ie<10;ie++)K0=ie.toString(),_=String.fromCharCode(55349,57294+ie),s(o,c,N,K0,_),s(S,c,y,K0,_),_=String.fromCharCode(55349,57314+ie),s(o,c,N,K0,_),s(S,c,y,K0,_),_=String.fromCharCode(55349,57324+ie),s(o,c,N,K0,_),s(S,c,y,K0,_),_=String.fromCharCode(55349,57334+ie),s(o,c,N,K0,_),s(S,c,y,K0,_);var K0,ie,jr="\xD0\xDE\xFE";for(Rt=0;Rt<jr.length;Rt++)Ze=jr.charAt(Rt),s(o,c,N,Ze,Ze),s(S,c,y,Ze,Ze);var Ze,Rt,_t=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],vn=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Is=function(e,t){var a=e.charCodeAt(0),n=e.charCodeAt(1),i=(a-55296)*1024+(n-56320)+65536,l=t==="math"?0:1;if(119808<=i&&i<120484){var u=Math.floor((i-119808)/26);return[_t[u][2],_t[u][l]]}else if(120782<=i&&i<=120831){var h=Math.floor((i-120782)/10);return[vn[h][2],vn[h][l]]}else{if(i===120485||i===120486)return[_t[0][2],_t[0][l]];if(120486<i&&i<120782)return["",""];throw new T("Unsupported character: "+e)}},Qt=function(e,t,a){return K[a][e]&&K[a][e].replace&&(e=K[a][e].replace),{value:e,metrics:Jr(e,t,a)}},$0=function(e,t,a,n,i){var l=Qt(e,t,a),u=l.metrics;e=l.value;var h;if(u){var m=u.italic;(a==="text"||n&&n.font==="mathit")&&(m=0),h=new w0(e,u.height,u.depth,m,u.skew,u.width,i)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '"+a+"'")),h=new w0(e,0,0,0,0,0,i);if(n){h.maxFontSize=n.sizeMultiplier,n.style.isTight()&&h.classes.push("mtight");var v=n.getColor();v&&(h.style.color=v)}return h},Ps=function(e,t,a,n){return n===void 0&&(n=[]),a.font==="boldsymbol"&&Qt(e,"Main-Bold",t).metrics?$0(e,"Main-Bold",t,a,n.concat(["mathbf"])):e==="\\"||K[t][e].font==="main"?$0(e,"Main-Regular",t,a,n):$0(e,"AMS-Regular",t,a,n.concat(["amsrm"]))},Ls=function(e,t,a,n,i){return i!=="textord"&&Qt(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},js=function(e,t,a){var n=e.mode,i=e.text,l=["mord"],u=n==="math"||n==="text"&&t.font,h=u?t.font:t.fontFamily,m="",v="";if(i.charCodeAt(0)===55349&&([m,v]=Is(i,n)),m.length>0)return $0(i,m,n,t,l.concat(v));if(h){var g,b;if(h==="boldsymbol"){var x=Ls(i,n,t,l,a);g=x.fontName,b=[x.fontClass]}else u?(g=Yn[h].fontName,b=[h]):(g=Ht(h,t.fontWeight,t.fontShape),b=[h,t.fontWeight,t.fontShape]);if(Qt(i,g,n).metrics)return $0(i,g,n,t,l.concat(b));if(Gn.hasOwnProperty(i)&&g.slice(0,10)==="Typewriter"){for(var k=[],A=0;A<i.length;A++)k.push($0(i[A],g,n,t,l.concat(b)));return Wn(k)}}if(a==="mathord")return $0(i,"Math-Italic",n,t,l.concat(["mathnormal"]));if(a==="textord"){var C=K[n][i]&&K[n][i].font;if(C==="ams"){var D=Ht("amsrm",t.fontWeight,t.fontShape);return $0(i,D,n,t,l.concat("amsrm",t.fontWeight,t.fontShape))}else if(C==="main"||!C){var R=Ht("textrm",t.fontWeight,t.fontShape);return $0(i,R,n,t,l.concat(t.fontWeight,t.fontShape))}else{var H=Ht(C,t.fontWeight,t.fontShape);return $0(i,H,n,t,l.concat(H,t.fontWeight,t.fontShape))}}else throw new Error("unexpected type: "+a+" in makeOrd")},Fs=(r,e)=>{if(le(r.classes)!==le(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},Vs=r=>{for(var e=0;e<r.length-1;e++){var t=r[e],a=r[e+1];t instanceof w0&&a instanceof w0&&Fs(t,a)&&(t.text+=a.text,t.height=Math.max(t.height,a.height),t.depth=Math.max(t.depth,a.depth),t.italic=a.italic,r.splice(e+1,1),e--)}return r},Qr=function(e){for(var t=0,a=0,n=0,i=0;i<e.children.length;i++){var l=e.children[i];l.height>t&&(t=l.height),l.depth>a&&(a=l.depth),l.maxFontSize>n&&(n=l.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},b0=function(e,t,a,n){var i=new we(e,t,a,n);return Qr(i),i},Kn=(r,e,t,a)=>new we(r,e,t,a),Us=function(e,t,a){var n=b0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=z(n.height),n.maxFontSize=1,n},Gs=function(e,t,a,n){var i=new rt(e,t,a,n);return Qr(i),i},Wn=function(e){var t=new xe(e);return Qr(t),t},Ks=function(e,t){return e instanceof xe?b0([],[e],t):e},Ws=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,i=n,l=1;l<t.length;l++){var u=-t[l].shift-i-t[l].elem.depth,h=u-(t[l-1].elem.height+t[l-1].elem.depth);i=i+u,a.push({type:"kern",size:h}),a.push(t[l])}return{children:a,depth:n}}var m;if(e.positionType==="top"){for(var v=e.positionData,g=0;g<e.children.length;g++){var b=e.children[g];v-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}m=v}else if(e.positionType==="bottom")m=-e.positionData;else{var x=e.children[0];if(x.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")m=-x.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")m=-x.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:m}},Ys=function(e,t){for(var{children:a,depth:n}=Ws(e),i=0,l=0;l<a.length;l++){var u=a[l];if(u.type==="elem"){var h=u.elem;i=Math.max(i,h.maxFontSize,h.height)}}i+=2;var m=b0(["pstrut"],[]);m.style.height=z(i);for(var v=[],g=n,b=n,x=n,k=0;k<a.length;k++){var A=a[k];if(A.type==="kern")x+=A.size;else{var C=A.elem,D=A.wrapperClasses||[],R=A.wrapperStyle||{},H=b0(D,[m,C],void 0,R);H.style.top=z(-i-x-C.depth),A.marginLeft&&(H.style.marginLeft=A.marginLeft),A.marginRight&&(H.style.marginRight=A.marginRight),v.push(H),x+=C.height+C.depth}g=Math.min(g,x),b=Math.max(b,x)}var j=b0(["vlist"],v);j.style.height=z(b);var I;if(g<0){var F=b0([],[]),L=b0(["vlist"],[F]);L.style.height=z(-g);var Z=b0(["vlist-s"],[new w0("\u200B")]);I=[b0(["vlist-r"],[j,Z]),b0(["vlist-r"],[L])]}else I=[b0(["vlist-r"],[j])];var V=b0(["vlist-t"],I);return I.length===2&&V.classes.push("vlist-t2"),V.height=b,V.depth=-g,V},Xs=(r,e)=>{var t=b0(["mspace"],[],e),a=t0(r,e);return t.style.marginRight=z(a),t},Ht=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var i;return t==="textbf"&&a==="textit"?i="BoldItalic":t==="textbf"?i="Bold":t==="textit"?i="Italic":i="Regular",n+"-"+i},Yn={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"}},Xn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Zs=function(e,t){var[a,n,i]=Xn[e],l=new H0(a),u=new N0([l],{width:z(n),height:z(i),style:"width:"+z(n),viewBox:"0 0 "+1e3*n+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),h=Kn(["overlay"],[u],t);return h.height=i,h.style.height=z(i),h.style.width=z(n),h},w={fontMap:Yn,makeSymbol:$0,mathsym:Ps,makeSpan:b0,makeSvgSpan:Kn,makeLineSpan:Us,makeAnchor:Gs,makeFragment:Wn,wrapFragment:Ks,makeVList:Ys,makeOrd:js,makeGlue:Xs,staticSvg:Zs,svgData:Xn,tryCombineChars:Vs},e0={number:3,unit:"mu"},ye={number:4,unit:"mu"},W0={number:5,unit:"mu"},Js={mord:{mop:e0,mbin:ye,mrel:W0,minner:e0},mop:{mord:e0,mop:e0,mrel:W0,minner:e0},mbin:{mord:ye,mop:ye,mopen:ye,minner:ye},mrel:{mord:W0,mop:W0,mopen:W0,minner:W0},mopen:{},mclose:{mop:e0,mbin:ye,mrel:W0,minner:e0},mpunct:{mord:e0,mop:e0,mrel:W0,mopen:e0,mclose:e0,mpunct:e0,minner:e0},minner:{mord:e0,mop:e0,mbin:ye,mrel:W0,mopen:e0,mpunct:e0,minner:e0}},Qs={mord:{mop:e0},mop:{mord:e0,mop:e0},mbin:{},mrel:{},mopen:{},mclose:{mop:e0},mpunct:{},minner:{mop:e0}},Zn={},Kt={},Wt={};function E(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:i,mathmlBuilder:l}=r,u={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},h=0;h<t.length;++h)Zn[t[h]]=u;e&&(i&&(Kt[e]=i),l&&(Wt[e]=l))}function ke(r){var{type:e,htmlBuilder:t,mathmlBuilder:a}=r;E({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:a})}var Yt=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},n0=function(e){return e.type==="ordgroup"?e.body:[e]},Z0=w.makeSpan,e1=["leftmost","mbin","mopen","mrel","mop","mpunct"],t1=["rightmost","mrel","mclose","mpunct"],r1={display:O.DISPLAY,text:O.TEXT,script:O.SCRIPT,scriptscript:O.SCRIPTSCRIPT},a1={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},l0=function(e,t,a,n){n===void 0&&(n=[null,null]);for(var i=[],l=0;l<e.length;l++){var u=P(e[l],t);if(u instanceof xe){var h=u.children;i.push(...h)}else i.push(u)}if(w.tryCombineChars(i),!a)return i;var m=t;if(e.length===1){var v=e[0];v.type==="sizing"?m=t.havingSize(v.size):v.type==="styling"&&(m=t.havingStyle(r1[v.style]))}var g=Z0([n[0]||"leftmost"],[],t),b=Z0([n[1]||"rightmost"],[],t),x=a==="root";return gn(i,(k,A)=>{var C=A.classes[0],D=k.classes[0];C==="mbin"&&$.contains(t1,D)?A.classes[0]="mord":D==="mbin"&&$.contains(e1,C)&&(k.classes[0]="mord")},{node:g},b,x),gn(i,(k,A)=>{var C=Fr(A),D=Fr(k),R=C&&D?k.hasClass("mtight")?Qs[C][D]:Js[C][D]:null;if(R)return w.makeGlue(R,m)},{node:g},b,x),i},gn=function r(e,t,a,n,i){n&&e.push(n);for(var l=0;l<e.length;l++){var u=e[l],h=Jn(u);if(h){r(h.children,t,a,null,i);continue}var m=!u.hasClass("mspace");if(m){var v=t(u,a.node);v&&(a.insertAfter?a.insertAfter(v):(e.unshift(v),l++))}m?a.node=u:i&&u.hasClass("newline")&&(a.node=Z0(["leftmost"])),a.insertAfter=(g=>b=>{e.splice(g+1,0,b),l++})(l)}n&&e.pop()},Jn=function(e){return e instanceof xe||e instanceof rt||e instanceof we&&e.hasClass("enclosing")?e:null},n1=function r(e,t){var a=Jn(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},Fr=function(e,t){return e?(t&&(e=n1(e,t)),a1[e.classes[0]]||null):null},nt=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return Z0(t.concat(a))},P=function(e,t,a){if(!e)return Z0();if(Kt[e.type]){var n=Kt[e.type](e,t);if(a&&t.size!==a.size){n=Z0(t.sizingClasses(a),[n],t);var i=t.sizeMultiplier/a.sizeMultiplier;n.height*=i,n.depth*=i}return n}else throw new T("Got group of unknown type: '"+e.type+"'")};function qt(r,e){var t=Z0(["base"],r,e),a=Z0(["strut"]);return a.style.height=z(t.height+t.depth),t.depth&&(a.style.verticalAlign=z(-t.depth)),t.children.unshift(a),t}function Vr(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=l0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var i=[],l=[],u=0;u<a.length;u++)if(l.push(a[u]),a[u].hasClass("mbin")||a[u].hasClass("mrel")||a[u].hasClass("allowbreak")){for(var h=!1;u<a.length-1&&a[u+1].hasClass("mspace")&&!a[u+1].hasClass("newline");)u++,l.push(a[u]),a[u].hasClass("nobreak")&&(h=!0);h||(i.push(qt(l,e)),l=[])}else a[u].hasClass("newline")&&(l.pop(),l.length>0&&(i.push(qt(l,e)),l=[]),i.push(a[u]));l.length>0&&i.push(qt(l,e));var m;t?(m=qt(l0(t,e,!0)),m.classes=["tag"],i.push(m)):n&&i.push(n);var v=Z0(["katex-html"],i);if(v.setAttribute("aria-hidden","true"),m){var g=m.children[0];g.style.height=z(v.height+v.depth),v.depth&&(g.style.verticalAlign=z(-v.depth))}return v}function Qn(r){return new xe(r)}var x0=class{constructor(e,t,a){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=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=le(this.classes));for(var a=0;a<this.children.length;a++)e.appendChild(this.children[a].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=$.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+$.escape(le(this.classes))+'"'),e+=">";for(var a=0;a<this.children.length;a++)e+=this.children[a].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},be=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return $.escape(this.toText())}toText(){return this.text}},Ur=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",z(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+z(this.width)+'"/>'}toText(){return this.character?this.character:" "}},M={MathNode:x0,TextNode:be,SpaceNode:Ur,newDocumentFragment:Qn},E0=function(e,t,a){return K[t][e]&&K[t][e].replace&&e.charCodeAt(0)!==55349&&!(Gn.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=K[t][e].replace),new M.TextNode(e)},ea=function(e){return e.length===1?e[0]:new M.MathNode("mrow",e)},ta=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var i=e.text;if($.contains(["\\imath","\\jmath"],i))return null;K[n][i]&&K[n][i].replace&&(i=K[n][i].replace);var l=w.fontMap[a].fontName;return Jr(i,l,n)?w.fontMap[a].variant:null},k0=function(e,t,a){if(e.length===1){var n=U(e[0],t);return a&&n instanceof x0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var i=[],l,u=0;u<e.length;u++){var h=U(e[u],t);if(h instanceof x0&&l instanceof x0){if(h.type==="mtext"&&l.type==="mtext"&&h.getAttribute("mathvariant")===l.getAttribute("mathvariant")){l.children.push(...h.children);continue}else if(h.type==="mn"&&l.type==="mn"){l.children.push(...h.children);continue}else if(h.type==="mi"&&h.children.length===1&&l.type==="mn"){var m=h.children[0];if(m instanceof be&&m.text==="."){l.children.push(...h.children);continue}}else if(l.type==="mi"&&l.children.length===1){var v=l.children[0];if(v instanceof be&&v.text==="\u0338"&&(h.type==="mo"||h.type==="mi"||h.type==="mn")){var g=h.children[0];g instanceof be&&g.text.length>0&&(g.text=g.text.slice(0,1)+"\u0338"+g.text.slice(1),i.pop())}}}i.push(h),l=h}return i},oe=function(e,t,a){return ea(k0(e,t,a))},U=function(e,t){if(!e)return new M.MathNode("mrow");if(Wt[e.type]){var a=Wt[e.type](e,t);return a}else throw new T("Got group of unknown type: '"+e.type+"'")};function yn(r,e,t,a,n){var i=k0(r,t),l;i.length===1&&i[0]instanceof x0&&$.contains(["mrow","mtable"],i[0].type)?l=i[0]:l=new M.MathNode("mrow",i);var u=new M.MathNode("annotation",[new M.TextNode(e)]);u.setAttribute("encoding","application/x-tex");var h=new M.MathNode("semantics",[l,u]),m=new M.MathNode("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&m.setAttribute("display","block");var v=n?"katex":"katex-mathml";return w.makeSpan([v],[m])}var ei=function(e){return new Ut({style:e.displayMode?O.DISPLAY:O.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ti=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=w.makeSpan(a,[e])}return e},i1=function(e,t,a){var n=ei(a),i;if(a.output==="mathml")return yn(e,t,n,a.displayMode,!0);if(a.output==="html"){var l=Vr(e,n);i=w.makeSpan(["katex"],[l])}else{var u=yn(e,t,n,a.displayMode,!1),h=Vr(e,n);i=w.makeSpan(["katex"],[u,h])}return ti(i,a)},s1=function(e,t,a){var n=ei(a),i=Vr(e,n),l=w.makeSpan(["katex"],[i]);return ti(l,a)},l1={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":"="},o1=function(e){var t=new M.MathNode("mo",[new M.TextNode(l1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},u1={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]},h1=function(e){return e.type==="ordgroup"?e.body.length:1},c1=function(e,t){function a(){var u=4e5,h=e.label.slice(1);if($.contains(["widehat","widecheck","widetilde","utilde"],h)){var m=e,v=h1(m.base),g,b,x;if(v>5)h==="widehat"||h==="widecheck"?(g=420,u=2364,x=.42,b=h+"4"):(g=312,u=2340,x=.34,b="tilde4");else{var k=[1,1,2,2,3,3][v];h==="widehat"||h==="widecheck"?(u=[0,1062,2364,2364,2364][k],g=[0,239,300,360,420][k],x=[0,.24,.3,.3,.36,.42][k],b=h+k):(u=[0,600,1033,2339,2340][k],g=[0,260,286,306,312][k],x=[0,.26,.286,.3,.306,.34][k],b="tilde"+k)}var A=new H0(b),C=new N0([A],{width:"100%",height:z(x),viewBox:"0 0 "+u+" "+g,preserveAspectRatio:"none"});return{span:w.makeSvgSpan([],[C],t),minWidth:0,height:x}}else{var D=[],R=u1[h],[H,j,I]=R,F=I/1e3,L=H.length,Z,V;if(L===1){var L0=R[3];Z=["hide-tail"],V=[L0]}else if(L===2)Z=["halfarrow-left","halfarrow-right"],V=["xMinYMin","xMaxYMin"];else if(L===3)Z=["brace-left","brace-center","brace-right"],V=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support 683 + `+L+" children.");for(var m0=0;m0<L;m0++){var s0=new H0(H[m0]),he=new N0([s0],{width:"400em",height:z(F),viewBox:"0 0 "+u+" "+I,preserveAspectRatio:V[m0]+" slice"}),v0=w.makeSvgSpan([Z[m0]],[he],t);if(L===1)return{span:v0,minWidth:j,height:F};v0.style.height=z(F),D.push(v0)}return{span:w.makeSpan(["stretchy"],D,t),minWidth:j,height:F}}}var{span:n,minWidth:i,height:l}=a();return n.height=l,n.style.height=z(l),i>0&&(n.style.minWidth=z(i)),n},d1=function(e,t,a,n,i){var l,u=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(l=w.makeSpan(["stretchy",t],[],i),t==="fbox"){var h=i.color&&i.getColor();h&&(l.style.borderColor=h)}}else{var m=[];/^[bx]cancel$/.test(t)&&m.push(new at({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&m.push(new at({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var v=new N0(m,{width:"100%",height:z(u)});l=w.makeSvgSpan([],[v],i)}return l.height=u,l.style.height=z(u),l},J0={encloseSpan:d1,mathMLnode:o1,svgSpan:c1};function q(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function ra(r){var e=er(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function er(r){return r&&(r.type==="atom"||qs.hasOwnProperty(r.type))?r:null}var aa=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=q(r.base,"accent"),t=a.base,r.base=t,n=_s(P(r,e)),r.base=a):(a=q(r,"accent"),t=a.base);var i=P(t,e.havingCrampedStyle()),l=a.isShifty&&$.isCharacterBox(t),u=0;if(l){var h=$.getBaseElem(t),m=P(h,e.havingCrampedStyle());u=mn(m).skew}var v=a.label==="\\c",g=v?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),b;if(a.isStretchy)b=J0.svgSpan(a,e),b=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:b,wrapperClasses:["svg-align"],wrapperStyle:u>0?{width:"calc(100% - "+z(2*u)+")",marginLeft:z(2*u)}:void 0}]},e);else{var x,k;a.label==="\\vec"?(x=w.staticSvg("vec",e),k=w.svgData.vec[1]):(x=w.makeOrd({mode:a.mode,text:a.label},e,"textord"),x=mn(x),x.italic=0,k=x.width,v&&(g+=x.depth)),b=w.makeSpan(["accent-body"],[x]);var A=a.label==="\\textcircled";A&&(b.classes.push("accent-full"),g=i.height);var C=u;A||(C-=k/2),b.style.left=z(C),a.label==="\\textcircled"&&(b.style.top=".2em"),b=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-g},{type:"elem",elem:b}]},e)}var D=w.makeSpan(["mord","accent"],[b],e);return n?(n.children[0]=D,n.height=Math.max(D.height,n.height),n.classes[0]="mord",n):D},ri=(r,e)=>{var t=r.isStretchy?J0.mathMLnode(r.label):new M.MathNode("mo",[E0(r.label,r.mode)]),a=new M.MathNode("mover",[U(r.base,e),t]);return a.setAttribute("accent","true"),a},m1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));E({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:(r,e)=>{var t=Yt(e[0]),a=!m1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:aa,mathmlBuilder:ri});E({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:aa,mathmlBuilder:ri});E({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=P(r.base,e),a=J0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,i=w.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return w.makeSpan(["mord","accentunder"],[i],e)},mathmlBuilder:(r,e)=>{var t=J0.mathMLnode(r.label),a=new M.MathNode("munder",[U(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var It=r=>{var e=new M.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};E({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(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=w.wrapFragment(P(r.body,a,e),e),i=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(i+"-arrow-pad");var l;r.below&&(a=e.havingStyle(t.sub()),l=w.wrapFragment(P(r.below,a,e),e),l.classes.push(i+"-arrow-pad"));var u=J0.svgSpan(r,e),h=-e.fontMetrics().axisHeight+.5*u.height,m=-e.fontMetrics().axisHeight-.5*u.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(m-=n.depth);var v;if(l){var g=-e.fontMetrics().axisHeight+l.height+.5*u.height+.111;v=w.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:m},{type:"elem",elem:u,shift:h},{type:"elem",elem:l,shift:g}]},e)}else v=w.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:m},{type:"elem",elem:u,shift:h}]},e);return v.children[0].children[0].children[1].classes.push("svg-align"),w.makeSpan(["mrel","x-arrow"],[v],e)},mathmlBuilder(r,e){var t=J0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=It(U(r.body,e));if(r.below){var i=It(U(r.below,e));a=new M.MathNode("munderover",[t,i,n])}else a=new M.MathNode("mover",[t,n])}else if(r.below){var l=It(U(r.below,e));a=new M.MathNode("munder",[t,l])}else a=It(),a=new M.MathNode("mover",[t,a]);return a}});var f1=w.makeSpan;function ai(r,e){var t=l0(r.body,e,!0);return f1([r.mclass],t,e)}function ni(r,e){var t,a=k0(r.body,e);return r.mclass==="minner"?t=new M.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new M.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new M.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}E({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:n0(n),isCharacterBox:$.isCharacterBox(n)}},htmlBuilder:ai,mathmlBuilder:ni});var tr=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};E({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:tr(e[0]),body:n0(e[1]),isCharacterBox:$.isCharacterBox(e[1])}}});E({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],i=e[0],l;a!=="\\stackrel"?l=tr(n):l="mrel";var u={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:n0(n)},h={type:"supsub",mode:i.mode,base:u,sup:a==="\\underset"?null:i,sub:a==="\\underset"?i:null};return{type:"mclass",mode:t.mode,mclass:l,body:[h],isCharacterBox:$.isCharacterBox(h)}},htmlBuilder:ai,mathmlBuilder:ni});E({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:tr(e[0]),body:n0(e[0])}},htmlBuilder(r,e){var t=l0(r.body,e,!0),a=w.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=k0(r.body,e),a=new M.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var p1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},bn=()=>({type:"styling",body:[],mode:"math",style:"display"}),xn=r=>r.type==="textord"&&r.text==="@",v1=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function g1(r,e,t){var a=p1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:a,mode:"math",family:"rel"},l=t.callFunction("\\Big",[i],[]),u=t.callFunction("\\\\cdright",[e[1]],[]),h={type:"ordgroup",mode:"math",body:[n,l,u]};return t.callFunction("\\\\cdparent",[h],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var m={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[m],[])}default:return{type:"textord",text:" ",mode:"math"}}}function y1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new T("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],i=0;i<e.length;i++){for(var l=e[i],u=bn(),h=0;h<l.length;h++)if(!xn(l[h]))u.body.push(l[h]);else{a.push(u),h+=1;var m=ra(l[h]).text,v=new Array(2);if(v[0]={type:"ordgroup",mode:"math",body:[]},v[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(m)>-1))if("<>AV".indexOf(m)>-1)for(var g=0;g<2;g++){for(var b=!0,x=h+1;x<l.length;x++){if(v1(l[x],m)){b=!1,h=x;break}if(xn(l[x]))throw new T("Missing a "+m+" character to complete a CD arrow.",l[x]);v[g].body.push(l[x])}if(b)throw new T("Missing a "+m+" character to complete a CD arrow.",l[h])}else throw new T('Expected one of "<>AV=|." after @',l[h]);var k=g1(m,v,r),A={type:"styling",body:[k],mode:"math",style:"display"};a.push(A),u=bn()}i%2===0?a.push(u):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var C=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:C,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}E({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=w.wrapFragment(P(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=z(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new M.MathNode("mrow",[U(r.label,e)]);return t=new M.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new M.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});E({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=w.wrapFragment(P(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new M.MathNode("mrow",[U(r.fragment,e)])}});E({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=q(e[0],"ordgroup"),n=a.body,i="",l=0;l<n.length;l++){var u=q(n[l],"textord");i+=u.text}var h=parseInt(i),m;if(isNaN(h))throw new T("\\@char has non-numeric argument "+i);if(h<0||h>=1114111)throw new T("\\@char with invalid code point "+i);return h<=65535?m=String.fromCharCode(h):(h-=65536,m=String.fromCharCode((h>>10)+55296,(h&1023)+56320)),{type:"textord",mode:t.mode,text:m}}});var ii=(r,e)=>{var t=l0(r.body,e.withColor(r.color),!1);return w.makeFragment(t)},si=(r,e)=>{var t=k0(r.body,e.withColor(r.color)),a=new M.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};E({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=q(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:n0(n)}},htmlBuilder:ii,mathmlBuilder:si});E({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=q(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var i=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:i}},htmlBuilder:ii,mathmlBuilder:si});E({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&q(n,"size").value}},htmlBuilder(r,e){var t=w.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=z(t0(r.size,e)))),t},mathmlBuilder(r,e){var t=new M.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",z(t0(r.size,e)))),t}});var Gr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},li=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new T("Expected a control sequence",r);return e},b1=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},oi=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};E({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(Gr[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=Gr[a.text]),q(e.parseFunction(),"internal");throw new T("Invalid token after macro prefix",a)}});E({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new T("Expected a control sequence",a);for(var i=0,l,u=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){l=e.gullet.future(),u[i].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new T('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==i+1)throw new T('Argument number "'+a.text+'" out of order');i++,u.push([])}else{if(a.text==="EOF")throw new T("Expected a macro definition");u[i].push(a.text)}var{tokens:h}=e.gullet.consumeArg();return l&&h.unshift(l),(t==="\\edef"||t==="\\xdef")&&(h=e.gullet.expandTokens(h),h.reverse()),e.gullet.macros.set(n,{tokens:h,numArgs:i,delimiters:u},t===Gr[t]),{type:"internal",mode:e.mode}}});E({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=li(e.gullet.popToken());e.gullet.consumeSpaces();var n=b1(e);return oi(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});E({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=li(e.gullet.popToken()),n=e.gullet.popToken(),i=e.gullet.popToken();return oi(e,a,i,t==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var Je=function(e,t,a){var n=K.math[e]&&K.math[e].replace,i=Jr(n||e,t,a);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return i},na=function(e,t,a,n){var i=a.havingBaseStyle(t),l=w.makeSpan(n.concat(i.sizingClasses(a)),[e],a),u=i.sizeMultiplier/a.sizeMultiplier;return l.height*=u,l.depth*=u,l.maxFontSize=i.sizeMultiplier,l},ui=function(e,t,a){var n=t.havingBaseStyle(a),i=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=z(i),e.height-=i,e.depth+=i},x1=function(e,t,a,n,i,l){var u=w.makeSymbol(e,"Main-Regular",i,n),h=na(u,t,n,l);return a&&ui(h,n,t),h},w1=function(e,t,a,n){return w.makeSymbol(e,"Size"+t+"-Regular",a,n)},hi=function(e,t,a,n,i,l){var u=w1(e,t,i,n),h=na(w.makeSpan(["delimsizing","size"+t],[u],n),O.TEXT,n,l);return a&&ui(h,n,O.TEXT),h},Br=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var i=w.makeSpan(["delimsizinginner",n],[w.makeSpan([],[w.makeSymbol(e,t,a)])]);return{type:"elem",elem:i}},Dr=function(e,t,a){var n=_0["Size4-Regular"][e.charCodeAt(0)]?_0["Size4-Regular"][e.charCodeAt(0)][4]:_0["Size1-Regular"][e.charCodeAt(0)][4],i=new H0("inner",Es(e,Math.round(1e3*t))),l=new N0([i],{width:z(n),height:z(t),style:"width:"+z(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),u=w.makeSvgSpan([],[l],a);return u.height=t,u.style.height=z(t),u.style.width=z(n),{type:"elem",elem:u}},Kr=.008,Pt={type:"kern",size:-1*Kr},k1=["|","\\lvert","\\rvert","\\vert"],S1=["\\|","\\lVert","\\rVert","\\Vert"],ci=function(e,t,a,n,i,l){var u,h,m,v,g="",b=0;u=m=v=e,h=null;var x="Size1-Regular";e==="\\uparrow"?m=v="\u23D0":e==="\\Uparrow"?m=v="\u2016":e==="\\downarrow"?u=m="\u23D0":e==="\\Downarrow"?u=m="\u2016":e==="\\updownarrow"?(u="\\uparrow",m="\u23D0",v="\\downarrow"):e==="\\Updownarrow"?(u="\\Uparrow",m="\u2016",v="\\Downarrow"):$.contains(k1,e)?(m="\u2223",g="vert",b=333):$.contains(S1,e)?(m="\u2225",g="doublevert",b=556):e==="["||e==="\\lbrack"?(u="\u23A1",m="\u23A2",v="\u23A3",x="Size4-Regular",g="lbrack",b=667):e==="]"||e==="\\rbrack"?(u="\u23A4",m="\u23A5",v="\u23A6",x="Size4-Regular",g="rbrack",b=667):e==="\\lfloor"||e==="\u230A"?(m=u="\u23A2",v="\u23A3",x="Size4-Regular",g="lfloor",b=667):e==="\\lceil"||e==="\u2308"?(u="\u23A1",m=v="\u23A2",x="Size4-Regular",g="lceil",b=667):e==="\\rfloor"||e==="\u230B"?(m=u="\u23A5",v="\u23A6",x="Size4-Regular",g="rfloor",b=667):e==="\\rceil"||e==="\u2309"?(u="\u23A4",m=v="\u23A5",x="Size4-Regular",g="rceil",b=667):e==="("||e==="\\lparen"?(u="\u239B",m="\u239C",v="\u239D",x="Size4-Regular",g="lparen",b=875):e===")"||e==="\\rparen"?(u="\u239E",m="\u239F",v="\u23A0",x="Size4-Regular",g="rparen",b=875):e==="\\{"||e==="\\lbrace"?(u="\u23A7",h="\u23A8",v="\u23A9",m="\u23AA",x="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(u="\u23AB",h="\u23AC",v="\u23AD",m="\u23AA",x="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(u="\u23A7",v="\u23A9",m="\u23AA",x="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(u="\u23AB",v="\u23AD",m="\u23AA",x="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(u="\u23A7",v="\u23AD",m="\u23AA",x="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(u="\u23AB",v="\u23A9",m="\u23AA",x="Size4-Regular");var k=Je(u,x,i),A=k.height+k.depth,C=Je(m,x,i),D=C.height+C.depth,R=Je(v,x,i),H=R.height+R.depth,j=0,I=1;if(h!==null){var F=Je(h,x,i);j=F.height+F.depth,I=2}var L=A+H+j,Z=Math.max(0,Math.ceil((t-L)/(I*D))),V=L+Z*I*D,L0=n.fontMetrics().axisHeight;a&&(L0*=n.sizeMultiplier);var m0=V/2-L0,s0=[];if(g.length>0){var he=V-A-H,v0=Math.round(V*1e3),B0=Bs(g,Math.round(he*1e3)),ee=new H0(g,B0),Se=(b/1e3).toFixed(3)+"em",Ae=(v0/1e3).toFixed(3)+"em",nr=new N0([ee],{width:Se,height:Ae,viewBox:"0 0 "+b+" "+v0}),te=w.makeSvgSpan([],[nr],n);te.height=v0/1e3,te.style.width=Se,te.style.height=Ae,s0.push({type:"elem",elem:te})}else{if(s0.push(Br(v,x,i)),s0.push(Pt),h===null){var re=V-A-H+2*Kr;s0.push(Dr(m,re,n))}else{var T0=(V-A-H-j)/2+2*Kr;s0.push(Dr(m,T0,n)),s0.push(Pt),s0.push(Br(h,x,i)),s0.push(Pt),s0.push(Dr(m,T0,n))}s0.push(Pt),s0.push(Br(u,x,i))}var He=n.havingBaseStyle(O.TEXT),ir=w.makeVList({positionType:"bottom",positionData:m0,children:s0},He);return na(w.makeSpan(["delimsizing","mult"],[ir],He),O.TEXT,n,l)},$r=80,Nr=.08,Or=function(e,t,a,n,i){var l=Cs(e,n,a),u=new H0(e,l),h=new N0([u],{width:"400em",height:z(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return w.makeSvgSpan(["hide-tail"],[h],i)},A1=function(e,t){var a=t.havingBaseSizing(),n=pi("\\surd",e*a.sizeMultiplier,fi,a),i=a.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),u,h=0,m=0,v=0,g;return n.type==="small"?(v=1e3+1e3*l+$r,e<1?i=1:e<1.4&&(i=.7),h=(1+l+Nr)/i,m=(1+l)/i,u=Or("sqrtMain",h,v,l,t),u.style.minWidth="0.853em",g=.833/i):n.type==="large"?(v=(1e3+$r)*Qe[n.size],m=(Qe[n.size]+l)/i,h=(Qe[n.size]+l+Nr)/i,u=Or("sqrtSize"+n.size,h,v,l,t),u.style.minWidth="1.02em",g=1/i):(h=e+l+Nr,m=e+l,v=Math.floor(1e3*e+l)+$r,u=Or("sqrtTall",h,v,l,t),u.style.minWidth="0.742em",g=1.056),u.height=m,u.style.height=z(h),{span:u,advanceWidth:g,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*i}},di=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],M1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],mi=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Qe=[0,1.2,1.8,2.4,3],T1=function(e,t,a,n,i){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),$.contains(di,e)||$.contains(mi,e))return hi(e,t,!1,a,n,i);if($.contains(M1,e))return ci(e,Qe[t],!1,a,n,i);throw new T("Illegal delimiter: '"+e+"'")},z1=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],C1=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"stack"}],fi=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],E1=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},pi=function(e,t,a,n){for(var i=Math.min(2,3-n.style.size),l=i;l<a.length&&a[l].type!=="stack";l++){var u=Je(e,E1(a[l]),"math"),h=u.height+u.depth;if(a[l].type==="small"){var m=n.havingBaseStyle(a[l].style);h*=m.sizeMultiplier}if(h>t)return a[l]}return a[a.length-1]},vi=function(e,t,a,n,i,l){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var u;$.contains(mi,e)?u=z1:$.contains(di,e)?u=fi:u=C1;var h=pi(e,t,u,n);return h.type==="small"?x1(e,h.style,a,n,i,l):h.type==="large"?hi(e,h.size,a,n,i,l):ci(e,t,a,n,i,l)},B1=function(e,t,a,n,i,l){var u=n.fontMetrics().axisHeight*n.sizeMultiplier,h=901,m=5/n.fontMetrics().ptPerEm,v=Math.max(t-u,a+u),g=Math.max(v/500*h,2*v-m);return vi(e,g,!0,n,i,l)},X0={sqrtImage:A1,sizedDelim:T1,sizeToMaxHeight:Qe,customSizedDelim:vi,leftRightDelim:B1},wn={"\\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}},D1=["(","\\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 rr(r,e){var t=er(r);if(t&&$.contains(D1,t.text))return t;throw t?new T("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new T("Invalid delimiter type '"+r.type+"'",r)}E({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:(r,e)=>{var t=rr(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:wn[r.funcName].size,mclass:wn[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?w.makeSpan([r.mclass]):X0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(E0(r.delim,r.mode));var t=new M.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=z(X0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function kn(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}E({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new T("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:rr(e[0],r).text,color:t}}});E({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=rr(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=q(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(r,e)=>{kn(r);for(var t=l0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,i=!1,l=0;l<t.length;l++)t[l].isMiddle?i=!0:(a=Math.max(t[l].height,a),n=Math.max(t[l].depth,n));a*=e.sizeMultiplier,n*=e.sizeMultiplier;var u;if(r.left==="."?u=nt(e,["mopen"]):u=X0.leftRightDelim(r.left,a,n,e,r.mode,["mopen"]),t.unshift(u),i)for(var h=1;h<t.length;h++){var m=t[h],v=m.isMiddle;v&&(t[h]=X0.leftRightDelim(v.delim,a,n,v.options,r.mode,[]))}var g;if(r.right===".")g=nt(e,["mclose"]);else{var b=r.rightColor?e.withColor(r.rightColor):e;g=X0.leftRightDelim(r.right,a,n,b,r.mode,["mclose"])}return t.push(g),w.makeSpan(["minner"],t,e)},mathmlBuilder:(r,e)=>{kn(r);var t=k0(r.body,e);if(r.left!=="."){var a=new M.MathNode("mo",[E0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new M.MathNode("mo",[E0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return ea(t)}});E({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=rr(e[0],r);if(!r.parser.leftrightDepth)throw new T("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=nt(e,[]);else{t=X0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?E0("|","text"):E0(r.delim,r.mode),a=new M.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var ia=(r,e)=>{var t=w.wrapFragment(P(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,i,l=0,u=$.isCharacterBox(r.body);if(a==="sout")i=w.makeSpan(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/n,l=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var h=t0({number:.6,unit:"pt"},e),m=t0({number:.35,unit:"ex"},e),v=e.havingBaseSizing();n=n/v.sizeMultiplier;var g=t.height+t.depth+h+m;t.style.paddingLeft=z(g/2+h);var b=Math.floor(1e3*g*n),x=Ts(b),k=new N0([new H0("phase",x)],{width:"400em",height:z(b/1e3),viewBox:"0 0 400000 "+b,preserveAspectRatio:"xMinYMin slice"});i=w.makeSvgSpan(["hide-tail"],[k],e),i.style.height=z(g),l=t.depth+h+m}else{/cancel/.test(a)?u||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var A=0,C=0,D=0;/box/.test(a)?(D=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),A=e.fontMetrics().fboxsep+(a==="colorbox"?0:D),C=A):a==="angl"?(D=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),A=4*D,C=Math.max(0,.25-t.depth)):(A=u?.2:0,C=A),i=J0.encloseSpan(t,a,A,C,e),/fbox|boxed|fcolorbox/.test(a)?(i.style.borderStyle="solid",i.style.borderWidth=z(D)):a==="angl"&&D!==.049&&(i.style.borderTopWidth=z(D),i.style.borderRightWidth=z(D)),l=t.depth+C,r.backgroundColor&&(i.style.backgroundColor=r.backgroundColor,r.borderColor&&(i.style.borderColor=r.borderColor))}var R;if(r.backgroundColor)R=w.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:l},{type:"elem",elem:t,shift:0}]},e);else{var H=/cancel|phase/.test(a)?["svg-align"]:[];R=w.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:l,wrapperClasses:H}]},e)}return/cancel/.test(a)&&(R.height=t.height,R.depth=t.depth),/cancel/.test(a)&&!u?w.makeSpan(["mord","cancel-lap"],[R],e):w.makeSpan(["mord"],[R],e)},sa=(r,e)=>{var t=0,a=new M.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[U(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};E({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,i=q(e[0],"color-token").color,l=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:l}},htmlBuilder:ia,mathmlBuilder:sa});E({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,i=q(e[0],"color-token").color,l=q(e[1],"color-token").color,u=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:l,borderColor:i,body:u}},htmlBuilder:ia,mathmlBuilder:sa});E({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});E({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:ia,mathmlBuilder:sa});E({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var gi={};function q0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:i,mathmlBuilder:l}=r,u={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},h=0;h<t.length;++h)gi[t[h]]=u;i&&(Kt[e]=i),l&&(Wt[e]=l)}var yi={};function d(r,e){yi[r]=e}function Sn(r){var e=[];r.consumeSpaces();var t=r.fetch().text;for(t==="\\relax"&&(r.consume(),r.consumeSpaces(),t=r.fetch().text);t==="\\hline"||t==="\\hdashline";)r.consume(),e.push(t==="\\hdashline"),r.consumeSpaces(),t=r.fetch().text;return e}var ar=r=>{var e=r.parser.settings;if(!e.displayMode)throw new T("{"+r.envName+"} can be used only in display mode.")};function la(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function ue(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:i,arraystretch:l,colSeparationType:u,autoTag:h,singleRow:m,emptySingleRow:v,maxNumCols:g,leqno:b}=e;if(r.gullet.beginGroup(),m||r.gullet.macros.set("\\cr","\\\\\\relax"),!l){var x=r.gullet.expandMacroAsText("\\arraystretch");if(x==null)l=1;else if(l=parseFloat(x),!l||l<0)throw new T("Invalid \\arraystretch: "+x)}r.gullet.beginGroup();var k=[],A=[k],C=[],D=[],R=h!=null?[]:void 0;function H(){h&&r.gullet.macros.set("\\@eqnsw","1",!0)}function j(){R&&(r.gullet.macros.get("\\df@tag")?(R.push(r.subparse([new C0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):R.push(!!h&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(H(),D.push(Sn(r));;){var I=r.parseExpression(!1,m?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),I={type:"ordgroup",mode:r.mode,body:I},t&&(I={type:"styling",mode:r.mode,style:t,body:[I]}),k.push(I);var F=r.fetch().text;if(F==="&"){if(g&&k.length===g){if(m||u)throw new T("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(F==="\\end"){j(),k.length===1&&I.type==="styling"&&I.body[0].body.length===0&&(A.length>1||!v)&&A.pop(),D.length<A.length+1&&D.push([]);break}else if(F==="\\\\"){r.consume();var L=void 0;r.gullet.future().text!==" "&&(L=r.parseSizeGroup(!0)),C.push(L?L.value:null),j(),D.push(Sn(r)),k=[],A.push(k),H()}else throw new T("Expected & or \\\\ or \\cr or \\end",r.nextToken)}return r.gullet.endGroup(),r.gullet.endGroup(),{type:"array",mode:r.mode,addJot:n,arraystretch:l,body:A,cols:i,rowGaps:C,hskipBeforeAndAfter:a,hLinesBeforeRow:D,colSeparationType:u,tags:R,leqno:b}}function oa(r){return r.slice(0,1)==="d"?"display":"text"}var I0=function(e,t){var a,n,i=e.body.length,l=e.hLinesBeforeRow,u=0,h=new Array(i),m=[],v=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),g=1/t.fontMetrics().ptPerEm,b=5*g;if(e.colSeparationType&&e.colSeparationType==="small"){var x=t.havingStyle(O.SCRIPT).sizeMultiplier;b=.2778*(x/t.sizeMultiplier)}var k=e.colSeparationType==="CD"?t0({number:3,unit:"ex"},t):12*g,A=3*g,C=e.arraystretch*k,D=.7*C,R=.3*C,H=0;function j(ot){for(var ut=0;ut<ot.length;++ut)ut>0&&(H+=.25),m.push({pos:H,isDashed:ot[ut]})}for(j(l[0]),a=0;a<e.body.length;++a){var I=e.body[a],F=D,L=R;u<I.length&&(u=I.length);var Z=new Array(I.length);for(n=0;n<I.length;++n){var V=P(I[n],t);L<V.depth&&(L=V.depth),F<V.height&&(F=V.height),Z[n]=V}var L0=e.rowGaps[a],m0=0;L0&&(m0=t0(L0,t),m0>0&&(m0+=R,L<m0&&(L=m0),m0=0)),e.addJot&&(L+=A),Z.height=F,Z.depth=L,H+=F,Z.pos=H,H+=L+m0,h[a]=Z,j(l[a+1])}var s0=H/2+t.fontMetrics().axisHeight,he=e.cols||[],v0=[],B0,ee,Se=[];if(e.tags&&e.tags.some(ot=>ot))for(a=0;a<i;++a){var Ae=h[a],nr=Ae.pos-s0,te=e.tags[a],re=void 0;te===!0?re=w.makeSpan(["eqn-num"],[],t):te===!1?re=w.makeSpan([],[],t):re=w.makeSpan([],l0(te,t,!0),t),re.depth=Ae.depth,re.height=Ae.height,Se.push({type:"elem",elem:re,shift:nr})}for(n=0,ee=0;n<u||ee<he.length;++n,++ee){for(var T0=he[ee]||{},He=!0;T0.type==="separator";){if(He||(B0=w.makeSpan(["arraycolsep"],[]),B0.style.width=z(t.fontMetrics().doubleRuleSep),v0.push(B0)),T0.separator==="|"||T0.separator===":"){var ir=T0.separator==="|"?"solid":"dashed",Me=w.makeSpan(["vertical-separator"],[],t);Me.style.height=z(H),Me.style.borderRightWidth=z(v),Me.style.borderRightStyle=ir,Me.style.margin="0 "+z(-v/2);var va=H-s0;va&&(Me.style.verticalAlign=z(-va)),v0.push(Me)}else throw new T("Invalid separator type: "+T0.separator);ee++,T0=he[ee]||{},He=!1}if(!(n>=u)){var Te=void 0;(n>0||e.hskipBeforeAndAfter)&&(Te=$.deflt(T0.pregap,b),Te!==0&&(B0=w.makeSpan(["arraycolsep"],[]),B0.style.width=z(Te),v0.push(B0)));var ze=[];for(a=0;a<i;++a){var st=h[a],lt=st[n];if(lt){var _i=st.pos-s0;lt.depth=st.depth,lt.height=st.height,ze.push({type:"elem",elem:lt,shift:_i})}}ze=w.makeVList({positionType:"individualShift",children:ze},t),ze=w.makeSpan(["col-align-"+(T0.align||"c")],[ze]),v0.push(ze),(n<u-1||e.hskipBeforeAndAfter)&&(Te=$.deflt(T0.postgap,b),Te!==0&&(B0=w.makeSpan(["arraycolsep"],[]),B0.style.width=z(Te),v0.push(B0)))}}if(h=w.makeSpan(["mtable"],v0),m.length>0){for(var Hi=w.makeLineSpan("hline",t,v),qi=w.makeLineSpan("hdashline",t,v),sr=[{type:"elem",elem:h,shift:0}];m.length>0;){var ga=m.pop(),ya=ga.pos-s0;ga.isDashed?sr.push({type:"elem",elem:qi,shift:ya}):sr.push({type:"elem",elem:Hi,shift:ya})}h=w.makeVList({positionType:"individualShift",children:sr},t)}if(Se.length===0)return w.makeSpan(["mord"],[h],t);var lr=w.makeVList({positionType:"individualShift",children:Se},t);return lr=w.makeSpan(["tag"],[lr],t),w.makeFragment([h,lr])},$1={c:"center ",l:"left ",r:"right "},P0=function(e,t){for(var a=[],n=new M.MathNode("mtd",[],["mtr-glue"]),i=new M.MathNode("mtd",[],["mml-eqn-num"]),l=0;l<e.body.length;l++){for(var u=e.body[l],h=[],m=0;m<u.length;m++)h.push(new M.MathNode("mtd",[U(u[m],t)]));e.tags&&e.tags[l]&&(h.unshift(n),h.push(n),e.leqno?h.unshift(i):h.push(i)),a.push(new M.MathNode("mtr",h))}var v=new M.MathNode("mtable",a),g=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);v.setAttribute("rowspacing",z(g));var b="",x="";if(e.cols&&e.cols.length>0){var k=e.cols,A="",C=!1,D=0,R=k.length;k[0].type==="separator"&&(b+="top ",D=1),k[k.length-1].type==="separator"&&(b+="bottom ",R-=1);for(var H=D;H<R;H++)k[H].type==="align"?(x+=$1[k[H].align],C&&(A+="none "),C=!0):k[H].type==="separator"&&C&&(A+=k[H].separator==="|"?"solid ":"dashed ",C=!1);v.setAttribute("columnalign",x.trim()),/[sd]/.test(A)&&v.setAttribute("columnlines",A.trim())}if(e.colSeparationType==="align"){for(var j=e.cols||[],I="",F=1;F<j.length;F++)I+=F%2?"0em ":"1em ";v.setAttribute("columnspacing",I.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?v.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?v.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?v.setAttribute("columnspacing","0.5em"):v.setAttribute("columnspacing","1em");var L="",Z=e.hLinesBeforeRow;b+=Z[0].length>0?"left ":"",b+=Z[Z.length-1].length>0?"right ":"";for(var V=1;V<Z.length-1;V++)L+=Z[V].length===0?"none ":Z[V][0]?"dashed ":"solid ";return/[sd]/.test(L)&&v.setAttribute("rowlines",L.trim()),b!==""&&(v=new M.MathNode("menclose",[v]),v.setAttribute("notation",b.trim())),e.arraystretch&&e.arraystretch<1&&(v=new M.MathNode("mstyle",[v]),v.setAttribute("scriptlevel","1")),v},bi=function(e,t){e.envName.indexOf("ed")===-1&&ar(e);var a=[],n=e.envName.indexOf("at")>-1?"alignat":"align",i=e.envName==="split",l=ue(e.parser,{cols:a,addJot:!0,autoTag:i?void 0:la(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),u,h=0,m={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var v="",g=0;g<t[0].body.length;g++){var b=q(t[0].body[g],"textord");v+=b.text}u=Number(v),h=u*2}var x=!h;l.body.forEach(function(D){for(var R=1;R<D.length;R+=2){var H=q(D[R],"styling"),j=q(H.body[0],"ordgroup");j.body.unshift(m)}if(x)h<D.length&&(h=D.length);else{var I=D.length/2;if(u<I)throw new T("Too many math in a row: "+("expected "+u+", but got "+I),D[0])}});for(var k=0;k<h;++k){var A="r",C=0;k%2===1?A="l":k>0&&x&&(C=1),a[k]={type:"align",align:A,pregap:C,postgap:0}}return l.colSeparationType=x?"align":"alignat",l};q0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=er(e[0]),a=t?[e[0]]:q(e[0],"ordgroup").body,n=a.map(function(l){var u=ra(l),h=u.text;if("lcr".indexOf(h)!==-1)return{type:"align",align:h};if(h==="|")return{type:"separator",separator:"|"};if(h===":")return{type:"separator",separator:":"};throw new T("Unknown column alignment: "+h,l)}),i={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return ue(r.parser,i,oa(r.envName))},htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new T("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var i=ue(r.parser,a,oa(r.envName)),l=Math.max(0,...i.body.map(u=>u.length));return i.cols=new Array(l).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=ue(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=er(e[0]),a=t?[e[0]]:q(e[0],"ordgroup").body,n=a.map(function(l){var u=ra(l),h=u.text;if("lc".indexOf(h)!==-1)return{type:"align",align:h};throw new T("Unknown column alignment: "+h,l)});if(n.length>1)throw new T("{subarray} can contain only one column");var i={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(i=ue(r.parser,i,"script"),i.body.length>0&&i.body[0].length>1)throw new T("{subarray} can contain only one column");return i},htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=ue(r.parser,e,oa(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:bi,htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){$.contains(["gather","gather*"],r.envName)&&ar(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:la(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return ue(r.parser,e,"display")},htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:bi,htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){ar(r);var e={autoTag:la(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return ue(r.parser,e,"display")},htmlBuilder:I0,mathmlBuilder:P0});q0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return ar(r),y1(r.parser)},htmlBuilder:I0,mathmlBuilder:P0});d("\\nonumber","\\gdef\\@eqnsw{0}");d("\\notag","\\nonumber");E({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new T(r.funcName+" valid only within array environment")}});var An=gi;E({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new T("Invalid environment name",n);for(var i="",l=0;l<n.body.length;++l)i+=q(n.body[l],"textord").text;if(a==="\\begin"){if(!An.hasOwnProperty(i))throw new T("No such environment: "+i,n);var u=An[i],{args:h,optArgs:m}=t.parseArguments("\\begin{"+i+"}",u),v={mode:t.mode,envName:i,parser:t},g=u.handler(v,h,m);t.expect("\\end",!1);var b=t.nextToken,x=q(t.parseFunction(),"environment");if(x.name!==i)throw new T("Mismatch: \\begin{"+i+"} matched by \\end{"+x.name+"}",b);return g}return{type:"environment",mode:t.mode,name:i,nameGroup:n}}});var xi=(r,e)=>{var t=r.font,a=e.withFont(t);return P(r.body,a)},wi=(r,e)=>{var t=r.font,a=e.withFont(t);return U(r.body,a)},Mn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};E({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=Yt(e[0]),i=a;return i in Mn&&(i=Mn[i]),{type:"font",mode:t.mode,font:i.slice(1),body:n}},htmlBuilder:xi,mathmlBuilder:wi});E({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=$.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:tr(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});E({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:i}=t,l=t.parseExpression(!0,n),u="math"+a.slice(1);return{type:"font",mode:i,font:u,body:{type:"ordgroup",mode:t.mode,body:l}}},htmlBuilder:xi,mathmlBuilder:wi});var ki=(r,e)=>{var t=e;return r==="display"?t=t.id>=O.SCRIPT.id?t.text():O.DISPLAY:r==="text"&&t.size===O.DISPLAY.size?t=O.TEXT:r==="script"?t=O.SCRIPT:r==="scriptscript"&&(t=O.SCRIPTSCRIPT),t},ua=(r,e)=>{var t=ki(r.size,e.style),a=t.fracNum(),n=t.fracDen(),i;i=e.havingStyle(a);var l=P(r.numer,i,e);if(r.continued){var u=8.5/e.fontMetrics().ptPerEm,h=3.5/e.fontMetrics().ptPerEm;l.height=l.height<u?u:l.height,l.depth=l.depth<h?h:l.depth}i=e.havingStyle(n);var m=P(r.denom,i,e),v,g,b;r.hasBarLine?(r.barSize?(g=t0(r.barSize,e),v=w.makeLineSpan("frac-line",e,g)):v=w.makeLineSpan("frac-line",e),g=v.height,b=v.height):(v=null,g=0,b=e.fontMetrics().defaultRuleThickness);var x,k,A;t.size===O.DISPLAY.size||r.size==="display"?(x=e.fontMetrics().num1,g>0?k=3*b:k=7*b,A=e.fontMetrics().denom1):(g>0?(x=e.fontMetrics().num2,k=b):(x=e.fontMetrics().num3,k=3*b),A=e.fontMetrics().denom2);var C;if(v){var R=e.fontMetrics().axisHeight;x-l.depth-(R+.5*g)<k&&(x+=k-(x-l.depth-(R+.5*g))),R-.5*g-(m.height-A)<k&&(A+=k-(R-.5*g-(m.height-A)));var H=-(R-.5*g);C=w.makeVList({positionType:"individualShift",children:[{type:"elem",elem:m,shift:A},{type:"elem",elem:v,shift:H},{type:"elem",elem:l,shift:-x}]},e)}else{var D=x-l.depth-(m.height-A);D<k&&(x+=.5*(k-D),A+=.5*(k-D)),C=w.makeVList({positionType:"individualShift",children:[{type:"elem",elem:m,shift:A},{type:"elem",elem:l,shift:-x}]},e)}i=e.havingStyle(t),C.height*=i.sizeMultiplier/e.sizeMultiplier,C.depth*=i.sizeMultiplier/e.sizeMultiplier;var j;t.size===O.DISPLAY.size?j=e.fontMetrics().delim1:t.size===O.SCRIPTSCRIPT.size?j=e.havingStyle(O.SCRIPT).fontMetrics().delim2:j=e.fontMetrics().delim2;var I,F;return r.leftDelim==null?I=nt(e,["mopen"]):I=X0.customSizedDelim(r.leftDelim,j,!0,e.havingStyle(t),r.mode,["mopen"]),r.continued?F=w.makeSpan([]):r.rightDelim==null?F=nt(e,["mclose"]):F=X0.customSizedDelim(r.rightDelim,j,!0,e.havingStyle(t),r.mode,["mclose"]),w.makeSpan(["mord"].concat(i.sizingClasses(e)),[I,w.makeSpan(["mfrac"],[C]),F],e)},ha=(r,e)=>{var t=new M.MathNode("mfrac",[U(r.numer,e),U(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=t0(r.barSize,e);t.setAttribute("linethickness",z(a))}var n=ki(r.size,e.style);if(n.size!==e.style.size){t=new M.MathNode("mstyle",[t]);var i=n.size===O.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",i),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var l=[];if(r.leftDelim!=null){var u=new M.MathNode("mo",[new M.TextNode(r.leftDelim.replace("\\",""))]);u.setAttribute("fence","true"),l.push(u)}if(l.push(t),r.rightDelim!=null){var h=new M.MathNode("mo",[new M.TextNode(r.rightDelim.replace("\\",""))]);h.setAttribute("fence","true"),l.push(h)}return ea(l)}return t};E({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],i=e[1],l,u=null,h=null,m="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":l=!0;break;case"\\\\atopfrac":l=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":l=!1,u="(",h=")";break;case"\\\\bracefrac":l=!1,u="\\{",h="\\}";break;case"\\\\brackfrac":l=!1,u="[",h="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":m="display";break;case"\\tfrac":case"\\tbinom":m="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:i,hasBarLine:l,leftDelim:u,rightDelim:h,size:m,barSize:null}},htmlBuilder:ua,mathmlBuilder:ha});E({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],i=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});E({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var Tn=["display","text","script","scriptscript"],zn=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};E({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],i=Yt(e[0]),l=i.type==="atom"&&i.family==="open"?zn(i.text):null,u=Yt(e[1]),h=u.type==="atom"&&u.family==="close"?zn(u.text):null,m=q(e[2],"size"),v,g=null;m.isBlank?v=!0:(g=m.value,v=g.number>0);var b="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var k=q(x.body[0],"textord");b=Tn[Number(k.text)]}}else x=q(x,"textord"),b=Tn[Number(x.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:v,barSize:g,leftDelim:l,rightDelim:h,size:b}},htmlBuilder:ua,mathmlBuilder:ha});E({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:q(e[0],"size").value,token:n}}});E({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],i=cs(q(e[1],"infix").size),l=e[2],u=i.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:l,continued:!1,hasBarLine:u,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:ua,mathmlBuilder:ha});var Si=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?P(r.sup,e.havingStyle(t.sup()),e):P(r.sub,e.havingStyle(t.sub()),e),n=q(r.base,"horizBrace")):n=q(r,"horizBrace");var i=P(n.base,e.havingBaseStyle(O.DISPLAY)),l=J0.svgSpan(n,e),u;if(n.isOver?(u=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:l}]},e),u.children[0].children[0].children[1].classes.push("svg-align")):(u=w.makeVList({positionType:"bottom",positionData:i.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:i}]},e),u.children[0].children[0].children[0].classes.push("svg-align")),a){var h=w.makeSpan(["mord",n.isOver?"mover":"munder"],[u],e);n.isOver?u=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:a}]},e):u=w.makeVList({positionType:"bottom",positionData:h.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:h}]},e)}return w.makeSpan(["mord",n.isOver?"mover":"munder"],[u],e)},N1=(r,e)=>{var t=J0.mathMLnode(r.label);return new M.MathNode(r.isOver?"mover":"munder",[U(r.base,e),t])};E({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:Si,mathmlBuilder:N1});E({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=q(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:n0(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=l0(r.body,e,!1);return w.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=oe(r.body,e);return t instanceof x0||(t=new x0("mrow",[t])),t.setAttribute("href",r.href),t}});E({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=q(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<a.length;i++){var l=a[i];l==="~"&&(l="\\textasciitilde"),n.push({type:"textord",mode:"text",text:l})}var u={type:"text",mode:t.mode,font:"\\texttt",body:n};return{type:"href",mode:t.mode,href:a,body:n0(u)}}});E({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(r,e){var{parser:t}=r;return{type:"hbox",mode:t.mode,body:n0(e[0])}},htmlBuilder(r,e){var t=l0(r.body,e,!1);return w.makeFragment(t)},mathmlBuilder(r,e){return new M.MathNode("mrow",k0(r.body,e))}});E({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,token:n}=r,i=q(e[0],"raw").string,l=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var u,h={};switch(a){case"\\htmlClass":h.class=i,u={command:"\\htmlClass",class:i};break;case"\\htmlId":h.id=i,u={command:"\\htmlId",id:i};break;case"\\htmlStyle":h.style=i,u={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var m=i.split(","),v=0;v<m.length;v++){var g=m[v].split("=");if(g.length!==2)throw new T("Error parsing key-value for \\htmlData");h["data-"+g[0].trim()]=g[1].trim()}u={command:"\\htmlData",attributes:h};break}default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(u)?{type:"html",mode:t.mode,attributes:h,body:n0(l)}:t.formatUnsupportedCmd(a)},htmlBuilder:(r,e)=>{var t=l0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=w.makeSpan(a,t,e);for(var i in r.attributes)i!=="class"&&r.attributes.hasOwnProperty(i)&&n.setAttribute(i,r.attributes[i]);return n},mathmlBuilder:(r,e)=>oe(r.body,e)});E({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:n0(e[0]),mathml:n0(e[1])}},htmlBuilder:(r,e)=>{var t=l0(r.html,e,!1);return w.makeFragment(t)},mathmlBuilder:(r,e)=>oe(r.mathml,e)});var Rr=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new T("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!jn(a))throw new T("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};E({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},i={number:.9,unit:"em"},l={number:0,unit:"em"},u="";if(t[0])for(var h=q(t[0],"raw").string,m=h.split(","),v=0;v<m.length;v++){var g=m[v].split("=");if(g.length===2){var b=g[1].trim();switch(g[0].trim()){case"alt":u=b;break;case"width":n=Rr(b);break;case"height":i=Rr(b);break;case"totalheight":l=Rr(b);break;default:throw new T("Invalid key: '"+g[0]+"' in \\includegraphics.")}}}var x=q(e[0],"url").url;return u===""&&(u=x,u=u.replace(/^.*[\\/]/,""),u=u.substring(0,u.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:a.mode,alt:u,width:n,height:i,totalheight:l,src:x}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(r,e)=>{var t=t0(r.height,e),a=0;r.totalheight.number>0&&(a=t0(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=t0(r.width,e));var i={height:z(t+a)};n>0&&(i.width=z(n)),a>0&&(i.verticalAlign=z(-a));var l=new Lr(r.src,r.alt,i);return l.height=t,l.depth=a,l},mathmlBuilder:(r,e)=>{var t=new M.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=t0(r.height,e),n=0;if(r.totalheight.number>0&&(n=t0(r.totalheight,e)-a,t.setAttribute("valign",z(-n))),t.setAttribute("height",z(a+n)),r.width.number>0){var i=t0(r.width,e);t.setAttribute("width",z(i))}return t.setAttribute("src",r.src),t}});E({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=q(e[0],"size");if(t.settings.strict){var i=a[1]==="m",l=n.value.unit==="mu";i?(l||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):l&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return w.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=t0(r.dimension,e);return new M.SpaceNode(t)}});E({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=w.makeSpan([],[P(r.body,e)]),t=w.makeSpan(["inner"],[t],e)):t=w.makeSpan(["inner"],[P(r.body,e)]);var a=w.makeSpan(["fix"],[]),n=w.makeSpan([r.alignment],[t,a],e),i=w.makeSpan(["strut"]);return i.style.height=z(n.height+n.depth),n.depth&&(i.style.verticalAlign=z(-n.depth)),n.children.unshift(i),n=w.makeSpan(["thinbox"],[n],e),w.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new M.MathNode("mpadded",[U(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});E({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var i=t==="\\("?"\\)":"$",l=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:l}}});E({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new T("Mismatched "+r.funcName)}});var Cn=(r,e)=>{switch(e.style.size){case O.DISPLAY.size:return r.display;case O.TEXT.size:return r.text;case O.SCRIPT.size:return r.script;case O.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};E({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:n0(e[0]),text:n0(e[1]),script:n0(e[2]),scriptscript:n0(e[3])}},htmlBuilder:(r,e)=>{var t=Cn(r,e),a=l0(t,e,!1);return w.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=Cn(r,e);return oe(t,e)}});var Ai=(r,e,t,a,n,i,l)=>{r=w.makeSpan([],[r]);var u=t&&$.isCharacterBox(t),h,m;if(e){var v=P(e,a.havingStyle(n.sup()),a);m={elem:v,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-v.depth)}}if(t){var g=P(t,a.havingStyle(n.sub()),a);h={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-g.height)}}var b;if(m&&h){var x=a.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+r.depth+l;b=w.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:z(-i)},{type:"kern",size:h.kern},{type:"elem",elem:r},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:z(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(h){var k=r.height-l;b=w.makeVList({positionType:"top",positionData:k,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:z(-i)},{type:"kern",size:h.kern},{type:"elem",elem:r}]},a)}else if(m){var A=r.depth+l;b=w.makeVList({positionType:"bottom",positionData:A,children:[{type:"elem",elem:r},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:z(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var C=[b];if(h&&i!==0&&!u){var D=w.makeSpan(["mspace"],[],a);D.style.marginRight=z(i),C.unshift(D)}return w.makeSpan(["mop","op-limits"],C,a)},Mi=["\\smallint"],_e=(r,e)=>{var t,a,n=!1,i;r.type==="supsub"?(t=r.sup,a=r.sub,i=q(r.base,"op"),n=!0):i=q(r,"op");var l=e.style,u=!1;l.size===O.DISPLAY.size&&i.symbol&&!$.contains(Mi,i.name)&&(u=!0);var h;if(i.symbol){var m=u?"Size2-Regular":"Size1-Regular",v="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(v=i.name.slice(1),i.name=v==="oiint"?"\\iint":"\\iiint"),h=w.makeSymbol(i.name,m,"math",e,["mop","op-symbol",u?"large-op":"small-op"]),v.length>0){var g=h.italic,b=w.staticSvg(v+"Size"+(u?"2":"1"),e);h=w.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:b,shift:u?.08:0}]},e),i.name="\\"+v,h.classes.unshift("mop"),h.italic=g}}else if(i.body){var x=l0(i.body,e,!0);x.length===1&&x[0]instanceof w0?(h=x[0],h.classes[0]="mop"):h=w.makeSpan(["mop"],x,e)}else{for(var k=[],A=1;A<i.name.length;A++)k.push(w.mathsym(i.name[A],i.mode,e));h=w.makeSpan(["mop"],k,e)}var C=0,D=0;return(h instanceof w0||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift&&(C=(h.height-h.depth)/2-e.fontMetrics().axisHeight,D=h.italic),n?Ai(h,t,a,e,l,D,C):(C&&(h.style.position="relative",h.style.top=z(C)),h)},it=(r,e)=>{var t;if(r.symbol)t=new x0("mo",[E0(r.name,r.mode)]),$.contains(Mi,r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new x0("mo",k0(r.body,e));else{t=new x0("mi",[new be(r.name.slice(1))]);var a=new x0("mo",[E0("\u2061","text")]);r.parentIsSupSub?t=new x0("mrow",[t,a]):t=Qn([t,a])}return t},O1={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};E({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:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=O1[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:_e,mathmlBuilder:it});E({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:n0(a)}},htmlBuilder:_e,mathmlBuilder:it});var R1={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};E({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(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:_e,mathmlBuilder:it});E({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:_e,mathmlBuilder:it});E({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=R1[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:_e,mathmlBuilder:it});var Ti=(r,e)=>{var t,a,n=!1,i;r.type==="supsub"?(t=r.sup,a=r.sub,i=q(r.base,"operatorname"),n=!0):i=q(r,"operatorname");var l;if(i.body.length>0){for(var u=i.body.map(g=>{var b=g.text;return typeof b=="string"?{type:"textord",mode:g.mode,text:b}:g}),h=l0(u,e.withFont("mathrm"),!0),m=0;m<h.length;m++){var v=h[m];v instanceof w0&&(v.text=v.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}l=w.makeSpan(["mop"],h,e)}else l=w.makeSpan(["mop"],[],e);return n?Ai(l,t,a,e,e.style,0,0):l},_1=(r,e)=>{for(var t=k0(r.body,e.withFont("mathrm")),a=!0,n=0;n<t.length;n++){var i=t[n];if(!(i instanceof M.SpaceNode))if(i instanceof M.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var l=i.children[0];i.children.length===1&&l instanceof M.TextNode?l.text=l.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){var u=t.map(v=>v.toText()).join("");t=[new M.TextNode(u)]}var h=new M.MathNode("mi",t);h.setAttribute("mathvariant","normal");var m=new M.MathNode("mo",[E0("\u2061","text")]);return r.parentIsSupSub?new M.MathNode("mrow",[h,m]):M.newDocumentFragment([h,m])};E({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:n0(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Ti,mathmlBuilder:_1});d("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");ke({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?w.makeFragment(l0(r.body,e,!1)):w.makeSpan(["mord"],l0(r.body,e,!0),e)},mathmlBuilder(r,e){return oe(r.body,e,!0)}});E({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle()),a=w.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,i=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return w.makeSpan(["mord","overline"],[i],e)},mathmlBuilder(r,e){var t=new M.MathNode("mo",[new M.TextNode("\u203E")]);t.setAttribute("stretchy","true");var a=new M.MathNode("mover",[U(r.body,e),t]);return a.setAttribute("accent","true"),a}});E({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:n0(a)}},htmlBuilder:(r,e)=>{var t=l0(r.body,e.withPhantom(),!1);return w.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=k0(r.body,e);return new M.MathNode("mphantom",t)}});E({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=w.makeSpan([],[P(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a<t.children.length;a++)t.children[a].height=0,t.children[a].depth=0;return t=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e),w.makeSpan(["mord"],[t],e)},mathmlBuilder:(r,e)=>{var t=k0(n0(r.body),e),a=new M.MathNode("mphantom",t),n=new M.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});E({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=w.makeSpan(["inner"],[P(r.body,e.withPhantom())]),a=w.makeSpan(["fix"],[]);return w.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=k0(n0(r.body),e),a=new M.MathNode("mphantom",t),n=new M.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});E({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=q(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=P(r.body,e),a=t0(r.dy,e);return w.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new M.MathNode("mpadded",[U(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});E({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});E({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],i=q(e[0],"size"),l=q(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&q(n,"size").value,width:i.value,height:l.value}},htmlBuilder(r,e){var t=w.makeSpan(["mord","rule"],[],e),a=t0(r.width,e),n=t0(r.height,e),i=r.shift?t0(r.shift,e):0;return t.style.borderRightWidth=z(a),t.style.borderTopWidth=z(n),t.style.bottom=z(i),t.width=a,t.height=n+i,t.depth=-i,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=t0(r.width,e),a=t0(r.height,e),n=r.shift?t0(r.shift,e):0,i=e.color&&e.getColor()||"black",l=new M.MathNode("mspace");l.setAttribute("mathbackground",i),l.setAttribute("width",z(t)),l.setAttribute("height",z(a));var u=new M.MathNode("mpadded",[l]);return n>=0?u.setAttribute("height",z(n)):(u.setAttribute("height",z(n)),u.setAttribute("depth",z(-n))),u.setAttribute("voffset",z(n)),u}});function zi(r,e,t){for(var a=l0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,i=0;i<a.length;i++){var l=a[i].classes.indexOf("sizing");l<0?Array.prototype.push.apply(a[i].classes,e.sizingClasses(t)):a[i].classes[l+1]==="reset-size"+e.size&&(a[i].classes[l+1]="reset-size"+t.size),a[i].height*=n,a[i].depth*=n}return w.makeFragment(a)}var En=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],H1=(r,e)=>{var t=e.havingSize(r.size);return zi(r.body,t,e)};E({type:"sizing",names:En,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,i=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:En.indexOf(a)+1,body:i}},htmlBuilder:H1,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=k0(r.body,t),n=new M.MathNode("mstyle",a);return n.setAttribute("mathsize",z(t.sizeMultiplier)),n}});E({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,i=!1,l=t[0]&&q(t[0],"ordgroup");if(l)for(var u="",h=0;h<l.body.length;++h){var m=l.body[h];if(u=m.text,u==="t")n=!0;else if(u==="b")i=!0;else{n=!1,i=!1;break}}else n=!0,i=!0;var v=e[0];return{type:"smash",mode:a.mode,body:v,smashHeight:n,smashDepth:i}},htmlBuilder:(r,e)=>{var t=w.makeSpan([],[P(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a<t.children.length;a++)t.children[a].height=0;if(r.smashDepth&&(t.depth=0,t.children))for(var n=0;n<t.children.length;n++)t.children[n].depth=0;var i=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e);return w.makeSpan(["mord"],[i],e)},mathmlBuilder:(r,e)=>{var t=new M.MathNode("mpadded",[U(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});E({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],i=e[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=w.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,i=n;e.style.id<O.TEXT.id&&(i=e.fontMetrics().xHeight);var l=n+i/4,u=t.height+t.depth+l+n,{span:h,ruleWidth:m,advanceWidth:v}=X0.sqrtImage(u,e),g=h.height-m;g>t.height+t.depth+l&&(l=(l+g-t.height-t.depth)/2);var b=h.height-t.height-l-m;t.style.paddingLeft=z(v);var x=w.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+b)},{type:"elem",elem:h},{type:"kern",size:m}]},e);if(r.index){var k=e.havingStyle(O.SCRIPTSCRIPT),A=P(r.index,k,e),C=.6*(x.height-x.depth),D=w.makeVList({positionType:"shift",positionData:-C,children:[{type:"elem",elem:A}]},e),R=w.makeSpan(["root"],[D]);return w.makeSpan(["mord","sqrt"],[R,x],e)}else return w.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new M.MathNode("mroot",[U(t,e),U(a,e)]):new M.MathNode("msqrt",[U(t,e)])}});var Bn={display:O.DISPLAY,text:O.TEXT,script:O.SCRIPT,scriptscript:O.SCRIPTSCRIPT};E({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,i=n.parseExpression(!0,t),l=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:l,body:i}},htmlBuilder(r,e){var t=Bn[r.style],a=e.havingStyle(t).withFont("");return zi(r.body,a,e)},mathmlBuilder(r,e){var t=Bn[r.style],a=e.havingStyle(t),n=k0(r.body,a),i=new M.MathNode("mstyle",n),l={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},u=l[r.style];return i.setAttribute("scriptlevel",u[0]),i.setAttribute("displaystyle",u[1]),i}});var q1=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===O.DISPLAY.size||a.alwaysHandleSupSub);return n?_e:null}else if(a.type==="operatorname"){var i=a.alwaysHandleSupSub&&(t.style.size===O.DISPLAY.size||a.limits);return i?Ti:null}else{if(a.type==="accent")return $.isCharacterBox(a.base)?aa:null;if(a.type==="horizBrace"){var l=!e.sub;return l===a.isOver?Si:null}else return null}else return null};ke({type:"supsub",htmlBuilder(r,e){var t=q1(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:i}=r,l=P(a,e),u,h,m=e.fontMetrics(),v=0,g=0,b=a&&$.isCharacterBox(a);if(n){var x=e.havingStyle(e.style.sup());u=P(n,x,e),b||(v=l.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(i){var k=e.havingStyle(e.style.sub());h=P(i,k,e),b||(g=l.depth+k.fontMetrics().subDrop*k.sizeMultiplier/e.sizeMultiplier)}var A;e.style===O.DISPLAY?A=m.sup1:e.style.cramped?A=m.sup3:A=m.sup2;var C=e.sizeMultiplier,D=z(.5/m.ptPerEm/C),R=null;if(h){var H=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(l instanceof w0||H)&&(R=z(-l.italic))}var j;if(u&&h){v=Math.max(v,A,u.depth+.25*m.xHeight),g=Math.max(g,m.sub2);var I=m.defaultRuleThickness,F=4*I;if(v-u.depth-(h.height-g)<F){g=F-(v-u.depth)+h.height;var L=.8*m.xHeight-(v-u.depth);L>0&&(v+=L,g-=L)}var Z=[{type:"elem",elem:h,shift:g,marginRight:D,marginLeft:R},{type:"elem",elem:u,shift:-v,marginRight:D}];j=w.makeVList({positionType:"individualShift",children:Z},e)}else if(h){g=Math.max(g,m.sub1,h.height-.8*m.xHeight);var V=[{type:"elem",elem:h,marginLeft:R,marginRight:D}];j=w.makeVList({positionType:"shift",positionData:g,children:V},e)}else if(u)v=Math.max(v,A,u.depth+.25*m.xHeight),j=w.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:u,marginRight:D}]},e);else throw new Error("supsub must have either sup or sub.");var L0=Fr(l,"right")||"mord";return w.makeSpan([L0],[l,w.makeSpan(["msupsub"],[j])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var i=[U(r.base,e)];r.sub&&i.push(U(r.sub,e)),r.sup&&i.push(U(r.sup,e));var l;if(t)l=a?"mover":"munder";else if(r.sub)if(r.sup){var m=r.base;m&&m.type==="op"&&m.limits&&e.style===O.DISPLAY||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(e.style===O.DISPLAY||m.limits)?l="munderover":l="msubsup"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===O.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===O.DISPLAY)?l="munder":l="msub"}else{var u=r.base;u&&u.type==="op"&&u.limits&&(e.style===O.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||e.style===O.DISPLAY)?l="mover":l="msup"}return new M.MathNode(l,i)}});ke({type:"atom",htmlBuilder(r,e){return w.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new M.MathNode("mo",[E0(r.text,r.mode)]);if(r.family==="bin"){var a=ta(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var Ci={mi:"italic",mn:"normal",mtext:"normal"};ke({type:"mathord",htmlBuilder(r,e){return w.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new M.MathNode("mi",[E0(r.text,r.mode,e)]),a=ta(r,e)||"italic";return a!==Ci[t.type]&&t.setAttribute("mathvariant",a),t}});ke({type:"textord",htmlBuilder(r,e){return w.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=E0(r.text,r.mode,e),a=ta(r,e)||"normal",n;return r.mode==="text"?n=new M.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new M.MathNode("mn",[t]):r.text==="\\prime"?n=new M.MathNode("mo",[t]):n=new M.MathNode("mi",[t]),a!==Ci[n.type]&&n.setAttribute("mathvariant",a),n}});var _r={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ke({type:"spacing",htmlBuilder(r,e){if(Hr.hasOwnProperty(r.text)){var t=Hr[r.text].className||"";if(r.mode==="text"){var a=w.makeOrd(r,e,"textord");return a.classes.push(t),a}else return w.makeSpan(["mspace",t],[w.mathsym(r.text,r.mode,e)],e)}else{if(_r.hasOwnProperty(r.text))return w.makeSpan(["mspace",_r[r.text]],[],e);throw new T('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(Hr.hasOwnProperty(r.text))t=new M.MathNode("mtext",[new M.TextNode("\xA0")]);else{if(_r.hasOwnProperty(r.text))return new M.MathNode("mspace");throw new T('Unknown type of space "'+r.text+'"')}return t}});var Dn=()=>{var r=new M.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};ke({type:"tag",mathmlBuilder(r,e){var t=new M.MathNode("mtable",[new M.MathNode("mtr",[Dn(),new M.MathNode("mtd",[oe(r.body,e)]),Dn(),new M.MathNode("mtd",[oe(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var $n={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Nn={"\\textbf":"textbf","\\textmd":"textmd"},I1={"\\textit":"textit","\\textup":"textup"},On=(r,e)=>{var t=r.font;if(t){if($n[t])return e.withTextFontFamily($n[t]);if(Nn[t])return e.withTextFontWeight(Nn[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(I1[t])};E({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:n0(n),font:a}},htmlBuilder(r,e){var t=On(r,e),a=l0(r.body,t,!0);return w.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=On(r,e);return oe(r.body,t)}});E({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=w.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,i=w.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return w.makeSpan(["mord","underline"],[i],e)},mathmlBuilder(r,e){var t=new M.MathNode("mo",[new M.TextNode("\u203E")]);t.setAttribute("stretchy","true");var a=new M.MathNode("munder",[U(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});E({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return w.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new M.MathNode("mpadded",[U(r.body,e)],["vcenter"])}});E({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new T("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=Rn(r),a=[],n=e.havingStyle(e.style.text()),i=0;i<t.length;i++){var l=t[i];l==="~"&&(l="\\textasciitilde"),a.push(w.makeSymbol(l,"Typewriter-Regular",r.mode,n,["mord","texttt"]))}return w.makeSpan(["mord","text"].concat(n.sizingClasses(e)),w.tryCombineChars(a),n)},mathmlBuilder(r,e){var t=new M.TextNode(Rn(r)),a=new M.MathNode("mtext",[t]);return a.setAttribute("mathvariant","monospace"),a}});var Rn=r=>r.body.replace(/ /g,r.star?"\u2423":"\xA0"),se=Zn,Ei=`[ \r 684 + ]`,P1="\\\\[a-zA-Z@]+",L1="\\\\[^\uD800-\uDFFF]",j1="("+P1+")"+Ei+"*",F1=`\\\\( 685 + |[ \r ]+ 686 + ?)[ \r ]*`,Wr="[\u0300-\u036F]",V1=new RegExp(Wr+"+$"),U1="("+Ei+"+)|"+(F1+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Wr+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Wr+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+j1)+("|"+L1+")"),Xt=class{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(U1,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new C0("EOF",new A0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new T("Unexpected character: '"+e[t]+"'",new C0(e[t],new A0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var i=e.indexOf(` 687 + `,this.tokenRegex.lastIndex);return i===-1?(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=i+1,this.lex()}return new C0(n,new A0(this,t,this.tokenRegex.lastIndex))}},Yr=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(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(this.undefStack.length===0)throw new T("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?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,a){if(a===void 0&&(a=!1),a){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},G1=yi;d("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});d("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});d("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});d("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});d("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});d("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");d("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var _n={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};d("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new T("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=_n[e.text],a==null||a>=t)throw new T("Invalid base-"+t+" digit "+e.text);for(var n;(n=_n[r.future().text])!=null&&n<t;)a*=t,a+=n,r.popToken()}return"\\@char{"+a+"}"});var ca=(r,e,t)=>{var a=r.consumeArg().tokens;if(a.length!==1)throw new T("\\newcommand's first argument must be a macro name");var n=a[0].text,i=r.isDefined(n);if(i&&!e)throw new T("\\newcommand{"+n+"} attempting to redefine "+(n+"; use \\renewcommand"));if(!i&&!t)throw new T("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var l=0;if(a=r.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var u="",h=r.expandNextToken();h.text!=="]"&&h.text!=="EOF";)u+=h.text,h=r.expandNextToken();if(!u.match(/^\s*[0-9]+\s*$/))throw new T("Invalid number of arguments: "+u);l=parseInt(u),a=r.consumeArg().tokens}return r.macros.set(n,{tokens:a,numArgs:l}),""};d("\\newcommand",r=>ca(r,!1,!0));d("\\renewcommand",r=>ca(r,!0,!1));d("\\providecommand",r=>ca(r,!0,!0));d("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});d("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});d("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),se[t],K.math[t],K.text[t]),""});d("\\bgroup","{");d("\\egroup","}");d("~","\\nobreakspace");d("\\lq","`");d("\\rq","'");d("\\aa","\\r a");d("\\AA","\\r A");d("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");d("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");d("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");d("\u212C","\\mathscr{B}");d("\u2130","\\mathscr{E}");d("\u2131","\\mathscr{F}");d("\u210B","\\mathscr{H}");d("\u2110","\\mathscr{I}");d("\u2112","\\mathscr{L}");d("\u2133","\\mathscr{M}");d("\u211B","\\mathscr{R}");d("\u212D","\\mathfrak{C}");d("\u210C","\\mathfrak{H}");d("\u2128","\\mathfrak{Z}");d("\\Bbbk","\\Bbb{k}");d("\xB7","\\cdotp");d("\\llap","\\mathllap{\\textrm{#1}}");d("\\rlap","\\mathrlap{\\textrm{#1}}");d("\\clap","\\mathclap{\\textrm{#1}}");d("\\mathstrut","\\vphantom{(}");d("\\underbar","\\underline{\\text{#1}}");d("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');d("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");d("\\ne","\\neq");d("\u2260","\\neq");d("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");d("\u2209","\\notin");d("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");d("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");d("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");d("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");d("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");d("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");d("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");d("\u27C2","\\perp");d("\u203C","\\mathclose{!\\mkern-0.8mu!}");d("\u220C","\\notni");d("\u231C","\\ulcorner");d("\u231D","\\urcorner");d("\u231E","\\llcorner");d("\u231F","\\lrcorner");d("\xA9","\\copyright");d("\xAE","\\textregistered");d("\uFE0F","\\textregistered");d("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');d("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');d("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');d("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');d("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");d("\u22EE","\\vdots");d("\\varGamma","\\mathit{\\Gamma}");d("\\varDelta","\\mathit{\\Delta}");d("\\varTheta","\\mathit{\\Theta}");d("\\varLambda","\\mathit{\\Lambda}");d("\\varXi","\\mathit{\\Xi}");d("\\varPi","\\mathit{\\Pi}");d("\\varSigma","\\mathit{\\Sigma}");d("\\varUpsilon","\\mathit{\\Upsilon}");d("\\varPhi","\\mathit{\\Phi}");d("\\varPsi","\\mathit{\\Psi}");d("\\varOmega","\\mathit{\\Omega}");d("\\substack","\\begin{subarray}{c}#1\\end{subarray}");d("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");d("\\boxed","\\fbox{$\\displaystyle{#1}$}");d("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");d("\\implies","\\DOTSB\\;\\Longrightarrow\\;");d("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Hn={",":"\\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"};d("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in Hn?e=Hn[t]:(t.slice(0,4)==="\\not"||t in K.math&&$.contains(["bin","rel"],K.math[t].group))&&(e="\\dotsb"),e});var da={")":!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};d("\\dotso",function(r){var e=r.future().text;return e in da?"\\ldots\\,":"\\ldots"});d("\\dotsc",function(r){var e=r.future().text;return e in da&&e!==","?"\\ldots\\,":"\\ldots"});d("\\cdots",function(r){var e=r.future().text;return e in da?"\\@cdots\\,":"\\@cdots"});d("\\dotsb","\\cdots");d("\\dotsm","\\cdots");d("\\dotsi","\\!\\cdots");d("\\dotsx","\\ldots\\,");d("\\DOTSI","\\relax");d("\\DOTSB","\\relax");d("\\DOTSX","\\relax");d("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");d("\\,","\\tmspace+{3mu}{.1667em}");d("\\thinspace","\\,");d("\\>","\\mskip{4mu}");d("\\:","\\tmspace+{4mu}{.2222em}");d("\\medspace","\\:");d("\\;","\\tmspace+{5mu}{.2777em}");d("\\thickspace","\\;");d("\\!","\\tmspace-{3mu}{.1667em}");d("\\negthinspace","\\!");d("\\negmedspace","\\tmspace-{4mu}{.2222em}");d("\\negthickspace","\\tmspace-{5mu}{.277em}");d("\\enspace","\\kern.5em ");d("\\enskip","\\hskip.5em\\relax");d("\\quad","\\hskip1em\\relax");d("\\qquad","\\hskip2em\\relax");d("\\tag","\\@ifstar\\tag@literal\\tag@paren");d("\\tag@paren","\\tag@literal{({#1})}");d("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new T("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});d("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");d("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");d("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");d("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");d("\\newline","\\\\\\relax");d("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Bi=z(_0["Main-Regular"]["T".charCodeAt(0)][1]-.7*_0["Main-Regular"]["A".charCodeAt(0)][1]);d("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Bi+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");d("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Bi+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");d("\\hspace","\\@ifstar\\@hspacer\\@hspace");d("\\@hspace","\\hskip #1\\relax");d("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");d("\\ordinarycolon",":");d("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");d("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');d("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');d("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');d("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');d("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');d("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');d("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');d("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');d("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');d("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');d("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');d("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');d("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');d("\u2237","\\dblcolon");d("\u2239","\\eqcolon");d("\u2254","\\coloneqq");d("\u2255","\\eqqcolon");d("\u2A74","\\Coloneqq");d("\\ratio","\\vcentcolon");d("\\coloncolon","\\dblcolon");d("\\colonequals","\\coloneqq");d("\\coloncolonequals","\\Coloneqq");d("\\equalscolon","\\eqqcolon");d("\\equalscoloncolon","\\Eqqcolon");d("\\colonminus","\\coloneq");d("\\coloncolonminus","\\Coloneq");d("\\minuscolon","\\eqcolon");d("\\minuscoloncolon","\\Eqcolon");d("\\coloncolonapprox","\\Colonapprox");d("\\coloncolonsim","\\Colonsim");d("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");d("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");d("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");d("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");d("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");d("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");d("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");d("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");d("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");d("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");d("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");d("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");d("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");d("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");d("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");d("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");d("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");d("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");d("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");d("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");d("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");d("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");d("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");d("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");d("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");d("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");d("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");d("\\imath","\\html@mathml{\\@imath}{\u0131}");d("\\jmath","\\html@mathml{\\@jmath}{\u0237}");d("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");d("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");d("\u27E6","\\llbracket");d("\u27E7","\\rrbracket");d("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");d("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");d("\u2983","\\lBrace");d("\u2984","\\rBrace");d("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");d("\u29B5","\\minuso");d("\\darr","\\downarrow");d("\\dArr","\\Downarrow");d("\\Darr","\\Downarrow");d("\\lang","\\langle");d("\\rang","\\rangle");d("\\uarr","\\uparrow");d("\\uArr","\\Uparrow");d("\\Uarr","\\Uparrow");d("\\N","\\mathbb{N}");d("\\R","\\mathbb{R}");d("\\Z","\\mathbb{Z}");d("\\alef","\\aleph");d("\\alefsym","\\aleph");d("\\Alpha","\\mathrm{A}");d("\\Beta","\\mathrm{B}");d("\\bull","\\bullet");d("\\Chi","\\mathrm{X}");d("\\clubs","\\clubsuit");d("\\cnums","\\mathbb{C}");d("\\Complex","\\mathbb{C}");d("\\Dagger","\\ddagger");d("\\diamonds","\\diamondsuit");d("\\empty","\\emptyset");d("\\Epsilon","\\mathrm{E}");d("\\Eta","\\mathrm{H}");d("\\exist","\\exists");d("\\harr","\\leftrightarrow");d("\\hArr","\\Leftrightarrow");d("\\Harr","\\Leftrightarrow");d("\\hearts","\\heartsuit");d("\\image","\\Im");d("\\infin","\\infty");d("\\Iota","\\mathrm{I}");d("\\isin","\\in");d("\\Kappa","\\mathrm{K}");d("\\larr","\\leftarrow");d("\\lArr","\\Leftarrow");d("\\Larr","\\Leftarrow");d("\\lrarr","\\leftrightarrow");d("\\lrArr","\\Leftrightarrow");d("\\Lrarr","\\Leftrightarrow");d("\\Mu","\\mathrm{M}");d("\\natnums","\\mathbb{N}");d("\\Nu","\\mathrm{N}");d("\\Omicron","\\mathrm{O}");d("\\plusmn","\\pm");d("\\rarr","\\rightarrow");d("\\rArr","\\Rightarrow");d("\\Rarr","\\Rightarrow");d("\\real","\\Re");d("\\reals","\\mathbb{R}");d("\\Reals","\\mathbb{R}");d("\\Rho","\\mathrm{P}");d("\\sdot","\\cdot");d("\\sect","\\S");d("\\spades","\\spadesuit");d("\\sub","\\subset");d("\\sube","\\subseteq");d("\\supe","\\supseteq");d("\\Tau","\\mathrm{T}");d("\\thetasym","\\vartheta");d("\\weierp","\\wp");d("\\Zeta","\\mathrm{Z}");d("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");d("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");d("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");d("\\bra","\\mathinner{\\langle{#1}|}");d("\\ket","\\mathinner{|{#1}\\rangle}");d("\\braket","\\mathinner{\\langle{#1}\\rangle}");d("\\Bra","\\left\\langle#1\\right|");d("\\Ket","\\left|#1\\right\\rangle");var Di=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,l=e.macros.get("|"),u=e.macros.get("\\|");e.macros.beginGroup();var h=g=>b=>{r&&(b.macros.set("|",l),n.length&&b.macros.set("\\|",u));var x=g;if(!g&&n.length){var k=b.future();k.text==="|"&&(b.popToken(),x=!0)}return{tokens:x?n:a,numArgs:0}};e.macros.set("|",h(!1)),n.length&&e.macros.set("\\|",h(!0));var m=e.consumeArg().tokens,v=e.expandTokens([...i,...m,...t]);return e.macros.endGroup(),{tokens:v.reverse(),numArgs:0}};d("\\bra@ket",Di(!1));d("\\bra@set",Di(!0));d("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");d("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");d("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");d("\\angln","{\\angl n}");d("\\blue","\\textcolor{##6495ed}{#1}");d("\\orange","\\textcolor{##ffa500}{#1}");d("\\pink","\\textcolor{##ff00af}{#1}");d("\\red","\\textcolor{##df0030}{#1}");d("\\green","\\textcolor{##28ae7b}{#1}");d("\\gray","\\textcolor{gray}{#1}");d("\\purple","\\textcolor{##9d38bd}{#1}");d("\\blueA","\\textcolor{##ccfaff}{#1}");d("\\blueB","\\textcolor{##80f6ff}{#1}");d("\\blueC","\\textcolor{##63d9ea}{#1}");d("\\blueD","\\textcolor{##11accd}{#1}");d("\\blueE","\\textcolor{##0c7f99}{#1}");d("\\tealA","\\textcolor{##94fff5}{#1}");d("\\tealB","\\textcolor{##26edd5}{#1}");d("\\tealC","\\textcolor{##01d1c1}{#1}");d("\\tealD","\\textcolor{##01a995}{#1}");d("\\tealE","\\textcolor{##208170}{#1}");d("\\greenA","\\textcolor{##b6ffb0}{#1}");d("\\greenB","\\textcolor{##8af281}{#1}");d("\\greenC","\\textcolor{##74cf70}{#1}");d("\\greenD","\\textcolor{##1fab54}{#1}");d("\\greenE","\\textcolor{##0d923f}{#1}");d("\\goldA","\\textcolor{##ffd0a9}{#1}");d("\\goldB","\\textcolor{##ffbb71}{#1}");d("\\goldC","\\textcolor{##ff9c39}{#1}");d("\\goldD","\\textcolor{##e07d10}{#1}");d("\\goldE","\\textcolor{##a75a05}{#1}");d("\\redA","\\textcolor{##fca9a9}{#1}");d("\\redB","\\textcolor{##ff8482}{#1}");d("\\redC","\\textcolor{##f9685d}{#1}");d("\\redD","\\textcolor{##e84d39}{#1}");d("\\redE","\\textcolor{##bc2612}{#1}");d("\\maroonA","\\textcolor{##ffbde0}{#1}");d("\\maroonB","\\textcolor{##ff92c6}{#1}");d("\\maroonC","\\textcolor{##ed5fa6}{#1}");d("\\maroonD","\\textcolor{##ca337c}{#1}");d("\\maroonE","\\textcolor{##9e034e}{#1}");d("\\purpleA","\\textcolor{##ddd7ff}{#1}");d("\\purpleB","\\textcolor{##c6b9fc}{#1}");d("\\purpleC","\\textcolor{##aa87ff}{#1}");d("\\purpleD","\\textcolor{##7854ab}{#1}");d("\\purpleE","\\textcolor{##543b78}{#1}");d("\\mintA","\\textcolor{##f5f9e8}{#1}");d("\\mintB","\\textcolor{##edf2df}{#1}");d("\\mintC","\\textcolor{##e0e5cc}{#1}");d("\\grayA","\\textcolor{##f6f7f7}{#1}");d("\\grayB","\\textcolor{##f0f1f2}{#1}");d("\\grayC","\\textcolor{##e3e5e6}{#1}");d("\\grayD","\\textcolor{##d6d8da}{#1}");d("\\grayE","\\textcolor{##babec2}{#1}");d("\\grayF","\\textcolor{##888d93}{#1}");d("\\grayG","\\textcolor{##626569}{#1}");d("\\grayH","\\textcolor{##3b3e40}{#1}");d("\\grayI","\\textcolor{##21242c}{#1}");d("\\kaBlue","\\textcolor{##314453}{#1}");d("\\kaGreen","\\textcolor{##71B307}{#1}");var $i={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Xr=class{constructor(e,t,a){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 Yr(G1,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new Xt(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&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){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new C0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),i,l=0,u=0;do{if(i=this.popToken(),t.push(i),i.text==="{")++l;else if(i.text==="}"){if(--l,l===-1)throw new T("Extra }",i)}else if(i.text==="EOF")throw new T("Unexpected end of input in a macro argument, expected '"+(e&&a?e[u]:"}")+"'",i);if(e&&a)if((l===0||l===1&&e[u]==="{")&&i.text===e[u]){if(++u,u===e.length){t.splice(-u,u);break}}else u=0}while(l!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new T("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;n<a.length;n++){var i=this.popToken();if(a[n]!==i.text)throw new T("Use of the macro doesn't match its definition",i)}}for(var l=[],u=0;u<e;u++)l.push(this.consumeArg(t&&t[u+1]).tokens);return l}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new T("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new T("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,l=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){i=i.slice();for(var u=i.length-1;u>=0;--u){var h=i[u];if(h.text==="#"){if(u===0)throw new T("Incomplete placeholder at end of macro body",h);if(h=i[--u],h.text==="#")i.splice(u+1,1);else if(/^[1-9]$/.test(h.text))i.splice(u,2,...l[+h.text-1]);else throw new T("Not a valid argument number",h)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new C0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var i=0;if(n.indexOf("#")!==-1)for(var l=n.replace(/##/g,"");l.indexOf("#"+(i+1))!==-1;)++i;for(var u=new Xt(n,this.settings),h=[],m=u.lex();m.text!=="EOF";)h.push(m),m=u.lex();h.reverse();var v={tokens:h,numArgs:i};return v}return n}isDefined(e){return this.macros.has(e)||se.hasOwnProperty(e)||K.math.hasOwnProperty(e)||K.text.hasOwnProperty(e)||$i.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:se.hasOwnProperty(e)&&!se[e].primitive}},qn=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Lt=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"}),qr={"\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"}},In={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"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",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"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",\u00EA:"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",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"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",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"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",\u00F4:"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",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"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",\u00FB:"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",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"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",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"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",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"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",\u00CA:"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",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"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",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"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",\u00D4:"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",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"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",\u00DB:"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",\u00DD:"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"},Zt=class r{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 Xr(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new T("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(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{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new C0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(r.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&se[n.text]&&se[n.text].infix)break;var i=this.parseAtom(t);if(i){if(i.type==="internal")continue}else break;a.push(i)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n<e.length;n++)if(e[n].type==="infix"){if(t!==-1)throw new T("only one infix operator per group",e[n].token);t=n,a=e[n].replaceWith}if(t!==-1&&a){var i,l,u=e.slice(0,t),h=e.slice(t+1);u.length===1&&u[0].type==="ordgroup"?i=u[0]:i={type:"ordgroup",mode:this.mode,body:u},h.length===1&&h[0].type==="ordgroup"?l=h[0]:l={type:"ordgroup",mode:this.mode,body:h};var m;return a==="\\\\abovefrac"?m=this.callFunction(a,[i,e[t],l],[]):m=this.callFunction(a,[i,l],[]),[m]}else return e}handleSupSubscript(e){var t=this.fetch(),a=t.text;this.consume(),this.consumeSpaces();var n=this.parseGroup(e);if(!n)throw new T("Expected group after '"+a+"'",t);return n}formatUnsupportedCmd(e){for(var t=[],a=0;a<e.length;a++)t.push({type:"textord",mode:"text",text:e[a]});var n={type:"text",mode:this.mode,body:t},i={type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]};return i}parseAtom(e){var t=this.parseGroup("atom",e);if(this.mode==="text")return t;for(var a,n;;){this.consumeSpaces();var i=this.fetch();if(i.text==="\\limits"||i.text==="\\nolimits"){if(t&&t.type==="op"){var l=i.text==="\\limits";t.limits=l,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=i.text==="\\limits");else throw new T("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(a)throw new T("Double superscript",i);a=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(n)throw new T("Double subscript",i);n=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(a)throw new T("Double superscript",i);var u={type:"textord",mode:this.mode,text:"\\prime"},h=[u];for(this.consume();this.fetch().text==="'";)h.push(u),this.consume();this.fetch().text==="^"&&h.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:h}}else if(Lt[i.text]){var m=qn.test(i.text),v=[];for(v.push(new C0(Lt[i.text])),this.consume();;){var g=this.fetch().text;if(!Lt[g]||qn.test(g)!==m)break;v.unshift(new C0(Lt[g])),this.consume()}var b=this.subparse(v);m?n={type:"ordgroup",mode:"math",body:b}:a={type:"ordgroup",mode:"math",body:b}}else break}return a||n?{type:"supsub",mode:this.mode,base:t,sup:a,sub:n}:t}parseFunction(e,t){var a=this.fetch(),n=a.text,i=se[n];if(!i)return null;if(this.consume(),t&&t!=="atom"&&!i.allowedInArgument)throw new T("Got function '"+n+"' with no arguments"+(t?" as "+t:""),a);if(this.mode==="text"&&!i.allowedInText)throw new T("Can't use function '"+n+"' in text mode",a);if(this.mode==="math"&&i.allowedInMath===!1)throw new T("Can't use function '"+n+"' in math mode",a);var{args:l,optArgs:u}=this.parseArguments(n,i);return this.callFunction(n,l,u,a,e)}callFunction(e,t,a,n,i){var l={funcName:e,parser:this,token:n,breakOnTokenText:i},u=se[e];if(u&&u.handler)return u.handler(l,t,a);throw new T("No function handler for "+e)}parseArguments(e,t){var a=t.numArgs+t.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var n=[],i=[],l=0;l<a;l++){var u=t.argTypes&&t.argTypes[l],h=l<t.numOptionalArgs;(t.primitive&&u==null||t.type==="sqrt"&&l===1&&i[0]==null)&&(u="primitive");var m=this.parseGroupOfType("argument to '"+e+"'",u,h);if(h)i.push(m);else if(m!=null)n.push(m);else throw new T("Null argument, please report this as a bug")}return{args:n,optArgs:i}}parseGroupOfType(e,t,a){switch(t){case"color":return this.parseColorGroup(a);case"size":return this.parseSizeGroup(a);case"url":return this.parseUrlGroup(a);case"math":case"text":return this.parseArgumentGroup(a,t);case"hbox":{var n=this.parseArgumentGroup(a,"text");return n!=null?{type:"styling",mode:n.mode,body:[n],style:"text"}:null}case"raw":{var i=this.parseStringGroup("raw",a);return i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(a)throw new T("A primitive argument cannot be optional");var l=this.parseGroup(e);if(l==null)throw new T("Expected group as "+e,this.fetch());return l}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new T("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var a=this.gullet.scanArgument(t);if(a==null)return null;for(var n="",i;(i=this.fetch()).text!=="EOF";)n+=i.text,this.consume();return this.consume(),a.text=n,a}parseRegexGroup(e,t){for(var a=this.fetch(),n=a,i="",l;(l=this.fetch()).text!=="EOF"&&e.test(i+l.text);)n=l,i+=n.text,this.consume();if(i==="")throw new T("Invalid "+t+": '"+a.text+"'",a);return a.range(n,i)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var a=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!a)throw new T("Invalid color: '"+t.text+"'",t);var n=a[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,a=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",a=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new T("Invalid size: '"+t.text+"'",t);var i={number:+(n[1]+n[2]),unit:n[3]};if(!jn(i))throw new T("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:a}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var a=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:a}}parseArgumentGroup(e,t){var a=this.gullet.scanArgument(e);if(a==null)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var l={type:"ordgroup",mode:this.mode,loc:a.loc,body:i};return t&&this.switchMode(n),l}parseGroup(e,t){var a=this.fetch(),n=a.text,i;if(n==="{"||n==="\\begingroup"){this.consume();var l=n==="{"?"}":"\\endgroup";this.gullet.beginGroup();var u=this.parseExpression(!1,l),h=this.fetch();this.expect(l),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:A0.range(a,h),body:u,semisimple:n==="\\begingroup"||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&n[0]==="\\"&&!$i.hasOwnProperty(n)){if(this.settings.throwOnError)throw new T("Undefined control sequence: "+n,a);i=this.formatUnsupportedCmd(n),this.consume()}return i}formLigatures(e){for(var t=e.length-1,a=0;a<t;++a){var n=e[a],i=n.text;i==="-"&&e[a+1].text==="-"&&(a+1<t&&e[a+2].text==="-"?(e.splice(a,3,{type:"textord",mode:"text",loc:A0.range(n,e[a+2]),text:"---"}),t-=2):(e.splice(a,2,{type:"textord",mode:"text",loc:A0.range(n,e[a+1]),text:"--"}),t-=1)),(i==="'"||i==="`")&&e[a+1].text===i&&(e.splice(a,2,{type:"textord",mode:"text",loc:A0.range(n,e[a+1]),text:i+i}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var a=t.slice(5),n=a.charAt(0)==="*";if(n&&(a=a.slice(1)),a.length<2||a.charAt(0)!==a.slice(-1))throw new T(`\\verb assertion failed -- 688 + please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:n}}In.hasOwnProperty(t[0])&&!K[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=In[t[0]]+t.slice(1));var i=V1.exec(t);i&&(t=t.substring(0,i.index),t==="i"?t="\u0131":t==="j"&&(t="\u0237"));var l;if(K[this.mode][t]){this.settings.strict&&this.mode==="math"&&jr.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var u=K[this.mode][t].group,h=A0.range(e),m;if(Hs.hasOwnProperty(u)){var v=u;m={type:"atom",mode:this.mode,family:v,loc:h,text:t}}else m={type:u,mode:this.mode,loc:h,text:t};l=m}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Ln(t.charCodeAt(0))?this.mode==="math"&&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)),l={type:"textord",mode:"text",loc:A0.range(e),text:t};else return null;if(this.consume(),i)for(var g=0;g<i[0].length;g++){var b=i[0][g];if(!qr[b])throw new T("Unknown accent ' "+b+"'",e);var x=qr[b][this.mode]||qr[b].text;if(!x)throw new T("Accent "+b+" unsupported in "+this.mode+" mode",e);l={type:"accent",mode:this.mode,loc:A0.range(e),label:x,isStretchy:!1,isShifty:!0,base:l}}return l}};Zt.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var ma=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new Zt(e,t);delete a.gullet.macros.current["\\df@tag"];var n=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new T("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:a.subparse([new C0("\\df@tag")])}]}return n},Ni=function(e,t,a){t.textContent="";var n=fa(e,a).toNode();t.appendChild(n)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Ni=function(){throw new T("KaTeX doesn't work in quirks mode.")});var K1=function(e,t){var a=fa(e,t).toMarkup();return a},W1=function(e,t){var a=new et(t);return ma(e,a)},Oi=function(e,t,a){if(a.throwOnError||!(e instanceof T))throw e;var n=w.makeSpan(["katex-error"],[new w0(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+a.errorColor),n},fa=function(e,t){var a=new et(t);try{var n=ma(e,a);return i1(n,e,a)}catch(i){return Oi(i,e,a)}},Y1=function(e,t){var a=new et(t);try{var n=ma(e,a);return s1(n,e,a)}catch(i){return Oi(i,e,a)}},pa={version:"0.16.11",render:Ni,renderToString:K1,ParseError:T,SETTINGS_SCHEMA:jt,__parse:W1,__renderToDomTree:fa,__renderToHTMLTree:Y1,__setFontMetrics:Ds,__defineSymbol:s,__defineFunction:E,__defineMacro:d,__domTree:{Span:we,Anchor:rt,SymbolNode:w0,SvgNode:N0,PathNode:H0,LineNode:at}};var X1=function(e,t,a){for(var n=a,i=0,l=e.length;n<t.length;){var u=t[n];if(i<=0&&t.slice(n,n+l)===e)return n;u==="\\"?n++:u==="{"?i++:u==="}"&&i--,n++}return-1},Z1=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},J1=/^\\begin{/,Q1=function(e,t){for(var a,n=[],i=new RegExp("("+t.map(m=>Z1(m.left)).join("|")+")");a=e.search(i),a!==-1;){a>0&&(n.push({type:"text",data:e.slice(0,a)}),e=e.slice(a));var l=t.findIndex(m=>e.startsWith(m.left));if(a=X1(t[l].right,e,t[l].left.length),a===-1)break;var u=e.slice(0,a+t[l].right.length),h=J1.test(u)?u:e.slice(t[l].left.length,a);n.push({type:"math",data:h,rawData:u,display:t[l].display}),e=e.slice(a+t[l].right.length)}return e!==""&&n.push({type:"text",data:e}),n},el=function(e,t){var a=Q1(e,t.delimiters);if(a.length===1&&a[0].type==="text")return null;for(var n=document.createDocumentFragment(),i=0;i<a.length;i++)if(a[i].type==="text")n.appendChild(document.createTextNode(a[i].data));else{var l=document.createElement("span"),u=a[i].data;t.displayMode=a[i].display;try{t.preProcess&&(u=t.preProcess(u)),pa.render(u,l,t)}catch(h){if(!(h instanceof pa.ParseError))throw h;t.errorCallback("KaTeX auto-render: Failed to parse `"+a[i].data+"` with ",h),n.appendChild(document.createTextNode(a[i].rawData));continue}n.appendChild(l)}return n},tl=function r(e,t){for(var a=0;a<e.childNodes.length;a++){var n=e.childNodes[a];if(n.nodeType===3){for(var i=n.textContent,l=n.nextSibling,u=0;l&&l.nodeType===Node.TEXT_NODE;)i+=l.textContent,l=l.nextSibling,u++;var h=el(i,t);if(h){for(var m=0;m<u;m++)n.nextSibling.remove();a+=h.childNodes.length-1,e.replaceChild(h,n)}else a+=u}else n.nodeType===1&&function(){var v=" "+n.className+" ",g=t.ignoredTags.indexOf(n.nodeName.toLowerCase())===-1&&t.ignoredClasses.every(b=>v.indexOf(" "+b+" ")===-1);g&&r(n,t)}()}},Ri=function(e,t){if(!e)throw new Error("No element provided to render");var a={};for(var n in t)t.hasOwnProperty(n)&&(a[n]=t[n]);a.delimiters=a.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],a.ignoredTags=a.ignoredTags||["script","noscript","style","textarea","pre","code","option"],a.ignoredClasses=a.ignoredClasses||[],a.errorCallback=a.errorCallback||console.error,a.macros=a.macros||{},tl(e,a)};function rl(r,e){return r.reduce(([t,a],n)=>e(n)?[[...t,n],a]:[t,[...a,n]],[[],[]])}window.addEventListener("load",r=>{Ri(document.body);let e=a=>{for(;a!=null;)a.nodeName=="DETAILS"&&(a.open=!0),a=a.parentNode},t=a=>{if(a.target.tagName==="A")return;let i=a.target.closest("span[data-target]").getAttribute("data-target"),l=document.querySelector(i);e(l),window.location=i};[...document.querySelectorAll("[data-target^='#']")].forEach(a=>a.addEventListener("click",t))});var al=document.querySelector("ninja-keys");fetch("./forest.json").then(r=>r.json()).then(r=>{let e=[],t='<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M480-120v-71l216-216 71 71-216 216h-71ZM120-330v-60h300v60H120Zm690-49-71-71 29-29q8-8 21-8t21 8l29 29q8 8 8 21t-8 21l-29 29ZM120-495v-60h470v60H120Zm0-165v-60h470v60H120Z"/></svg>',a='<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M120-40v-700q0-24 18-42t42-18h480q24 0 42.5 18t18.5 42v700L420-167 120-40Zm60-91 240-103 240 103v-609H180v609Zm600 1v-730H233v-60h547q24 0 42 18t18 42v730h-60ZM180-740h480-480Z"/></svg>';window.sourcePath&&e.push({id:"edit",title:"Edit current tree in Visual Studio Code",section:"Commands",hotkey:"cmd+e",icon:t,handler:()=>{window.location.href=`vscode://file/${window.sourcePath}`}});let n=h=>{let m=r[h];return m.tags?m.tags.includes("top"):!1},i=(h,m,v)=>{let g=r[h],x=`${g.taxon?g.title?`${g.taxon}. ${g.title}`:g.taxon:g.title?g.title:"Untitled"} [${h}]`;e.push({id:h,title:x,section:m,icon:v,handler:()=>{window.location.href=g.route}})},[l,u]=rl(Object.keys(r),n);l.forEach(h=>i(h,"Top Trees",a)),u.forEach(h=>i(h,"All Trees",null)),al.data=e});})(); 689 + /*! Bundled license information: 690 + 691 + @lit/reactive-element/css-tag.js: 692 + (** 693 + * @license 694 + * Copyright 2019 Google LLC 695 + * SPDX-License-Identifier: BSD-3-Clause 696 + *) 697 + 698 + @lit/reactive-element/reactive-element.js: 699 + (** 700 + * @license 701 + * Copyright 2017 Google LLC 702 + * SPDX-License-Identifier: BSD-3-Clause 703 + *) 704 + 705 + lit-html/lit-html.js: 706 + (** 707 + * @license 708 + * Copyright 2017 Google LLC 709 + * SPDX-License-Identifier: BSD-3-Clause 710 + *) 711 + 712 + lit-element/lit-element.js: 713 + (** 714 + * @license 715 + * Copyright 2017 Google LLC 716 + * SPDX-License-Identifier: BSD-3-Clause 717 + *) 718 + 719 + @lit/reactive-element/decorators/custom-element.js: 720 + (** 721 + * @license 722 + * Copyright 2017 Google LLC 723 + * SPDX-License-Identifier: BSD-3-Clause 724 + *) 725 + 726 + @lit/reactive-element/decorators/property.js: 727 + (** 728 + * @license 729 + * Copyright 2017 Google LLC 730 + * SPDX-License-Identifier: BSD-3-Clause 731 + *) 732 + 733 + @lit/reactive-element/decorators/state.js: 734 + (** 735 + * @license 736 + * Copyright 2017 Google LLC 737 + * SPDX-License-Identifier: BSD-3-Clause 738 + *) 739 + 740 + @lit/reactive-element/decorators/base.js: 741 + (** 742 + * @license 743 + * Copyright 2017 Google LLC 744 + * SPDX-License-Identifier: BSD-3-Clause 745 + *) 746 + 747 + @lit/reactive-element/decorators/event-options.js: 748 + (** 749 + * @license 750 + * Copyright 2017 Google LLC 751 + * SPDX-License-Identifier: BSD-3-Clause 752 + *) 753 + 754 + @lit/reactive-element/decorators/query.js: 755 + (** 756 + * @license 757 + * Copyright 2017 Google LLC 758 + * SPDX-License-Identifier: BSD-3-Clause 759 + *) 760 + 761 + @lit/reactive-element/decorators/query-all.js: 762 + (** 763 + * @license 764 + * Copyright 2017 Google LLC 765 + * SPDX-License-Identifier: BSD-3-Clause 766 + *) 767 + 768 + @lit/reactive-element/decorators/query-async.js: 769 + (** 770 + * @license 771 + * Copyright 2017 Google LLC 772 + * SPDX-License-Identifier: BSD-3-Clause 773 + *) 774 + 775 + @lit/reactive-element/decorators/query-assigned-elements.js: 776 + (** 777 + * @license 778 + * Copyright 2021 Google LLC 779 + * SPDX-License-Identifier: BSD-3-Clause 780 + *) 781 + 782 + @lit/reactive-element/decorators/query-assigned-nodes.js: 783 + (** 784 + * @license 785 + * Copyright 2017 Google LLC 786 + * SPDX-License-Identifier: BSD-3-Clause 787 + *) 788 + 789 + lit-html/directive.js: 790 + (** 791 + * @license 792 + * Copyright 2017 Google LLC 793 + * SPDX-License-Identifier: BSD-3-Clause 794 + *) 795 + 796 + lit-html/directive-helpers.js: 797 + (** 798 + * @license 799 + * Copyright 2020 Google LLC 800 + * SPDX-License-Identifier: BSD-3-Clause 801 + *) 802 + 803 + lit-html/directives/repeat.js: 804 + (** 805 + * @license 806 + * Copyright 2017 Google LLC 807 + * SPDX-License-Identifier: BSD-3-Clause 808 + *) 809 + 810 + lit-html/directives/live.js: 811 + (** 812 + * @license 813 + * Copyright 2020 Google LLC 814 + * SPDX-License-Identifier: BSD-3-Clause 815 + *) 816 + 817 + lit-html/async-directive.js: 818 + (** 819 + * @license 820 + * Copyright 2017 Google LLC 821 + * SPDX-License-Identifier: BSD-3-Clause 822 + *) 823 + 824 + lit-html/directives/ref.js: 825 + (** 826 + * @license 827 + * Copyright 2020 Google LLC 828 + * SPDX-License-Identifier: BSD-3-Clause 829 + *) 830 + 831 + lit-html/directives/class-map.js: 832 + (** 833 + * @license 834 + * Copyright 2018 Google LLC 835 + * SPDX-License-Identifier: BSD-3-Clause 836 + *) 837 + 838 + hotkeys-js/dist/hotkeys.esm.js: 839 + (*! 840 + * hotkeys-js v3.8.7 841 + * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. 842 + * 843 + * Copyright (c) 2021 kenny wong <wowohoo@qq.com> 844 + * http://jaywcjlove.github.io/hotkeys 845 + * 846 + * Licensed under the MIT license. 847 + *) 848 + 849 + lit-html/directives/unsafe-html.js: 850 + (** 851 + * @license 852 + * Copyright 2017 Google LLC 853 + * SPDX-License-Identifier: BSD-3-Clause 854 + *) 855 + 856 + lit-html/directives/join.js: 857 + (** 858 + * @license 859 + * Copyright 2021 Google LLC 860 + * SPDX-License-Identifier: BSD-3-Clause 861 + *) 862 + 863 + @material/mwc-icon/mwc-icon-host.css.js: 864 + (** 865 + * @license 866 + * Copyright 2021 Google LLC 867 + * SPDX-LIcense-Identifier: Apache-2.0 868 + *) 869 + 870 + @material/mwc-icon/mwc-icon.js: 871 + (** 872 + * @license 873 + * Copyright 2018 Google LLC 874 + * SPDX-License-Identifier: Apache-2.0 875 + *) 876 + */
+43
bin/forester/theme/index.html
··· 1 + <!doctype html> 2 + <html> 3 + <head> 4 + <meta name="viewport" content="width=device-width" /> 5 + <link rel="stylesheet" href="style.css" /> 6 + <link rel="icon" type="image/x-icon" href="favicon.ico" /> 7 + <script type="module" src="min.js"></script> 8 + <script 9 + src="https://unpkg.com/htmx.org@2.0.4/dist/htmx.js" 10 + integrity="sha384-oeUn82QNXPuVkGCkcrInrS1twIxKhkZiFfr2TdiuObZ3n3yIeMiqcRzkIcguaof1" 11 + crossorigin="anonymous" 12 + ></script> 13 + 14 + <link 15 + rel="stylesheet" 16 + href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css" 17 + integrity="sha384-zh0CIslj+VczCZtlzBcjt5ppRcsAmDnRem7ESsYwWwg3m/OaJ2l4x7YBZl9Kxxib" 18 + crossorigin="anonymous" 19 + /> 20 + 21 + <script 22 + src="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.js" 23 + integrity="sha384-CAltQiu9myJj3FAllEacN6FT+rOyXo+hFZKGuR2p4HB8JvJlyUHm31eLfL4eEiJL" 24 + crossorigin="anonymous" 25 + ></script> 26 + 27 + <title></title> 28 + </head> 29 + <body> 30 + <header></header> 31 + <div id="grid-wrapper"> 32 + <!-- I would like to use hx-push-url. See: https://github.com/bigskysoftware/htmx/discussions/1700 --> 33 + <article hx-get="/home" hx-trigger="load" hx-swap="innerHTML"></article> 34 + <nav id="toc"> 35 + <div class="block"> 36 + <h1>Table of contents</h1> 37 + <ul id="toc-list"></ul> 38 + </div> 39 + </nav> 40 + </div> 41 + <div id="modal-container"></div> 42 + </body> 43 + </html>
+96
bin/forester/theme/javascript-source/forester.js
··· 1 + import 'ninja-keys'; 2 + import 'katex'; 3 + 4 + import autoRenderMath from 'katex/contrib/auto-render'; 5 + 6 + function partition(array, isValid) { 7 + return array.reduce(([pass, fail], elem) => { 8 + return isValid(elem) ? [[...pass, elem], fail] : [pass, [...fail, elem]]; 9 + }, [[], []]); 10 + } 11 + 12 + window.addEventListener("load", (event) => { 13 + autoRenderMath(document.body) 14 + 15 + const openAllDetailsAbove = elt => { 16 + while (elt != null) { 17 + if (elt.nodeName == 'DETAILS') { 18 + elt.open = true 19 + } 20 + 21 + elt = elt.parentNode; 22 + } 23 + } 24 + 25 + const jumpToSubtree = evt => { 26 + if (evt.target.tagName === "A") { 27 + return; 28 + } 29 + 30 + const link = evt.target.closest('span[data-target]') 31 + const selector = link.getAttribute('data-target') 32 + const tree = document.querySelector(selector) 33 + openAllDetailsAbove(tree) 34 + window.location = selector 35 + } 36 + 37 + 38 + [...document.querySelectorAll("[data-target^='#']")].forEach( 39 + el => el.addEventListener("click", jumpToSubtree) 40 + ); 41 + }); 42 + 43 + const ninja = document.querySelector('ninja-keys'); 44 + 45 + fetch("./forest.json") 46 + .then((res) => res.json()) 47 + .then((data) => { 48 + const items = [] 49 + 50 + const editIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M480-120v-71l216-216 71 71-216 216h-71ZM120-330v-60h300v60H120Zm690-49-71-71 29-29q8-8 21-8t21 8l29 29q8 8 8 21t-8 21l-29 29ZM120-495v-60h470v60H120Zm0-165v-60h470v60H120Z"/></svg>' 51 + const bookmarkIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M120-40v-700q0-24 18-42t42-18h480q24 0 42.5 18t18.5 42v700L420-167 120-40Zm60-91 240-103 240 103v-609H180v609Zm600 1v-730H233v-60h547q24 0 42 18t18 42v730h-60ZM180-740h480-480Z"/></svg>' 52 + 53 + if (window.sourcePath) { 54 + items.push({ 55 + id: 'edit', 56 + title: 'Edit current tree in Visual Studio Code', 57 + section: 'Commands', 58 + hotkey: 'cmd+e', 59 + icon: editIcon, 60 + handler: () => { 61 + window.location.href = `vscode://file/${window.sourcePath}` 62 + } 63 + }) 64 + } 65 + 66 + const isTopTree = (addr) => { 67 + const item = data[addr] 68 + return item.tags ? item.tags.includes('top') : false 69 + } 70 + 71 + const addItemToSection = (addr, section, icon) => { 72 + const item = data[addr] 73 + const title = 74 + item.taxon 75 + ? (item.title ? `${item.taxon}. ${item.title}` : item.taxon) 76 + : (item.title ? item.title : "Untitled") 77 + const fullTitle = `${title} [${addr}]` 78 + items.push({ 79 + id: addr, 80 + title: fullTitle, 81 + section: section, 82 + icon: icon, 83 + handler: () => { 84 + window.location.href = item.route 85 + } 86 + }) 87 + } 88 + 89 + const [top, rest] = partition(Object.keys(data), isTopTree) 90 + top.forEach((addr) => addItemToSection(addr, "Top Trees", bookmarkIcon)) 91 + rest.forEach((addr) => addItemToSection(addr, "All Trees", null)) 92 + 93 + ninja.data = items 94 + }); 95 + 96 +
+1
bin/forester/theme/katex.min.css
··· 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{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.8"}.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 .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}
+34
bin/forester/theme/links.xsl
··· 1 + <?xml version="1.0"?> 2 + <!-- SPDX-License-Identifier: CC0-1.0 --> 3 + <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://www.jonmsterling.com/jms-005P.xml"> 4 + 5 + <!-- The purpose of this module is to perform flattening of nested links. --> 6 + <xsl:template match="f:link"> 7 + <span class="link {@type}"> 8 + <xsl:apply-templates mode="link-flattening" /> 9 + </span> 10 + </xsl:template> 11 + 12 + <xsl:template match="f:link//node()[not(f:link)]" mode="link-flattening"> 13 + <a href="{ancestor::f:link[1]/@href}"> 14 + <xsl:choose> 15 + <xsl:when test="ancestor::f:link[1]/@addr"> 16 + <xsl:attribute name="title"> 17 + <xsl:value-of select="ancestor::f:link[1]/@title" /> 18 + <xsl:text> [</xsl:text> 19 + <xsl:value-of 20 + select="ancestor::f:link[1]/@addr" /> 21 + <xsl:text>]</xsl:text> 22 + </xsl:attribute> 23 + </xsl:when> 24 + <xsl:otherwise> 25 + <xsl:attribute name="title"> 26 + <xsl:value-of select="ancestor::f:link[1]/@title" /> 27 + </xsl:attribute> 28 + </xsl:otherwise> 29 + </xsl:choose> 30 + <xsl:apply-templates select="." /> 31 + </a> 32 + </xsl:template> 33 + 34 + </xsl:stylesheet>
+165
bin/forester/theme/metadata.xsl
··· 1 + <?xml version="1.0"?> 2 + <!-- SPDX-License-Identifier: CC0-1.0 --> 3 + <xsl:stylesheet version="1.0" 4 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 + xmlns:f="http://www.jonmsterling.com/jms-005P.xml"> 6 + 7 + <xsl:template match="f:month[.='1']"> 8 + <xsl:text>January</xsl:text> 9 + </xsl:template> 10 + 11 + <xsl:template match="f:month[.='2']"> 12 + <xsl:text>February</xsl:text> 13 + </xsl:template> 14 + 15 + <xsl:template match="f:month[.='3']"> 16 + <xsl:text>March</xsl:text> 17 + </xsl:template> 18 + 19 + <xsl:template match="f:month[.='4']"> 20 + <xsl:text>April</xsl:text> 21 + </xsl:template> 22 + 23 + <xsl:template match="f:month[.='5']"> 24 + <xsl:text>May</xsl:text> 25 + </xsl:template> 26 + 27 + <xsl:template match="f:month[.='6']"> 28 + <xsl:text>June</xsl:text> 29 + </xsl:template> 30 + 31 + <xsl:template match="f:month[.='7']"> 32 + <xsl:text>July</xsl:text> 33 + </xsl:template> 34 + 35 + <xsl:template match="f:month[.='8']"> 36 + <xsl:text>August</xsl:text> 37 + </xsl:template> 38 + 39 + <xsl:template match="f:month[.='9']"> 40 + <xsl:text>September</xsl:text> 41 + </xsl:template> 42 + 43 + <xsl:template match="f:month[.='10']"> 44 + <xsl:text>October</xsl:text> 45 + </xsl:template> 46 + 47 + <xsl:template match="f:month[.='11']"> 48 + <xsl:text>November</xsl:text> 49 + </xsl:template> 50 + 51 + <xsl:template match="f:month[.='12']"> 52 + <xsl:text>December</xsl:text> 53 + </xsl:template> 54 + 55 + <xsl:template match="f:year"> 56 + <xsl:apply-templates /> 57 + </xsl:template> 58 + 59 + <xsl:template match="f:day"> 60 + <xsl:apply-templates /> 61 + </xsl:template> 62 + 63 + <xsl:template match="f:date" mode="date-inner"> 64 + <xsl:apply-templates select="f:month" /> 65 + <xsl:if test="f:day"> 66 + <xsl:text>&#160;</xsl:text> 67 + <xsl:apply-templates select="f:day" /> 68 + </xsl:if> 69 + <xsl:if test="f:month"> 70 + <xsl:text>,&#160;</xsl:text> 71 + </xsl:if> 72 + <xsl:apply-templates select="f:year" /> 73 + </xsl:template> 74 + 75 + <xsl:template match="f:date[@href]"> 76 + <li class="meta-item"> 77 + <a class="link local" href="{@href}"> 78 + <xsl:apply-templates select="." mode="date-inner" /> 79 + </a> 80 + </li> 81 + </xsl:template> 82 + 83 + <xsl:template match="f:date[not(@href)]"> 84 + <li class="meta-item"> 85 + <xsl:apply-templates select="." mode="date-inner" /> 86 + </li> 87 + </xsl:template> 88 + 89 + <xsl:template match="f:authors"> 90 + <xsl:if test="f:author or f:contributor"> 91 + <li class="meta-item"> 92 + <address class="author"> 93 + <xsl:for-each select="f:author"> 94 + <xsl:apply-templates /> 95 + <xsl:if test="position()!=last()"> 96 + <xsl:text>, &#x20;</xsl:text> 97 + </xsl:if> 98 + </xsl:for-each> 99 + <xsl:if test="f:contributor"> 100 + <xsl:text>&#x20;with contributions from&#x20;</xsl:text> 101 + <xsl:for-each select="f:contributor"> 102 + <xsl:apply-templates /> 103 + <xsl:if test="position()!=last()"> 104 + <xsl:text>,&#x20;</xsl:text> 105 + </xsl:if> 106 + </xsl:for-each> 107 + </xsl:if> 108 + </address> 109 + </li> 110 + </xsl:if> 111 + </xsl:template> 112 + 113 + <xsl:template match="f:meta[@name='doi']"> 114 + <li class="meta-item"> 115 + <a class="doi link" href="{concat('https://www.doi.org/', .)}"> 116 + <xsl:value-of select="." /> 117 + </a> 118 + </li> 119 + </xsl:template> 120 + 121 + <xsl:template match="f:meta[@name='orcid']"> 122 + <li class="meta-item"> 123 + <a class="orcid" href="{concat('https://orcid.org/', .)}"> 124 + <xsl:value-of select="." /> 125 + </a> 126 + </li> 127 + </xsl:template> 128 + 129 + <xsl:template match="f:meta[@name='bibtex']"> 130 + <pre> 131 + <xsl:value-of select="." /> 132 + </pre> 133 + </xsl:template> 134 + 135 + <xsl:template match="f:meta[@name='venue']|f:meta[@name='position']|f:meta[@name='institution']|f:meta[@name='source']"> 136 + <li class="meta-item"> 137 + <xsl:apply-templates /> 138 + </li> 139 + </xsl:template> 140 + 141 + <xsl:template match="f:meta[@name='external']"> 142 + <li class="meta-item"> 143 + <a class="link external" href="{.}"> 144 + <xsl:value-of select="." /> 145 + </a> 146 + </li> 147 + </xsl:template> 148 + 149 + <xsl:template match="f:meta[@name='slides']"> 150 + <li class="meta-item"> 151 + <a class="link external" href="{.}"> 152 + <xsl:text>Slides</xsl:text> 153 + </a> 154 + </li> 155 + </xsl:template> 156 + 157 + <xsl:template match="f:meta[@name='video']"> 158 + <li class="meta-item"> 159 + <a class="link external" href="{.}"> 160 + <xsl:text>Video</xsl:text> 161 + </a> 162 + </li> 163 + </xsl:template> 164 + 165 + </xsl:stylesheet>
+514
bin/forester/theme/package-lock.json
··· 1 + { 2 + "name": "theme", 3 + "lockfileVersion": 3, 4 + "requires": true, 5 + "packages": { 6 + "": { 7 + "dependencies": { 8 + "esbuild": "^0.18.15", 9 + "katex": "^0.16.8", 10 + "ninja-keys": "^1.2.2" 11 + } 12 + }, 13 + "node_modules/@esbuild/android-arm": { 14 + "version": "0.18.20", 15 + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", 16 + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", 17 + "cpu": [ 18 + "arm" 19 + ], 20 + "license": "MIT", 21 + "optional": true, 22 + "os": [ 23 + "android" 24 + ], 25 + "engines": { 26 + "node": ">=12" 27 + } 28 + }, 29 + "node_modules/@esbuild/android-arm64": { 30 + "version": "0.18.20", 31 + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", 32 + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", 33 + "cpu": [ 34 + "arm64" 35 + ], 36 + "license": "MIT", 37 + "optional": true, 38 + "os": [ 39 + "android" 40 + ], 41 + "engines": { 42 + "node": ">=12" 43 + } 44 + }, 45 + "node_modules/@esbuild/android-x64": { 46 + "version": "0.18.20", 47 + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", 48 + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", 49 + "cpu": [ 50 + "x64" 51 + ], 52 + "license": "MIT", 53 + "optional": true, 54 + "os": [ 55 + "android" 56 + ], 57 + "engines": { 58 + "node": ">=12" 59 + } 60 + }, 61 + "node_modules/@esbuild/darwin-arm64": { 62 + "version": "0.18.20", 63 + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", 64 + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", 65 + "cpu": [ 66 + "arm64" 67 + ], 68 + "license": "MIT", 69 + "optional": true, 70 + "os": [ 71 + "darwin" 72 + ], 73 + "engines": { 74 + "node": ">=12" 75 + } 76 + }, 77 + "node_modules/@esbuild/darwin-x64": { 78 + "version": "0.18.20", 79 + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", 80 + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", 81 + "cpu": [ 82 + "x64" 83 + ], 84 + "license": "MIT", 85 + "optional": true, 86 + "os": [ 87 + "darwin" 88 + ], 89 + "engines": { 90 + "node": ">=12" 91 + } 92 + }, 93 + "node_modules/@esbuild/freebsd-arm64": { 94 + "version": "0.18.20", 95 + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", 96 + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", 97 + "cpu": [ 98 + "arm64" 99 + ], 100 + "license": "MIT", 101 + "optional": true, 102 + "os": [ 103 + "freebsd" 104 + ], 105 + "engines": { 106 + "node": ">=12" 107 + } 108 + }, 109 + "node_modules/@esbuild/freebsd-x64": { 110 + "version": "0.18.20", 111 + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", 112 + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", 113 + "cpu": [ 114 + "x64" 115 + ], 116 + "license": "MIT", 117 + "optional": true, 118 + "os": [ 119 + "freebsd" 120 + ], 121 + "engines": { 122 + "node": ">=12" 123 + } 124 + }, 125 + "node_modules/@esbuild/linux-arm": { 126 + "version": "0.18.20", 127 + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", 128 + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", 129 + "cpu": [ 130 + "arm" 131 + ], 132 + "license": "MIT", 133 + "optional": true, 134 + "os": [ 135 + "linux" 136 + ], 137 + "engines": { 138 + "node": ">=12" 139 + } 140 + }, 141 + "node_modules/@esbuild/linux-arm64": { 142 + "version": "0.18.20", 143 + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", 144 + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", 145 + "cpu": [ 146 + "arm64" 147 + ], 148 + "license": "MIT", 149 + "optional": true, 150 + "os": [ 151 + "linux" 152 + ], 153 + "engines": { 154 + "node": ">=12" 155 + } 156 + }, 157 + "node_modules/@esbuild/linux-ia32": { 158 + "version": "0.18.20", 159 + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", 160 + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", 161 + "cpu": [ 162 + "ia32" 163 + ], 164 + "license": "MIT", 165 + "optional": true, 166 + "os": [ 167 + "linux" 168 + ], 169 + "engines": { 170 + "node": ">=12" 171 + } 172 + }, 173 + "node_modules/@esbuild/linux-loong64": { 174 + "version": "0.18.20", 175 + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", 176 + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", 177 + "cpu": [ 178 + "loong64" 179 + ], 180 + "license": "MIT", 181 + "optional": true, 182 + "os": [ 183 + "linux" 184 + ], 185 + "engines": { 186 + "node": ">=12" 187 + } 188 + }, 189 + "node_modules/@esbuild/linux-mips64el": { 190 + "version": "0.18.20", 191 + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", 192 + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", 193 + "cpu": [ 194 + "mips64el" 195 + ], 196 + "license": "MIT", 197 + "optional": true, 198 + "os": [ 199 + "linux" 200 + ], 201 + "engines": { 202 + "node": ">=12" 203 + } 204 + }, 205 + "node_modules/@esbuild/linux-ppc64": { 206 + "version": "0.18.20", 207 + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", 208 + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", 209 + "cpu": [ 210 + "ppc64" 211 + ], 212 + "license": "MIT", 213 + "optional": true, 214 + "os": [ 215 + "linux" 216 + ], 217 + "engines": { 218 + "node": ">=12" 219 + } 220 + }, 221 + "node_modules/@esbuild/linux-riscv64": { 222 + "version": "0.18.20", 223 + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", 224 + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", 225 + "cpu": [ 226 + "riscv64" 227 + ], 228 + "license": "MIT", 229 + "optional": true, 230 + "os": [ 231 + "linux" 232 + ], 233 + "engines": { 234 + "node": ">=12" 235 + } 236 + }, 237 + "node_modules/@esbuild/linux-s390x": { 238 + "version": "0.18.20", 239 + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", 240 + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", 241 + "cpu": [ 242 + "s390x" 243 + ], 244 + "license": "MIT", 245 + "optional": true, 246 + "os": [ 247 + "linux" 248 + ], 249 + "engines": { 250 + "node": ">=12" 251 + } 252 + }, 253 + "node_modules/@esbuild/linux-x64": { 254 + "version": "0.18.20", 255 + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", 256 + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", 257 + "cpu": [ 258 + "x64" 259 + ], 260 + "license": "MIT", 261 + "optional": true, 262 + "os": [ 263 + "linux" 264 + ], 265 + "engines": { 266 + "node": ">=12" 267 + } 268 + }, 269 + "node_modules/@esbuild/netbsd-x64": { 270 + "version": "0.18.20", 271 + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", 272 + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", 273 + "cpu": [ 274 + "x64" 275 + ], 276 + "license": "MIT", 277 + "optional": true, 278 + "os": [ 279 + "netbsd" 280 + ], 281 + "engines": { 282 + "node": ">=12" 283 + } 284 + }, 285 + "node_modules/@esbuild/openbsd-x64": { 286 + "version": "0.18.20", 287 + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", 288 + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", 289 + "cpu": [ 290 + "x64" 291 + ], 292 + "license": "MIT", 293 + "optional": true, 294 + "os": [ 295 + "openbsd" 296 + ], 297 + "engines": { 298 + "node": ">=12" 299 + } 300 + }, 301 + "node_modules/@esbuild/sunos-x64": { 302 + "version": "0.18.20", 303 + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", 304 + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", 305 + "cpu": [ 306 + "x64" 307 + ], 308 + "license": "MIT", 309 + "optional": true, 310 + "os": [ 311 + "sunos" 312 + ], 313 + "engines": { 314 + "node": ">=12" 315 + } 316 + }, 317 + "node_modules/@esbuild/win32-arm64": { 318 + "version": "0.18.20", 319 + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", 320 + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", 321 + "cpu": [ 322 + "arm64" 323 + ], 324 + "license": "MIT", 325 + "optional": true, 326 + "os": [ 327 + "win32" 328 + ], 329 + "engines": { 330 + "node": ">=12" 331 + } 332 + }, 333 + "node_modules/@esbuild/win32-ia32": { 334 + "version": "0.18.20", 335 + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", 336 + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", 337 + "cpu": [ 338 + "ia32" 339 + ], 340 + "license": "MIT", 341 + "optional": true, 342 + "os": [ 343 + "win32" 344 + ], 345 + "engines": { 346 + "node": ">=12" 347 + } 348 + }, 349 + "node_modules/@esbuild/win32-x64": { 350 + "version": "0.18.20", 351 + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", 352 + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", 353 + "cpu": [ 354 + "x64" 355 + ], 356 + "license": "MIT", 357 + "optional": true, 358 + "os": [ 359 + "win32" 360 + ], 361 + "engines": { 362 + "node": ">=12" 363 + } 364 + }, 365 + "node_modules/@lit-labs/ssr-dom-shim": { 366 + "version": "1.2.0", 367 + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz", 368 + "integrity": "sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g==", 369 + "license": "BSD-3-Clause" 370 + }, 371 + "node_modules/@lit/reactive-element": { 372 + "version": "1.6.3", 373 + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", 374 + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", 375 + "license": "BSD-3-Clause", 376 + "dependencies": { 377 + "@lit-labs/ssr-dom-shim": "^1.0.0" 378 + } 379 + }, 380 + "node_modules/@material/mwc-icon": { 381 + "version": "0.25.3", 382 + "resolved": "https://registry.npmjs.org/@material/mwc-icon/-/mwc-icon-0.25.3.tgz", 383 + "integrity": "sha512-36076AWZIRSr8qYOLjuDDkxej/HA0XAosrj7TS1ZeLlUBnLUtbDtvc1S7KSa0hqez7ouzOqGaWK24yoNnTa2OA==", 384 + "deprecated": "MWC beta is longer supported. Please upgrade to @material/web", 385 + "license": "Apache-2.0", 386 + "dependencies": { 387 + "lit": "^2.0.0", 388 + "tslib": "^2.0.1" 389 + } 390 + }, 391 + "node_modules/@types/trusted-types": { 392 + "version": "2.0.7", 393 + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", 394 + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", 395 + "license": "MIT" 396 + }, 397 + "node_modules/commander": { 398 + "version": "8.3.0", 399 + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", 400 + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", 401 + "license": "MIT", 402 + "engines": { 403 + "node": ">= 12" 404 + } 405 + }, 406 + "node_modules/esbuild": { 407 + "version": "0.18.20", 408 + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", 409 + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", 410 + "hasInstallScript": true, 411 + "license": "MIT", 412 + "bin": { 413 + "esbuild": "bin/esbuild" 414 + }, 415 + "engines": { 416 + "node": ">=12" 417 + }, 418 + "optionalDependencies": { 419 + "@esbuild/android-arm": "0.18.20", 420 + "@esbuild/android-arm64": "0.18.20", 421 + "@esbuild/android-x64": "0.18.20", 422 + "@esbuild/darwin-arm64": "0.18.20", 423 + "@esbuild/darwin-x64": "0.18.20", 424 + "@esbuild/freebsd-arm64": "0.18.20", 425 + "@esbuild/freebsd-x64": "0.18.20", 426 + "@esbuild/linux-arm": "0.18.20", 427 + "@esbuild/linux-arm64": "0.18.20", 428 + "@esbuild/linux-ia32": "0.18.20", 429 + "@esbuild/linux-loong64": "0.18.20", 430 + "@esbuild/linux-mips64el": "0.18.20", 431 + "@esbuild/linux-ppc64": "0.18.20", 432 + "@esbuild/linux-riscv64": "0.18.20", 433 + "@esbuild/linux-s390x": "0.18.20", 434 + "@esbuild/linux-x64": "0.18.20", 435 + "@esbuild/netbsd-x64": "0.18.20", 436 + "@esbuild/openbsd-x64": "0.18.20", 437 + "@esbuild/sunos-x64": "0.18.20", 438 + "@esbuild/win32-arm64": "0.18.20", 439 + "@esbuild/win32-ia32": "0.18.20", 440 + "@esbuild/win32-x64": "0.18.20" 441 + } 442 + }, 443 + "node_modules/hotkeys-js": { 444 + "version": "3.8.7", 445 + "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.8.7.tgz", 446 + "integrity": "sha512-ckAx3EkUr5XjDwjEHDorHxRO2Kb7z6Z2Sxul4MbBkN8Nho7XDslQsgMJT+CiJ5Z4TgRxxvKHEpuLE3imzqy4Lg==", 447 + "license": "MIT" 448 + }, 449 + "node_modules/katex": { 450 + "version": "0.16.11", 451 + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", 452 + "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", 453 + "funding": [ 454 + "https://opencollective.com/katex", 455 + "https://github.com/sponsors/katex" 456 + ], 457 + "license": "MIT", 458 + "dependencies": { 459 + "commander": "^8.3.0" 460 + }, 461 + "bin": { 462 + "katex": "cli.js" 463 + } 464 + }, 465 + "node_modules/lit": { 466 + "version": "2.2.6", 467 + "resolved": "https://registry.npmjs.org/lit/-/lit-2.2.6.tgz", 468 + "integrity": "sha512-K2vkeGABfSJSfkhqHy86ujchJs3NR9nW1bEEiV+bXDkbiQ60Tv5GUausYN2mXigZn8lC1qXuc46ArQRKYmumZw==", 469 + "license": "BSD-3-Clause", 470 + "dependencies": { 471 + "@lit/reactive-element": "^1.3.0", 472 + "lit-element": "^3.2.0", 473 + "lit-html": "^2.2.0" 474 + } 475 + }, 476 + "node_modules/lit-element": { 477 + "version": "3.3.3", 478 + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", 479 + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", 480 + "license": "BSD-3-Clause", 481 + "dependencies": { 482 + "@lit-labs/ssr-dom-shim": "^1.1.0", 483 + "@lit/reactive-element": "^1.3.0", 484 + "lit-html": "^2.8.0" 485 + } 486 + }, 487 + "node_modules/lit-html": { 488 + "version": "2.8.0", 489 + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", 490 + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", 491 + "license": "BSD-3-Clause", 492 + "dependencies": { 493 + "@types/trusted-types": "^2.0.2" 494 + } 495 + }, 496 + "node_modules/ninja-keys": { 497 + "version": "1.2.2", 498 + "resolved": "https://registry.npmjs.org/ninja-keys/-/ninja-keys-1.2.2.tgz", 499 + "integrity": "sha512-ylo8jzKowi3XBHkgHRjBJaKQkl32WRLr7kRiA0ajiku11vHRDJ2xANtTScR5C7XlDwKEOYvUPesCKacUeeLAYw==", 500 + "license": "MIT", 501 + "dependencies": { 502 + "@material/mwc-icon": "0.25.3", 503 + "hotkeys-js": "3.8.7", 504 + "lit": "2.2.6" 505 + } 506 + }, 507 + "node_modules/tslib": { 508 + "version": "2.6.3", 509 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", 510 + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", 511 + "license": "0BSD" 512 + } 513 + } 514 + }
+7
bin/forester/theme/package.json
··· 1 + { 2 + "dependencies": { 3 + "esbuild": "^0.18.15", 4 + "katex": "^0.16.8", 5 + "ninja-keys": "^1.2.2" 6 + } 7 + }
+624
bin/forester/theme/style.css
··· 1 + /* SPDX-License-Identifier: CC0-1.0 */ 2 + 3 + .katex { 4 + font-size: 1.15em !important; 5 + } 6 + 7 + /* inria-sans-300 - latin_latin-ext */ 8 + @font-face { 9 + font-display: swap; 10 + /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ 11 + font-family: 'Inria Sans'; 12 + font-style: normal; 13 + font-weight: 300; 14 + src: url('fonts/inria-sans-v14-latin_latin-ext-300.woff2') format('woff2'); 15 + /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ 16 + } 17 + 18 + /* inria-sans-300italic - latin_latin-ext */ 19 + @font-face { 20 + font-display: swap; 21 + /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ 22 + font-family: 'Inria Sans'; 23 + font-style: italic; 24 + font-weight: 300; 25 + src: url('fonts/inria-sans-v14-latin_latin-ext-300italic.woff2') format('woff2'); 26 + /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ 27 + } 28 + 29 + /* inria-sans-regular - latin_latin-ext */ 30 + @font-face { 31 + font-display: swap; 32 + /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ 33 + font-family: 'Inria Sans'; 34 + font-style: normal; 35 + font-weight: 400; 36 + src: url('fonts/inria-sans-v14-latin_latin-ext-regular.woff2') format('woff2'); 37 + /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ 38 + } 39 + 40 + /* inria-sans-italic - latin_latin-ext */ 41 + @font-face { 42 + font-display: swap; 43 + /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ 44 + font-family: 'Inria Sans'; 45 + font-style: italic; 46 + font-weight: 400; 47 + src: url('fonts/inria-sans-v14-latin_latin-ext-italic.woff2') format('woff2'); 48 + /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ 49 + } 50 + 51 + /* inria-sans-700 - latin_latin-ext */ 52 + @font-face { 53 + font-display: swap; 54 + /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ 55 + font-family: 'Inria Sans'; 56 + font-style: normal; 57 + font-weight: 700; 58 + src: url('fonts/inria-sans-v14-latin_latin-ext-700.woff2') format('woff2'); 59 + /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ 60 + } 61 + 62 + /* inria-sans-700italic - latin_latin-ext */ 63 + @font-face { 64 + font-display: swap; 65 + /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ 66 + font-family: 'Inria Sans'; 67 + font-style: italic; 68 + font-weight: 700; 69 + src: url('fonts/inria-sans-v14-latin_latin-ext-700italic.woff2') format('woff2'); 70 + /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ 71 + } 72 + 73 + :root { 74 + --content-gap: 15px; 75 + --radius: 5px; 76 + } 77 + 78 + h1, 79 + h2, 80 + h3, 81 + h4, 82 + h5, 83 + h6 { 84 + line-height: 1.2; 85 + margin-bottom: 0; 86 + } 87 + 88 + h5, 89 + h6, 90 + p { 91 + margin-top: 0; 92 + } 93 + 94 + h1, 95 + h2, 96 + h3, 97 + h4 { 98 + margin-top: .5em; 99 + } 100 + 101 + pre, 102 + img, 103 + .katex-display, 104 + section, 105 + center { 106 + overflow-y: hidden; 107 + } 108 + 109 + pre { 110 + border-radius: var(--radius); 111 + background-color: rgba(0, 100, 100, 0.04); 112 + padding: .5em; 113 + font-size: 11pt; 114 + margin-top: 0em; 115 + overflow-x: auto; 116 + white-space: pre-wrap; 117 + white-space: -moz-pre-wrap; 118 + white-space: -pre-wrap; 119 + white-space: -o-pre-wrap; 120 + word-wrap: break-word; 121 + } 122 + 123 + code { 124 + border-radius: var(--radius); 125 + background-color: rgba(0, 100, 100, 0.04); 126 + padding: 0.2em; 127 + font-size: 0.9em; 128 + } 129 + 130 + body { 131 + font-family: "Inria Sans"; 132 + font-size: 12pt; 133 + line-height: 1.55; 134 + } 135 + 136 + math { 137 + font-size: 1.12em; 138 + } 139 + 140 + mrow:hover { 141 + background-color: rgba(0, 100, 255, 0.04); 142 + } 143 + 144 + .logo { 145 + font-weight: 1000; 146 + font-size: 24px; 147 + } 148 + 149 + .logo a { 150 + color: #666; 151 + text-decoration: none; 152 + } 153 + 154 + .logo a:hover { 155 + color: #aaa; 156 + } 157 + 158 + .block.hide-metadata>details>summary>header>.metadata { 159 + display: none; 160 + } 161 + 162 + article>section>details>summary>header>h1>.taxon { 163 + display: block; 164 + font-size: .9em; 165 + color: #888; 166 + padding-bottom: 5pt; 167 + } 168 + 169 + section section[data-taxon="Reference"]>details>summary>header>h1>.taxon, 170 + section section[data-taxon="Person"]>details>summary>header>h1>.taxon { 171 + display: none; 172 + } 173 + 174 + footer>section { 175 + margin-bottom: 1em; 176 + } 177 + 178 + footer h2 { 179 + font-size: 14pt; 180 + } 181 + 182 + .metadata>address { 183 + display: inline; 184 + } 185 + 186 + @media only screen and (max-width: 1000px) { 187 + body { 188 + margin-top: 1em; 189 + margin-left: .5em; 190 + margin-right: .5em; 191 + transition: ease all .2s; 192 + } 193 + 194 + #grid-wrapper>nav { 195 + display: none; 196 + transition: ease all .2s; 197 + } 198 + } 199 + 200 + @media only screen and (min-width: 1000px) { 201 + body { 202 + margin-top: 2em; 203 + margin-left: 2em; 204 + transition: ease all .2s; 205 + } 206 + 207 + #grid-wrapper { 208 + display: grid; 209 + grid-template-columns: 90ex; 210 + } 211 + } 212 + 213 + body>header { 214 + margin-bottom: 0.5em; 215 + } 216 + 217 + #grid-wrapper>article { 218 + max-width: 90ex; 219 + margin-right: auto; 220 + grid-column: 1; 221 + } 222 + 223 + #grid-wrapper>nav { 224 + grid-column: 2; 225 + } 226 + 227 + details>summary>header { 228 + display: inline; 229 + } 230 + 231 + a.heading-link { 232 + box-shadow: none; 233 + } 234 + 235 + details h1 { 236 + font-size: 13pt; 237 + display: inline; 238 + } 239 + 240 + section .block[data-taxon] details>summary>header>h1 { 241 + font-size: 12pt; 242 + } 243 + 244 + span.taxon { 245 + color: #444; 246 + font-weight: bolder; 247 + } 248 + 249 + 250 + .link-list>section>details>summary>header h1 { 251 + font-size: 12pt; 252 + } 253 + 254 + 255 + article>section>details>summary>header>h1 { 256 + font-size: 1.5em; 257 + } 258 + 259 + details>summary { 260 + list-style-type: none; 261 + } 262 + 263 + details>summary::marker, 264 + details>summary::-webkit-details-marker { 265 + display: none; 266 + } 267 + 268 + article>section>details>summary>header { 269 + display: block; 270 + margin-bottom: .5em; 271 + } 272 + 273 + section.block>details { 274 + margin-bottom: 0.4em; 275 + } 276 + 277 + 278 + section.block>details[open] { 279 + margin-bottom: 1em; 280 + } 281 + 282 + 283 + .link-list>section.block>details { 284 + margin-bottom: .25em; 285 + } 286 + 287 + nav#toc { 288 + margin-left: 1em; 289 + } 290 + 291 + nav#toc h1 { 292 + margin-top: 0; 293 + font-size: 16pt; 294 + } 295 + 296 + nav#toc, 297 + nav#toc a { 298 + color: #555; 299 + } 300 + 301 + nav#toc .link { 302 + box-shadow: none; 303 + text-decoration: none; 304 + } 305 + 306 + nav#toc a.bullet { 307 + opacity: 0.7; 308 + margin-left: 0.4em; 309 + margin-right: 0.3em; 310 + padding-left: 0.2em; 311 + padding-right: 0.2em; 312 + text-decoration: none; 313 + } 314 + 315 + nav#toc h2 { 316 + font-size: 1.1em; 317 + } 318 + 319 + nav#toc ul { 320 + list-style-type: none; 321 + } 322 + 323 + nav#toc li > ul { 324 + padding-left: 1em; 325 + } 326 + 327 + nav#toc li { 328 + list-style-position: inside; 329 + } 330 + 331 + .block { 332 + border-radius: var(--radius) 333 + } 334 + 335 + .block:hover { 336 + background-color: rgba(0, 100, 255, 0.04); 337 + } 338 + 339 + .block.highlighted { 340 + border-style: solid; 341 + border-width: 1pt; 342 + } 343 + 344 + .highlighted { 345 + background-color: rgba(255, 255, 140, .3); 346 + border-color: #ccc; 347 + } 348 + 349 + .highlighted:hover { 350 + background-color: rgba(255, 255, 140, .6); 351 + border-color: #aaa; 352 + } 353 + 354 + .slug, 355 + .doi, 356 + .orcid { 357 + color: gray; 358 + font-weight: 200; 359 + } 360 + 361 + .edit-button { 362 + color: rgb(180, 180, 180); 363 + font-weight: 200; 364 + } 365 + 366 + .block { 367 + padding-left: 5px; 368 + padding-right: 10px; 369 + padding-bottom: 2px; 370 + border-radius: 5px; 371 + } 372 + 373 + .link.external { 374 + text-decoration: underline; 375 + } 376 + 377 + a.link.local, 378 + .link.local a, 379 + a.slug { 380 + box-shadow: none; 381 + text-decoration-line: underline; 382 + text-decoration-style: dotted; 383 + } 384 + 385 + ninja-keys::part(ninja-action) { 386 + white-space: nowrap; 387 + } 388 + 389 + body { 390 + hyphens: auto; 391 + } 392 + 393 + table { 394 + margin-bottom: 1em; 395 + } 396 + 397 + table.macros { 398 + overflow-x: visible; 399 + overflow-y: visible; 400 + font-size: 0.9em; 401 + } 402 + 403 + table.macros td { 404 + padding-left: 5pt; 405 + padding-right: 15pt; 406 + vertical-align: baseline; 407 + } 408 + 409 + th { 410 + text-align: left; 411 + } 412 + 413 + th, 414 + td { 415 + padding: 0 15px; 416 + vertical-align: top; 417 + } 418 + 419 + td.macro-name, 420 + td.macro-body { 421 + white-space: nowrap; 422 + } 423 + 424 + td.macro-doc { 425 + font-size: .9em; 426 + } 427 + 428 + .enclosing.macro-scope>.enclosing { 429 + border-radius: 2px; 430 + } 431 + 432 + .enclosing.macro-scope>.enclosing:hover { 433 + background-color: rgba(0, 100, 255, 0.1); 434 + } 435 + 436 + [aria-label][role~="tooltip"]::after { 437 + font-family: "Inria Sans"; 438 + } 439 + 440 + .tooltip { 441 + position: relative; 442 + } 443 + 444 + .inline.tooltip { 445 + display: inline-block; 446 + } 447 + 448 + .display.tooltip { 449 + display: block; 450 + } 451 + 452 + 453 + /* The tooltip class is applied to the span element that is the tooltip */ 454 + 455 + .tooltip .tooltiptext { 456 + visibility: hidden; 457 + white-space: nowrap; 458 + min-width: fit-content; 459 + background-color: black; 460 + color: #fff; 461 + padding-left: 5px; 462 + padding-top: 5px; 463 + padding-right: 10px; 464 + border-radius: 6px; 465 + position: absolute; 466 + z-index: 1; 467 + top: 100%; 468 + left: 50%; 469 + margin-left: -60px; 470 + opacity: 0; 471 + transition: opacity 0.3s; 472 + } 473 + 474 + .tooltip .tooltiptext::after { 475 + content: ""; 476 + position: absolute; 477 + top: 100%; 478 + left: 50%; 479 + margin-left: -5px; 480 + border-width: 5px; 481 + } 482 + 483 + 484 + /* Show the tooltip */ 485 + 486 + .tooltip:hover .tooltiptext { 487 + visibility: visible; 488 + opacity: 1; 489 + } 490 + 491 + .tooltiptext a { 492 + color: white 493 + } 494 + 495 + .macro-doc { 496 + font-style: italic; 497 + } 498 + 499 + .macro-name { 500 + white-space: nowrap; 501 + } 502 + 503 + .macro-is-private { 504 + color: var(--secondary); 505 + } 506 + 507 + blockquote { 508 + border-inline-start: 1px solid var(--secondary); 509 + } 510 + 511 + a.slug:hover, 512 + a.bullet:hover, 513 + .edit-button:hover, 514 + .link:hover { 515 + background-color: rgba(0, 100, 255, .1); 516 + } 517 + 518 + .link { 519 + cursor: pointer; 520 + } 521 + 522 + a { 523 + color: black; 524 + text-decoration: inherit; 525 + } 526 + 527 + .nowrap { 528 + white-space: nowrap; 529 + } 530 + 531 + .nocite { 532 + display: none 533 + } 534 + 535 + blockquote { 536 + font-style: italic; 537 + } 538 + 539 + 540 + 541 + address { 542 + display: inline; 543 + } 544 + 545 + 546 + .metadata ul { 547 + padding-left: 0; 548 + display: inline; 549 + } 550 + 551 + .metadata li::after { 552 + content: " · "; 553 + } 554 + 555 + .metadata li:last-child::after { 556 + content: ""; 557 + } 558 + 559 + .metadata ul li { 560 + display: inline 561 + } 562 + 563 + img { 564 + object-fit: cover; 565 + max-width: 100%; 566 + } 567 + 568 + figure { 569 + text-align: center; 570 + } 571 + 572 + figcaption { 573 + font-style: italic; 574 + padding: 3px; 575 + } 576 + 577 + mark { 578 + background-color: rgb(255, 255, 151); 579 + } 580 + 581 + hr { 582 + margin-top: 10px; 583 + margin-bottom: 20px; 584 + background-color: gainsboro; 585 + border: 0 none; 586 + width: 100%; 587 + height: 2px; 588 + } 589 + 590 + ul, ol { 591 + padding-bottom: .5em; 592 + } 593 + 594 + ol { 595 + list-style-type: decimal; 596 + } 597 + 598 + ol li ol { 599 + list-style-type: lower-alpha; 600 + } 601 + 602 + ol li ol li ol { 603 + list-style-type: lower-roman; 604 + } 605 + 606 + .error, .info { 607 + border-radius: 4pt; 608 + padding-left: 3pt; 609 + padding-right: 3pt; 610 + padding-top: 1pt; 611 + padding-bottom: 2pt; 612 + font-weight: bold; 613 + } 614 + 615 + .error { 616 + background-color: red; 617 + color: white; 618 + } 619 + 620 + 621 + .info { 622 + background-color: #bbb; 623 + color: white; 624 + }
+395
bin/forester/theme/tree.xsl
··· 1 + <?xml version="1.0"?> 2 + <!-- SPDX-License-Identifier: CC0-1.0 --> 3 + <xsl:stylesheet version="1.0" 4 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 + xmlns:f="http://www.jonmsterling.com/jms-005P.xml"> 6 + 7 + <xsl:key name="tree-with-addr" match="/f:tree/f:mainmatter//f:tree" use="f:frontmatter/f:addr/text()" /> 8 + 9 + <xsl:template match="/"> 10 + <html> 11 + <head> 12 + <meta name="viewport" content="width=device-width" /> 13 + <link rel="stylesheet" href="style.css" /> 14 + <link rel="stylesheet" href="katex.min.css" /> 15 + <script type="text/javascript"> 16 + <xsl:if test="/f:tree/f:frontmatter/f:source-path"> 17 + <xsl:text>window.sourcePath = '</xsl:text> 18 + <xsl:value-of select="/f:tree/f:frontmatter/f:source-path" /> 19 + <xsl:text>'</xsl:text> 20 + </xsl:if> 21 + </script> 22 + <script type="module" src="forester.js"></script> 23 + <title> 24 + <xsl:value-of select="/f:tree/f:frontmatter/f:title[@text]" /> 25 + </title> 26 + </head> 27 + <body> 28 + <ninja-keys placeholder="Start typing a note title or ID"></ninja-keys> 29 + <xsl:if test="not(/f:tree[@root = 'true'])"> 30 + <header class="header"> 31 + <nav class="nav"> 32 + <div class="logo"> 33 + <a href="index.xml" title="Home"> 34 + <xsl:text>« Home</xsl:text> 35 + </a> 36 + </div> 37 + </nav> 38 + </header> 39 + </xsl:if> 40 + <div id="grid-wrapper"> 41 + <article> 42 + <xsl:apply-templates select="f:tree" /> 43 + </article> 44 + <xsl:if test="f:tree/f:mainmatter/f:tree[not(@toc='false')] and not(/f:tree/f:frontmatter/f:meta[@name = 'toc']/.='false')"> 45 + <nav id="toc"> 46 + <div class="block"> 47 + <h1>Table of Contents</h1> 48 + <xsl:apply-templates select="f:tree/f:mainmatter" mode="toc" /> 49 + </div> 50 + </nav> 51 + </xsl:if> 52 + </div> 53 + </body> 54 + </html> 55 + </xsl:template> 56 + 57 + <xsl:template match="f:tree" mode="tree-taxon-with-number"> 58 + <xsl:param name="suffix" select="''" /> 59 + <xsl:param name="taxon" select="f:frontmatter/f:taxon" /> 60 + <xsl:param name="number" select="f:frontmatter/f:number" /> 61 + <xsl:param name="fallback-number" /> 62 + <xsl:param name="in-backmatter" select="ancestor::f:backmatter" /> 63 + 64 + <xsl:variable name="tree-is-root" select="not(parent::*)" /> 65 + 66 + <xsl:variable name="explicitly-unnumbered" select="boolean(ancestor-or-self::f:tree[@numbered='false' or @toc='false'])" /> 67 + <xsl:variable name="implicitly-unnumbered" select="count(../f:tree) = 1 and not(count(f:mainmatter/f:tree) > 1)" /> 68 + 69 + <xsl:variable name="should-number" select="$number != '' or (not($in-backmatter) and not($tree-is-root) and not($explicitly-unnumbered)) and not($implicitly-unnumbered)" /> 70 + 71 + <xsl:if test="$taxon != ''"> 72 + <xsl:value-of select="$taxon" /> 73 + <xsl:if test="$should-number or $fallback-number != ''"> 74 + <xsl:text>&#160;</xsl:text> 75 + </xsl:if> 76 + </xsl:if> 77 + 78 + <xsl:choose> 79 + <xsl:when test="$should-number"> 80 + <xsl:choose> 81 + <xsl:when test="$number != ''"> 82 + <xsl:value-of select="$number" /> 83 + </xsl:when> 84 + <xsl:otherwise> 85 + <xsl:number format="1.1" count="f:tree[ancestor::f:tree and (not(@toc='false' or @numbered='false'))]" level="multiple" /> 86 + </xsl:otherwise> 87 + </xsl:choose> 88 + </xsl:when> 89 + <xsl:when test="$fallback-number != ''"> 90 + <xsl:value-of select="$fallback-number" /> 91 + </xsl:when> 92 + </xsl:choose> 93 + 94 + <xsl:if test="$taxon != '' or $fallback-number != '' or $should-number"> 95 + <xsl:value-of select="$suffix" /> 96 + </xsl:if> 97 + </xsl:template> 98 + 99 + <xsl:template match="f:tree" mode="contextual-number"> 100 + <xsl:param name="suffix" select="''" /> 101 + <xsl:param name="number" select="f:frontmatter/f:number" /> 102 + <xsl:param name="fallback-number" /> 103 + <xsl:param name="in-backmatter" select="ancestor::f:backmatter" /> 104 + 105 + <xsl:variable name="tree-is-root" select="not(parent::*)" /> 106 + 107 + <xsl:variable name="explicitly-unnumbered" select="boolean(ancestor-or-self::f:tree[@numbered='false' or @toc='false'])" /> 108 + <xsl:variable name="implicitly-unnumbered" select="count(../f:tree) = 1 and not(count(f:mainmatter/f:tree) > 1)" /> 109 + 110 + <xsl:variable name="should-number" select="$number != '' or (not($in-backmatter) and not($tree-is-root) and not($explicitly-unnumbered)) and not($implicitly-unnumbered)" /> 111 + 112 + <xsl:choose> 113 + <xsl:when test="$should-number"> 114 + <xsl:choose> 115 + <xsl:when test="$number != ''"> 116 + <xsl:value-of select="$number" /> 117 + </xsl:when> 118 + <xsl:otherwise> 119 + <xsl:number format="1.1" count="f:tree[ancestor::f:tree and (not(@toc='false' or @numbered='false'))]" level="multiple" /> 120 + </xsl:otherwise> 121 + </xsl:choose> 122 + </xsl:when> 123 + <xsl:when test="$fallback-number != ''"> 124 + <xsl:value-of select="$fallback-number" /> 125 + </xsl:when> 126 + </xsl:choose> 127 + 128 + <xsl:if test="$fallback-number != '' or $should-number"> 129 + <xsl:value-of select="$suffix" /> 130 + </xsl:if> 131 + </xsl:template> 132 + 133 + <xsl:template match="f:tree" mode="toc"> 134 + <li> 135 + <xsl:for-each select="f:frontmatter"> 136 + <a class="bullet"> 137 + <xsl:choose> 138 + <xsl:when test="f:addr and f:route"> 139 + <xsl:attribute name="href"> 140 + <xsl:value-of select="f:route" /> 141 + </xsl:attribute> 142 + <xsl:attribute name="title"> 143 + <xsl:value-of select="f:title[@text]" /> 144 + <xsl:text>&#160;[</xsl:text> 145 + <xsl:value-of select="f:addr" /> 146 + <xsl:text>]</xsl:text> 147 + </xsl:attribute> 148 + </xsl:when> 149 + <xsl:otherwise> 150 + <xsl:attribute name="href"> 151 + <xsl:text>#</xsl:text> 152 + <xsl:value-of select="generate-id(..)" /> 153 + </xsl:attribute> 154 + <xsl:attribute name="title"> 155 + <xsl:value-of select="f:title" /> 156 + </xsl:attribute> 157 + </xsl:otherwise> 158 + </xsl:choose> 159 + <xsl:text>■</xsl:text> 160 + </a> 161 + <span class="link local" data-target="#{generate-id(..)}"> 162 + <span class="taxon"> 163 + <xsl:apply-templates select=".." mode="tree-taxon-with-number"> 164 + <xsl:with-param name="suffix">.&#160;</xsl:with-param> 165 + </xsl:apply-templates> 166 + </span> 167 + 168 + <xsl:apply-templates select="f:title" /> 169 + </span> 170 + </xsl:for-each> 171 + <xsl:apply-templates select="f:mainmatter" mode="toc" /> 172 + </li> 173 + </xsl:template> 174 + 175 + <xsl:template match="f:mainmatter" mode="toc"> 176 + <ul class="block"> 177 + <xsl:apply-templates select="f:tree[not(@toc='false')]" mode="toc" /> 178 + </ul> 179 + </xsl:template> 180 + 181 + <xsl:template match="f:frontmatter/f:title"> 182 + <xsl:apply-templates /> 183 + </xsl:template> 184 + 185 + <xsl:template match="f:mainmatter"> 186 + <div class="tree-content"> 187 + <xsl:apply-templates /> 188 + </div> 189 + </xsl:template> 190 + 191 + <xsl:template match="f:addr[../f:route]"> 192 + <a class="slug" href="{../f:route}"> 193 + <xsl:text>[</xsl:text> 194 + <xsl:value-of select="." /> 195 + <xsl:text>]</xsl:text> 196 + </a> 197 + </xsl:template> 198 + 199 + <xsl:template match="f:addr[not(../f:route)]"> 200 + </xsl:template> 201 + 202 + <xsl:template match="f:resource"> 203 + <xsl:apply-templates select="f:resource-content" /> 204 + </xsl:template> 205 + 206 + <xsl:template match="f:resource-content"> 207 + <xsl:apply-templates /> 208 + </xsl:template> 209 + 210 + <xsl:template match="f:source-path"> 211 + <a class="edit-button" href="{concat('vscode://file', .)}"> 212 + <xsl:text>[edit]</xsl:text> 213 + </a> 214 + </xsl:template> 215 + 216 + <xsl:template match="f:taxon"> 217 + <xsl:value-of select="." /> 218 + </xsl:template> 219 + 220 + <xsl:template match="f:frontmatter"> 221 + <header> 222 + <h1> 223 + <span class="taxon"> 224 + <xsl:apply-templates select=".." mode="tree-taxon-with-number"> 225 + <xsl:with-param name="suffix">.&#160;</xsl:with-param> 226 + </xsl:apply-templates> 227 + </span> 228 + 229 + <xsl:apply-templates select="f:title" /> 230 + <xsl:text>&#032;</xsl:text> 231 + <xsl:apply-templates select="f:addr" /> 232 + <xsl:text>&#032;</xsl:text> 233 + <xsl:apply-templates select="f:source-path" /> 234 + </h1> 235 + <div class="metadata"> 236 + <ul> 237 + <xsl:apply-templates select="f:date" /> 238 + <xsl:if test="not(f:meta[@name = 'author']/.='false')"> 239 + <xsl:apply-templates select="f:authors" /> 240 + </xsl:if> 241 + <xsl:apply-templates select="f:meta[@name='position']" /> 242 + <xsl:apply-templates select="f:meta[@name='institution']" /> 243 + <xsl:apply-templates select="f:meta[@name='venue']" /> 244 + <xsl:apply-templates select="f:meta[@name='source']" /> 245 + <xsl:apply-templates select="f:meta[@name='doi']" /> 246 + <xsl:apply-templates select="f:meta[@name='orcid']" /> 247 + <xsl:apply-templates select="f:meta[@name='external']" /> 248 + <xsl:apply-templates select="f:meta[@name='slides']" /> 249 + <xsl:apply-templates select="f:meta[@name='video']" /> 250 + </ul> 251 + </div> 252 + </header> 253 + </xsl:template> 254 + 255 + <xsl:template match="f:ref"> 256 + <xsl:variable name="fallback-number"> 257 + <xsl:text>[</xsl:text> 258 + <xsl:value-of select="@addr" /> 259 + <xsl:text>]</xsl:text> 260 + </xsl:variable> 261 + 262 + <xsl:variable name="taxon"> 263 + <xsl:choose> 264 + <xsl:when test="@taxon"> 265 + <xsl:value-of select="@taxon" /> 266 + </xsl:when> 267 + <xsl:otherwise> 268 + <xsl:text>§</xsl:text> 269 + </xsl:otherwise> 270 + </xsl:choose> 271 + </xsl:variable> 272 + 273 + <a class="link local"> 274 + <xsl:attribute name="href"> 275 + <xsl:choose> 276 + <xsl:when test="key('tree-with-addr',current()/@addr)"> 277 + <xsl:text>#</xsl:text> 278 + <xsl:value-of select="generate-id(key('tree-with-addr',current()/@addr))" /> 279 + </xsl:when> 280 + <xsl:otherwise> 281 + <xsl:value-of select="@href" /> 282 + </xsl:otherwise> 283 + </xsl:choose> 284 + </xsl:attribute> 285 + 286 + <xsl:choose> 287 + <xsl:when test="key('tree-with-addr', current()/@addr)"> 288 + <xsl:apply-templates select="key('tree-with-addr', current()/@addr)" mode="tree-taxon-with-number"> 289 + <xsl:with-param name="in-backmatter" select="boolean(ancestor::f:backmatter)" /> 290 + <xsl:with-param name="number" select="@number" /> 291 + <xsl:with-param name="fallback-number" select="$fallback-number" /> 292 + <xsl:with-param name="taxon" select="$taxon" /> 293 + </xsl:apply-templates> 294 + </xsl:when> 295 + <xsl:otherwise> 296 + <xsl:value-of select="$taxon" /> 297 + <xsl:text>&#160;</xsl:text> 298 + <xsl:choose> 299 + <xsl:when test="@number"> 300 + <xsl:value-of select="@number" /> 301 + </xsl:when> 302 + <xsl:otherwise> 303 + <xsl:value-of select="$fallback-number" /> 304 + </xsl:otherwise> 305 + </xsl:choose> 306 + </xsl:otherwise> 307 + </xsl:choose> 308 + </a> 309 + </xsl:template> 310 + 311 + <xsl:template match="f:contextual-number[@addr]"> 312 + <xsl:variable name="fallback-number"> 313 + <xsl:text>[</xsl:text> 314 + <xsl:value-of select="@addr" /> 315 + <xsl:text>]</xsl:text> 316 + </xsl:variable> 317 + 318 + <xsl:choose> 319 + <xsl:when test="key('tree-with-addr', current()/@addr)"> 320 + <xsl:apply-templates select="key('tree-with-addr', current()/@addr)" mode="contextual-number"> 321 + <xsl:with-param name="in-backmatter" select="boolean(ancestor::f:backmatter)" /> 322 + <xsl:with-param name="fallback-number" select="$fallback-number" /> 323 + </xsl:apply-templates> 324 + </xsl:when> 325 + <xsl:otherwise> 326 + <xsl:value-of select="$fallback-number" /> 327 + </xsl:otherwise> 328 + </xsl:choose> 329 + </xsl:template> 330 + 331 + <xsl:template match="/f:tree[@root='true']/f:backmatter"> 332 + </xsl:template> 333 + 334 + <xsl:template match="/f:tree[not(@root='true')]/f:backmatter"> 335 + <footer> 336 + <xsl:apply-templates /> 337 + </footer> 338 + </xsl:template> 339 + 340 + <xsl:template match="f:mainmatter//f:backmatter"> 341 + </xsl:template> 342 + 343 + <xsl:template match="f:backmatter//f:backmatter"> 344 + </xsl:template> 345 + 346 + <xsl:template match="f:tree[f:mainmatter[*] or not(@hidden-when-empty = 'true')]"> 347 + <section> 348 + <xsl:attribute name="lang"> 349 + <xsl:choose> 350 + <xsl:when test="f:frontmatter/f:meta[@name='lang']"> 351 + <xsl:value-of select="f:frontmatter/f:meta[@name='lang']" /> 352 + </xsl:when> 353 + <xsl:otherwise>en</xsl:otherwise> 354 + </xsl:choose> 355 + </xsl:attribute> 356 + 357 + <xsl:choose> 358 + <xsl:when test="@show-metadata = 'false'"> 359 + <xsl:attribute name="class">block hide-metadata</xsl:attribute> 360 + </xsl:when> 361 + <xsl:otherwise> 362 + <xsl:attribute name="class">block</xsl:attribute> 363 + </xsl:otherwise> 364 + </xsl:choose> 365 + <xsl:if test="f:frontmatter/f:taxon"> 366 + <xsl:attribute name="data-taxon"> 367 + <xsl:value-of select="f:frontmatter/f:taxon" /> 368 + </xsl:attribute> 369 + </xsl:if> 370 + 371 + <xsl:choose> 372 + <xsl:when test="not(@show-heading='false')"> 373 + <details id="{generate-id(.)}"> 374 + <xsl:if test="not(@expanded = 'false')"> 375 + <xsl:attribute name="open">open</xsl:attribute> 376 + </xsl:if> 377 + <summary> 378 + <xsl:apply-templates select="f:frontmatter" /> 379 + </summary> 380 + <xsl:apply-templates select="f:mainmatter" /> 381 + <xsl:apply-templates select="f:frontmatter/f:meta[@name='bibtex']" /> 382 + </details> 383 + </xsl:when> 384 + <xsl:otherwise> 385 + <xsl:apply-templates select="f:mainmatter" /> 386 + </xsl:otherwise> 387 + </xsl:choose> 388 + </section> 389 + 390 + <xsl:apply-templates select="f:backmatter" /> 391 + </xsl:template> 392 + 393 + <xsl:template match="f:tree"></xsl:template> 394 + 395 + </xsl:stylesheet>
+9
dune-project
··· 6 6 7 7 (using menhir 3.0) 8 8 9 + (using dune_site 0.1) 10 + 9 11 (name forester) 10 12 11 13 (authors "Jonathan Sterling") ··· 32 34 (package 33 35 (name forester) 34 36 (synopsis "A tool for tending mathematical forests") 37 + (sites 38 + (share theme)) 35 39 (depends 36 40 (menhir 37 41 (>= 20240715)) ··· 40 44 (ocaml 41 45 (>= 5.2.0)) 42 46 dune 47 + dune-site 43 48 ppx_deriving 44 49 (cmdliner 45 50 (>= 1.2.0)) ··· 90 95 (>= 2.8.3)) 91 96 (cohttp-eio 92 97 (>= 6.0.0)) 98 + (routes 99 + (>= 2.0.0)) 100 + (brr 101 + (>= 0.0.7)) 93 102 (odoc 94 103 (>= 2.4.4 :with-doc)) 95 104 (alcotest :with-test)))
+5
forester.opam
··· 12 12 "ocamlgraph" {>= "2.1.0"} 13 13 "ocaml" {>= "5.2.0"} 14 14 "dune" {>= "3.13"} 15 + "dune-site" 15 16 "ppx_deriving" 16 17 "cmdliner" {>= "1.2.0"} 17 18 "dune-build-info" ··· 38 39 "logs" {>= "0.7.0"} 39 40 "bisect_ppx" {>= "2.8.3"} 40 41 "cohttp-eio" {>= "6.0.0"} 42 + "routes" {>= "2.0.0"} 43 + "brr" {>= "0.0.7"} 41 44 "odoc" {"2.4.4" >= with-doc} 42 45 "alcotest" {with-test} 43 46 ] ··· 50 53 name 51 54 "-j" 52 55 jobs 56 + "--promote-install-files=false" 53 57 "@install" 54 58 "@runtest" {with-test} 55 59 "@doc" {with-doc} 56 60 ] 61 + ["dune" "install" "-p" name "--create-install-files" name] 57 62 ] 58 63 dev-repo: "git+https://git.sr.ht/~jonsterling/ocaml-forester"
+2 -2
lib/compiler/Forest.ml
··· 78 78 and analyse_artefact graphs scope artefact = 79 79 analyse_content graphs scope artefact.content 80 80 81 - and analyse_transclusion graphs (scope : Iri.t) (transclusion : T.content T.transclusion) : unit = 81 + and analyse_transclusion graphs (scope : Iri.t) (transclusion : T.transclusion) : unit = 82 82 match transclusion.target with 83 83 | Full _ | Mainmatter -> 84 84 add_edge graphs Builtin_relation.transcludes ~source: (Iri_vertex scope) ~target: (Iri_vertex transclusion.href) ··· 195 195 196 196 let section_symbol = "§" 197 197 198 - let get_content_of_transclusion (transclusion : T.content T.transclusion) forest = 198 + let get_content_of_transclusion (transclusion : T.transclusion) forest = 199 199 let@ content = 200 200 Option.map @~ 201 201 match transclusion.target with
+1 -3
lib/compiler/Forest.mli
··· 54 54 T.content 55 55 56 56 val get_content_of_transclusion : 57 - T.content T.transclusion -> 58 - T.content T.resource t -> 59 - T.content option 57 + T.transclusion -> T.content T.resource t -> T.content option 60 58 61 59 val get_title_or_content_of_vertex : 62 60 ?not_found: (key -> T.content option) ->
+2
lib/compiler/Phases.ml
··· 25 25 let resources = Forest.create 1000 in 26 26 let diagnostics = Diagnostic_store.create 100 in 27 27 let units = Expand.Env.empty in 28 + let search_index = State.Search_index.empty in 28 29 { 29 30 env; 30 31 dev; ··· 38 39 resolver; 39 40 import_graph; 40 41 graphs; 42 + search_index; 41 43 } 42 44 43 45 let load
+4 -1
lib/compiler/State.ml
··· 9 9 module T = Types 10 10 type resource = T.content T.resource 11 11 12 + module Search_index = Map.Make(String) 13 + 12 14 type t = { 13 15 env: Eio_unix.Stdenv.base; 14 16 dev: bool; ··· 21 23 resources: resource Forest.t; 22 24 graphs: (module Forest_graphs.S); 23 25 import_graph: Forest_graph.t; 24 - resolver: string Iri_tbl.t 26 + resolver: string Iri_tbl.t; 27 + search_index: iri list Search_index.t; 25 28 } 26 29 27 30 let documents (t : t) = t.documents
+2 -2
lib/core/Types.ml
··· 110 110 Sentence_case | Identity 111 111 [@@deriving show, repr] 112 112 113 - type 'content transclusion = { 113 + type transclusion = { 114 114 href: iri; 115 115 target: content_target; 116 116 modifier: modifier ··· 152 152 | Text of string 153 153 | CDATA of string 154 154 | Xml_elt of 'content xml_elt 155 - | Transclude of 'content transclusion 155 + | Transclude of transclusion 156 156 | Contextual_number of iri 157 157 | Results_of_query of ('content vertex, Query.dbix) Query.expr 158 158 | Section of 'content section
+9 -6
lib/frontend/Config_parser.ml
··· 62 62 parse lexbuf "<anonymous>" 63 63 64 64 let parse_forest_config_file filename = 65 - let ch = open_in filename in 66 - let@ () = Fun.protect ~finally: (fun _ -> close_in ch) in 67 - let lexbuf = Lexing.from_channel ch in 68 - let result = parse lexbuf filename in 69 - Sys.chdir @@ Filename.dirname filename; 70 - result 65 + try 66 + let ch = open_in filename in 67 + let@ () = Fun.protect ~finally: (fun _ -> close_in ch) in 68 + let lexbuf = Lexing.from_channel ch in 69 + let result = parse lexbuf filename in 70 + Sys.chdir @@ Filename.dirname filename; 71 + result 72 + with 73 + | exn -> Reporter.fatalf Configuration_error "%a" Eio.Exn.pp exn
+2 -1
lib/frontend/Forester_frontend.ml
··· 13 13 module DSL = DSL 14 14 15 15 module State_machine = State_machine 16 - module Http_server = Http_server 16 + 17 + module Htmx_client = Htmx_client
+1 -1
lib/frontend/Htmx_client.ml
··· 251 251 and _render_resource resource = 252 252 render_content resource.contents 253 253 254 - and render_transclusion (forest : State.t) (transclusion : T.content T.transclusion) : P.node list = 254 + and render_transclusion (forest : State.t) (transclusion : T.transclusion) : P.node list = 255 255 List.concat @@ 256 256 Option.to_list @@ 257 257 Option.map (render_content forest) @@
-125
lib/frontend/Http_server.ml
··· 1 - (* 2 - * SPDX-FileCopyrightText: 2024 The Forester Project Contributors 3 - * 4 - * SPDX-License-Identifier: GPL-3.0-or-later 5 - *) 6 - 7 - open Forester_prelude 8 - open Forester_core 9 - open Forester_compiler 10 - 11 - module T = Types 12 - 13 - let log_warning ex = Logs.warn (fun f -> f "WARNING: %a" Eio.Exn.pp ex) 14 - 15 - let run 16 - : env: Eio_unix.Stdenv.base -> State.t -> unit 17 - = fun ~env state -> 18 - let module P = Pure_html in 19 - let module H = P.HTML in 20 - let@ sw = Eio.Switch.run ?name: None in 21 - let port = ref 8080 in 22 - (* let state = ref state in *) 23 - let handler _ request (_body : Cohttp_eio.Body.t) = 24 - (* let state = !state in *) 25 - let resource = Iri.of_string (Http.Request.resource request) in 26 - match Iri.path_string (resource) with 27 - | "/" -> 28 - begin 29 - let home = 30 - Option.bind 31 - ( 32 - Option.map 33 - (Iri_scheme.user_iri ~host: state.config.host) 34 - state.config.home 35 - ) 36 - (fun iri -> Forest.get_article iri state.resources) 37 - in 38 - match home with 39 - | None -> 40 - Cohttp_eio.Server.respond_string 41 - ~status: `OK 42 - ~body: ( 43 - Format.asprintf 44 - "not found" 45 - ) 46 - () 47 - | Some r -> 48 - Cohttp_eio.Server.respond_string 49 - ~status: `OK 50 - ~body: ( 51 - Format.asprintf "%a" Render.(pp ~dev: true state HTML) (Article r) 52 - ) 53 - () 54 - end 55 - | "style.css" -> 56 - Cohttp_eio.Server.respond_string 57 - ~status: `OK 58 - ~body: Css.stylesheet 59 - () 60 - | "/query" -> 61 - let q = Iri.query_kv resource |> Iri.KV.find_opt "query" in 62 - let response = 63 - q 64 - |> Option.get 65 - |> Iri_types.pct_decode 66 - |> Repr.of_json_string 67 - Datalog_expr.(query_t Repr.string (T.vertex_t T.content_t)) |> function 68 - | Ok q -> 69 - Logs.app (fun m -> m "parsed successfully"); 70 - let (_, _, result) = State_machine.update (Query q) state in 71 - begin 72 - match result with 73 - | Vertex_set vs -> 74 - Htmx_client.render_query_result state vs 75 - | Render_result _ 76 - | Error _ 77 - | Nothing -> 78 - [P.txt "failed to run"] 79 - end 80 - | Error (`Msg str) -> 81 - [P.txt "failed to parse: %s" str] 82 - in 83 - Cohttp_eio.Server.respond_string 84 - ~status: `OK 85 - ~body: ( 86 - Format.asprintf 87 - "%a" 88 - P.pp 89 - (H.ul [] response) 90 - ) 91 - () 92 - | path -> 93 - let path = 94 - let len = String.length path in 95 - String.sub path 1 (len - 1) 96 - in 97 - let iri = Iri_scheme.user_iri ~host: state.config.host path in 98 - match Forest.get_article iri state.resources with 99 - | None -> 100 - Cohttp_eio.Server.respond_string 101 - ~status: `Not_found 102 - ~body: ( 103 - Format.asprintf 104 - "%s: 404 not found" 105 - path 106 - ) 107 - () 108 - | Some r -> 109 - Cohttp_eio.Server.respond_string 110 - ~status: `OK 111 - ~body: ( 112 - Format.asprintf "%a" Render.(pp ~dev: true state HTML) (Article r) 113 - ) 114 - () 115 - in 116 - let socket = 117 - Eio.Net.listen 118 - env#net 119 - ~sw 120 - ~backlog: 128 121 - ~reuse_addr: true 122 - (`Tcp (Eio.Net.Ipaddr.V4.loopback, !port)) 123 - and server = Cohttp_eio.Server.make ~callback: handler () 124 - in 125 - Cohttp_eio.Server.run socket server ~on_error: log_warning
+1 -1
lib/frontend/Legacy_xml_client.ml
··· 337 337 and render_resource_source source = 338 338 X.resource_source [X.type_ "%s" source.type_; X.resource_part "%s" source.part] "<![CDATA[%s]]>" source.source 339 339 340 - and render_transclusion (forest : State.t) (transclusion : T.content T.transclusion) : P.node list = 340 + and render_transclusion (forest : State.t) (transclusion : T.transclusion) : P.node list = 341 341 match Hashtbl.find_opt transclusion_cache transclusion with 342 342 | Some nodes -> nodes 343 343 | None ->
+1 -1
lib/frontend/Plain_text_client.ml
··· 31 31 | Link link -> pp_link ~forest ~router fmt link 32 32 | Results_of_query _ | Results_of_datalog_query _ | Img _ | Artefact _ | Datalog_script _ -> () 33 33 34 - and pp_transclusion ~forest ~router fmt (transclusion : T.content T.transclusion) = 34 + and pp_transclusion ~forest ~router fmt (transclusion : T.transclusion) = 35 35 match Forest.get_content_of_transclusion transclusion forest with 36 36 | None -> Format.fprintf fmt "<could not resolve transclusion of %a>" pp_iri transclusion.href 37 37 | Some content -> pp_content ~forest ~router fmt content
+6 -1
lib/frontend/State_machine.ml
··· 6 6 7 7 open Forester_core 8 8 open Forester_compiler 9 + open Forester_search 9 10 10 11 module T = Types 11 12 ··· 28 29 | Get of (('a Render.target [@opaque]) * iri) 29 30 | Query of (string, Vertex.t) Datalog_expr.query 30 31 | Cache_results of (Vertex_set.t [@opaque]) 32 + | Index 31 33 [@@deriving show] 32 34 33 35 type ('r, 'e) result = ··· 133 135 | Parse _ 134 136 | Cache_results _ 135 137 | Done -> 138 + (Done, state, Nothing) 139 + | Index -> 136 140 ( 137 141 Done, 138 - state, 142 + {state with search_index = Index.index state.resources}, 139 143 Nothing 140 144 ) 141 145 ··· 168 172 |> plant_assets 169 173 |> implant_foreign 170 174 |> run_action Load_all_configured_dirs 175 + |> run_action Index 171 176 172 177 let language_server 173 178 : state -> unit
+1 -4
lib/frontend/dune
··· 2 2 ;;; 3 3 ;;; SPDX-License-Identifier: GPL-3.0-or-later 4 4 5 - ; (env 6 - ; (dev 7 - ; (flags (:standard -w -32-33)))) 8 - 9 5 (library 10 6 (name Forester_frontend) 11 7 (public_name forester.frontend) ··· 24 20 forester.human_datetime 25 21 forester.xml_names 26 22 forester.parser 23 + forester.search 27 24 ocamlgraph 28 25 toml 29 26 eio
+1
lib/search/Forester_search.ml
··· 1 + module Index = Index
+144
lib/search/Index.ml
··· 1 + open Forester_core 2 + open Forester_compiler 3 + module T = Forester_core.Types 4 + module Search_index = State.Search_index 5 + 6 + module Set = Set.Make(String) 7 + (* module Index = Map.Make(String) *) 8 + 9 + let common_words = 10 + Set.of_list 11 + [ 12 + "a"; 13 + "and"; 14 + "be"; 15 + "have"; 16 + "i"; 17 + "in"; 18 + "of"; 19 + "that"; 20 + "the"; 21 + "to"; 22 + ] 23 + 24 + let tokenize string = 25 + Str.(split @@ regexp "[^a-zA-Z0-9]+") string 26 + |> List.filter_map 27 + (fun s -> 28 + let lower = String.lowercase_ascii s in 29 + if not @@ Set.mem lower common_words then 30 + Some (Stemming.stem lower) 31 + else 32 + None 33 + ) 34 + 35 + let rec tokenize_content : T.content -> _ = function 36 + | Content nodes -> 37 + List.concat_map 38 + (function 39 + | T.Text s 40 + | T.CDATA s -> 41 + tokenize s 42 + | T.Xml_elt {content; _} -> 43 + (* TODO: Consider tokenizing xml_qname *) 44 + tokenize_content content 45 + | T.Section {frontmatter; mainmatter; _} -> tokenize_frontmatter frontmatter @ tokenize_content mainmatter 46 + | T.Prim (_, content) -> tokenize_content content 47 + | T.Link {content; _} -> tokenize_content content 48 + | T.KaTeX (_, _) -> 49 + (* NOTE: 50 + In order to properly search math, we need to revamp the 51 + architecture and add more features...*) 52 + [] 53 + | T.Transclude _ 54 + | T.Contextual_number _ 55 + | T.Results_of_query _ 56 + | T.TeX_cs _ 57 + | T.Img _ 58 + | T.Artefact _ 59 + | T.Iri _ 60 + | T.Route_of_iri _ 61 + | T.Datalog_script _ 62 + | T.Results_of_datalog_query _ -> 63 + [] 64 + ) 65 + nodes 66 + 67 + and tokenize_vertex = function 68 + | T.Iri_vertex _ -> [] 69 + | T.Content_vertex c -> 70 + tokenize_content c 71 + 72 + and tokenize_attribution 73 + : T.content T.attribution -> _ 74 + = function 75 + | {vertex; _} -> 76 + tokenize_vertex vertex 77 + 78 + and tokenize_frontmatter 79 + : T.content T.frontmatter -> _ 80 + = function 81 + | {title; 82 + attributions; 83 + taxon; 84 + tags; 85 + metas; 86 + _; 87 + } -> 88 + List.concat 89 + [ 90 + Option.value ~default: [] (Option.map tokenize_content title); 91 + Option.value ~default: [] (Option.map tokenize_content taxon); 92 + List.concat_map tokenize_attribution attributions; 93 + List.concat_map tokenize_vertex tags; 94 + List.concat_map (fun (s, c) -> tokenize s @ tokenize_content c) metas; 95 + ] 96 + 97 + let tokenize_article : T.content T.article -> _ = function 98 + | {frontmatter; mainmatter; _} -> 99 + tokenize_frontmatter frontmatter @ tokenize_content mainmatter 100 + 101 + let add 102 + : T.content T.article list -> 103 + iri list Search_index.t -> 104 + iri list Search_index.t 105 + = fun articles index -> 106 + List.fold_left 107 + (fun acc article -> 108 + if Option.is_none T.(article.frontmatter.iri) then acc 109 + else 110 + let tokens = tokenize_article article in 111 + let iri = Option.get T.(article.frontmatter.iri) in 112 + List.fold_left 113 + (fun acc token -> 114 + match Search_index.find_opt token acc with 115 + | Some ids -> 116 + if List.nth ids (List.length ids - 1) = iri then acc 117 + else 118 + Search_index.add token (ids @ [iri]) acc 119 + | None -> Search_index.add token [iri] acc 120 + ) 121 + acc 122 + tokens 123 + ) 124 + index 125 + articles 126 + 127 + let search 128 + : iri list Search_index.t -> string -> iri list list 129 + = fun index term -> 130 + tokenize term 131 + |> List.concat_map 132 + (fun str -> 133 + match Search_index.find_opt str index with 134 + | Some ids -> 135 + [ids] 136 + | None -> [] 137 + ) 138 + 139 + let index 140 + : T.content T.resource Forest.t -> iri list Search_index.t 141 + = function 142 + | resources -> 143 + Forest.get_all_articles resources 144 + |> (fun articles -> add articles Search_index.empty)
+235
lib/search/Stemming.ml
··· 1 + (* stemmer.ml: Generates stems of English words. 2 + * 3 + * Copyright (C) 2003-2010, 2014 by Erik Arneson <earneson@arnesonium.com> 4 + * No guarantees or restrictions on use. This code is released into the 5 + * public domain. 6 + * 7 + * $Id: stemmer.ml,v 1.4 2003/07/20 18:50:21 erik Exp $ 8 + *) 9 + 10 + exception No_stem of string 11 + 12 + (* Now for the native OCaml port *) 13 + let rule_list_1a = [ 14 + (101, "sses", "ss", -1); 15 + (102, "ies", "i", -1); 16 + (103, "ss", "ss", -1); 17 + (104, "s", "", -1) 18 + ] 19 + 20 + let rule_list_1b = [(105, "eed", "ee", 0); (106, "ed", "", -1); (107, "ing", "", -1)] 21 + 22 + let rule_list_1b1 = [ 23 + (108, "at", "ate", -1); 24 + (109, "bl", "ble", -1); 25 + (110, "iz", "ize", -1); 26 + (111, "bb", "b", -1); 27 + (112, "dd", "d", -1); 28 + (113, "ff", "f", -1); 29 + (114, "gg", "g", -1); 30 + (115, "mm", "m", -1); 31 + (116, "nn", "n", -1); 32 + (117, "pp", "p", -1); 33 + (118, "rr", "r", -1); 34 + (119, "tt", "t", -1); 35 + (120, "ww", "w", -1); 36 + (121, "xx", "x", -1); 37 + (122, "", "e", -1) 38 + ] 39 + 40 + let rule_list_1c = [(123, "y", "i", -1)] 41 + 42 + let rule_list_2 = [ 43 + (203, "ational", "ate", 0); 44 + (204, "tional", "tion", 0); 45 + (205, "enci", "ence", 0); 46 + (206, "anci", "ance", 0); 47 + (207, "izer", "ize", 0); 48 + (208, "abli", "able", 0); 49 + (209, "alli", "al", 0); 50 + (210, "entli", "ent", 0); 51 + (211, "eli", "e", 0); 52 + (213, "ousli", "ous", 0); 53 + (214, "ization", "ize", 0); 54 + (215, "ation", "ate", 0); 55 + (216, "ator", "ate", 0); 56 + (217, "alism", "al", 0); 57 + (218, "iveness", "ive", 0); 58 + (219, "fulnes", "ful", 0); 59 + (220, "ousness", "ous", 0); 60 + (221, "aliti", "al", 0); 61 + (222, "iviti", "ive", 0); 62 + (223, "biliti", "ble", 0) 63 + ] 64 + 65 + let rule_list_3 = [ 66 + (301, "icate", "ic", 0); 67 + (302, "ative", "", 0); 68 + (303, "alize", "al", 0); 69 + (304, "iciti", "ic", 0); 70 + (305, "ical", "ic", 0); 71 + (308, "ful", "", 0); 72 + (309, "ness", "", 0) 73 + ] 74 + 75 + let rule_list_4 = [ 76 + (401, "al", "", 1); 77 + (402, "ance", "", 1); 78 + (403, "ence", "", 1); 79 + (405, "er", "", 1); 80 + (406, "ic", "", 1); 81 + (407, "able", "", 1); 82 + (408, "ible", "", 1); 83 + (409, "ant", "", 1); 84 + (410, "ement", "", 1); 85 + (411, "ment", "", 1); 86 + (412, "ent", "", 1); 87 + (423, "sion", "s", 1); 88 + (424, "tion", "t", 1); 89 + (415, "ou", "", 1); 90 + (416, "ism", "", 1); 91 + (417, "ate", "", 1); 92 + (418, "iti", "", 1); 93 + (419, "ous", "", 1); 94 + (420, "ive", "", 1); 95 + (421, "ize", "", 1) 96 + ] 97 + 98 + let rule_list_5a = [(501, "e", "", 1); (502, "e", "", -1)] 99 + 100 + let rule_list_5b = [(503, "ll", "l", 1)] 101 + 102 + let all_rules = [ 103 + rule_list_1a; 104 + rule_list_1b; (* rule_list_1b1 is conditionally applied below *) 105 + rule_list_1c; 106 + rule_list_2; 107 + rule_list_3; 108 + rule_list_4; 109 + rule_list_5a; 110 + rule_list_5b 111 + ] 112 + 113 + (* Returns boolean based on vowel-ness of a character *) 114 + let is_vowel c = 115 + match c with 'a' | 'e' | 'i' | 'o' | 'u' -> true | _ -> false 116 + 117 + (* Computes a weird word count number based on syllabels and such. *) 118 + let word_size word = 119 + let wordlen = String.length word in 120 + let rec aux idx count state = 121 + if idx < wordlen then 122 + let call = aux (succ idx) in 123 + match state with 124 + | 0 -> 125 + if is_vowel word.[idx] then call count 1 else call count 2 126 + | 1 -> 127 + if is_vowel word.[idx] then call count 1 else call (succ count) 2 128 + | 2 -> 129 + if is_vowel word.[idx] || word.[idx] = 'y' then call count 1 130 + else call count 2 131 + | _ -> 132 + failwith "Impossible state" 133 + else count 134 + in 135 + aux 0 0 0 136 + 137 + (* Various rule applications *) 138 + let ends_with_cvc str = 139 + let len = String.length str in 140 + let vowel_or_y c = is_vowel c || c = 'y' in 141 + let vowel_or_wxy c = vowel_or_y c || c = 'x' || c = 'w' in 142 + if len < 3 then false 143 + else if (not (vowel_or_wxy str.[len - 1])) 144 + && vowel_or_y str.[len - 2] 145 + && not (is_vowel str.[len - 3]) then true 146 + else false 147 + 148 + let add_an_e word = 149 + if word_size word = 1 && ends_with_cvc word then true else false 150 + 151 + let remove_an_e word = 152 + if word_size word = 1 && not (ends_with_cvc word) then true else false 153 + 154 + let contains_vowel str = 155 + let len = String.length str in 156 + let rec aux idx = 157 + if idx = len then false 158 + else if is_vowel str.[idx] || str.[idx] = 'y' then true 159 + else aux (succ idx) 160 + in 161 + is_vowel str.[0] || aux 1 162 + 163 + (* Some rules have additional criteria added to them *) 164 + let rules_criteria = [([106; 107; 123], contains_vowel); ([122], add_an_e); ([502], remove_an_e)] 165 + 166 + let match_rule word ((num, orig, _, min_root): int * string * string * int) = 167 + let orig_len = String.length orig and word_len = String.length word in 168 + let rec aux_rule word num lst = 169 + match lst with 170 + | (rules, fn) :: tl -> 171 + if List.mem num rules then fn word else aux_rule word num tl 172 + | [] -> 173 + true 174 + in 175 + if word_len > orig_len then 176 + let word_end = String.sub word (word_len - orig_len) orig_len 177 + and word_root = String.sub word 0 (word_len - orig_len) 178 + in 179 + if word_end = orig 180 + && min_root < word_size word_root 181 + && aux_rule word_root num rules_criteria then 182 + (*print_int num; 183 + print_string (" ("^word^") "^word_end^" matches "^orig^"\n");*) 184 + true 185 + else false 186 + else false 187 + 188 + let apply_rule word ((_, orig, rep, _): int * string * string * int) = 189 + let orig_len = String.length orig and word_len = String.length word in 190 + let orig_word = word 191 + and new_word = String.sub word 0 (word_len - orig_len) ^ rep 192 + in 193 + (* The new stem must be 2 or more characters in length *) 194 + if String.length new_word < 2 then orig_word else new_word 195 + 196 + let rec replace_end word (rule_list : (int * string * string * int) list) = 197 + match rule_list with 198 + | hd :: tl -> 199 + if match_rule word hd then 200 + let rule, _, _, _ = hd in 201 + (rule, apply_rule word hd) 202 + else replace_end word tl 203 + | [] -> 204 + (0, word) 205 + 206 + let stem in_word = 207 + let word = String.lowercase_ascii in_word in 208 + let rec aux aux_word list = 209 + match list with 210 + | hd :: tl -> 211 + ( 212 + match replace_end aux_word hd with 213 + | 106, out | 107, out -> 214 + let _, out2 = replace_end out rule_list_1b1 in 215 + aux out2 tl 216 + | _, out -> 217 + aux out tl 218 + ) 219 + | [] -> 220 + aux_word 221 + in 222 + (* This is a really stupid hack. Why do I need it? *) 223 + (* if 0 = String.compare "'s" (String.sub word (-2) 2) then word *) 224 + (* else aux word all_rules *) 225 + aux word all_rules 226 + 227 + let stem_cmp s1 s2 = stem s1 = stem s2 228 + 229 + let stem_gt s1 s2 = stem s1 > stem s2 230 + 231 + let stem_gte s1 s2 = stem s1 >= stem s2 232 + 233 + let stem_lt s1 s2 = stem s1 < stem s2 234 + 235 + let stem_lte s1 s2 = stem s1 <= stem s2
+4
lib/search/dune
··· 1 + (library 2 + (name Forester_search) 3 + (public_name forester.search) 4 + (libraries forester.core forester.compiler str eio.core eio))
+36
lib/server/Router.ml
··· 1 + (* 2 + * SPDX-FileCopyrightText: 2024 The Forester Project Contributors 3 + * 4 + * SPDX-License-Identifier: GPL-3.0-or-later 5 + *) 6 + 7 + open Routes 8 + 9 + type route = 10 + | Index 11 + | Font of string 12 + | Js_bundle 13 + | Stylesheet 14 + | Favicon 15 + | Tree of string 16 + | Search 17 + | Searchmenu 18 + | Nil 19 + | Home 20 + | Query 21 + 22 + let routes : route router = 23 + one_of 24 + [ 25 + route (Routes.nil) Index; 26 + route (s "fonts" / str /? nil) (fun s -> Font s); 27 + route (s "style.css" /? nil) Stylesheet; 28 + route (s "min.js" /? nil) Js_bundle; 29 + route (s "favicon.ico" /? nil) Favicon; 30 + route (s "trees" / str /? nil) (fun s -> Tree s); 31 + route (s "search" /? nil) Search; 32 + route (s "searchmenu" /? nil) Searchmenu; 33 + route (s "nil" /? nil) Nil; 34 + route (s "home" /? nil) Home; 35 + route (s "query" /? nil) Query; 36 + ]
+37
lib/server/Search_menu.ml
··· 1 + let v = 2 + let markup = 3 + let open Pure_html in 4 + let open HTML in 5 + div 6 + [ 7 + class_ "modal-overlay"; 8 + Hx.trigger "click target:.modal-overlay, keyup[key=='Escape'] from:body"; 9 + Hx.target "#modal-container"; 10 + Hx.get "/nil"; 11 + ] 12 + [ 13 + div 14 + [class_ "modal-content";] 15 + [ 16 + div 17 + [class_ "search-wrapper";] 18 + [ 19 + input 20 + [ 21 + autofocus; 22 + class_ "search"; 23 + type_ "search"; 24 + name "search"; 25 + Hx.post "/search"; 26 + Hx.trigger "input changed delay:500ms, keyup[key=='Enter'], load"; 27 + Hx.target "#search-results"; 28 + placeholder "Start typing a note title or ID"; 29 + ]; 30 + ]; 31 + ul 32 + [id "search-results";] 33 + []; 34 + ]; 35 + ] 36 + in 37 + Pure_html.to_string markup
+198
lib/server/Server.ml
··· 1 + (* 2 + * SPDX-FileCopyrightText: 2024 The Forester Project Contributors 3 + * 4 + * SPDX-License-Identifier: GPL-3.0-or-later 5 + *) 6 + 7 + open Forester_prelude 8 + open Forester_core 9 + open Forester_compiler 10 + open Forester_frontend 11 + 12 + module T = Types 13 + 14 + module EP = Eio.Path 15 + 16 + type theme = { 17 + stylesheet: string; 18 + index: string; 19 + js_bundle: string; 20 + font_dir: string; 21 + favicon: string; 22 + } 23 + 24 + let load_theme ~env theme_location = 25 + assert (List.length theme_location = 1); 26 + let base_dir = List.hd theme_location in 27 + let theme_dir = EP.(env#fs / base_dir / "theme") in 28 + let stylesheet = EP.(load (theme_dir / "style.css")) in 29 + let index = EP.(load (theme_dir / "index.html")) in 30 + let js_bundle = EP.(load (env#fs / base_dir / "min.js")) in 31 + let favicon = EP.(load (theme_dir / "favicon.ico")) in 32 + let font_dir = EP.(native_exn @@ theme_dir / "fonts") in 33 + {stylesheet; index; js_bundle; font_dir; favicon;} 34 + 35 + let lookup_font ~env theme font = 36 + Eio.Path.(load (env#fs / theme.font_dir / font)) 37 + 38 + let handler 39 + : env: < fs: [> Eio.Fs.dir_ty] Eio.Path.t; .. > -> 40 + theme: theme -> 41 + forest: _ -> 42 + 'a -> 43 + Http.Request.t -> 44 + Cohttp_eio.Body.t -> 45 + Cohttp_eio.Server.response 46 + = fun 47 + ~env 48 + ~theme 49 + ~forest 50 + _socket 51 + request 52 + body 53 + -> 54 + let resource = Uri.of_string request.resource in 55 + let path = Uri.path resource in 56 + match Routes.match' ~target: path Router.routes with 57 + | Routes.FullMatch r 58 + | Routes.MatchWithTrailingSlash r -> 59 + begin 60 + match r with 61 + | Font fontname -> 62 + let body = lookup_font ~env theme fontname in 63 + let headers = 64 + let ext = Filename.extension fontname in 65 + let mimetype = 66 + match ext with 67 + | ".ttf" -> "font/ttf" 68 + | ".woff" -> "font/woff" 69 + | ".woff2" -> "font/woff2" 70 + | _ -> assert false 71 + in 72 + Http.Header.of_list ["Content-Type", mimetype] 73 + in 74 + Cohttp_eio.Server.respond_string ~headers ~status: `OK ~body () 75 + | Stylesheet -> 76 + let headers = Http.Header.of_list ["Content-Type", "text/css"] in 77 + Cohttp_eio.Server.respond_string ~headers ~status: `OK ~body: theme.stylesheet () 78 + | Js_bundle -> 79 + let headers = Http.Header.of_list ["Content-Type", "application/javascript"] in 80 + Cohttp_eio.Server.respond_string ~headers ~status: `OK ~body: theme.js_bundle () 81 + | Index -> 82 + Cohttp_eio.Server.respond_string ~status: `OK ~body: theme.index () 83 + | Favicon -> 84 + let headers = Http.Header.of_list ["Content-Type", "image/x-icon"] in 85 + Cohttp_eio.Server.respond_string ~headers ~status: `OK ~body: theme.favicon () 86 + | Tree s -> 87 + let iri = Iri_scheme.user_iri ~host: State.(forest.config.host) s in 88 + begin 89 + match Forest.get_article iri forest.resources with 90 + | None -> Cohttp_eio.Server.respond_string ~status: `Not_found ~body: "" () 91 + | Some article -> 92 + let content = 93 + Render.( 94 + Format.asprintf 95 + "%a" 96 + (pp ~dev: forest.dev forest HTML) 97 + (Article article) 98 + ) 99 + in 100 + Cohttp_eio.Server.respond_string ~status: `OK ~body: content () 101 + end 102 + | Search -> 103 + if request.meth = `POST then 104 + let body = Eio.Flow.read_all body in 105 + let search_term = 106 + String.concat "" @@ 107 + snd @@ 108 + List.find 109 + (fun (s, _) -> 110 + s = "search" 111 + ) 112 + (Uri.query_of_encoded body) 113 + in 114 + Cohttp_eio.Server.respond_string ~status: `OK ~body: (Format.asprintf "%s" search_term) () 115 + else 116 + Cohttp_eio.Server.respond_string ~status: `Method_not_allowed ~body: "" () 117 + | Searchmenu -> 118 + Cohttp_eio.Server.respond_string ~status: `OK ~body: Search_menu.v () 119 + | Nil -> 120 + Cohttp_eio.Server.respond_string ~status: `OK ~body: "" () 121 + | Home -> 122 + begin 123 + match forest.config.home with 124 + | None -> 125 + Cohttp_eio.Server.respond_string ~status: `OK ~body: "" () 126 + | Some home -> 127 + let home = Iri_scheme.user_iri ~host: forest.config.host home in 128 + match Forest.get_article home forest.resources with 129 + | None -> 130 + Cohttp_eio.Server.respond_string ~status: `OK ~body: "" () 131 + | Some home_tree -> 132 + begin 133 + let content = 134 + Render.( 135 + Format.asprintf 136 + "%a" 137 + (pp ~dev: forest.dev forest HTML) 138 + (Article home_tree) 139 + ) 140 + in 141 + Cohttp_eio.Server.respond_string ~status: `OK ~body: content () 142 + end 143 + end 144 + | Query -> 145 + let q = Uri.get_query_param resource "query" in 146 + let response = 147 + q 148 + |> Option.get 149 + |> Iri_types.pct_decode 150 + |> Repr.of_json_string 151 + Datalog_expr.(query_t Repr.string (T.vertex_t T.content_t)) |> function 152 + | Ok q -> 153 + Logs.app (fun m -> m "parsed successfully"); 154 + let (_, _, result) = State_machine.update (Query q) forest in 155 + begin 156 + match result with 157 + | Vertex_set vs -> 158 + Htmx_client.render_query_result forest vs 159 + | Render_result _ 160 + | Error _ 161 + | Nothing -> 162 + [Pure_html.txt "failed to run"] 163 + end 164 + | Error (`Msg str) -> 165 + [Pure_html.txt "failed to parse: %s" str] 166 + in 167 + Cohttp_eio.Server.respond_string 168 + ~status: `OK 169 + ~body: ( 170 + Format.asprintf 171 + "%a" 172 + Pure_html.pp 173 + (Pure_html.HTML.ul [] response) 174 + ) 175 + () 176 + end 177 + | Routes.NoMatch -> 178 + Cohttp_eio.Server.respond_string ~status: `Not_found ~body: "" () 179 + 180 + let log_warning ex = Logs.warn (fun f -> f "%a" Eio.Exn.pp ex) 181 + 182 + let run ~env ~port ~forest theme_location = 183 + let@ sw = Eio.Switch.run ?name: None in 184 + let port = ref port in 185 + let theme = load_theme ~env theme_location in 186 + let socket = 187 + Eio.Net.listen 188 + env#net 189 + ~sw 190 + ~backlog: 128 191 + ~reuse_addr: true 192 + (`Tcp (Eio.Net.Ipaddr.V4.loopback, !port)) 193 + and server = Cohttp_eio.Server.make ~callback: (handler ~env ~theme ~forest) () 194 + in 195 + Cohttp_eio.Server.run 196 + socket 197 + server 198 + ~on_error: log_warning
+28
lib/server/dune
··· 1 + ;;; SPDX-FileCopyrightText: 2024 The Forester Project Contributors 2 + ;;; 3 + ;;; SPDX-License-Identifier: GPL-3.0-or-later 4 + 5 + (library 6 + (name Forester_server) 7 + (public_name forester.server) 8 + (instrumentation 9 + (backend bisect_ppx)) 10 + (preprocess 11 + (pps ppx_deriving.show ppx_repr)) 12 + (libraries 13 + routes 14 + forester.prelude 15 + forester.core 16 + forester.language_server 17 + forester.compiler 18 + forester.frontend 19 + iri 20 + pure-html 21 + logs 22 + eio 23 + eio.core 24 + eio.unix 25 + http 26 + cohttp-eio 27 + uri 28 + fmt))
-19
test/Test_http_server.ml
··· 1 - (* 2 - * SPDX-FileCopyrightText: 2024 The Forester Project Contributors 3 - * 4 - * SPDX-License-Identifier: GPL-3.0-or-later 5 - *) 6 - 7 - open Forester_prelude 8 - open Forester_core 9 - open Forester_frontend 10 - 11 - let () = 12 - let@ env = Eio_main.run in 13 - Logs.set_reporter (Logs_fmt.reporter ()); 14 - Logs.set_level (Some Debug); 15 - let@ () = Reporter.easy_run in 16 - let config = Config_parser.parse_forest_config_file "forest.toml" in 17 - Http_server.run 18 - ~env 19 - (State_machine.batch_run ~env ~config ~dev: true)
+1 -1
test/Test_transclusion.ml
··· 47 47 in 48 48 let iri = Iri_scheme.user_iri ~host "transcludee" in 49 49 let print_transclusion 50 - : T.content T.transclusion -> unit 50 + : T.transclusion -> unit 51 51 = fun t -> 52 52 let content = Option.get @@ Forest.get_content_of_transclusion t forest.resources in 53 53 Format.printf
+23 -15
test/dune
··· 15 15 (deps %{bin:server})) 16 16 17 17 (cram 18 + (applies_to Lsp) 19 + (deps %{bin:forester} %{bin:nvim})) 20 + 21 + (cram 18 22 (applies_to Transclude) 19 23 (deps 20 24 %{bin:transclude} ··· 27 31 (glob_files_rec ./forest/*))) 28 32 29 33 (executables 30 - (names Test_http_server Test_transclusion) 31 - (public_names server transclude) 34 + (names Test_transclusion) 35 + (public_names transclude) 32 36 (libraries 33 37 logs 34 38 logs.fmt ··· 37 41 eio.core 38 42 eio.unix 39 43 eio_main 44 + lsp 45 + yojson 46 + forester.language_server 40 47 forester.frontend 41 48 forester.prelude 42 49 forester.compiler ··· 69 76 (glob_files_rec ./imports/*)) 70 77 (libraries 71 78 alcotest 72 - unix 79 + asai 80 + bwd 81 + eio 82 + eio.core 83 + eio.unix 84 + eio_main 73 85 fmt 74 - forester.frontend 75 - forester.prelude 76 86 forester.compiler 77 87 forester.core 88 + forester.frontend 89 + forester.language_server 78 90 forester.parser 79 - pure-html 80 - yuujinchou 91 + forester.prelude 92 + iri 93 + jsonrpc 81 94 logs 82 95 logs.fmt 83 - iri 84 - eio 85 - eio.core 86 - eio.unix 87 - eio_main 88 - asai 89 - bwd 90 96 lsp 97 + pure-html 98 + unix 91 99 yojson 92 - jsonrpc)) 100 + yuujinchou))