diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..1227634 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,88 @@ +name: Build & Deploy Asciidoctor Pages + +on: + push: + branches: ["**"] # build on all branches; deploy only from default branch + pull_request: + +# GitHub Pages needs these permissions on the deploy job +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build site + runs-on: ubuntu-latest + # Use the same container image as in GitLab + container: + image: asciidoctor/docker-asciidoctor + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install tools (apk) and Node.js + run: | + apk update + apk add --no-cache nodejs curl unzip tar + which node || true + - name: Install asciidoctor-chunker + working-directory: /tmp + run: | + curl -L -o asciidoctor-chunker_v1.0.4.zip \ + https://github.com/wshito/asciidoctor-chunker/releases/download/v1.0.4/asciidoctor-chunker_v1.0.4.zip + unzip -p asciidoctor-chunker_v1.0.4.zip '*/asciidoctor-chunker.js' > /usr/bin/asciidoctor-chunker + chmod 0755 /usr/bin/asciidoctor-chunker + + - name: Run Asciidoctor + run: | + asciidoctor -a data-uri \ + -a reproducible \ + -a icons=font \ + -a source-highlighter=Pygments \ + -a experimental \ + -a stylesheet=$GITHUB_WORKSPACE/src/stylesheets/readthedocs-new.css \ + -D /tmp \ + -R doc/src '**/*.adoc' + + - name: Chunk HTML + run: | + mkdir -p public + asciidoctor-chunker \ + --depth 1 \ + --outdir public \ + --titlePage '' \ + /tmp/index.html + + - name: Copy stylesheet to public + run: | + cp -v src/asciidoctor-chunker.css public || true + + # Upload the 'public' folder as the artifact GitHub Pages will deploy + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: public + + deploy: + name: Deploy to GitHub Pages + needs: build + runs-on: ubuntu-latest + if: > + github.event_name == 'push' && + github.ref_name == github.event.repository.default_branch + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Configure Pages + uses: actions/configure-pages@v5 + - name: Deploy + id: deployment + uses: actions/deploy-pages@v4 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bca2cd5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pbuild.log diff --git a/doc/asciidoctor-chunker_v1.0.6/LICENSE b/doc/asciidoctor-chunker_v1.0.6/LICENSE new file mode 100644 index 0000000..ab60297 --- /dev/null +++ b/doc/asciidoctor-chunker_v1.0.6/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/doc/asciidoctor-chunker_v1.0.6/README.md b/doc/asciidoctor-chunker_v1.0.6/README.md new file mode 100644 index 0000000..3085004 --- /dev/null +++ b/doc/asciidoctor-chunker_v1.0.6/README.md @@ -0,0 +1,122 @@ +# asciidoctor-chunker + +[![npm version](https://badge.fury.io/js/asciidoctor-chunker.svg)](https://badge.fury.io/js/asciidoctor-chunker) +[![Node.js CI](https://github.com/wshito/asciidoctor-chunker/actions/workflows/node.js.yml/badge.svg)](https://github.com/wshito/asciidoctor-chunker/actions/workflows/node.js.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +Generates chunked (multi-page) HTML from Asciidoctor's single HTML file with the support of fine-tuned splits by chapters, sections, or any depth of subsections. Here is [the sample output.](http://www.seinan-gu.ac.jp/~shito/asciidoctor/html_chunk/index.html) Each chapter can have different levels of extraction depth. See [What it does](#what-it-does) for details. The asciidoctor-chunker is written in JavaScript and is very easy to install. See [Installation](#installation). + +## Latest News + +See [CHANGELOG.md](CHANGELOG.md) for the complete history + +- 2023/2/20 [Ver 1.0.6](https://github.com/wshito/asciidoctor-chunker/releases) Page navigation is disabled with shift+arrow (thanks to [@chloekek](https://github.com/chloekek)). +- 2022/9/14 [Ver 1.0.5](https://github.com/wshito/asciidoctor-chunker/releases) Node.js v18.x is supported. The `npm` installs the shebang script so you can invoke asciidoctor-chunker with `npx`. When the target link within the document is missing, the anchor is still created with `target-missing` class attribute. +- 2021/8/3 [Ver 1.0.4](https://github.com/wshito/asciidoctor-chunker/releases) Added the keyboard shotcuts for the page navigation with arrow keys. Added the accessibility labels on the page navigation for screen readers. +- 2021/6/25 [Ver 1.0.3](https://github.com/wshito/asciidoctor-chunker/releases) Fixed the security vulnerabilities in the dependencies. +- 2021/5/9 [Ver 1.0.2](https://github.com/wshito/asciidoctor-chunker/releases) The toc item for the titlepage can be configured with `--titlePage` option (thanks to [@johnthad](https://github.com/johnthad)). + +## What it does + +Asciidoctor-Chunker generates chunked HTML from a single HTML generated by Asciidoctor. + +1. Splits part preambles and chapters (or any depth of section level) into separate files. Each chapter can be configured to have a different depth for extractions. +1. Extracts css inside the style element into a separate file so the browser can cache and share it among all the pages. +1. Places footnotes in the file they belong to. This also means that the multiply referred footnotes are placed in every referrer's files and sets the link back to the referrer's id within the page. +1. Re-writes the relative links (cross references) in order to point to the appropriate chunked files. The `target-missing` class attribute is added to the anchor when the link target is missing (is undefined in the source document). +1. Copies the local images and linked files (with `link`, `script` and `img` tags) whose paths are relative, to the directory relative to the chunked html output. Files are only copied if they are new or modified compared to the previously copied one. +1. Adds a titlepage link in the toc and non-opinionated page navigation at the bottom of each page. Arrow-keys navigation is supported. +1. Highlights the current page toc items and they get scrolled into the viewport. + +Here is [the sample output](http://www.seinan-gu.ac.jp/~shito/asciidoctor/html_chunk/index.html) created from the [Asciidoctor User Manual](https://asciidoctor.org/docs/user-manual/). The footer on the sample page is added by setting the asciidoctor attribute and is not added by asciidoctor-chunker. + + +## Installation + +Asciidoctor-Chunker is written in JavaScript and runs with NodeJS. + +1. Install [Node.js](https://nodejs.org/), the JavaScript runtime. This will install `npm`, the package manager CLI for Node.js. +1. If you want to install globally, invoke the following; + ``` + npm install -g asciidoctor-chunker + ``` + You can install locally under the current directory as; + ``` + npm install asciidoctor-chunker + ``` +1. Or alternatively you can download the pre-built program from the [release](https://github.com/wshito/asciidoctor-chunker/releases). + +## Usage + +If you installed globally: + ``` + asiidoctor-chunker [single-html-file] -o [output-directory] + ``` +If you installed locally invoke the following under the directory you installed: + ``` + npx asciidoctor-chunker [single-html-file] -o [output-directory] + ``` +If you installed the prebuild program simply run the script as: + ``` + ./asciidoctor-chunker.js [single-html-file] -o [output-directory] + ``` +`[single-html-file]` is the single HTML file generated by [Asciidoctor](https://asciidoctor.org) from the book doctype. If the output directory is not specified, the default is `html_chunks` under the current directory. + +More discription of usage is available with `--help` option. + +## How to Configure the Depth of Extraction + +You can list the multiple settings by connecting each specifier with a comma. Each specifier is consisted of either a single number or a collon separated with two numbers. + +The single number sets the default level of extraction. Number 1 is the application's default and it extracts the chapter level. Number 2 for section extraction, 3 for subsection, and so on to 6 which is the maximum section level of Asciidoctor. + +The list of collon separated numbers, `chap:level`, can change the extraction depth for specific chapters, so `3:2` means chapter 3 is extracted down to 2 levels (ie. section level). You can use a hyphen to specify the range of chapters to set as `chapFrom-chapTo:level`, so `1-3:5` means chapter 1 through 5 should be extracted with the depth level 5. + +Example: +``` + --depth 2 The default level 2, all the chapters and + sections will be extracted. + --depth 3,1:2,8:5 The default level 3, level 2 for Chap 1, + level 5 for Chap 8. + --depth 1,3-8:2 The default level 1, level 2 for Chap 3 to 8. + --depth 3-8:3 No default is set so default level is 1, and + level 3 for chap3 to 8.` +``` + +## Custom CSS + +By default `asciidoctor-chunker.css` is included in the output directory. It provides the non-opinionated page navigation at the bottom of every chunked page. You can override this by giving a comma separated list of paths to your custom css files. They are copied into the output directory so the paths must be accessible by `asciidoctor-chunker`. + +## About Strict Mode + +If you have any custom elements inserted under `
` in the source single html, `asciidoctor-chunker` ignores it by default. If you want them to be included into the chunked html, set the option `--no-strictMode`. +The element will be copied to every chunked page. + +## Customizing Titlepage + +The `index.html` created by `asciidoctor-chunker` is selected by clicking the word **Titlepage** in the table of contents. To change the default value, use the option `--titlePage [string]` where `[string]` is the desired text. + +## Example + +The project contains the `example` directory where you can generate the chunked html for the [Asciidoctor User Manual](https://asciidoctor.org/docs/user-manual/) by invoking `make`. Simply go into the `example` directory and invoke `make`. This will clone the asciidoctor project from the github for the first time, then the chunked html will be generated under `test/output-chunk/html_chunk/` directory. The `index.html` is the first page. + +``` +$ cd example +$ make +``` + +## Related Projects + +- [owenh000/asciidoctor-multipage](https://github.com/owenh000/asciidoctor-multipage) - The similar tool to produce multipage html. It is an extension of [Asciidoctor](https://asciidoctor.org/) and produces multipage html directly from the asciidoc source file. +- [asciidoctor/asciidoctor](https://github.com/asciidoctor/asciidoctor) - The official Asciidoctor repository. + +## License + +MIT + +## Developer's Memo + +- Unit test uses `test/resources/output/single/sample.html` generated from `test/resources/sample.adoc`. +- `npm install cheerio commander` +- `npm install --save-dev ava webpack webpack-cli webpack-shebang-plugin` +- Filename related modules: Toc.mjs diff --git a/doc/asciidoctor-chunker_v1.0.6/asciidoctor-chunker.js b/doc/asciidoctor-chunker_v1.0.6/asciidoctor-chunker.js new file mode 100755 index 0000000..bc8deb0 --- /dev/null +++ b/doc/asciidoctor-chunker_v1.0.6/asciidoctor-chunker.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +(()=>{var e,t,n={73:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},846:e=>{"use strict";e.exports=".nav {\n margin: 0;\n max-width: 150px;\n min-width: 90px;\n justify-content: center;\n align-content: center;\n font-size: 40px;\n color: #ccc;\n text-align: center;\n text-decoration: none;\n text-rendering: auto;\n -webkit-transition: all 350ms ease;\n -moz-transition: all 350ms ease;\n -o-transition: all 350ms ease;\n transition: all 350ms ease\n}\n\n.nav:hover {\n text-decoration: none;\n color: #444\n}\n\n.nav-next {\n float: right;\n display: block;\n}\n\n.nav-prev {\n float: left;\n display: block;\n}\n\n#toc li {\n padding: 0.07rem;\n}\n\nli.current {\n border-radius: 0.5rem;\n background-color: rgb(226, 231, 235);\n /* rgb(226, 231, 235); */\n /* rgb(255, 247, 229); */\n}\n"},81:e=>{"use strict";e.exports=require("child_process")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},17:e=>{"use strict";e.exports=require("path")},168:e=>{"use strict";e.exports=require("process")},461:(e,t,n)=>{const{Argument:s}=n(998),{Command:r}=n(282),{CommanderError:i,InvalidArgumentError:a}=n(56),{Help:o}=n(917),{Option:c}=n(790);(t=e.exports=new r).program=t,t.Argument=s,t.Command=r,t.CommanderError=i,t.Help=o,t.InvalidArgumentError=a,t.InvalidOptionArgumentError=a,t.Option=c},998:(e,t,n)=>{const{InvalidArgumentError:s}=n(56);t.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new s(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},t.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}},282:(e,t,n)=>{const s=n(361).EventEmitter,r=n(81),i=n(17),a=n(147),o=n(168),{Argument:c,humanReadableArgName:h}=n(998),{CommanderError:l}=n(56),{Help:u}=n(917),{Option:d,splitOptionFlags:p,DualOptions:E}=n(790),{suggestSimilar:m}=n(812);class T extends s{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>o.stdout.write(e),writeErr:e=>o.stderr.write(e),getOutHelpWidth:()=>o.stdout.isTTY?o.stdout.columns:void 0,getErrHelpWidth:()=>o.stderr.isTTY?o.stderr.columns:void 0,outputError:(e,t)=>t(e)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,t,n){let s=t,r=n;"object"==typeof s&&null!==s&&(r=s,s=null),r=r||{};const[,i,a]=e.match(/([^ ]+) *(.*)/),o=this.createCommand(i);return s&&(o.description(s),o._executableHandler=!0),r.isDefault&&(this._defaultCommandName=o._name),o._hidden=!(!r.noHelp&&!r.hidden),o._executableFile=r.executableFile||null,a&&o.arguments(a),this.commands.push(o),o.parent=this,o.copyInheritedSettings(this),s?this:o}createCommand(e){return new T(e)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,t){return new c(e,t)}argument(e,t,n,s){const r=this.createArgument(e,t);return"function"==typeof n?r.default(s).argParser(n):r.default(n),this.addArgument(r),this}arguments(e){return e.split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const t=this._args.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,t){return!1===e?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new l(e,t,n)),o.exit(e)}action(e){return this._actionHandler=t=>{const n=this._args.length,s=t.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)},this}createOption(e,t){return new d(e,t)}addOption(e){const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");this.options.push(e);const s=(t,s,r)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const i=this.getOptionValue(n);if(null!==t&&e.parseArg)try{t=e.parseArg(t,i)}catch(e){if("commander.invalidArgument"===e.code){const t=`${s} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}else null!==t&&e.variadic&&(t=e._concatValue(t,i));null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,r)};return this.on("option:"+t,(t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;s(t,n,"cli")})),e.envVar&&this.on("optionEnv:"+t,(t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;s(t,n,"env")})),this}_optionEx(e,t,n,s,r){if("object"==typeof t&&t instanceof d)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const i=this.createOption(t,n);if(i.makeOptionMandatory(!!e.mandatory),"function"==typeof s)i.default(r).argParser(s);else if(s instanceof RegExp){const e=s;s=(t,n)=>{const s=e.exec(t);return s?s[0]:n},i.default(r).argParser(s)}else i.default(s);return this.addOption(i)}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this}setOptionValueWithSource(e,t,n){return this.setOptionValue(e,t),this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let n;switch(t=t||{},void 0===e&&(e=o.argv,o.versions&&o.versions.electron&&(t.from="electron")),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":o.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1;const s=[".js",".ts",".tsx",".mjs",".cjs"];function c(e,t){const n=i.resolve(e,t);if(a.existsSync(n))return n;if(s.includes(i.extname(t)))return;const r=s.find((e=>a.existsSync(`${n}${e}`)));return r?`${n}${r}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let h,u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||"";if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,u);if(!t&&!e._executableFile&&this._scriptPath){const n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u)),"win32"!==o.platform?n?(t.unshift(u),t=A(o.execArgv).concat(t),h=r.spawn(o.argv[0],t,{stdio:"inherit"})):h=r.spawn(u,t,{stdio:"inherit"}):(t.unshift(u),t=A(o.execArgv).concat(t),h=r.spawn(o.execPath,t,{stdio:"inherit"})),h.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{o.on(e,(()=>{!1===h.killed&&null===h.exitCode&&h.kill(e)}))}));const p=this._exitCallback;p?h.on("close",(()=>{p(new l(o.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):h.on("close",o.exit.bind(o)),h.on("error",(t=>{if("ENOENT"===t.code){const t=d?`searched for local subcommand relative to directory '${d}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${u}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(n)}if("EACCES"===t.code)throw new Error(`'${u}' not executable`);if(p){const e=new l(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else o.exit(1)})),this.runningCommand=h}_dispatchSubcommand(e,t,n){const s=this._findCommand(e);let r;return s||this.help({error:!0}),r=this._chainOrCallSubCommandHook(r,s,"preSubcommand"),r=this._chainOrCall(r,(()=>{if(!s._executableHandler)return s._parseCommand(t,n);this._executeSubCommand(s,t.concat(n))})),r}_checkNumberOfArguments(){this._args.forEach(((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())})),this._args.length>0&&this._args[this._args.length-1].variadic||this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let s=t;if(null!==t&&e.parseArg)try{s=e.parseArg(t,n)}catch(n){if("commander.invalidArgument"===n.code){const s=`error: command-argument value '${t}' is invalid for argument '${e.name()}'. ${n.message}`;this.error(s,{exitCode:n.exitCode,code:n.code})}throw n}return s};this._checkNumberOfArguments();const t=[];this._args.forEach(((n,s)=>{let r=n.defaultValue;n.variadic?se(n,s,t)),n.defaultValue))):void 0===r&&(r=[]):st())):t()}_chainOrCallHooks(e,t){let n=e;const s=[];return _(this).reverse().filter((e=>void 0!==e._lifeCycleHooks[t])).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{s.push({hookedCommand:e,callback:t})}))})),"postAction"===t&&s.reverse(),s.forEach((e=>{n=this._chainOrCall(n,(()=>e.callback(e.hookedCommand,this)))})),n}_chainOrCallSubCommandHook(e,t,n){let s=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach((e=>{s=this._chainOrCall(s,(()=>e(this,t)))})),s}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return 1===e.length&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return f(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),f(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const s=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){let n;return s(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,(()=>this._actionHandler(this.processedArgs))),this.parent&&(n=this._chainOrCall(n,(()=>{this.parent.emit(r,e,t)}))),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent&&this.parent.listenerCount(r))s(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),this._processArguments())}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach((t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}));e.filter((e=>e.conflictsWith.length>0)).forEach((t=>{const n=e.find((e=>t.conflictsWith.includes(e.attributeName())));n&&this._conflictingOption(t,n)}))}_checkForConflictingOptions(){for(let e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}parseOptions(e){const t=[],n=[];let s=t;const r=e.slice();function i(e){return e.length>1&&"-"===e[0]}let a=null;for(;r.length;){const e=r.shift();if("--"===e){s===n&&s.push(e),s.push(...r);break}if(!a||i(e)){if(a=null,i(e)){const t=this._findOption(e);if(t){if(t.required){const e=r.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;r.length>0&&!i(r[0])&&(e=r.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);a=t.variadic?t:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),r.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(i(e)&&(s=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(e)){t.push(e),r.length>0&&n.push(...r);break}if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(e),r.length>0&&t.push(...r);break}if(this._defaultCommandName){n.push(e),r.length>0&&n.push(...r);break}}if(this._passThroughOptions){s.push(e),r.length>0&&s.push(...r);break}s.push(e)}else this.emit(`option:${a.name()}`,e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;nObject.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},s=n.exitCode||1,r=n.code||"commander.error";this._exit(s,r,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in o.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,o.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new E(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n))).forEach((e=>{Object.keys(e.implied).filter((e=>!t(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),s=this.options.find((e=>e.negate&&t===e.attributeName())),r=this.options.find((e=>!e.negate&&t===e.attributeName()));return s&&(void 0===s.presetArg&&!1===n||void 0!==s.presetArg&&n===s.presetArg)?s:r||e},s=e=>{const t=n(e),s=t.attributeName();return"env"===this.getOptionValueSource(s)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},r=`error: ${s(e)} cannot be used with ${s(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{const e=s.createHelp().visibleOptions(s).filter((e=>e.long)).map((e=>e.long));n=n.concat(e),s=s.parent}while(s&&!s._enablePositionalOptions);t=m(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this._args.length,n=1===t?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach((e=>{n.push(e.name()),e.alias()&&n.push(e.alias())})),t=m(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const s=this.createOption(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this._args.map((e=>h(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return void 0===t.helpWidth&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){const t={error:!!(e=e||{}).error};let n;return n=t.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getHelpContext(e);_(this).reverse().forEach((e=>e.emit("beforeAllHelp",n))),this.emit("beforeHelp",n);let s=this.helpInformation(n);if(t&&(s=t(s),"string"!=typeof s&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this.emit(this._helpLongFlag),this.emit("afterHelp",n),_(this).forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){if("boolean"==typeof e)return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;const n=p(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e);let t=o.exitCode||0;0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const s=`${e}Help`;return this.on(s,(e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)})),this}}function f(e,t){e._hasHelpOption&&t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function A(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let t,n,s="127.0.0.1",r="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?r=n[3]:s=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],s=n[3],r=n[4]),t&&"0"!==r?`${t}=${s}:${parseInt(r)+1}`:e}))}function _(e){const t=[];for(let n=e;n;n=n.parent)t.push(n);return t}t.Command=T},56:(e,t)=>{class n extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}t.CommanderError=n,t.InvalidArgumentError=class extends n{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}},917:(e,t,n)=>{const{humanReadableArgName:s}=n(998);t.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,n,s]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),r=e.createCommand(n).helpOption(!1);r.description(e._helpCommandDescription),s&&r.arguments(s),t.push(r)}return this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),s=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||s){let r;r=n?s?e.createOption(e._helpFlags,e._helpDescription):e.createOption(e._helpShortFlag,e._helpDescription):e.createOption(e._helpLongFlag,e._helpDescription),t.push(r)}if(this.sortOptions){const e=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");t.sort(((t,n)=>e(t).localeCompare(e(n))))}return t}visibleArguments(e){return e._argsDescription&&e._args.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e._args.find((e=>e.description))?e._args:[]}subcommandTerm(e){const t=e._args.map((e=>s(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t),s=t.helpWidth||80;function r(e,r){if(r){const i=`${e.padEnd(n+2)}${r}`;return t.wrap(i,s-2,n+2)}return e}function i(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let a=[`Usage: ${t.commandUsage(e)}`,""];const o=t.commandDescription(e);o.length>0&&(a=a.concat([o,""]));const c=t.visibleArguments(e).map((e=>r(t.argumentTerm(e),t.argumentDescription(e))));c.length>0&&(a=a.concat(["Arguments:",i(c),""]));const h=t.visibleOptions(e).map((e=>r(t.optionTerm(e),t.optionDescription(e))));h.length>0&&(a=a.concat(["Options:",i(h),""]));const l=t.visibleCommands(e).map((e=>r(t.subcommandTerm(e),t.subcommandDescription(e))));return l.length>0&&(a=a.concat(["Commands:",i(l),""])),a.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,s=40){if(e.match(/[\n]\s+/))return e;const r=t-n;if(r("\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(t>0?o:"")+e.trimRight()))).join("\n")}}},790:(e,t,n)=>{const{InvalidArgumentError:s}=n(56);function r(e){let t,n;const s=e.split(/[ |,]+/);return s.length>1&&!/^[[<]/.test(s[1])&&(t=s.shift()),n=s.shift(),!t&&/^-[^-]$/.test(n)&&(t=n,n=void 0),{shortFlag:t,longFlag:n}}t.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=r(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){return this.implied=Object.assign(this.implied||{},e),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new s(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},t.splitOptionFlags=r,t.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)}))}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const s=this.negativeOptions.get(n).presetArg,r=void 0!==s&&s;return t.negate===(r===e)}}},812:(e,t)=>{t.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const n=e.startsWith("--");n&&(e=e.slice(2),t=t.map((e=>e.slice(2))));let s=[],r=3;return t.forEach((t=>{if(t.length<=1)return;const n=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let s=1;s<=t.length;s++)for(let r=1;r<=e.length;r++){let i=1;i=e[r-1]===t[s-1]?0:1,n[r][s]=Math.min(n[r-1][s]+1,n[r][s-1]+1,n[r-1][s-1]+i),r>1&&s>1&&e[r-1]===t[s-2]&&e[r-2]===t[s-1]&&(n[r][s]=Math.min(n[r][s],n[r-2][s-2]+1))}return n[e.length][t.length]}(e,t),i=Math.max(e.length,t.length);(i-n)/i>.4&&(ne.localeCompare(t))),n&&(s=s.map((e=>`--${e}`))),s.length>1?`\n(Did you mean one of ${s.join(", ")}?)`:1===s.length?`\n(Did you mean ${s[0]}?)`:""}}},s={};function r(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,r.d(i,a),i},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};r.r(e),r.d(e,{DocumentPosition:()=>et,append:()=>ve,appendChild:()=>xe,compareDocumentPosition:()=>tt,existsOne:()=>Ye,filter:()=>He,find:()=>we,findAll:()=>Ve,findOne:()=>Ge,findOneChild:()=>Ue,getAttributeValue:()=>De,getChildren:()=>Se,getElementById:()=>je,getElements:()=>Ke,getElementsByTagName:()=>ze,getElementsByTagType:()=>Je,getFeed:()=>st,getInnerHTML:()=>ge,getName:()=>Le,getOuterHTML:()=>_e,getParent:()=>be,getSiblings:()=>Oe,getText:()=>Ce,hasAttrib:()=>Re,hasChildren:()=>H,innerText:()=>Ie,isCDATA:()=>y,isComment:()=>v,isDocument:()=>F,isTag:()=>P,isText:()=>x,nextElementSibling:()=>ke,prepend:()=>Fe,prependChild:()=>Be,prevElementSibling:()=>Me,removeElement:()=>Pe,removeSubsets:()=>Ze,replaceElement:()=>ye,testElement:()=>Xe,textContent:()=>Ne,uniqueSort:()=>nt});var t={};r.r(t),r.d(t,{contains:()=>ft,html:()=>dt,merge:()=>At,parseHTML:()=>mt,root:()=>Tt,text:()=>Et,xml:()=>pt});var n={};r.r(n),r.d(n,{addClass:()=>$t,attr:()=>yt,data:()=>wt,hasClass:()=>qt,prop:()=>Bt,removeAttr:()=>Vt,removeClass:()=>Wt,toggleClass:()=>Qt,val:()=>Ut});var s={};r.r(s),r.d(s,{add:()=>Qs,addBack:()=>Xs,children:()=>Ls,closest:()=>Cs,contents:()=>ks,each:()=>Ms,end:()=>Ws,eq:()=>Gs,filter:()=>xs,filterArray:()=>vs,find:()=>ds,first:()=>ws,get:()=>Ys,has:()=>Hs,index:()=>qs,is:()=>Bs,last:()=>Us,map:()=>Ps,next:()=>Ns,nextAll:()=>Is,nextUntil:()=>Ss,not:()=>Fs,parent:()=>As,parents:()=>_s,parentsUntil:()=>gs,prev:()=>bs,prevAll:()=>Os,prevUntil:()=>Ds,siblings:()=>Rs,slice:()=>$s,toArray:()=>Vs});var i={};r.r(i),r.d(i,{_makeDomArray:()=>js,after:()=>cr,append:()=>tr,appendTo:()=>Zs,before:()=>lr,clone:()=>Ar,empty:()=>Er,html:()=>mr,insertAfter:()=>hr,insertBefore:()=>ur,prepend:()=>nr,prependTo:()=>er,remove:()=>dr,replaceWith:()=>pr,text:()=>fr,toString:()=>Tr,unwrap:()=>ar,wrap:()=>rr,wrapAll:()=>or,wrapInner:()=>ir});var a={};r.r(a),r.d(a,{css:()=>_r});var o={};r.r(o),r.d(o,{serialize:()=>br,serializeArray:()=>Or});const c=require("node:fs/promises");var h=r(147);const l={xml:!1,decodeEntities:!0},u={_useHtmlParser2:!0,xmlMode:!0};function d(e){return(null==e?void 0:e.xml)?"boolean"==typeof e.xml?u:{...u,...e.xml}:null!=e?e:void 0}var p;!function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(p||(p={}));const E=p.Root,m=p.Text,T=p.Directive,f=p.Comment,A=p.Script,_=p.Style,g=p.Tag,C=p.CDATA,N=p.Doctype;class I{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return w(this,e)}}class S extends I{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}}class b extends S{constructor(){super(...arguments),this.type=p.Text}get nodeType(){return 3}}class O extends S{constructor(){super(...arguments),this.type=p.Comment}get nodeType(){return 8}}class D extends S{constructor(e,t){super(t),this.name=e,this.type=p.Directive}get nodeType(){return 1}}class R extends I{constructor(e){super(),this.children=e}get firstChild(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}}class L extends R{constructor(){super(...arguments),this.type=p.CDATA}get nodeType(){return 4}}class k extends R{constructor(){super(...arguments),this.type=p.Root}get nodeType(){return 9}}class M extends R{constructor(e,t,n=[],s=("script"===e?p.Script:"style"===e?p.Style:p.Tag)){super(n),this.name=e,this.attribs=t,this.type=s}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map((e=>{var t,n;return{name:e,value:this.attribs[e],namespace:null===(t=this["x-attribsNamespace"])||void 0===t?void 0:t[e],prefix:null===(n=this["x-attribsPrefix"])||void 0===n?void 0:n[e]}}))}}function P(e){return(t=e).type===p.Tag||t.type===p.Script||t.type===p.Style;var t}function y(e){return e.type===p.CDATA}function x(e){return e.type===p.Text}function v(e){return e.type===p.Comment}function B(e){return e.type===p.Directive}function F(e){return e.type===p.Root}function H(e){return Object.prototype.hasOwnProperty.call(e,"children")}function w(e,t=!1){let n;if(x(e))n=new b(e.data);else if(v(e))n=new O(e.data);else if(P(e)){const s=t?U(e.children):[],r=new M(e.name,{...e.attribs},s);s.forEach((e=>e.parent=r)),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]={...e["x-attribsPrefix"]}),n=r}else if(y(e)){const s=t?U(e.children):[],r=new L(s);s.forEach((e=>e.parent=r)),n=r}else if(F(e)){const s=t?U(e.children):[],r=new k(s);s.forEach((e=>e.parent=r)),e["x-mode"]&&(r["x-mode"]=e["x-mode"]),n=r}else{if(!B(e))throw new Error(`Not implemented yet: ${e.type}`);{const t=new D(e.name,e.data);null!=e["x-name"]&&(t["x-name"]=e["x-name"],t["x-publicId"]=e["x-publicId"],t["x-systemId"]=e["x-systemId"]),n=t}}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function U(e){const t=e.map((e=>w(e,!0)));for(let e=1;e65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function X(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=W.get(e))&&void 0!==t?t:e}var K,j;function z(e){return function(t,n){let s="",r=0,i=0;for(;(i=t.indexOf("&",i))>=0;){if(s+=t.slice(r,i),r=i,i+=1,t.charCodeAt(i)===K.NUM){let e=i+1,a=10,o=t.charCodeAt(e);(o|K.To_LOWER_BIT)===K.LOWER_X&&(a=16,i+=1,e+=1);do{o=t.charCodeAt(++i)}while(o>=K.ZERO&&o<=K.NINE||16===a&&(o|K.To_LOWER_BIT)>=K.LOWER_A&&(o|K.To_LOWER_BIT)<=K.LOWER_F);if(e!==i){const o=t.substring(e,i),c=parseInt(o,a);if(t.charCodeAt(i)===K.SEMI)i+=1;else if(n)continue;s+=Q(X(c)),r=i}continue}let a=0,o=1,c=0,h=e[c];for(;i>14)-1;if(0===e)break;c+=e}}if(0!==a){const t=(e[a]&j.VALUE_LENGTH)>>14;s+=1===t?String.fromCharCode(e[a]&~j.VALUE_LENGTH):2===t?String.fromCharCode(e[a+1]):String.fromCharCode(e[a+1],e[a+2]),r=i-o+1}}return s+t.slice(r)}}function J(e,t,n,s){const r=(t&j.BRANCH_LENGTH)>>7,i=t&j.JUMP_TABLE;if(0===r)return 0!==i&&s===i?n:-1;if(i){const t=s-i;return t<0||t>r?-1:e[n+t]-1}let a=n,o=a+r-1;for(;a<=o;){const t=a+o>>>1,n=e[t];if(ns))return e[t+r];o=t-1}}return-1}!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.To_LOWER_BIT=32]="To_LOWER_BIT"}(K||(K={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(j||(j={})),z(V),z(q),new Map([[9," "],[10," "],[33,"!"],[34,"""],[35,"#"],[36,"$"],[37,"%"],[38,"&"],[39,"'"],[40,"("],[41,")"],[42,"*"],[43,"+"],[44,","],[46,"."],[47,"/"],[58,":"],[59,";"],[60,{v:"<",n:8402,o:"<⃒"}],[61,{v:"=",n:8421,o:"=⃥"}],[62,{v:">",n:8402,o:">⃒"}],[63,"?"],[64,"@"],[91,"["],[92,"\"],[93,"]"],[94,"^"],[95,"_"],[96,"`"],[102,{n:106,o:"fj"}],[123,"{"],[124,"|"],[125,"}"],[160," "],[161,"¡"],[162,"¢"],[163,"£"],[164,"¤"],[165,"¥"],[166,"¦"],[167,"§"],[168,"¨"],[169,"©"],[170,"ª"],[171,"«"],[172,"¬"],[173,"­"],[174,"®"],[175,"¯"],[176,"°"],[177,"±"],[178,"²"],[179,"³"],[180,"´"],[181,"µ"],[182,"¶"],[183,"·"],[184,"¸"],[185,"¹"],[186,"º"],[187,"»"],[188,"¼"],[189,"½"],[190,"¾"],[191,"¿"],[192,"À"],[193,"Á"],[194,"Â"],[195,"Ã"],[196,"Ä"],[197,"Å"],[198,"Æ"],[199,"Ç"],[200,"È"],[201,"É"],[202,"Ê"],[203,"Ë"],[204,"Ì"],[205,"Í"],[206,"Î"],[207,"Ï"],[208,"Ð"],[209,"Ñ"],[210,"Ò"],[211,"Ó"],[212,"Ô"],[213,"Õ"],[214,"Ö"],[215,"×"],[216,"Ø"],[217,"Ù"],[218,"Ú"],[219,"Û"],[220,"Ü"],[221,"Ý"],[222,"Þ"],[223,"ß"],[224,"à"],[225,"á"],[226,"â"],[227,"ã"],[228,"ä"],[229,"å"],[230,"æ"],[231,"ç"],[232,"è"],[233,"é"],[234,"ê"],[235,"ë"],[236,"ì"],[237,"í"],[238,"î"],[239,"ï"],[240,"ð"],[241,"ñ"],[242,"ò"],[243,"ó"],[244,"ô"],[245,"õ"],[246,"ö"],[247,"÷"],[248,"ø"],[249,"ù"],[250,"ú"],[251,"û"],[252,"ü"],[253,"ý"],[254,"þ"],[255,"ÿ"],[256,"Ā"],[257,"ā"],[258,"Ă"],[259,"ă"],[260,"Ą"],[261,"ą"],[262,"Ć"],[263,"ć"],[264,"Ĉ"],[265,"ĉ"],[266,"Ċ"],[267,"ċ"],[268,"Č"],[269,"č"],[270,"Ď"],[271,"ď"],[272,"Đ"],[273,"đ"],[274,"Ē"],[275,"ē"],[278,"Ė"],[279,"ė"],[280,"Ę"],[281,"ę"],[282,"Ě"],[283,"ě"],[284,"Ĝ"],[285,"ĝ"],[286,"Ğ"],[287,"ğ"],[288,"Ġ"],[289,"ġ"],[290,"Ģ"],[292,"Ĥ"],[293,"ĥ"],[294,"Ħ"],[295,"ħ"],[296,"Ĩ"],[297,"ĩ"],[298,"Ī"],[299,"ī"],[302,"Į"],[303,"į"],[304,"İ"],[305,"ı"],[306,"IJ"],[307,"ij"],[308,"Ĵ"],[309,"ĵ"],[310,"Ķ"],[311,"ķ"],[312,"ĸ"],[313,"Ĺ"],[314,"ĺ"],[315,"Ļ"],[316,"ļ"],[317,"Ľ"],[318,"ľ"],[319,"Ŀ"],[320,"ŀ"],[321,"Ł"],[322,"ł"],[323,"Ń"],[324,"ń"],[325,"Ņ"],[326,"ņ"],[327,"Ň"],[328,"ň"],[329,"ʼn"],[330,"Ŋ"],[331,"ŋ"],[332,"Ō"],[333,"ō"],[336,"Ő"],[337,"ő"],[338,"Œ"],[339,"œ"],[340,"Ŕ"],[341,"ŕ"],[342,"Ŗ"],[343,"ŗ"],[344,"Ř"],[345,"ř"],[346,"Ś"],[347,"ś"],[348,"Ŝ"],[349,"ŝ"],[350,"Ş"],[351,"ş"],[352,"Š"],[353,"š"],[354,"Ţ"],[355,"ţ"],[356,"Ť"],[357,"ť"],[358,"Ŧ"],[359,"ŧ"],[360,"Ũ"],[361,"ũ"],[362,"Ū"],[363,"ū"],[364,"Ŭ"],[365,"ŭ"],[366,"Ů"],[367,"ů"],[368,"Ű"],[369,"ű"],[370,"Ų"],[371,"ų"],[372,"Ŵ"],[373,"ŵ"],[374,"Ŷ"],[375,"ŷ"],[376,"Ÿ"],[377,"Ź"],[378,"ź"],[379,"Ż"],[380,"ż"],[381,"Ž"],[382,"ž"],[402,"ƒ"],[437,"Ƶ"],[501,"ǵ"],[567,"ȷ"],[710,"ˆ"],[711,"ˇ"],[728,"˘"],[729,"˙"],[730,"˚"],[731,"˛"],[732,"˜"],[733,"˝"],[785,"̑"],[913,"Α"],[914,"Β"],[915,"Γ"],[916,"Δ"],[917,"Ε"],[918,"Ζ"],[919,"Η"],[920,"Θ"],[921,"Ι"],[922,"Κ"],[923,"Λ"],[924,"Μ"],[925,"Ν"],[926,"Ξ"],[927,"Ο"],[928,"Π"],[929,"Ρ"],[931,"Σ"],[932,"Τ"],[933,"Υ"],[934,"Φ"],[935,"Χ"],[936,"Ψ"],[937,"Ω"],[945,"α"],[946,"β"],[947,"γ"],[948,"δ"],[949,"ε"],[950,"ζ"],[951,"η"],[952,"θ"],[953,"ι"],[954,"κ"],[955,"λ"],[956,"μ"],[957,"ν"],[958,"ξ"],[959,"ο"],[960,"π"],[961,"ρ"],[962,"ς"],[963,"σ"],[964,"τ"],[965,"υ"],[966,"φ"],[967,"χ"],[968,"ψ"],[969,"ω"],[977,"ϑ"],[978,"ϒ"],[981,"ϕ"],[982,"ϖ"],[988,"Ϝ"],[989,"ϝ"],[1008,"ϰ"],[1009,"ϱ"],[1013,"ϵ"],[1014,"϶"],[1025,"Ё"],[1026,"Ђ"],[1027,"Ѓ"],[1028,"Є"],[1029,"Ѕ"],[1030,"І"],[1031,"Ї"],[1032,"Ј"],[1033,"Љ"],[1034,"Њ"],[1035,"Ћ"],[1036,"Ќ"],[1038,"Ў"],[1039,"Џ"],[1040,"А"],[1041,"Б"],[1042,"В"],[1043,"Г"],[1044,"Д"],[1045,"Е"],[1046,"Ж"],[1047,"З"],[1048,"И"],[1049,"Й"],[1050,"К"],[1051,"Л"],[1052,"М"],[1053,"Н"],[1054,"О"],[1055,"П"],[1056,"Р"],[1057,"С"],[1058,"Т"],[1059,"У"],[1060,"Ф"],[1061,"Х"],[1062,"Ц"],[1063,"Ч"],[1064,"Ш"],[1065,"Щ"],[1066,"Ъ"],[1067,"Ы"],[1068,"Ь"],[1069,"Э"],[1070,"Ю"],[1071,"Я"],[1072,"а"],[1073,"б"],[1074,"в"],[1075,"г"],[1076,"д"],[1077,"е"],[1078,"ж"],[1079,"з"],[1080,"и"],[1081,"й"],[1082,"к"],[1083,"л"],[1084,"м"],[1085,"н"],[1086,"о"],[1087,"п"],[1088,"р"],[1089,"с"],[1090,"т"],[1091,"у"],[1092,"ф"],[1093,"х"],[1094,"ц"],[1095,"ч"],[1096,"ш"],[1097,"щ"],[1098,"ъ"],[1099,"ы"],[1100,"ь"],[1101,"э"],[1102,"ю"],[1103,"я"],[1105,"ё"],[1106,"ђ"],[1107,"ѓ"],[1108,"є"],[1109,"ѕ"],[1110,"і"],[1111,"ї"],[1112,"ј"],[1113,"љ"],[1114,"њ"],[1115,"ћ"],[1116,"ќ"],[1118,"ў"],[1119,"џ"],[8194," "],[8195," "],[8196," "],[8197," "],[8199," "],[8200," "],[8201," "],[8202," "],[8203,"​"],[8204,"‌"],[8205,"‍"],[8206,"‎"],[8207,"‏"],[8208,"‐"],[8211,"–"],[8212,"—"],[8213,"―"],[8214,"‖"],[8216,"‘"],[8217,"’"],[8218,"‚"],[8220,"“"],[8221,"”"],[8222,"„"],[8224,"†"],[8225,"‡"],[8226,"•"],[8229,"‥"],[8230,"…"],[8240,"‰"],[8241,"‱"],[8242,"′"],[8243,"″"],[8244,"‴"],[8245,"‵"],[8249,"‹"],[8250,"›"],[8254,"‾"],[8257,"⁁"],[8259,"⁃"],[8260,"⁄"],[8271,"⁏"],[8279,"⁗"],[8287,{v:" ",n:8202,o:"  "}],[8288,"⁠"],[8289,"⁡"],[8290,"⁢"],[8291,"⁣"],[8364,"€"],[8411,"⃛"],[8412,"⃜"],[8450,"ℂ"],[8453,"℅"],[8458,"ℊ"],[8459,"ℋ"],[8460,"ℌ"],[8461,"ℍ"],[8462,"ℎ"],[8463,"ℏ"],[8464,"ℐ"],[8465,"ℑ"],[8466,"ℒ"],[8467,"ℓ"],[8469,"ℕ"],[8470,"№"],[8471,"℗"],[8472,"℘"],[8473,"ℙ"],[8474,"ℚ"],[8475,"ℛ"],[8476,"ℜ"],[8477,"ℝ"],[8478,"℞"],[8482,"™"],[8484,"ℤ"],[8487,"℧"],[8488,"ℨ"],[8489,"℩"],[8492,"ℬ"],[8493,"ℭ"],[8495,"ℯ"],[8496,"ℰ"],[8497,"ℱ"],[8499,"ℳ"],[8500,"ℴ"],[8501,"ℵ"],[8502,"ℶ"],[8503,"ℷ"],[8504,"ℸ"],[8517,"ⅅ"],[8518,"ⅆ"],[8519,"ⅇ"],[8520,"ⅈ"],[8531,"⅓"],[8532,"⅔"],[8533,"⅕"],[8534,"⅖"],[8535,"⅗"],[8536,"⅘"],[8537,"⅙"],[8538,"⅚"],[8539,"⅛"],[8540,"⅜"],[8541,"⅝"],[8542,"⅞"],[8592,"←"],[8593,"↑"],[8594,"→"],[8595,"↓"],[8596,"↔"],[8597,"↕"],[8598,"↖"],[8599,"↗"],[8600,"↘"],[8601,"↙"],[8602,"↚"],[8603,"↛"],[8605,{v:"↝",n:824,o:"↝̸"}],[8606,"↞"],[8607,"↟"],[8608,"↠"],[8609,"↡"],[8610,"↢"],[8611,"↣"],[8612,"↤"],[8613,"↥"],[8614,"↦"],[8615,"↧"],[8617,"↩"],[8618,"↪"],[8619,"↫"],[8620,"↬"],[8621,"↭"],[8622,"↮"],[8624,"↰"],[8625,"↱"],[8626,"↲"],[8627,"↳"],[8629,"↵"],[8630,"↶"],[8631,"↷"],[8634,"↺"],[8635,"↻"],[8636,"↼"],[8637,"↽"],[8638,"↾"],[8639,"↿"],[8640,"⇀"],[8641,"⇁"],[8642,"⇂"],[8643,"⇃"],[8644,"⇄"],[8645,"⇅"],[8646,"⇆"],[8647,"⇇"],[8648,"⇈"],[8649,"⇉"],[8650,"⇊"],[8651,"⇋"],[8652,"⇌"],[8653,"⇍"],[8654,"⇎"],[8655,"⇏"],[8656,"⇐"],[8657,"⇑"],[8658,"⇒"],[8659,"⇓"],[8660,"⇔"],[8661,"⇕"],[8662,"⇖"],[8663,"⇗"],[8664,"⇘"],[8665,"⇙"],[8666,"⇚"],[8667,"⇛"],[8669,"⇝"],[8676,"⇤"],[8677,"⇥"],[8693,"⇵"],[8701,"⇽"],[8702,"⇾"],[8703,"⇿"],[8704,"∀"],[8705,"∁"],[8706,{v:"∂",n:824,o:"∂̸"}],[8707,"∃"],[8708,"∄"],[8709,"∅"],[8711,"∇"],[8712,"∈"],[8713,"∉"],[8715,"∋"],[8716,"∌"],[8719,"∏"],[8720,"∐"],[8721,"∑"],[8722,"−"],[8723,"∓"],[8724,"∔"],[8726,"∖"],[8727,"∗"],[8728,"∘"],[8730,"√"],[8733,"∝"],[8734,"∞"],[8735,"∟"],[8736,{v:"∠",n:8402,o:"∠⃒"}],[8737,"∡"],[8738,"∢"],[8739,"∣"],[8740,"∤"],[8741,"∥"],[8742,"∦"],[8743,"∧"],[8744,"∨"],[8745,{v:"∩",n:65024,o:"∩︀"}],[8746,{v:"∪",n:65024,o:"∪︀"}],[8747,"∫"],[8748,"∬"],[8749,"∭"],[8750,"∮"],[8751,"∯"],[8752,"∰"],[8753,"∱"],[8754,"∲"],[8755,"∳"],[8756,"∴"],[8757,"∵"],[8758,"∶"],[8759,"∷"],[8760,"∸"],[8762,"∺"],[8763,"∻"],[8764,{v:"∼",n:8402,o:"∼⃒"}],[8765,{v:"∽",n:817,o:"∽̱"}],[8766,{v:"∾",n:819,o:"∾̳"}],[8767,"∿"],[8768,"≀"],[8769,"≁"],[8770,{v:"≂",n:824,o:"≂̸"}],[8771,"≃"],[8772,"≄"],[8773,"≅"],[8774,"≆"],[8775,"≇"],[8776,"≈"],[8777,"≉"],[8778,"≊"],[8779,{v:"≋",n:824,o:"≋̸"}],[8780,"≌"],[8781,{v:"≍",n:8402,o:"≍⃒"}],[8782,{v:"≎",n:824,o:"≎̸"}],[8783,{v:"≏",n:824,o:"≏̸"}],[8784,{v:"≐",n:824,o:"≐̸"}],[8785,"≑"],[8786,"≒"],[8787,"≓"],[8788,"≔"],[8789,"≕"],[8790,"≖"],[8791,"≗"],[8793,"≙"],[8794,"≚"],[8796,"≜"],[8799,"≟"],[8800,"≠"],[8801,{v:"≡",n:8421,o:"≡⃥"}],[8802,"≢"],[8804,{v:"≤",n:8402,o:"≤⃒"}],[8805,{v:"≥",n:8402,o:"≥⃒"}],[8806,{v:"≦",n:824,o:"≦̸"}],[8807,{v:"≧",n:824,o:"≧̸"}],[8808,{v:"≨",n:65024,o:"≨︀"}],[8809,{v:"≩",n:65024,o:"≩︀"}],[8810,{v:"≪",n:new Map([[824,"≪̸"],[8402,"≪⃒"]])}],[8811,{v:"≫",n:new Map([[824,"≫̸"],[8402,"≫⃒"]])}],[8812,"≬"],[8813,"≭"],[8814,"≮"],[8815,"≯"],[8816,"≰"],[8817,"≱"],[8818,"≲"],[8819,"≳"],[8820,"≴"],[8821,"≵"],[8822,"≶"],[8823,"≷"],[8824,"≸"],[8825,"≹"],[8826,"≺"],[8827,"≻"],[8828,"≼"],[8829,"≽"],[8830,"≾"],[8831,{v:"≿",n:824,o:"≿̸"}],[8832,"⊀"],[8833,"⊁"],[8834,{v:"⊂",n:8402,o:"⊂⃒"}],[8835,{v:"⊃",n:8402,o:"⊃⃒"}],[8836,"⊄"],[8837,"⊅"],[8838,"⊆"],[8839,"⊇"],[8840,"⊈"],[8841,"⊉"],[8842,{v:"⊊",n:65024,o:"⊊︀"}],[8843,{v:"⊋",n:65024,o:"⊋︀"}],[8845,"⊍"],[8846,"⊎"],[8847,{v:"⊏",n:824,o:"⊏̸"}],[8848,{v:"⊐",n:824,o:"⊐̸"}],[8849,"⊑"],[8850,"⊒"],[8851,{v:"⊓",n:65024,o:"⊓︀"}],[8852,{v:"⊔",n:65024,o:"⊔︀"}],[8853,"⊕"],[8854,"⊖"],[8855,"⊗"],[8856,"⊘"],[8857,"⊙"],[8858,"⊚"],[8859,"⊛"],[8861,"⊝"],[8862,"⊞"],[8863,"⊟"],[8864,"⊠"],[8865,"⊡"],[8866,"⊢"],[8867,"⊣"],[8868,"⊤"],[8869,"⊥"],[8871,"⊧"],[8872,"⊨"],[8873,"⊩"],[8874,"⊪"],[8875,"⊫"],[8876,"⊬"],[8877,"⊭"],[8878,"⊮"],[8879,"⊯"],[8880,"⊰"],[8882,"⊲"],[8883,"⊳"],[8884,{v:"⊴",n:8402,o:"⊴⃒"}],[8885,{v:"⊵",n:8402,o:"⊵⃒"}],[8886,"⊶"],[8887,"⊷"],[8888,"⊸"],[8889,"⊹"],[8890,"⊺"],[8891,"⊻"],[8893,"⊽"],[8894,"⊾"],[8895,"⊿"],[8896,"⋀"],[8897,"⋁"],[8898,"⋂"],[8899,"⋃"],[8900,"⋄"],[8901,"⋅"],[8902,"⋆"],[8903,"⋇"],[8904,"⋈"],[8905,"⋉"],[8906,"⋊"],[8907,"⋋"],[8908,"⋌"],[8909,"⋍"],[8910,"⋎"],[8911,"⋏"],[8912,"⋐"],[8913,"⋑"],[8914,"⋒"],[8915,"⋓"],[8916,"⋔"],[8917,"⋕"],[8918,"⋖"],[8919,"⋗"],[8920,{v:"⋘",n:824,o:"⋘̸"}],[8921,{v:"⋙",n:824,o:"⋙̸"}],[8922,{v:"⋚",n:65024,o:"⋚︀"}],[8923,{v:"⋛",n:65024,o:"⋛︀"}],[8926,"⋞"],[8927,"⋟"],[8928,"⋠"],[8929,"⋡"],[8930,"⋢"],[8931,"⋣"],[8934,"⋦"],[8935,"⋧"],[8936,"⋨"],[8937,"⋩"],[8938,"⋪"],[8939,"⋫"],[8940,"⋬"],[8941,"⋭"],[8942,"⋮"],[8943,"⋯"],[8944,"⋰"],[8945,"⋱"],[8946,"⋲"],[8947,"⋳"],[8948,"⋴"],[8949,{v:"⋵",n:824,o:"⋵̸"}],[8950,"⋶"],[8951,"⋷"],[8953,{v:"⋹",n:824,o:"⋹̸"}],[8954,"⋺"],[8955,"⋻"],[8956,"⋼"],[8957,"⋽"],[8958,"⋾"],[8965,"⌅"],[8966,"⌆"],[8968,"⌈"],[8969,"⌉"],[8970,"⌊"],[8971,"⌋"],[8972,"⌌"],[8973,"⌍"],[8974,"⌎"],[8975,"⌏"],[8976,"⌐"],[8978,"⌒"],[8979,"⌓"],[8981,"⌕"],[8982,"⌖"],[8988,"⌜"],[8989,"⌝"],[8990,"⌞"],[8991,"⌟"],[8994,"⌢"],[8995,"⌣"],[9005,"⌭"],[9006,"⌮"],[9014,"⌶"],[9021,"⌽"],[9023,"⌿"],[9084,"⍼"],[9136,"⎰"],[9137,"⎱"],[9140,"⎴"],[9141,"⎵"],[9142,"⎶"],[9180,"⏜"],[9181,"⏝"],[9182,"⏞"],[9183,"⏟"],[9186,"⏢"],[9191,"⏧"],[9251,"␣"],[9416,"Ⓢ"],[9472,"─"],[9474,"│"],[9484,"┌"],[9488,"┐"],[9492,"└"],[9496,"┘"],[9500,"├"],[9508,"┤"],[9516,"┬"],[9524,"┴"],[9532,"┼"],[9552,"═"],[9553,"║"],[9554,"╒"],[9555,"╓"],[9556,"╔"],[9557,"╕"],[9558,"╖"],[9559,"╗"],[9560,"╘"],[9561,"╙"],[9562,"╚"],[9563,"╛"],[9564,"╜"],[9565,"╝"],[9566,"╞"],[9567,"╟"],[9568,"╠"],[9569,"╡"],[9570,"╢"],[9571,"╣"],[9572,"╤"],[9573,"╥"],[9574,"╦"],[9575,"╧"],[9576,"╨"],[9577,"╩"],[9578,"╪"],[9579,"╫"],[9580,"╬"],[9600,"▀"],[9604,"▄"],[9608,"█"],[9617,"░"],[9618,"▒"],[9619,"▓"],[9633,"□"],[9642,"▪"],[9643,"▫"],[9645,"▭"],[9646,"▮"],[9649,"▱"],[9651,"△"],[9652,"▴"],[9653,"▵"],[9656,"▸"],[9657,"▹"],[9661,"▽"],[9662,"▾"],[9663,"▿"],[9666,"◂"],[9667,"◃"],[9674,"◊"],[9675,"○"],[9708,"◬"],[9711,"◯"],[9720,"◸"],[9721,"◹"],[9722,"◺"],[9723,"◻"],[9724,"◼"],[9733,"★"],[9734,"☆"],[9742,"☎"],[9792,"♀"],[9794,"♂"],[9824,"♠"],[9827,"♣"],[9829,"♥"],[9830,"♦"],[9834,"♪"],[9837,"♭"],[9838,"♮"],[9839,"♯"],[10003,"✓"],[10007,"✗"],[10016,"✠"],[10038,"✶"],[10072,"❘"],[10098,"❲"],[10099,"❳"],[10184,"⟈"],[10185,"⟉"],[10214,"⟦"],[10215,"⟧"],[10216,"⟨"],[10217,"⟩"],[10218,"⟪"],[10219,"⟫"],[10220,"⟬"],[10221,"⟭"],[10229,"⟵"],[10230,"⟶"],[10231,"⟷"],[10232,"⟸"],[10233,"⟹"],[10234,"⟺"],[10236,"⟼"],[10239,"⟿"],[10498,"⤂"],[10499,"⤃"],[10500,"⤄"],[10501,"⤅"],[10508,"⤌"],[10509,"⤍"],[10510,"⤎"],[10511,"⤏"],[10512,"⤐"],[10513,"⤑"],[10514,"⤒"],[10515,"⤓"],[10518,"⤖"],[10521,"⤙"],[10522,"⤚"],[10523,"⤛"],[10524,"⤜"],[10525,"⤝"],[10526,"⤞"],[10527,"⤟"],[10528,"⤠"],[10531,"⤣"],[10532,"⤤"],[10533,"⤥"],[10534,"⤦"],[10535,"⤧"],[10536,"⤨"],[10537,"⤩"],[10538,"⤪"],[10547,{v:"⤳",n:824,o:"⤳̸"}],[10549,"⤵"],[10550,"⤶"],[10551,"⤷"],[10552,"⤸"],[10553,"⤹"],[10556,"⤼"],[10557,"⤽"],[10565,"⥅"],[10568,"⥈"],[10569,"⥉"],[10570,"⥊"],[10571,"⥋"],[10574,"⥎"],[10575,"⥏"],[10576,"⥐"],[10577,"⥑"],[10578,"⥒"],[10579,"⥓"],[10580,"⥔"],[10581,"⥕"],[10582,"⥖"],[10583,"⥗"],[10584,"⥘"],[10585,"⥙"],[10586,"⥚"],[10587,"⥛"],[10588,"⥜"],[10589,"⥝"],[10590,"⥞"],[10591,"⥟"],[10592,"⥠"],[10593,"⥡"],[10594,"⥢"],[10595,"⥣"],[10596,"⥤"],[10597,"⥥"],[10598,"⥦"],[10599,"⥧"],[10600,"⥨"],[10601,"⥩"],[10602,"⥪"],[10603,"⥫"],[10604,"⥬"],[10605,"⥭"],[10606,"⥮"],[10607,"⥯"],[10608,"⥰"],[10609,"⥱"],[10610,"⥲"],[10611,"⥳"],[10612,"⥴"],[10613,"⥵"],[10614,"⥶"],[10616,"⥸"],[10617,"⥹"],[10619,"⥻"],[10620,"⥼"],[10621,"⥽"],[10622,"⥾"],[10623,"⥿"],[10629,"⦅"],[10630,"⦆"],[10635,"⦋"],[10636,"⦌"],[10637,"⦍"],[10638,"⦎"],[10639,"⦏"],[10640,"⦐"],[10641,"⦑"],[10642,"⦒"],[10643,"⦓"],[10644,"⦔"],[10645,"⦕"],[10646,"⦖"],[10650,"⦚"],[10652,"⦜"],[10653,"⦝"],[10660,"⦤"],[10661,"⦥"],[10662,"⦦"],[10663,"⦧"],[10664,"⦨"],[10665,"⦩"],[10666,"⦪"],[10667,"⦫"],[10668,"⦬"],[10669,"⦭"],[10670,"⦮"],[10671,"⦯"],[10672,"⦰"],[10673,"⦱"],[10674,"⦲"],[10675,"⦳"],[10676,"⦴"],[10677,"⦵"],[10678,"⦶"],[10679,"⦷"],[10681,"⦹"],[10683,"⦻"],[10684,"⦼"],[10686,"⦾"],[10687,"⦿"],[10688,"⧀"],[10689,"⧁"],[10690,"⧂"],[10691,"⧃"],[10692,"⧄"],[10693,"⧅"],[10697,"⧉"],[10701,"⧍"],[10702,"⧎"],[10703,{v:"⧏",n:824,o:"⧏̸"}],[10704,{v:"⧐",n:824,o:"⧐̸"}],[10716,"⧜"],[10717,"⧝"],[10718,"⧞"],[10723,"⧣"],[10724,"⧤"],[10725,"⧥"],[10731,"⧫"],[10740,"⧴"],[10742,"⧶"],[10752,"⨀"],[10753,"⨁"],[10754,"⨂"],[10756,"⨄"],[10758,"⨆"],[10764,"⨌"],[10765,"⨍"],[10768,"⨐"],[10769,"⨑"],[10770,"⨒"],[10771,"⨓"],[10772,"⨔"],[10773,"⨕"],[10774,"⨖"],[10775,"⨗"],[10786,"⨢"],[10787,"⨣"],[10788,"⨤"],[10789,"⨥"],[10790,"⨦"],[10791,"⨧"],[10793,"⨩"],[10794,"⨪"],[10797,"⨭"],[10798,"⨮"],[10799,"⨯"],[10800,"⨰"],[10801,"⨱"],[10803,"⨳"],[10804,"⨴"],[10805,"⨵"],[10806,"⨶"],[10807,"⨷"],[10808,"⨸"],[10809,"⨹"],[10810,"⨺"],[10811,"⨻"],[10812,"⨼"],[10815,"⨿"],[10816,"⩀"],[10818,"⩂"],[10819,"⩃"],[10820,"⩄"],[10821,"⩅"],[10822,"⩆"],[10823,"⩇"],[10824,"⩈"],[10825,"⩉"],[10826,"⩊"],[10827,"⩋"],[10828,"⩌"],[10829,"⩍"],[10832,"⩐"],[10835,"⩓"],[10836,"⩔"],[10837,"⩕"],[10838,"⩖"],[10839,"⩗"],[10840,"⩘"],[10842,"⩚"],[10843,"⩛"],[10844,"⩜"],[10845,"⩝"],[10847,"⩟"],[10854,"⩦"],[10858,"⩪"],[10861,{v:"⩭",n:824,o:"⩭̸"}],[10862,"⩮"],[10863,"⩯"],[10864,{v:"⩰",n:824,o:"⩰̸"}],[10865,"⩱"],[10866,"⩲"],[10867,"⩳"],[10868,"⩴"],[10869,"⩵"],[10871,"⩷"],[10872,"⩸"],[10873,"⩹"],[10874,"⩺"],[10875,"⩻"],[10876,"⩼"],[10877,{v:"⩽",n:824,o:"⩽̸"}],[10878,{v:"⩾",n:824,o:"⩾̸"}],[10879,"⩿"],[10880,"⪀"],[10881,"⪁"],[10882,"⪂"],[10883,"⪃"],[10884,"⪄"],[10885,"⪅"],[10886,"⪆"],[10887,"⪇"],[10888,"⪈"],[10889,"⪉"],[10890,"⪊"],[10891,"⪋"],[10892,"⪌"],[10893,"⪍"],[10894,"⪎"],[10895,"⪏"],[10896,"⪐"],[10897,"⪑"],[10898,"⪒"],[10899,"⪓"],[10900,"⪔"],[10901,"⪕"],[10902,"⪖"],[10903,"⪗"],[10904,"⪘"],[10905,"⪙"],[10906,"⪚"],[10909,"⪝"],[10910,"⪞"],[10911,"⪟"],[10912,"⪠"],[10913,{v:"⪡",n:824,o:"⪡̸"}],[10914,{v:"⪢",n:824,o:"⪢̸"}],[10916,"⪤"],[10917,"⪥"],[10918,"⪦"],[10919,"⪧"],[10920,"⪨"],[10921,"⪩"],[10922,"⪪"],[10923,"⪫"],[10924,{v:"⪬",n:65024,o:"⪬︀"}],[10925,{v:"⪭",n:65024,o:"⪭︀"}],[10926,"⪮"],[10927,{v:"⪯",n:824,o:"⪯̸"}],[10928,{v:"⪰",n:824,o:"⪰̸"}],[10931,"⪳"],[10932,"⪴"],[10933,"⪵"],[10934,"⪶"],[10935,"⪷"],[10936,"⪸"],[10937,"⪹"],[10938,"⪺"],[10939,"⪻"],[10940,"⪼"],[10941,"⪽"],[10942,"⪾"],[10943,"⪿"],[10944,"⫀"],[10945,"⫁"],[10946,"⫂"],[10947,"⫃"],[10948,"⫄"],[10949,{v:"⫅",n:824,o:"⫅̸"}],[10950,{v:"⫆",n:824,o:"⫆̸"}],[10951,"⫇"],[10952,"⫈"],[10955,{v:"⫋",n:65024,o:"⫋︀"}],[10956,{v:"⫌",n:65024,o:"⫌︀"}],[10959,"⫏"],[10960,"⫐"],[10961,"⫑"],[10962,"⫒"],[10963,"⫓"],[10964,"⫔"],[10965,"⫕"],[10966,"⫖"],[10967,"⫗"],[10968,"⫘"],[10969,"⫙"],[10970,"⫚"],[10971,"⫛"],[10980,"⫤"],[10982,"⫦"],[10983,"⫧"],[10984,"⫨"],[10985,"⫩"],[10987,"⫫"],[10988,"⫬"],[10989,"⫭"],[10990,"⫮"],[10991,"⫯"],[10992,"⫰"],[10993,"⫱"],[10994,"⫲"],[10995,"⫳"],[11005,{v:"⫽",n:8421,o:"⫽⃥"}],[55349,{n:new Map([[56476,"𝒜"],[56478,"𝒞"],[56479,"𝒟"],[56482,"𝒢"],[56485,"𝒥"],[56486,"𝒦"],[56489,"𝒩"],[56490,"𝒪"],[56491,"𝒫"],[56492,"𝒬"],[56494,"𝒮"],[56495,"𝒯"],[56496,"𝒰"],[56497,"𝒱"],[56498,"𝒲"],[56499,"𝒳"],[56500,"𝒴"],[56501,"𝒵"],[56502,"𝒶"],[56503,"𝒷"],[56504,"𝒸"],[56505,"𝒹"],[56507,"𝒻"],[56509,"𝒽"],[56510,"𝒾"],[56511,"𝒿"],[56512,"𝓀"],[56513,"𝓁"],[56514,"𝓂"],[56515,"𝓃"],[56517,"𝓅"],[56518,"𝓆"],[56519,"𝓇"],[56520,"𝓈"],[56521,"𝓉"],[56522,"𝓊"],[56523,"𝓋"],[56524,"𝓌"],[56525,"𝓍"],[56526,"𝓎"],[56527,"𝓏"],[56580,"𝔄"],[56581,"𝔅"],[56583,"𝔇"],[56584,"𝔈"],[56585,"𝔉"],[56586,"𝔊"],[56589,"𝔍"],[56590,"𝔎"],[56591,"𝔏"],[56592,"𝔐"],[56593,"𝔑"],[56594,"𝔒"],[56595,"𝔓"],[56596,"𝔔"],[56598,"𝔖"],[56599,"𝔗"],[56600,"𝔘"],[56601,"𝔙"],[56602,"𝔚"],[56603,"𝔛"],[56604,"𝔜"],[56606,"𝔞"],[56607,"𝔟"],[56608,"𝔠"],[56609,"𝔡"],[56610,"𝔢"],[56611,"𝔣"],[56612,"𝔤"],[56613,"𝔥"],[56614,"𝔦"],[56615,"𝔧"],[56616,"𝔨"],[56617,"𝔩"],[56618,"𝔪"],[56619,"𝔫"],[56620,"𝔬"],[56621,"𝔭"],[56622,"𝔮"],[56623,"𝔯"],[56624,"𝔰"],[56625,"𝔱"],[56626,"𝔲"],[56627,"𝔳"],[56628,"𝔴"],[56629,"𝔵"],[56630,"𝔶"],[56631,"𝔷"],[56632,"𝔸"],[56633,"𝔹"],[56635,"𝔻"],[56636,"𝔼"],[56637,"𝔽"],[56638,"𝔾"],[56640,"𝕀"],[56641,"𝕁"],[56642,"𝕂"],[56643,"𝕃"],[56644,"𝕄"],[56646,"𝕆"],[56650,"𝕊"],[56651,"𝕋"],[56652,"𝕌"],[56653,"𝕍"],[56654,"𝕎"],[56655,"𝕏"],[56656,"𝕐"],[56658,"𝕒"],[56659,"𝕓"],[56660,"𝕔"],[56661,"𝕕"],[56662,"𝕖"],[56663,"𝕗"],[56664,"𝕘"],[56665,"𝕙"],[56666,"𝕚"],[56667,"𝕛"],[56668,"𝕜"],[56669,"𝕝"],[56670,"𝕞"],[56671,"𝕟"],[56672,"𝕠"],[56673,"𝕡"],[56674,"𝕢"],[56675,"𝕣"],[56676,"𝕤"],[56677,"𝕥"],[56678,"𝕦"],[56679,"𝕧"],[56680,"𝕨"],[56681,"𝕩"],[56682,"𝕪"],[56683,"𝕫"]])}],[64256,"ff"],[64257,"fi"],[64258,"fl"],[64259,"ffi"],[64260,"ffl"]]);const Z=/["&'<>$\x80-\uFFFF]/g,ee=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),te=null!=String.prototype.codePointAt?(e,t)=>e.codePointAt(t):(e,t)=>55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function ne(e){let t,n="",s=0;for(;null!==(t=Z.exec(e));){const r=t.index,i=e.charCodeAt(r),a=ee.get(i);void 0!==a?(n+=e.substring(s,r)+a,s=r+1):(n+=`${e.substring(s,r)}&#x${te(e,r).toString(16)};`,s=Z.lastIndex+=Number(55296==(64512&i)))}return n+e.substr(s)}function se(e,t){return function(n){let s,r=0,i="";for(;s=e.exec(n);)r!==s.index&&(i+=n.substring(r,s.index)),i+=t.get(s[0].charCodeAt(0)),r=s.index+1;return i+n.substring(r)}}se(/[&<>'"]/g,ee);const re=se(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),ie=se(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var ae,oe,ce;!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(ae||(ae={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict"}(oe||(oe={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(ce||(ce={}));const he=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),le=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),ue=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function de(e){return e.replace(/"/g,""")}const pe=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Ee(e,t={}){const n="length"in e?e:[e];let s="";for(let e=0;e`;case f:return`\x3c!--${e.data}--\x3e`;case C:return function(e){return``}(e);case A:case _:case g:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=he.get(e.name))&&void 0!==n?n:e.name,e.parent&&fe.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&Ae.has(e.name)&&(t={...t,xmlMode:"foreign"});let s=`<${e.name}`;const r=function(e,t){var n;if(!e)return;const s=!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)?de:t.xmlMode||"utf8"!==t.encodeEntities?ne:re;return Object.keys(e).map((n=>{var r,i;const a=null!==(r=e[n])&&void 0!==r?r:"";return"foreign"===t.xmlMode&&(n=null!==(i=le.get(n))&&void 0!==i?i:n),t.emptyAttrs||t.xmlMode||""!==a?`${n}="${s(a)}"`:n})).join(" ")}(e.attribs,t);return r&&(s+=` ${r}`),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&pe.has(e.name))?(t.xmlMode||(s+=" "),s+="/>"):(s+=">",e.children.length>0&&(s+=Ee(e.children,t)),!t.xmlMode&&pe.has(e.name)||(s+=``)),s}(e,t);case m:return function(e,t){var n;let s=e.data||"";return!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)||!t.xmlMode&&e.parent&&ue.has(e.parent.name)||(s=t.xmlMode||"utf8"!==t.encodeEntities?ne(s):ie(s)),s}(e,t)}}const fe=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Ae=new Set(["svg","math"]);function _e(e,t){return me(e,t)}function ge(e,t){return H(e)?e.children.map((e=>_e(e,t))).join(""):""}function Ce(e){return Array.isArray(e)?e.map(Ce).join(""):P(e)?"br"===e.name?"\n":Ce(e.children):y(e)?Ce(e.children):x(e)?e.data:""}function Ne(e){return Array.isArray(e)?e.map(Ne).join(""):H(e)&&!v(e)?Ne(e.children):x(e)?e.data:""}function Ie(e){return Array.isArray(e)?e.map(Ie).join(""):H(e)&&(e.type===p.Tag||y(e))?Ie(e.children):x(e)?e.data:""}function Se(e){return H(e)?e.children:[]}function be(e){return e.parent||null}function Oe(e){const t=be(e);if(null!=t)return Se(t);const n=[e];let{prev:s,next:r}=e;for(;null!=s;)n.unshift(s),({prev:s}=s);for(;null!=r;)n.push(r),({next:r}=r);return n}function De(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]}function Re(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]}function Le(e){return e.name}function ke(e){let{next:t}=e;for(;null!==t&&!P(t);)({next:t}=t);return t}function Me(e){let{prev:t}=e;for(;null!==t&&!P(t);)({prev:t}=t);return t}function Pe(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}function ye(e,t){const n=t.prev=e.prev;n&&(n.next=t);const s=t.next=e.next;s&&(s.prev=t);const r=t.parent=e.parent;if(r){const n=r.children;n[n.lastIndexOf(e)]=t,e.parent=null}}function xe(e,t){if(Pe(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function ve(e,t){Pe(t);const{parent:n}=e,s=e.next;if(t.next=s,t.prev=e,e.next=t,t.parent=n,s){if(s.prev=t,n){const e=n.children;e.splice(e.lastIndexOf(s),0,t)}}else n&&n.children.push(t)}function Be(e,t){if(Pe(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function Fe(e,t){Pe(t);const{parent:n}=e;if(n){const s=n.children;s.splice(s.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function He(e,t,n=!0,s=1/0){return Array.isArray(t)||(t=[t]),we(e,t,n,s)}function we(e,t,n,s){const r=[];for(const i of t){if(e(i)&&(r.push(i),--s<=0))break;if(n&&H(i)&&i.children.length>0){const t=we(e,i.children,n,s);if(r.push(...t),s-=t.length,s<=0)break}}return r}function Ue(e,t){return t.find(e)}function Ge(e,t,n=!0){let s=null;for(let r=0;r0&&(s=Ge(e,i.children,!0)))}return s}function Ye(e,t){return t.some((t=>P(t)&&(e(t)||t.children.length>0&&Ye(e,t.children))))}function Ve(e,t){var n;const s=[],r=t.filter(P);let i;for(;i=r.shift();){const t=null===(n=i.children)||void 0===n?void 0:n.filter(P);t&&t.length>0&&r.unshift(...t),e(i)&&s.push(i)}return s}const qe={tag_name:e=>"function"==typeof e?t=>P(t)&&e(t.name):"*"===e?P:t=>P(t)&&t.name===e,tag_type:e=>"function"==typeof e?t=>e(t.type):t=>t.type===e,tag_contains:e=>"function"==typeof e?t=>x(t)&&e(t.data):t=>x(t)&&t.data===e};function $e(e,t){return"function"==typeof t?n=>P(n)&&t(n.attribs[e]):n=>P(n)&&n.attribs[e]===t}function We(e,t){return n=>e(n)||t(n)}function Qe(e){const t=Object.keys(e).map((t=>{const n=e[t];return Object.prototype.hasOwnProperty.call(qe,t)?qe[t](n):$e(t,n)}));return 0===t.length?null:t.reduce(We)}function Xe(e,t){const n=Qe(e);return!n||n(t)}function Ke(e,t,n,s=1/0){const r=Qe(e);return r?He(r,t,n,s):[]}function je(e,t,n=!0){return Array.isArray(t)||(t=[t]),Ge($e("id",e),t,n)}function ze(e,t,n=!0,s=1/0){return He(qe.tag_name(e),t,n,s)}function Je(e,t,n=!0,s=1/0){return He(qe.tag_type(e),t,n,s)}function Ze(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(let s=n.parent;s;s=s.parent)if(e.includes(s)){e.splice(t,1);break}}return e}var et;function tt(e,t){const n=[],s=[];if(e===t)return 0;let r=H(e)?e:e.parent;for(;r;)n.unshift(r),r=r.parent;for(r=H(t)?t:t.parent;r;)s.unshift(r),r=r.parent;const i=Math.min(n.length,s.length);let a=0;for(;ac.indexOf(l)?o===t?et.FOLLOWING|et.CONTAINED_BY:et.FOLLOWING:o===e?et.PRECEDING|et.CONTAINS:et.PRECEDING}function nt(e){return(e=e.filter(((e,t,n)=>!n.includes(e,t+1)))).sort(((e,t)=>{const n=tt(e,t);return n&et.PRECEDING?-1:n&et.FOLLOWING?1:0})),e}function st(e){const t=ot(lt,e);return t?"feed"===t.name?function(e){var t;const n=e.children,s={type:"atom",items:ze("entry",n).map((e=>{var t;const{children:n}=e,s={media:at(n)};ht(s,"id","id",n),ht(s,"title","title",n);const r=null===(t=ot("link",n))||void 0===t?void 0:t.attribs.href;r&&(s.link=r);const i=ct("summary",n)||ct("content",n);i&&(s.description=i);const a=ct("updated",n);return a&&(s.pubDate=new Date(a)),s}))};ht(s,"id","id",n),ht(s,"title","title",n);const r=null===(t=ot("link",n))||void 0===t?void 0:t.attribs.href;r&&(s.link=r),ht(s,"description","subtitle",n);const i=ct("updated",n);return i&&(s.updated=new Date(i)),ht(s,"author","email",n,!0),s}(t):function(e){var t,n;const s=null!==(n=null===(t=ot("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],r={type:e.name.substr(0,3),id:"",items:ze("item",e.children).map((e=>{const{children:t}=e,n={media:at(t)};ht(n,"id","guid",t),ht(n,"title","title",t),ht(n,"link","link",t),ht(n,"description","description",t);const s=ct("pubDate",t);return s&&(n.pubDate=new Date(s)),n}))};ht(r,"title","title",s),ht(r,"link","link",s),ht(r,"description","description",s);const i=ct("lastBuildDate",s);return i&&(r.updated=new Date(i)),ht(r,"author","managingEditor",s,!0),r}(t):null}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(et||(et={}));const rt=["url","type","lang"],it=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function at(e){return ze("media:content",e).map((e=>{const{attribs:t}=e,n={medium:t.medium,isDefault:!!t.isDefault};for(const e of rt)t[e]&&(n[e]=t[e]);for(const e of it)t[e]&&(n[e]=parseInt(t[e],10));return t.expression&&(n.expression=t.expression),n}))}function ot(e,t){return ze(e,t,!0,1)[0]}function ct(e,t,n=!1){return Ne(ze(e,t,n,1)).trim()}function ht(e,t,n,s,r=!1){const i=ct(n,s,r);i&&(e[t]=i)}function lt(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}function ut(e,t,n){return e?e(null!=t?t:e._root.children,null,void 0,n).toString():""}function dt(e,t){return ut(this,function(e,t){return"object"==typeof e&&null!=e&&!("length"in e)&&!("type"in e)}(e)?void(t=e):e,{...l,...null==this?void 0:this._options,...d(null!=t?t:{})})}function pt(e){return ut(this,e,{...this._options,xmlMode:!0})}function Et(e){const t=e||(this?this.root():[]);let n="";for(let e=0;ew(e,!0))):[w(e,!0)],n=new k(t);return t.forEach((e=>{e.parent=n})),t}var It;function St(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const n=e.charCodeAt(t+1);return(n>=It.LowerA&&n<=It.LowerZ||n>=It.UpperA&&n<=It.UpperZ||n===It.Exclamation)&&e.includes(">",t+2)}!function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"}(It||(It={}));const bt=Object.prototype.hasOwnProperty,Ot=/\s+/,Dt="data-",Rt={null:null,true:!0,false:!1},Lt=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,kt=/^{[^]*}$|^\[[^]*]$/;function Mt(e,t,n){var s;if(e&&P(e))return null!==(s=e.attribs)&&void 0!==s||(e.attribs={}),t?bt.call(e.attribs,t)?!n&&Lt.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?Et(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function Pt(e,t,n){null===n?Gt(e,t):e.attribs[t]=`${n}`}function yt(e,t){if("object"==typeof e||void 0!==t){if("function"==typeof t){if("string"!=typeof e)throw new Error("Bad combination of arguments.");return Ct(this,((n,s)=>{P(n)&&Pt(n,e,t.call(n,s,n.attribs[e]))}))}return Ct(this,(n=>{P(n)&&("object"==typeof e?Object.keys(e).forEach((t=>{const s=e[t];Pt(n,t,s)})):Pt(n,e,t))}))}return arguments.length>1?this:Mt(this[0],e,this.options.xmlMode)}function xt(e,t,n){return t in e?e[t]:!n&&Lt.test(t)?void 0!==Mt(e,t,!1):Mt(e,t,n)}function vt(e,t,n,s){t in e?e[t]=n:Pt(e,t,!s&&Lt.test(t)?n?"":null:`${n}`)}function Bt(e,t){var n;if("string"==typeof e&&void 0===t){const t=this[0];if(!t||!P(t))return;switch(e){case"style":{const e=this.css(),t=Object.keys(e);return t.forEach(((t,n)=>{e[n]=t})),e.length=t.length,e}case"tagName":case"nodeName":return t.name.toUpperCase();case"href":case"src":{const s=null===(n=t.attribs)||void 0===n?void 0:n[e];return"undefined"==typeof URL||("href"!==e||"a"!==t.tagName&&"link"!==t.name)&&("src"!==e||"img"!==t.tagName&&"iframe"!==t.tagName&&"audio"!==t.tagName&&"video"!==t.tagName&&"source"!==t.tagName)||void 0===s||!this.options.baseURI?s:new URL(s,this.options.baseURI).href}case"innerText":return Ie(t);case"textContent":return Ne(t);case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return xt(t,e,this.options.xmlMode)}}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw new Error("Bad combination of arguments.");return Ct(this,((n,s)=>{P(n)&&vt(n,e,t.call(n,s,xt(n,e,this.options.xmlMode)),this.options.xmlMode)}))}return Ct(this,(n=>{P(n)&&("object"==typeof e?Object.keys(e).forEach((t=>{const s=e[t];vt(n,t,s,this.options.xmlMode)})):vt(n,e,t,this.options.xmlMode))}))}}function Ft(e,t,n){var s;const r=e;null!==(s=r.data)&&void 0!==s||(r.data={}),"object"==typeof t?Object.assign(r.data,t):"string"==typeof t&&void 0!==n&&(r.data[t]=n)}function Ht(e,t){let n,s,r;var i;null==t?(n=Object.keys(e.attribs).filter((e=>e.startsWith(Dt))),s=n.map((e=>e.slice(Dt.length).replace(/[_.-](\w|$)/g,((e,t)=>t.toUpperCase()))))):(n=[Dt+(i=t,i.replace(/[A-Z]/g,"-$&").toLowerCase())],s=[t]);for(let t=0;t{P(n)&&("object"==typeof e?Ft(n,e):Ft(n,e,t))})),this):bt.call(r.data,e)?r.data[e]:Ht(r,e):Ht(r)}function Ut(e){const t=0===arguments.length,n=this[0];if(!n||!P(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":{const n=this.find("option:selected");if(!t){if(null==this.attr("multiple")&&"object"==typeof e)return this;this.find("option").removeAttr("selected");const t="object"!=typeof e?[e]:e;for(let e=0;eEt(e.children))):n.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Gt(e,t){e.attribs&&bt.call(e.attribs,t)&&delete e.attribs[t]}function Yt(e){return e?e.trim().split(Ot):[]}function Vt(e){const t=Yt(e);for(let e=0;e{P(n)&&Gt(n,t[e])}));return this}function qt(e){return this.toArray().some((t=>{const n=P(t)&&t.attribs.class;let s=-1;if(n&&e.length)for(;(s=n.indexOf(e,s+1))>-1;){const t=s+e.length;if((0===s||Ot.test(n[s-1]))&&(t===n.length||Ot.test(n[t])))return!0}return!1}))}function $t(e){if("function"==typeof e)return Ct(this,((t,n)=>{if(P(t)){const s=t.attribs.class||"";$t.call([t],e.call(t,n,s))}}));if(!e||"string"!=typeof e)return this;const t=e.split(Ot),n=this.length;for(let e=0;e{P(t)&&Wt.call([t],e.call(t,n,t.attribs.class||""))}));const t=Yt(e),n=t.length,s=0===arguments.length;return Ct(this,(e=>{if(P(e))if(s)e.attribs.class="";else{const s=Yt(e.attribs.class);let r=!1;for(let e=0;e=0&&(s.splice(n,1),r=!0,e--)}r&&(e.attribs.class=s.join(" "))}}))}function Qt(e,t){if("function"==typeof e)return Ct(this,((n,s)=>{P(n)&&Qt.call([n],e.call(n,s,n.attribs.class||"",t),t)}));if(!e||"string"!=typeof e)return this;const n=e.split(Ot),s=n.length,r="boolean"==typeof t?t?1:-1:0,i=this.length;for(let e=0;e=0&&t<0?i.push(n[e]):r<=0&&t>=0&&i.splice(t,1)}t.attribs.class=i.join(" ")}return this}var Xt,Kt;!function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"}(Xt||(Xt={})),function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"}(Kt||(Kt={}));const jt=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,zt=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Jt=new Map([[126,Kt.Element],[94,Kt.Start],[36,Kt.End],[42,Kt.Any],[33,Kt.Not],[124,Kt.Hyphen]]),Zt=new Set(["has","not","matches","is","where","host","host-context"]);function en(e){switch(e.type){case Xt.Adjacent:case Xt.Child:case Xt.Descendant:case Xt.Parent:case Xt.Sibling:case Xt.ColumnCombinator:return!0;default:return!1}}const tn=new Set(["contains","icontains"]);function nn(e,t,n){const s=parseInt(t,16)-65536;return s!=s||n?t:s<0?String.fromCharCode(s+65536):String.fromCharCode(s>>10|55296,1023&s|56320)}function sn(e){return e.replace(zt,nn)}function rn(e){return 39===e||34===e}function an(e){return 32===e||9===e||10===e||12===e||13===e}function on(e){const t=[],n=cn(t,`${e}`,0);if(n0&&n0&&en(s[s.length-1]))throw new Error("Did not expect successive traversals.")}function h(e){s.length>0&&s[s.length-1].type===Xt.Descendant?s[s.length-1].type=e:(c(),s.push({type:e}))}function l(e,t){s.push({type:Xt.Attribute,name:e,action:t,value:r(1),namespace:null,ignoreCase:"quirks"})}function u(){if(s.length&&s[s.length-1].type===Xt.Descendant&&s.pop(),0===s.length)throw new Error("Empty sub-selector");e.push(s)}if(i(0),t.length===n)return n;e:for(;n=0&&s>=1)):e.type===Xt.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?s=0:Array.isArray(e.data)?(s=Math.min(...e.data.map((e=>Math.min(...e.map(En))))),s<0&&(s=0)):s=2:s=3),s}const mn=/[-[\]{}()*+?.,\\^$|#\s]/g;function Tn(e){return e.replace(mn,"\\$&")}const fn=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function An(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&fn.has(e.name)}const _n={equals(e,t,n){const{adapter:s}=n,{name:r}=t;let{value:i}=t;return An(t,n)?(i=i.toLowerCase(),t=>{const n=s.getAttributeValue(t,r);return null!=n&&n.length===i.length&&n.toLowerCase()===i&&e(t)}):t=>s.getAttributeValue(t,r)===i&&e(t)},hyphen(e,t,n){const{adapter:s}=n,{name:r}=t;let{value:i}=t;const a=i.length;return An(t,n)?(i=i.toLowerCase(),function(t){const n=s.getAttributeValue(t,r);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a).toLowerCase()===i&&e(t)}):function(t){const n=s.getAttributeValue(t,r);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a)===i&&e(t)}},element(e,t,n){const{adapter:s}=n,{name:r,value:i}=t;if(/\s/.test(i))return hn.falseFunc;const a=new RegExp(`(?:^|\\s)${Tn(i)}(?:$|\\s)`,An(t,n)?"i":"");return function(t){const n=s.getAttributeValue(t,r);return null!=n&&n.length>=i.length&&a.test(n)&&e(t)}},exists:(e,{name:t},{adapter:n})=>s=>n.hasAttrib(s,t)&&e(s),start(e,t,n){const{adapter:s}=n,{name:r}=t;let{value:i}=t;const a=i.length;return 0===a?hn.falseFunc:An(t,n)?(i=i.toLowerCase(),t=>{const n=s.getAttributeValue(t,r);return null!=n&&n.length>=a&&n.substr(0,a).toLowerCase()===i&&e(t)}):t=>{var n;return!!(null===(n=s.getAttributeValue(t,r))||void 0===n?void 0:n.startsWith(i))&&e(t)}},end(e,t,n){const{adapter:s}=n,{name:r}=t;let{value:i}=t;const a=-i.length;return 0===a?hn.falseFunc:An(t,n)?(i=i.toLowerCase(),t=>{var n;return(null===(n=s.getAttributeValue(t,r))||void 0===n?void 0:n.substr(a).toLowerCase())===i&&e(t)}):t=>{var n;return!!(null===(n=s.getAttributeValue(t,r))||void 0===n?void 0:n.endsWith(i))&&e(t)}},any(e,t,n){const{adapter:s}=n,{name:r,value:i}=t;if(""===i)return hn.falseFunc;if(An(t,n)){const t=new RegExp(Tn(i),"i");return function(n){const a=s.getAttributeValue(n,r);return null!=a&&a.length>=i.length&&t.test(a)&&e(n)}}return t=>{var n;return!!(null===(n=s.getAttributeValue(t,r))||void 0===n?void 0:n.includes(i))&&e(t)}},not(e,t,n){const{adapter:s}=n,{name:r}=t;let{value:i}=t;return""===i?t=>!!s.getAttributeValue(t,r)&&e(t):An(t,n)?(i=i.toLowerCase(),t=>{const n=s.getAttributeValue(t,r);return(null==n||n.length!==i.length||n.toLowerCase()!==i)&&e(t)}):t=>s.getAttributeValue(t,r)!==i&&e(t)}},gn=new Set([9,10,12,13,32]),Cn="0".charCodeAt(0),Nn="9".charCodeAt(0);function In(e){return function(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return hn.falseFunc;if(-1===t)return e=>e<=n;if(0===t)return e=>e===n;if(1===t)return n<0?hn.trueFunc:e=>e>=n;const s=Math.abs(t),r=(n%s+s)%s;return t>1?e=>e>=n&&e%s===r:e=>e<=n&&e%s===r}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,n=0,s=i(),r=a();if(t=Cn&&e.charCodeAt(t)<=Nn;)s=10*s+(e.charCodeAt(t)-Cn),t++;return t===n?null:s}function o(){for(;t{const s=t.getParent(n);return null!=s&&t.isTag(s)&&e(n)}}const bn={contains:(e,t,{adapter:n})=>function(s){return e(s)&&n.getText(s).includes(t)},icontains(e,t,{adapter:n}){const s=t.toLowerCase();return function(t){return e(t)&&n.getText(t).toLowerCase().includes(s)}},"nth-child"(e,t,{adapter:n,equals:s}){const r=In(t);return r===hn.falseFunc?hn.falseFunc:r===hn.trueFunc?Sn(e,n):function(t){const i=n.getSiblings(t);let a=0;for(let e=0;e=0&&!s(t,i[e]);e--)n.isTag(i[e])&&a++;return r(a)&&e(t)}},"nth-of-type"(e,t,{adapter:n,equals:s}){const r=In(t);return r===hn.falseFunc?hn.falseFunc:r===hn.trueFunc?Sn(e,n):function(t){const i=n.getSiblings(t);let a=0;for(let e=0;e=0;e--){const r=i[e];if(s(t,r))break;n.isTag(r)&&n.getName(r)===n.getName(t)&&a++}return r(a)&&e(t)}},root:(e,t,{adapter:n})=>t=>{const s=n.getParent(t);return(null==s||!n.isTag(s))&&e(t)},scope(e,t,n,s){const{equals:r}=n;return s&&0!==s.length?1===s.length?t=>r(s[0],t)&&e(t):t=>s.includes(t)&&e(t):bn.root(e,t,n)},hover:On("isHovered"),visited:On("isVisited"),active:On("isActive")};function On(e){return function(t,n,{adapter:s}){const r=s[e];return"function"!=typeof r?hn.falseFunc:function(e){return r(e)&&t(e)}}}const Dn={empty:(e,{adapter:t})=>!t.getChildren(e).some((e=>t.isTag(e)||""!==t.getText(e))),"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return null==t.prevElementSibling(e);const s=t.getSiblings(e).find((e=>t.isTag(e)));return null!=s&&n(e,s)},"last-child"(e,{adapter:t,equals:n}){const s=t.getSiblings(e);for(let r=s.length-1;r>=0;r--){if(n(e,s[r]))return!0;if(t.isTag(s[r]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const s=t.getSiblings(e),r=t.getName(e);for(let i=0;i=0;i--){const a=s[i];if(n(e,a))return!0;if(t.isTag(a)&&t.getName(a)===r)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const s=t.getName(e);return t.getSiblings(e).every((r=>n(e,r)||!t.isTag(r)||t.getName(r)!==s))},"only-child":(e,{adapter:t,equals:n})=>t.getSiblings(e).every((s=>n(e,s)||!t.isTag(s)))};function Rn(e,t,n,s){if(null===n){if(e.length>s)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===s)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Ln={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},kn={};function Mn(e,t){return e===hn.falseFunc?hn.falseFunc:n=>t.isTag(n)&&e(n)}function Pn(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const s=n.indexOf(e);return s<0||s===n.length-1?[]:n.slice(s+1).filter(t.isTag)}function yn(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const xn=(e,t,n,s,r)=>{const i=r(t,yn(n),s);return i===hn.trueFunc?e:i===hn.falseFunc?hn.falseFunc:t=>i(t)&&e(t)},vn={is:xn,matches:xn,where:xn,not(e,t,n,s,r){const i=r(t,yn(n),s);return i===hn.falseFunc?e:i===hn.trueFunc?hn.falseFunc:t=>!i(t)&&e(t)},has(e,t,n,s,r){const{adapter:i}=n,a=yn(n);a.relativeSelector=!0;const o=t.some((e=>e.some(un)))?[kn]:void 0,c=r(t,a,o);if(c===hn.falseFunc)return hn.falseFunc;const h=Mn(c,i);if(o&&c!==hn.trueFunc){const{shouldTestNextSiblings:t=!1}=c;return n=>{if(!e(n))return!1;o[0]=n;const s=i.getChildren(n),r=t?[...s,...Pn(n,i)]:s;return i.existsOne(h,r)}}return t=>e(t)&&i.existsOne(h,i.getChildren(t))}};function Bn(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function Fn(e,t,n){return Yn("string"==typeof e?on(e):e,t,n)}function Hn(e){return e.type===Xt.Pseudo&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((e=>e.some(Hn))))}const wn={type:Xt.Descendant},Un={type:"_flexibleDescendant"},Gn={type:Xt.Pseudo,name:"scope",data:null};function Yn(e,t,n){var s;e.forEach(pn),n=null!==(s=t.context)&&void 0!==s?s:n;const r=Array.isArray(n),i=n&&(Array.isArray(n)?n:[n]);if(!1!==t.relativeSelector)!function(e,{adapter:t},n){const s=!!(null==n?void 0:n.every((e=>{const n=t.isTag(e)&&t.getParent(e);return e===kn||n&&t.isTag(n)})));for(const t of e){if(t.length>0&&un(t[0])&&t[0].type!==Xt.Descendant);else{if(!s||t.some(Hn))continue;t.unshift(wn)}t.unshift(Gn)}}(e,t,i);else if(e.some((e=>e.length>0&&un(e[0]))))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let a=!1;const o=e.map((e=>{if(e.length>=2){const[t,n]=e;t.type!==Xt.Pseudo||"scope"!==t.name||(r&&n.type===Xt.Descendant?e[1]=Un:n.type!==Xt.Adjacent&&n.type!==Xt.Sibling||(a=!0))}return function(e,t,n){var s;return e.reduce(((e,s)=>e===hn.falseFunc?hn.falseFunc:function(e,t,n,s,r){const{adapter:i,equals:a}=n;switch(t.type){case Xt.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Xt.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Xt.Attribute:if(null!=t.namespace)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(t.name=t.name.toLowerCase()),_n[t.action](e,t,n);case Xt.Pseudo:return function(e,t,n,s,r){var i;const{name:a,data:o}=t;if(Array.isArray(o)){if(!(a in vn))throw new Error(`Unknown pseudo-class :${a}(${o})`);return vn[a](e,o,n,s,r)}const c=null===(i=n.pseudos)||void 0===i?void 0:i[a],h="string"==typeof c?c:Ln[a];if("string"==typeof h){if(null!=o)throw new Error(`Pseudo ${a} doesn't have any arguments`);const t=on(h);return vn.is(e,t,n,s,r)}if("function"==typeof c)return Rn(c,a,o,1),t=>c(t,o)&&e(t);if(a in bn)return bn[a](e,o,n,s);if(a in Dn){const t=Dn[a];return Rn(t,a,o,2),s=>t(s,n,o)&&e(s)}throw new Error(`Unknown pseudo-class :${a}`)}(e,t,n,s,r);case Xt.Tag:{if(null!=t.namespace)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:s}=t;return n.xmlMode&&!n.lowerCaseTags||(s=s.toLowerCase()),function(t){return i.getName(t)===s&&e(t)}}case Xt.Descendant:{if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){let n=t;for(;n=Bn(n,i);)if(e(n))return!0;return!1};const t=new WeakSet;return function(n){let s=n;for(;s=Bn(s,i);)if(!t.has(s)){if(i.isTag(s)&&e(s))return!0;t.add(s)}return!1}}case"_flexibleDescendant":return function(t){let n=t;do{if(e(n))return!0}while(n=Bn(n,i));return!1};case Xt.Parent:return function(t){return i.getChildren(t).some((t=>i.isTag(t)&&e(t)))};case Xt.Child:return function(t){const n=i.getParent(t);return null!=n&&i.isTag(n)&&e(n)};case Xt.Sibling:return function(t){const n=i.getSiblings(t);for(let s=0;se===t,$n={adapter:e,equals:qn};function Wn(t){var n,s,r,i;const a=null!=t?t:$n;return null!==(n=a.adapter)&&void 0!==n||(a.adapter=e),null!==(s=a.equals)&&void 0!==s||(a.equals=null!==(i=null===(r=a.adapter)||void 0===r?void 0:r.equals)&&void 0!==i?i:qn),a}function Qn(e){return function(t,n,s){const r=Wn(n);return e(t,r,s)}}Qn((function(e,t,n){return Mn(Fn(e,t,n),t.adapter)})),Qn(Fn);const Xn=Qn(Yn);function Kn(e){return function(t,n,s){const r=Wn(s);"function"!=typeof t&&(t=Fn(t,r,n));const i=jn(n,r.adapter,t.shouldTestNextSiblings);return e(t,i,r)}}function jn(e,t,n=!1){return n&&(e=function(e,t){const n=Array.isArray(e)?e.slice(0):[e],s=n.length;for(let e=0;ee!==hn.falseFunc&&t&&0!==t.length?n.adapter.findAll(e,t):[])),Kn(((e,t,n)=>e!==hn.falseFunc&&t&&0!==t.length?n.adapter.findOne(e,t):null));const zn=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function Jn(e){return"pseudo"===e.type&&(!!zn.has(e.name)||!("not"!==e.name||!Array.isArray(e.data))&&e.data.some((e=>e.some(Jn))))}function Zn(e){const t=[],n=[];for(const s of e)s.some(Jn)?t.push(s):n.push(s);return[n,t]}const es={type:Xt.Universal,namespace:null},ts={type:Xt.Pseudo,name:"scope",data:null};function ns(e,t,n={}){return ss([e],t,n)}function ss(e,t,n={}){if("function"==typeof t)return e.some(t);const[s,r]=Zn(on(t));return s.length>0&&e.some(Xn(s,n))||r.some((t=>as(t,e,n).length>0))}function rs(e,t,n={}){return is(on(e),t,n)}function is(e,t,n){if(0===t.length)return[];const[s,r]=Zn(e);let i;if(s.length){const e=ls(t,s,n);if(0===r.length)return e;e.length&&(i=new Set(e))}for(let e=0;eP(e)&&!i.has(e))):t).length)break;const a=as(s,t,n);if(a.length)if(i)a.forEach((e=>i.add(e)));else{if(e===r.length-1)return a;i=new Set(a)}}return void 0!==i?i.size===t.length?t:t.filter((e=>i.has(e))):[]}function as(e,t,n){var s;if(e.some(en)){const r=null!==(s=n.root)&&void 0!==s?s:function(e){for(;e.parent;)e=e.parent;return e}(t[0]),i={...n,context:t,relativeSelector:!1};return e.push(ts),os(r,e,i,!0,t.length)}return os(t,e,n,!1,t.length)}function os(t,n,s,r,i){const a=n.findIndex(Jn),o=n.slice(0,a),c=n[a],h=n.length-1===a?i:1/0,l=function(e,t,n){const s=null!=t?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(s)?s>=0?s+1:1/0:0;case"lt":return isFinite(s)?s>=0?Math.min(s,n):1/0:0;case"gt":return isFinite(s)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}(c.name,c.data,h);if(0===l)return[];const u=(0!==o.length||Array.isArray(t)?0===o.length?(Array.isArray(t)?t:[t]).filter(P):r||o.some(en)?cs(t,[o],s,l):ls(t,[o],s):Se(t).filter(P)).slice(0,l);let d=function(e,t,n,s){const r="string"==typeof n?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(r)&&Math.abs(r)t%2==0));case"odd":return t.filter(((e,t)=>t%2==1));case"not":{const e=new Set(is(n,t,s));return t.filter((t=>!e.has(t)))}}}(c.name,u,c.data,s);if(0===d.length||n.length===a+1)return d;const p=n.slice(a+1),E=p.some(en);if(E){if(en(p[0])){const{type:t}=p[0];t!==Xt.Sibling&&t!==Xt.Adjacent||(d=jn(d,e,!0)),p.unshift(es)}s={...s,relativeSelector:!1,rootFunc:e=>d.includes(e)}}else s.rootFunc&&s.rootFunc!==hn.trueFunc&&(s={...s,rootFunc:hn.trueFunc});return p.some(Jn)?os(d,p,s,!1,i):E?cs(d,[p],s,i):ls(d,[p],s)}function cs(e,t,n,s){return hs(e,Xn(t,n,e),s)}function hs(t,n,s=1/0){return we((e=>P(e)&&n(e)),jn(t,e,n.shouldTestNextSiblings),!0,s)}function ls(e,t,n){const s=(Array.isArray(e)?e:[e]).filter(P);if(0===s.length)return s;const r=Xn(t,n);return r===hn.trueFunc?s:s.filter(r)}const us=/^\s*[~+]/;function ds(e){var t;if(!e)return this._make([]);const n=this.toArray();if("string"!=typeof e){const t=gt(e)?e.toArray():[e];return this._make(t.filter((e=>n.some((t=>ft(t,e))))))}const s=us.test(e)?n:this.children().toArray(),r={context:n,root:null===(t=this._root)||void 0===t?void 0:t[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(function(e,t,n={},s=1/0){if("function"==typeof e)return hs(t,e);const[r,i]=Zn(on(e)),a=i.map((e=>os(t,e,n,!0,s)));return r.length&&a.push(cs(t,r,n,s)),0===a.length?[]:1===a.length?a[0]:nt(a.reduce(((e,t)=>[...e,...t])))}(e,s,r))}function ps(e){return function(t,...n){return function(s){var r;let i=e(t,this);return s&&(i=vs(i,s,this.options.xmlMode,null===(r=this._root)||void 0===r?void 0:r[0])),this._make(this.length>1&&i.length>1?n.reduce(((e,t)=>t(e)),i):i)}}}const Es=ps(((e,t)=>{const n=[];for(let s=0;s{const n=[];for(let s=0;s{const s=[];return Ct(t,(t=>{for(let r;(r=e(t))&&!(null==n?void 0:n(r,s.length));t=r)s.push(r)})),s}))(e,...t);return function(e,t){n="string"==typeof e?t=>ns(t,e,this.options):e?ys(e):null;const r=s.call(this,t);return n=null,r}}function fs(e){return Array.from(new Set(e))}const As=ms((({parent:e})=>e&&!F(e)?e:null),fs),_s=Es((e=>{const t=[];for(;e.parent&&!F(e.parent);)t.push(e.parent),e=e.parent;return t}),nt,(e=>e.reverse())),gs=Ts((({parent:e})=>e&&!F(e)?e:null),nt,(e=>e.reverse()));function Cs(e){var t;const n=[];if(!e)return this._make(n);const s={xmlMode:this.options.xmlMode,root:null===(t=this._root)||void 0===t?void 0:t[0]},r="string"==typeof e?t=>ns(t,e,s):ys(e);return Ct(this,(e=>{for(;e&&P(e);){if(r(e,0)){n.includes(e)||n.push(e);break}e=e.parent}})),this._make(n)}const Ns=ms((e=>ke(e))),Is=Es((e=>{const t=[];for(;e.next;)P(e=e.next)&&t.push(e);return t}),fs),Ss=Ts((e=>ke(e)),fs),bs=ms((e=>Me(e))),Os=Es((e=>{const t=[];for(;e.prev;)P(e=e.prev)&&t.push(e);return t}),fs),Ds=Ts((e=>Me(e)),fs),Rs=Es((e=>Oe(e).filter((t=>P(t)&&t!==e))),nt),Ls=Es((e=>Se(e).filter(P)),fs);function ks(){const e=this.toArray().reduce(((e,t)=>H(t)?e.concat(t.children):e),[]);return this._make(e)}function Ms(e){let t=0;const n=this.length;for(;te.call(t,n,t):gt(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function xs(e){var t;return this._make(vs(this.toArray(),e,this.options.xmlMode,null===(t=this._root)||void 0===t?void 0:t[0]))}function vs(e,t,n,s){return"string"==typeof t?rs(t,e,{xmlMode:n,root:s}):e.filter(ys(t))}function Bs(e){const t=this.toArray();return"string"==typeof e?ss(t.filter(P),e,this.options):!!e&&t.some(ys(e))}function Fs(e){let t=this.toArray();if("string"==typeof e){const n=new Set(rs(e,t,this.options));t=t.filter((e=>!n.has(e)))}else{const n=ys(e);t=t.filter(((e,t)=>!n(e,t)))}return this._make(t)}function Hs(e){return this.filter("string"==typeof e?`:has(${e})`:(t,n)=>this._make(n).find(e).length>0)}function ws(){return this.length>1?this._make(this[0]):this}function Us(){return this.length>0?this._make(this[this.length-1]):this}function Gs(e){var t;return 0==(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[]))}function Ys(e){return null==e?this.toArray():this[e<0?this.length+e:e]}function Vs(){return Array.prototype.slice.call(this)}function qs(e){let t,n;return null==e?(t=this.parent().children(),n=this[0]):"string"==typeof e?(t=this._make(e),n=this[0]):(t=this,n=gt(e)?e[0]:e),Array.prototype.indexOf.call(t,n)}function $s(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function Ws(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])}function Qs(e,t){const n=this._make(e,t),s=nt([...this.get(),...n.get()]);return this._make(s)}function Xs(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}function Ks(e,t){const n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(let e=0;ee.concat(this._makeDomArray(n,t))),[]):"string"==typeof e?this._parse(e,this.options,!1,null).children:t?Nt([e]):[e]}function zs(e){return function(...t){const n=this.length-1;return Ct(this,((s,r)=>{if(!H(s))return;const i="function"==typeof t[0]?t[0].call(s,r,this._render(s.children)):t,a=this._makeDomArray(i,r=e.length?null:e[t+n];for(let e=0;e-1&&(l.children.splice(e,1),r===l&&t>e&&o[0]--)}n.parent=r,n.prev&&(n.prev.next=null!==(i=n.next)&&void 0!==i?i:null),n.next&&(n.next.prev=null!==(a=n.prev)&&void 0!==a?a:null),n.prev=0===e?c:s[e-1],n.next=e===s.length-1?h:s[e+1]}return c&&(c.next=s[0]),h&&(h.prev=s[s.length-1]),e.splice(...o)}function Zs(e){return(gt(e)?e:this._make(e)).append(this),this}function er(e){return(gt(e)?e:this._make(e)).prepend(this),this}const tr=zs(((e,t,n)=>{Js(t,t.length,0,e,n)})),nr=zs(((e,t,n)=>{Js(t,0,0,e,n)}));function sr(e){return function(t){const n=this.length-1,s=this.parents().last();for(let r=0;r{const{parent:s}=e;if(!s)return;const r=s.children,i=r.indexOf(e);Ks([e],t),Js(r,i,0,n,s)})),ir=sr(((e,t,n)=>{H(e)&&(Ks(e.children,t),Ks(n,e))}));function ar(e){return this.parent(e).not("body").each(((e,t)=>{this._make(t).replaceWith(t.children)})),this}function or(e){const t=this[0];if(t){const n=this._make("function"==typeof e?e.call(t,0,t):e).insertBefore(t);let s;for(let e=0;e{const{parent:r}=n;if(!H(n)||!r)return;const i=r.children,a=i.indexOf(n);if(a<0)return;const o="function"==typeof e[0]?e[0].call(n,s,this._render(n.children)):e;Js(i,a+1,0,this._makeDomArray(o,s{const n=this.clone().toArray(),{parent:s}=e;if(!s)return;const r=s.children,i=r.indexOf(e);i<0||(Js(r,i+1,0,n,s),t.push(...n))})),this._make(t)}function lr(...e){const t=this.length-1;return Ct(this,((n,s)=>{const{parent:r}=n;if(!H(n)||!r)return;const i=r.children,a=i.indexOf(n);if(a<0)return;const o="function"==typeof e[0]?e[0].call(n,s,this._render(n.children)):e;Js(i,a,0,this._makeDomArray(o,s{const t=this.clone().toArray(),{parent:s}=e;if(!s)return;const r=s.children,i=r.indexOf(e);i<0||(Js(r,i,0,t,s),n.push(...t))})),this._make(n)}function dr(e){return Ct(e?this.filter(e):this,(e=>{Pe(e),e.prev=e.next=e.parent=null})),this}function pr(e){return Ct(this,((t,n)=>{const{parent:s}=t;if(!s)return;const r=s.children,i="function"==typeof e?e.call(t,n,t):e,a=this._makeDomArray(i);Ks(a,null);const o=r.indexOf(t);Js(r,o,1,a,s),a.includes(t)||(t.parent=t.prev=t.next=null)}))}function Er(){return Ct(this,(e=>{H(e)&&(e.children.forEach((e=>{e.next=e.prev=e.parent=null})),e.children.length=0)}))}function mr(e){if(void 0===e){const e=this[0];return e&&H(e)?this._render(e.children):null}return Ct(this,(t=>{H(t)&&(t.children.forEach((e=>{e.next=e.prev=e.parent=null})),Ks(gt(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children,t))}))}function Tr(){return this._render(this)}function fr(e){return void 0===e?Et(this):Ct(this,"function"==typeof e?(t,n)=>this._make(t).text(e.call(t,n,Et([t]))):t=>{H(t)&&(t.children.forEach((e=>{e.next=e.prev=e.parent=null})),Ks(new b(`${e}`),t))})}function Ar(){return this._make(Nt(this.get()))}function _r(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?Ct(this,((n,s)=>{P(n)&&gr(n,e,t,s)})):0!==this.length?Cr(this[0],e):void 0}function gr(e,t,n,s){if("string"==typeof t){const i=Cr(e),a="function"==typeof n?n.call(e,s,i[t]):n;""===a?delete i[t]:null!=a&&(i[t]=a),e.attribs.style=(r=i,Object.keys(r).reduce(((e,t)=>`${e}${e?" ":""}${t}: ${r[t]};`),""))}else"object"==typeof t&&Object.keys(t).forEach(((n,s)=>{gr(e,n,t[n],s)}));var r}function Cr(e,t){if(!e||!P(e))return;const n=function(e){if(!(e=(e||"").trim()))return{};const t={};let n;for(const s of e.split(";")){const e=s.indexOf(":");if(e<1||e===s.length-1){const e=s.trimEnd();e.length>0&&void 0!==n&&(t[n]+=`;${e}`)}else n=s.slice(0,e).trim(),t[n]=s.slice(e+1).trim()}return t}(e.attribs.style);if("string"==typeof t)return n[t];if(Array.isArray(t)){const e={};return t.forEach((t=>{null!=n[t]&&(e[t]=n[t])})),e}return n}const Nr="input,select,textarea,keygen",Ir=/%20/g,Sr=/\r?\n/g;function br(){const e=this.serializeArray().map((e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`));return e.join("&").replace(Ir,"+")}function Or(){return this.map(((e,t)=>{const n=this._make(t);return P(t)&&"form"===t.name?n.find(Nr).toArray():n.filter(Nr).toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map(((e,t)=>{var n;const s=this._make(t),r=s.attr("name"),i=null!==(n=s.val())&&void 0!==n?n:"";return Array.isArray(i)?i.map((e=>({name:r,value:e.replace(Sr,"\r\n")}))):{name:r,value:i.replace(Sr,"\r\n")}})).toArray()}class Dr{constructor(e,t,n){if(this.length=0,this.options=n,this._root=t,e){for(let t=0;t=55296&&e<=57343}function vr(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Br(e){return e>=64976&&e<=65007||Rr.has(e)}var Fr,Hr,wr,Ur,Gr,Yr,Vr;!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(Fr||(Fr={}));class qr{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:t,col:n,offset:s}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,kr.EOF;return this._err(Fr.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length?(this.endOfChunkHit=!this.lastChunkWritten,kr.EOF):this.html.charCodeAt(t)}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,kr.EOF;let e=this.html.charCodeAt(this.pos);return e===kr.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,kr.LINE_FEED):e===kr.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,xr(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===kr.LINE_FEED||e===kr.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){vr(e)?this._err(Fr.controlCharacterInInputStream):Br(e)&&this._err(Fr.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(Hr||(Hr={})),function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(wr||(wr={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(Ur||(Ur={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(Gr||(Gr={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(Yr||(Yr={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(Vr||(Vr={}));const Wr=new Map([[Yr.A,Vr.A],[Yr.ADDRESS,Vr.ADDRESS],[Yr.ANNOTATION_XML,Vr.ANNOTATION_XML],[Yr.APPLET,Vr.APPLET],[Yr.AREA,Vr.AREA],[Yr.ARTICLE,Vr.ARTICLE],[Yr.ASIDE,Vr.ASIDE],[Yr.B,Vr.B],[Yr.BASE,Vr.BASE],[Yr.BASEFONT,Vr.BASEFONT],[Yr.BGSOUND,Vr.BGSOUND],[Yr.BIG,Vr.BIG],[Yr.BLOCKQUOTE,Vr.BLOCKQUOTE],[Yr.BODY,Vr.BODY],[Yr.BR,Vr.BR],[Yr.BUTTON,Vr.BUTTON],[Yr.CAPTION,Vr.CAPTION],[Yr.CENTER,Vr.CENTER],[Yr.CODE,Vr.CODE],[Yr.COL,Vr.COL],[Yr.COLGROUP,Vr.COLGROUP],[Yr.DD,Vr.DD],[Yr.DESC,Vr.DESC],[Yr.DETAILS,Vr.DETAILS],[Yr.DIALOG,Vr.DIALOG],[Yr.DIR,Vr.DIR],[Yr.DIV,Vr.DIV],[Yr.DL,Vr.DL],[Yr.DT,Vr.DT],[Yr.EM,Vr.EM],[Yr.EMBED,Vr.EMBED],[Yr.FIELDSET,Vr.FIELDSET],[Yr.FIGCAPTION,Vr.FIGCAPTION],[Yr.FIGURE,Vr.FIGURE],[Yr.FONT,Vr.FONT],[Yr.FOOTER,Vr.FOOTER],[Yr.FOREIGN_OBJECT,Vr.FOREIGN_OBJECT],[Yr.FORM,Vr.FORM],[Yr.FRAME,Vr.FRAME],[Yr.FRAMESET,Vr.FRAMESET],[Yr.H1,Vr.H1],[Yr.H2,Vr.H2],[Yr.H3,Vr.H3],[Yr.H4,Vr.H4],[Yr.H5,Vr.H5],[Yr.H6,Vr.H6],[Yr.HEAD,Vr.HEAD],[Yr.HEADER,Vr.HEADER],[Yr.HGROUP,Vr.HGROUP],[Yr.HR,Vr.HR],[Yr.HTML,Vr.HTML],[Yr.I,Vr.I],[Yr.IMG,Vr.IMG],[Yr.IMAGE,Vr.IMAGE],[Yr.INPUT,Vr.INPUT],[Yr.IFRAME,Vr.IFRAME],[Yr.KEYGEN,Vr.KEYGEN],[Yr.LABEL,Vr.LABEL],[Yr.LI,Vr.LI],[Yr.LINK,Vr.LINK],[Yr.LISTING,Vr.LISTING],[Yr.MAIN,Vr.MAIN],[Yr.MALIGNMARK,Vr.MALIGNMARK],[Yr.MARQUEE,Vr.MARQUEE],[Yr.MATH,Vr.MATH],[Yr.MENU,Vr.MENU],[Yr.META,Vr.META],[Yr.MGLYPH,Vr.MGLYPH],[Yr.MI,Vr.MI],[Yr.MO,Vr.MO],[Yr.MN,Vr.MN],[Yr.MS,Vr.MS],[Yr.MTEXT,Vr.MTEXT],[Yr.NAV,Vr.NAV],[Yr.NOBR,Vr.NOBR],[Yr.NOFRAMES,Vr.NOFRAMES],[Yr.NOEMBED,Vr.NOEMBED],[Yr.NOSCRIPT,Vr.NOSCRIPT],[Yr.OBJECT,Vr.OBJECT],[Yr.OL,Vr.OL],[Yr.OPTGROUP,Vr.OPTGROUP],[Yr.OPTION,Vr.OPTION],[Yr.P,Vr.P],[Yr.PARAM,Vr.PARAM],[Yr.PLAINTEXT,Vr.PLAINTEXT],[Yr.PRE,Vr.PRE],[Yr.RB,Vr.RB],[Yr.RP,Vr.RP],[Yr.RT,Vr.RT],[Yr.RTC,Vr.RTC],[Yr.RUBY,Vr.RUBY],[Yr.S,Vr.S],[Yr.SCRIPT,Vr.SCRIPT],[Yr.SECTION,Vr.SECTION],[Yr.SELECT,Vr.SELECT],[Yr.SOURCE,Vr.SOURCE],[Yr.SMALL,Vr.SMALL],[Yr.SPAN,Vr.SPAN],[Yr.STRIKE,Vr.STRIKE],[Yr.STRONG,Vr.STRONG],[Yr.STYLE,Vr.STYLE],[Yr.SUB,Vr.SUB],[Yr.SUMMARY,Vr.SUMMARY],[Yr.SUP,Vr.SUP],[Yr.TABLE,Vr.TABLE],[Yr.TBODY,Vr.TBODY],[Yr.TEMPLATE,Vr.TEMPLATE],[Yr.TEXTAREA,Vr.TEXTAREA],[Yr.TFOOT,Vr.TFOOT],[Yr.TD,Vr.TD],[Yr.TH,Vr.TH],[Yr.THEAD,Vr.THEAD],[Yr.TITLE,Vr.TITLE],[Yr.TR,Vr.TR],[Yr.TRACK,Vr.TRACK],[Yr.TT,Vr.TT],[Yr.U,Vr.U],[Yr.UL,Vr.UL],[Yr.SVG,Vr.SVG],[Yr.VAR,Vr.VAR],[Yr.WBR,Vr.WBR],[Yr.XMP,Vr.XMP]]);function Qr(e){var t;return null!==(t=Wr.get(e))&&void 0!==t?t:Vr.UNKNOWN}const Xr=Vr,Kr={[wr.HTML]:new Set([Xr.ADDRESS,Xr.APPLET,Xr.AREA,Xr.ARTICLE,Xr.ASIDE,Xr.BASE,Xr.BASEFONT,Xr.BGSOUND,Xr.BLOCKQUOTE,Xr.BODY,Xr.BR,Xr.BUTTON,Xr.CAPTION,Xr.CENTER,Xr.COL,Xr.COLGROUP,Xr.DD,Xr.DETAILS,Xr.DIR,Xr.DIV,Xr.DL,Xr.DT,Xr.EMBED,Xr.FIELDSET,Xr.FIGCAPTION,Xr.FIGURE,Xr.FOOTER,Xr.FORM,Xr.FRAME,Xr.FRAMESET,Xr.H1,Xr.H2,Xr.H3,Xr.H4,Xr.H5,Xr.H6,Xr.HEAD,Xr.HEADER,Xr.HGROUP,Xr.HR,Xr.HTML,Xr.IFRAME,Xr.IMG,Xr.INPUT,Xr.LI,Xr.LINK,Xr.LISTING,Xr.MAIN,Xr.MARQUEE,Xr.MENU,Xr.META,Xr.NAV,Xr.NOEMBED,Xr.NOFRAMES,Xr.NOSCRIPT,Xr.OBJECT,Xr.OL,Xr.P,Xr.PARAM,Xr.PLAINTEXT,Xr.PRE,Xr.SCRIPT,Xr.SECTION,Xr.SELECT,Xr.SOURCE,Xr.STYLE,Xr.SUMMARY,Xr.TABLE,Xr.TBODY,Xr.TD,Xr.TEMPLATE,Xr.TEXTAREA,Xr.TFOOT,Xr.TH,Xr.THEAD,Xr.TITLE,Xr.TR,Xr.TRACK,Xr.UL,Xr.WBR,Xr.XMP]),[wr.MATHML]:new Set([Xr.MI,Xr.MO,Xr.MN,Xr.MS,Xr.MTEXT,Xr.ANNOTATION_XML]),[wr.SVG]:new Set([Xr.TITLE,Xr.FOREIGN_OBJECT,Xr.DESC]),[wr.XLINK]:new Set,[wr.XML]:new Set,[wr.XMLNS]:new Set};function jr(e){return e===Xr.H1||e===Xr.H2||e===Xr.H3||e===Xr.H4||e===Xr.H5||e===Xr.H6}const zr=new Set([Yr.STYLE,Yr.SCRIPT,Yr.XMP,Yr.IFRAME,Yr.NOEMBED,Yr.NOFRAMES,Yr.PLAINTEXT]),Jr=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var Zr;!function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.DECIMAL_CHARACTER_REFERENCE_START=76]="DECIMAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=77]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=78]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=79]="NUMERIC_CHARACTER_REFERENCE_END"}(Zr||(Zr={}));const ei={DATA:Zr.DATA,RCDATA:Zr.RCDATA,RAWTEXT:Zr.RAWTEXT,SCRIPT_DATA:Zr.SCRIPT_DATA,PLAINTEXT:Zr.PLAINTEXT,CDATA_SECTION:Zr.CDATA_SECTION};function ti(e){return e>=kr.DIGIT_0&&e<=kr.DIGIT_9}function ni(e){return e>=kr.LATIN_CAPITAL_A&&e<=kr.LATIN_CAPITAL_Z}function si(e){return function(e){return e>=kr.LATIN_SMALL_A&&e<=kr.LATIN_SMALL_Z}(e)||ni(e)}function ri(e){return si(e)||ti(e)}function ii(e){return e>=kr.LATIN_CAPITAL_A&&e<=kr.LATIN_CAPITAL_F}function ai(e){return e>=kr.LATIN_SMALL_A&&e<=kr.LATIN_SMALL_F}function oi(e){return e+32}function ci(e){return e===kr.SPACE||e===kr.LINE_FEED||e===kr.TABULATION||e===kr.FORM_FEED}function hi(e){return ci(e)||e===kr.SOLIDUS||e===kr.GREATER_THAN_SIGN}class li{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Zr.DATA,this.returnState=Zr.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new qr(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,n;null===(n=(t=this.handler).onParseError)||void 0===n||n.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e){this.state=e,this._unconsume(1)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(Fr.endTagWithAttributes),e.selfClosing&&this._err(Fr.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Hr.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Hr.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Hr.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Hr.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Hr.CHARACTER;ci(e)?t=Hr.WHITESPACE_CHARACTER:e===kr.NULL&&(t=Hr.NULL_CHARACTER),this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Hr.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,n=0,s=!1;for(let i=0,a=V[0];i>=0&&(i=J(V,a,i+1,e),!(i<0));e=this._consume()){n+=1,a=V[i];const o=a&j.VALUE_LENGTH;if(o){const a=(o>>14)-1;if(e!==kr.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((r=this.preprocessor.peek(1))===kr.EQUALS_SIGN||ri(r))?(t=[kr.AMPERSAND],i+=a):(t=0===a?[V[i]&~j.VALUE_LENGTH]:1===a?[V[++i]]:[V[++i],V[++i]],n=0,s=e!==kr.SEMICOLON),0===a){this._consume();break}}}var r;return this._unconsume(n),s&&!this.preprocessor.endOfChunkHit&&this._err(Fr.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===Zr.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Zr.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Zr.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Zr.DATA:this._stateData(e);break;case Zr.RCDATA:this._stateRcdata(e);break;case Zr.RAWTEXT:this._stateRawtext(e);break;case Zr.SCRIPT_DATA:this._stateScriptData(e);break;case Zr.PLAINTEXT:this._statePlaintext(e);break;case Zr.TAG_OPEN:this._stateTagOpen(e);break;case Zr.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Zr.TAG_NAME:this._stateTagName(e);break;case Zr.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Zr.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Zr.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Zr.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Zr.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Zr.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Zr.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Zr.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Zr.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Zr.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Zr.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Zr.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Zr.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Zr.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Zr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Zr.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Zr.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Zr.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Zr.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Zr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Zr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Zr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Zr.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Zr.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Zr.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Zr.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Zr.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Zr.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Zr.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Zr.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Zr.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Zr.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Zr.BOGUS_COMMENT:this._stateBogusComment(e);break;case Zr.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Zr.COMMENT_START:this._stateCommentStart(e);break;case Zr.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Zr.COMMENT:this._stateComment(e);break;case Zr.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Zr.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Zr.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Zr.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Zr.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Zr.COMMENT_END:this._stateCommentEnd(e);break;case Zr.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Zr.DOCTYPE:this._stateDoctype(e);break;case Zr.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Zr.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Zr.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Zr.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Zr.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Zr.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Zr.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Zr.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Zr.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Zr.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Zr.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Zr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Zr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Zr.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Zr.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Zr.CDATA_SECTION:this._stateCdataSection(e);break;case Zr.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Zr.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Zr.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case Zr.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case Zr.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case Zr.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case Zr.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case Zr.DECIMAL_CHARACTER_REFERENCE_START:this._stateDecimalCharacterReferenceStart(e);break;case Zr.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case Zr.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case Zr.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd();break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case kr.LESS_THAN_SIGN:this.state=Zr.TAG_OPEN;break;case kr.AMPERSAND:this.returnState=Zr.DATA,this.state=Zr.CHARACTER_REFERENCE;break;case kr.NULL:this._err(Fr.unexpectedNullCharacter),this._emitCodePoint(e);break;case kr.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case kr.AMPERSAND:this.returnState=Zr.RCDATA,this.state=Zr.CHARACTER_REFERENCE;break;case kr.LESS_THAN_SIGN:this.state=Zr.RCDATA_LESS_THAN_SIGN;break;case kr.NULL:this._err(Fr.unexpectedNullCharacter),this._emitChars(Lr);break;case kr.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case kr.LESS_THAN_SIGN:this.state=Zr.RAWTEXT_LESS_THAN_SIGN;break;case kr.NULL:this._err(Fr.unexpectedNullCharacter),this._emitChars(Lr);break;case kr.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case kr.LESS_THAN_SIGN:this.state=Zr.SCRIPT_DATA_LESS_THAN_SIGN;break;case kr.NULL:this._err(Fr.unexpectedNullCharacter),this._emitChars(Lr);break;case kr.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case kr.NULL:this._err(Fr.unexpectedNullCharacter),this._emitChars(Lr);break;case kr.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(si(e))this._createStartTagToken(),this.state=Zr.TAG_NAME,this._stateTagName(e);else switch(e){case kr.EXCLAMATION_MARK:this.state=Zr.MARKUP_DECLARATION_OPEN;break;case kr.SOLIDUS:this.state=Zr.END_TAG_OPEN;break;case kr.QUESTION_MARK:this._err(Fr.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Zr.BOGUS_COMMENT,this._stateBogusComment(e);break;case kr.EOF:this._err(Fr.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Fr.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Zr.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(si(e))this._createEndTagToken(),this.state=Zr.TAG_NAME,this._stateTagName(e);else switch(e){case kr.GREATER_THAN_SIGN:this._err(Fr.missingEndTagName),this.state=Zr.DATA;break;case kr.EOF:this._err(Fr.eofBeforeTagName),this._emitChars("");break;case kr.NULL:this._err(Fr.unexpectedNullCharacter),this.state=Zr.SCRIPT_DATA_ESCAPED,this._emitChars(Lr);break;case kr.EOF:this._err(Fr.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Zr.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===kr.SOLIDUS?this.state=Zr.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:si(e)?(this._emitChars("<"),this.state=Zr.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Zr.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){si(e)?(this.state=Zr.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break;case kr.NULL:this._err(Fr.unexpectedNullCharacter),this.state=Zr.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Lr);break;case kr.EOF:this._err(Fr.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Zr.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===kr.SOLIDUS?(this.state=Zr.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Zr.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(yr,!1)&&hi(this.preprocessor.peek(yr.length))){this._emitCodePoint(e);for(let e=0;e1114111)this._err(Fr.characterReferenceOutsideUnicodeRange),this.charRefCode=kr.REPLACEMENT_CHARACTER;else if(xr(this.charRefCode))this._err(Fr.surrogateCharacterReference),this.charRefCode=kr.REPLACEMENT_CHARACTER;else if(Br(this.charRefCode))this._err(Fr.noncharacterCharacterReference);else if(vr(this.charRefCode)||this.charRefCode===kr.CARRIAGE_RETURN){this._err(Fr.controlCharacterReference);const e=Jr.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState)}}const ui=new Set([Vr.DD,Vr.DT,Vr.LI,Vr.OPTGROUP,Vr.OPTION,Vr.P,Vr.RB,Vr.RP,Vr.RT,Vr.RTC]),di=new Set([...ui,Vr.CAPTION,Vr.COLGROUP,Vr.TBODY,Vr.TD,Vr.TFOOT,Vr.TH,Vr.THEAD,Vr.TR]),pi=new Map([[Vr.APPLET,wr.HTML],[Vr.CAPTION,wr.HTML],[Vr.HTML,wr.HTML],[Vr.MARQUEE,wr.HTML],[Vr.OBJECT,wr.HTML],[Vr.TABLE,wr.HTML],[Vr.TD,wr.HTML],[Vr.TEMPLATE,wr.HTML],[Vr.TH,wr.HTML],[Vr.ANNOTATION_XML,wr.MATHML],[Vr.MI,wr.MATHML],[Vr.MN,wr.MATHML],[Vr.MO,wr.MATHML],[Vr.MS,wr.MATHML],[Vr.MTEXT,wr.MATHML],[Vr.DESC,wr.SVG],[Vr.FOREIGN_OBJECT,wr.SVG],[Vr.TITLE,wr.SVG]]),Ei=[Vr.H1,Vr.H2,Vr.H3,Vr.H4,Vr.H5,Vr.H6],mi=[Vr.TR,Vr.TEMPLATE,Vr.HTML],Ti=[Vr.TBODY,Vr.TFOOT,Vr.THEAD,Vr.TEMPLATE,Vr.HTML],fi=[Vr.TABLE,Vr.TEMPLATE,Vr.HTML],Ai=[Vr.TD,Vr.TH];class _i{constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Vr.UNKNOWN,this.current=e}get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Vr.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===wr.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const s=this._indexOf(e)+1;this.items.splice(s,0,t),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==wr.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(fi,wr.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ti,wr.HTML)}clearBackToTableRowContext(){this.clearBackTo(mi,wr.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Vr.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===Vr.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],s=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&s===wr.HTML)return!0;if(pi.get(n)===s)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if(jr(t)&&n===wr.HTML)return!0;if(pi.get(t)===n)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],s=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&s===wr.HTML)return!0;if((n===Vr.UL||n===Vr.OL)&&s===wr.HTML||pi.get(n)===s)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],s=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&s===wr.HTML)return!0;if(n===Vr.BUTTON&&s===wr.HTML||pi.get(n)===s)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===wr.HTML){if(n===e)return!0;if(n===Vr.TABLE||n===Vr.TEMPLATE||n===Vr.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===wr.HTML){if(t===Vr.TBODY||t===Vr.THEAD||t===Vr.TFOOT)return!0;if(t===Vr.TABLE||t===Vr.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===wr.HTML){if(n===e)return!0;if(n!==Vr.OPTION&&n!==Vr.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;ui.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;di.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&di.has(this.currentTagId);)this.pop()}}var gi;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(gi||(gi={}));const Ci={type:gi.Marker};class Ni{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],s=t.length,r=this.treeAdapter.getTagName(e),i=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])));let r=0;for(let e=0;es.get(e.name)===e.value))&&(r+=1,r>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Ci)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:gi.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:gi.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(Ci);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===gi.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===gi.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===gi.Element&&t.element===e))}}var Ii;function Si(e){return{nodeName:Ii.Text,value:e,parentNode:null}}!function(e){e.Document="#document",e.DocumentFragment="#document-fragment",e.Comment="#comment",e.Text="#text",e.DocumentType="#documentType"}(Ii||(Ii={}));const bi={createDocument:()=>({nodeName:Ii.Document,mode:Gr.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:Ii.DocumentFragment,childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:Ii.Comment,data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const s=e.childNodes.indexOf(n);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,s){const r=e.childNodes.find((e=>e.nodeName===Ii.DocumentType));if(r)r.name=t,r.publicId=n,r.systemId=s;else{const r={nodeName:Ii.DocumentType,name:t,publicId:n,systemId:s,parentNode:null};bi.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(bi.isTextNode(n))return void(n.value+=t)}bi.appendChild(e,Si(t))},insertTextBefore(e,t,n){const s=e.childNodes[e.childNodes.indexOf(n)-1];s&&bi.isTextNode(s)?s.value+=t:bi.insertBefore(e,Si(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let s=0;se.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>e.nodeName===Ii.DocumentType,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Oi="html",Di=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Ri=[...Di,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Li=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ki=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Mi=[...ki,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Pi(e,t){return t.some((t=>e.startsWith(t)))}const yi=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),xi=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:wr.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:wr.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:wr.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:wr.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:wr.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:wr.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:wr.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:wr.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:wr.XML}],["xml:space",{prefix:"xml",name:"space",namespace:wr.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:wr.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:wr.XMLNS}]]),vi=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),Bi=new Set([Vr.B,Vr.BIG,Vr.BLOCKQUOTE,Vr.BODY,Vr.BR,Vr.CENTER,Vr.CODE,Vr.DD,Vr.DIV,Vr.DL,Vr.DT,Vr.EM,Vr.EMBED,Vr.H1,Vr.H2,Vr.H3,Vr.H4,Vr.H5,Vr.H6,Vr.HEAD,Vr.HR,Vr.I,Vr.IMG,Vr.LI,Vr.LISTING,Vr.MENU,Vr.META,Vr.NOBR,Vr.OL,Vr.P,Vr.PRE,Vr.RUBY,Vr.S,Vr.SMALL,Vr.SPAN,Vr.STRONG,Vr.STRIKE,Vr.SUB,Vr.SUP,Vr.TABLE,Vr.TT,Vr.U,Vr.UL,Vr.VAR]);function Fi(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(s=(n=this.treeAdapter).onItemPop)||void 0===s||s.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||this.treeAdapter.getNamespaceURI(e)===wr.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,wr.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Ui.TEXT}switchToPlaintextParsing(){this.insertionMode=Ui.TEXT,this.originalInsertionMode=Ui.IN_BODY,this.tokenizer.state=ei.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Yr.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===wr.HTML)switch(this.fragmentContextID){case Vr.TITLE:case Vr.TEXTAREA:this.tokenizer.state=ei.RCDATA;break;case Vr.STYLE:case Vr.XMP:case Vr.IFRAME:case Vr.NOEMBED:case Vr.NOFRAMES:case Vr.NOSCRIPT:this.tokenizer.state=ei.RAWTEXT;break;case Vr.SCRIPT:this.tokenizer.state=ei.SCRIPT_DATA;break;case Vr.PLAINTEXT:this.tokenizer.state=ei.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",s=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,s),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,wr.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,wr.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Yr.HTML,wr.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Vr.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const s=this.treeAdapter.getChildNodes(t),r=n?s.lastIndexOf(n):s.length,i=s[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:t,endCol:n,endOffset:s}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:s})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,s=this.treeAdapter.getTagName(e),r=t.type===Hr.END_TAG&&s===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,r)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==Vr.SVG||this.treeAdapter.getTagName(t)!==Yr.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==wr.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===Vr.MGLYPH||e.tagID===Vr.MALIGNMARK)&&!this._isIntegrationPoint(n,t,wr.HTML))}_processToken(e){switch(e.type){case Hr.CHARACTER:this.onCharacter(e);break;case Hr.NULL_CHARACTER:this.onNullCharacter(e);break;case Hr.COMMENT:this.onComment(e);break;case Hr.DOCTYPE:this.onDoctype(e);break;case Hr.START_TAG:this._processStartTag(e);break;case Hr.END_TAG:this.onEndTag(e);break;case Hr.EOF:this.onEof(e);break;case Hr.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return function(e,t,n,s){return(!s||s===wr.HTML)&&function(e,t,n){if(t===wr.MATHML&&e===Vr.ANNOTATION_XML)for(let e=0;ee.type===gi.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Ui.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Vr.P),this.openElements.popUntilTagNamePopped(Vr.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Vr.TR:return void(this.insertionMode=Ui.IN_ROW);case Vr.TBODY:case Vr.THEAD:case Vr.TFOOT:return void(this.insertionMode=Ui.IN_TABLE_BODY);case Vr.CAPTION:return void(this.insertionMode=Ui.IN_CAPTION);case Vr.COLGROUP:return void(this.insertionMode=Ui.IN_COLUMN_GROUP);case Vr.TABLE:return void(this.insertionMode=Ui.IN_TABLE);case Vr.BODY:return void(this.insertionMode=Ui.IN_BODY);case Vr.FRAMESET:return void(this.insertionMode=Ui.IN_FRAMESET);case Vr.SELECT:return void this._resetInsertionModeForSelect(e);case Vr.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case Vr.HTML:return void(this.insertionMode=this.headElement?Ui.AFTER_HEAD:Ui.BEFORE_HEAD);case Vr.TD:case Vr.TH:if(e>0)return void(this.insertionMode=Ui.IN_CELL);break;case Vr.HEAD:if(e>0)return void(this.insertionMode=Ui.IN_HEAD)}this.insertionMode=Ui.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===Vr.TEMPLATE)break;if(e===Vr.TABLE)return void(this.insertionMode=Ui.IN_SELECT_IN_TABLE)}this.insertionMode=Ui.IN_SELECT}_isElementCausesFosterParenting(e){return Yi.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Vr.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===wr.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Vr.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Kr[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case Ui.INITIAL:ea(this,e);break;case Ui.BEFORE_HTML:ta(this,e);break;case Ui.BEFORE_HEAD:na(this,e);break;case Ui.IN_HEAD:ia(this,e);break;case Ui.IN_HEAD_NO_SCRIPT:aa(this,e);break;case Ui.AFTER_HEAD:oa(this,e);break;case Ui.IN_BODY:case Ui.IN_CAPTION:case Ui.IN_CELL:case Ui.IN_TEMPLATE:la(this,e);break;case Ui.TEXT:case Ui.IN_SELECT:case Ui.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Ui.IN_TABLE:case Ui.IN_TABLE_BODY:case Ui.IN_ROW:_a(this,e);break;case Ui.IN_TABLE_TEXT:Sa(this,e);break;case Ui.IN_COLUMN_GROUP:Ra(this,e);break;case Ui.AFTER_BODY:Fa(this,e);break;case Ui.AFTER_AFTER_BODY:Ha(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Lr,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case Ui.INITIAL:ea(this,e);break;case Ui.BEFORE_HTML:ta(this,e);break;case Ui.BEFORE_HEAD:na(this,e);break;case Ui.IN_HEAD:ia(this,e);break;case Ui.IN_HEAD_NO_SCRIPT:aa(this,e);break;case Ui.AFTER_HEAD:oa(this,e);break;case Ui.TEXT:this._insertCharacters(e);break;case Ui.IN_TABLE:case Ui.IN_TABLE_BODY:case Ui.IN_ROW:_a(this,e);break;case Ui.IN_COLUMN_GROUP:Ra(this,e);break;case Ui.AFTER_BODY:Fa(this,e);break;case Ui.AFTER_AFTER_BODY:Ha(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Ji(this,e);else switch(this.insertionMode){case Ui.INITIAL:case Ui.BEFORE_HTML:case Ui.BEFORE_HEAD:case Ui.IN_HEAD:case Ui.IN_HEAD_NO_SCRIPT:case Ui.AFTER_HEAD:case Ui.IN_BODY:case Ui.IN_TABLE:case Ui.IN_CAPTION:case Ui.IN_COLUMN_GROUP:case Ui.IN_TABLE_BODY:case Ui.IN_ROW:case Ui.IN_CELL:case Ui.IN_SELECT:case Ui.IN_SELECT_IN_TABLE:case Ui.IN_TEMPLATE:case Ui.IN_FRAMESET:case Ui.AFTER_FRAMESET:Ji(this,e);break;case Ui.IN_TABLE_TEXT:ba(this,e);break;case Ui.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case Ui.AFTER_AFTER_BODY:case Ui.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Ui.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?Gr.QUIRKS:function(e){if(e.name!==Oi)return Gr.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return Gr.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),Li.has(n))return Gr.QUIRKS;let e=null===t?Ri:Di;if(Pi(n,e))return Gr.QUIRKS;if(e=null===t?ki:Mi,Pi(n,e))return Gr.LIMITED_QUIRKS}return Gr.NO_QUIRKS}(t);(function(e){return e.name===Oi&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,Fr.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Ui.BEFORE_HTML}(this,e);break;case Ui.BEFORE_HEAD:case Ui.IN_HEAD:case Ui.IN_HEAD_NO_SCRIPT:case Ui.AFTER_HEAD:this._err(e,Fr.misplacedDoctype);break;case Ui.IN_TABLE_TEXT:ba(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Fr.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===Vr.FONT&&e.attrs.some((({name:e})=>e===Ur.COLOR||e===Ur.SIZE||e===Ur.FACE))||Bi.has(t)}(t))wa(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===wr.MATHML?Fi(t):s===wr.SVG&&(function(e){const t=vi.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Qr(e.tagName))}(t),Hi(t)),wi(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Ui.INITIAL:ea(this,e);break;case Ui.BEFORE_HTML:!function(e,t){t.tagID===Vr.HTML?(e._insertElement(t,wr.HTML),e.insertionMode=Ui.BEFORE_HEAD):ta(e,t)}(this,e);break;case Ui.BEFORE_HEAD:!function(e,t){switch(t.tagID){case Vr.HTML:ma(e,t);break;case Vr.HEAD:e._insertElement(t,wr.HTML),e.headElement=e.openElements.current,e.insertionMode=Ui.IN_HEAD;break;default:na(e,t)}}(this,e);break;case Ui.IN_HEAD:sa(this,e);break;case Ui.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Vr.HTML:ma(e,t);break;case Vr.BASEFONT:case Vr.BGSOUND:case Vr.HEAD:case Vr.LINK:case Vr.META:case Vr.NOFRAMES:case Vr.STYLE:sa(e,t);break;case Vr.NOSCRIPT:e._err(t,Fr.nestedNoscriptInHead);break;default:aa(e,t)}}(this,e);break;case Ui.AFTER_HEAD:!function(e,t){switch(t.tagID){case Vr.HTML:ma(e,t);break;case Vr.BODY:e._insertElement(t,wr.HTML),e.framesetOk=!1,e.insertionMode=Ui.IN_BODY;break;case Vr.FRAMESET:e._insertElement(t,wr.HTML),e.insertionMode=Ui.IN_FRAMESET;break;case Vr.BASE:case Vr.BASEFONT:case Vr.BGSOUND:case Vr.LINK:case Vr.META:case Vr.NOFRAMES:case Vr.SCRIPT:case Vr.STYLE:case Vr.TEMPLATE:case Vr.TITLE:e._err(t,Fr.abandonedHeadElementChild),e.openElements.push(e.headElement,Vr.HEAD),sa(e,t),e.openElements.remove(e.headElement);break;case Vr.HEAD:e._err(t,Fr.misplacedStartTagForHeadElement);break;default:oa(e,t)}}(this,e);break;case Ui.IN_BODY:ma(this,e);break;case Ui.IN_TABLE:ga(this,e);break;case Ui.IN_TABLE_TEXT:ba(this,e);break;case Ui.IN_CAPTION:!function(e,t){const n=t.tagID;Oa.has(n)?e.openElements.hasInTableScope(Vr.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Vr.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Ui.IN_TABLE,ga(e,t)):ma(e,t)}(this,e);break;case Ui.IN_COLUMN_GROUP:Da(this,e);break;case Ui.IN_TABLE_BODY:La(this,e);break;case Ui.IN_ROW:Ma(this,e);break;case Ui.IN_CELL:!function(e,t){const n=t.tagID;Oa.has(n)?(e.openElements.hasInTableScope(Vr.TD)||e.openElements.hasInTableScope(Vr.TH))&&(e._closeTableCell(),Ma(e,t)):ma(e,t)}(this,e);break;case Ui.IN_SELECT:ya(this,e);break;case Ui.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===Vr.CAPTION||n===Vr.TABLE||n===Vr.TBODY||n===Vr.TFOOT||n===Vr.THEAD||n===Vr.TR||n===Vr.TD||n===Vr.TH?(e.openElements.popUntilTagNamePopped(Vr.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ya(e,t)}(this,e);break;case Ui.IN_TEMPLATE:!function(e,t){switch(t.tagID){case Vr.BASE:case Vr.BASEFONT:case Vr.BGSOUND:case Vr.LINK:case Vr.META:case Vr.NOFRAMES:case Vr.SCRIPT:case Vr.STYLE:case Vr.TEMPLATE:case Vr.TITLE:sa(e,t);break;case Vr.CAPTION:case Vr.COLGROUP:case Vr.TBODY:case Vr.TFOOT:case Vr.THEAD:e.tmplInsertionModeStack[0]=Ui.IN_TABLE,e.insertionMode=Ui.IN_TABLE,ga(e,t);break;case Vr.COL:e.tmplInsertionModeStack[0]=Ui.IN_COLUMN_GROUP,e.insertionMode=Ui.IN_COLUMN_GROUP,Da(e,t);break;case Vr.TR:e.tmplInsertionModeStack[0]=Ui.IN_TABLE_BODY,e.insertionMode=Ui.IN_TABLE_BODY,La(e,t);break;case Vr.TD:case Vr.TH:e.tmplInsertionModeStack[0]=Ui.IN_ROW,e.insertionMode=Ui.IN_ROW,Ma(e,t);break;default:e.tmplInsertionModeStack[0]=Ui.IN_BODY,e.insertionMode=Ui.IN_BODY,ma(e,t)}}(this,e);break;case Ui.AFTER_BODY:!function(e,t){t.tagID===Vr.HTML?ma(e,t):Fa(e,t)}(this,e);break;case Ui.IN_FRAMESET:!function(e,t){switch(t.tagID){case Vr.HTML:ma(e,t);break;case Vr.FRAMESET:e._insertElement(t,wr.HTML);break;case Vr.FRAME:e._appendElement(t,wr.HTML),t.ackSelfClosing=!0;break;case Vr.NOFRAMES:sa(e,t)}}(this,e);break;case Ui.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Vr.HTML:ma(e,t);break;case Vr.NOFRAMES:sa(e,t)}}(this,e);break;case Ui.AFTER_AFTER_BODY:!function(e,t){t.tagID===Vr.HTML?ma(e,t):Ha(e,t)}(this,e);break;case Ui.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Vr.HTML:ma(e,t);break;case Vr.NOFRAMES:sa(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===Vr.P||t.tagID===Vr.BR)return wa(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const s=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(s)===wr.HTML){e._endTagOutsideForeignContent(t);break}const r=e.treeAdapter.getTagName(s);if(r.toLowerCase()===t.tagName){t.tagName=r,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Ui.INITIAL:ea(this,e);break;case Ui.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==Vr.HTML&&n!==Vr.HEAD&&n!==Vr.BODY&&n!==Vr.BR||ta(e,t)}(this,e);break;case Ui.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===Vr.HEAD||n===Vr.BODY||n===Vr.HTML||n===Vr.BR?na(e,t):e._err(t,Fr.endTagWithoutMatchingOpenElement)}(this,e);break;case Ui.IN_HEAD:ra(this,e);break;case Ui.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Vr.NOSCRIPT:e.openElements.pop(),e.insertionMode=Ui.IN_HEAD;break;case Vr.BR:aa(e,t);break;default:e._err(t,Fr.endTagWithoutMatchingOpenElement)}}(this,e);break;case Ui.AFTER_HEAD:!function(e,t){switch(t.tagID){case Vr.BODY:case Vr.HTML:case Vr.BR:oa(e,t);break;case Vr.TEMPLATE:ra(e,t);break;default:e._err(t,Fr.endTagWithoutMatchingOpenElement)}}(this,e);break;case Ui.IN_BODY:fa(this,e);break;case Ui.TEXT:!function(e,t){var n;t.tagID===Vr.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case Ui.IN_TABLE:Ca(this,e);break;case Ui.IN_TABLE_TEXT:ba(this,e);break;case Ui.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case Vr.CAPTION:case Vr.TABLE:e.openElements.hasInTableScope(Vr.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Vr.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Ui.IN_TABLE,n===Vr.TABLE&&Ca(e,t));break;case Vr.BODY:case Vr.COL:case Vr.COLGROUP:case Vr.HTML:case Vr.TBODY:case Vr.TD:case Vr.TFOOT:case Vr.TH:case Vr.THEAD:case Vr.TR:break;default:fa(e,t)}}(this,e);break;case Ui.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case Vr.COLGROUP:e.openElements.currentTagId===Vr.COLGROUP&&(e.openElements.pop(),e.insertionMode=Ui.IN_TABLE);break;case Vr.TEMPLATE:ra(e,t);break;case Vr.COL:break;default:Ra(e,t)}}(this,e);break;case Ui.IN_TABLE_BODY:ka(this,e);break;case Ui.IN_ROW:Pa(this,e);break;case Ui.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case Vr.TD:case Vr.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Ui.IN_ROW);break;case Vr.TABLE:case Vr.TBODY:case Vr.TFOOT:case Vr.THEAD:case Vr.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Pa(e,t));break;case Vr.BODY:case Vr.CAPTION:case Vr.COL:case Vr.COLGROUP:case Vr.HTML:break;default:fa(e,t)}}(this,e);break;case Ui.IN_SELECT:xa(this,e);break;case Ui.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===Vr.CAPTION||n===Vr.TABLE||n===Vr.TBODY||n===Vr.TFOOT||n===Vr.THEAD||n===Vr.TR||n===Vr.TD||n===Vr.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Vr.SELECT),e._resetInsertionMode(),e.onEndTag(t)):xa(e,t)}(this,e);break;case Ui.IN_TEMPLATE:!function(e,t){t.tagID===Vr.TEMPLATE&&ra(e,t)}(this,e);break;case Ui.AFTER_BODY:Ba(this,e);break;case Ui.IN_FRAMESET:!function(e,t){t.tagID!==Vr.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===Vr.FRAMESET||(e.insertionMode=Ui.AFTER_FRAMESET))}(this,e);break;case Ui.AFTER_FRAMESET:!function(e,t){t.tagID===Vr.HTML&&(e.insertionMode=Ui.AFTER_AFTER_FRAMESET)}(this,e);break;case Ui.AFTER_AFTER_BODY:Ha(this,e)}}onEof(e){switch(this.insertionMode){case Ui.INITIAL:ea(this,e);break;case Ui.BEFORE_HTML:ta(this,e);break;case Ui.BEFORE_HEAD:na(this,e);break;case Ui.IN_HEAD:ia(this,e);break;case Ui.IN_HEAD_NO_SCRIPT:aa(this,e);break;case Ui.AFTER_HEAD:oa(this,e);break;case Ui.IN_BODY:case Ui.IN_TABLE:case Ui.IN_CAPTION:case Ui.IN_COLUMN_GROUP:case Ui.IN_TABLE_BODY:case Ui.IN_ROW:case Ui.IN_CELL:case Ui.IN_SELECT:case Ui.IN_SELECT_IN_TABLE:Aa(this,e);break;case Ui.TEXT:!function(e,t){e._err(t,Fr.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case Ui.IN_TABLE_TEXT:ba(this,e);break;case Ui.IN_TEMPLATE:va(this,e);break;case Ui.AFTER_BODY:case Ui.IN_FRAMESET:case Ui.AFTER_FRAMESET:case Ui.AFTER_AFTER_BODY:case Ui.AFTER_AFTER_FRAMESET:Zi(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===kr.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Ui.IN_HEAD:case Ui.IN_HEAD_NO_SCRIPT:case Ui.AFTER_HEAD:case Ui.TEXT:case Ui.IN_COLUMN_GROUP:case Ui.IN_SELECT:case Ui.IN_SELECT_IN_TABLE:case Ui.IN_FRAMESET:case Ui.AFTER_FRAMESET:this._insertCharacters(e);break;case Ui.IN_BODY:case Ui.IN_CAPTION:case Ui.IN_CELL:case Ui.IN_TEMPLATE:case Ui.AFTER_BODY:case Ui.AFTER_AFTER_BODY:case Ui.AFTER_AFTER_FRAMESET:ha(this,e);break;case Ui.IN_TABLE:case Ui.IN_TABLE_BODY:case Ui.IN_ROW:_a(this,e);break;case Ui.IN_TABLE_TEXT:Ia(this,e)}}}function $i(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ta(e,t),n}function Wi(e,t){let n=null,s=e.openElements.stackTop;for(;s>=0;s--){const r=e.openElements.items[s];if(r===t.element)break;e._isSpecialElement(r,e.openElements.tagIDs[s])&&(n=r)}return n||(e.openElements.shortenToLength(s<0?0:s),e.activeFormattingElements.removeEntry(t)),n}function Qi(e,t,n){let s=t,r=e.openElements.getCommonAncestor(t);for(let i=0,a=r;a!==n;i++,a=r){r=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),o=n&&i>=3;!n||o?(o&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=Xi(e,n),s===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(a,s),s=a)}return s}function Xi(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function Ki(e,t,n){const s=Qr(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const r=e.treeAdapter.getNamespaceURI(t);s===Vr.TEMPLATE&&r===wr.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ji(e,t,n){const s=e.treeAdapter.getNamespaceURI(n.element),{token:r}=n,i=e.treeAdapter.createElement(r.tagName,s,r.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,r),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,r.tagID)}function zi(e,t){for(let n=0;n<8;n++){const n=$i(e,t);if(!n)break;const s=Wi(e,n);if(!s)break;e.activeFormattingElements.bookmark=n;const r=Qi(e,s,n.element),i=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(r),i&&Ki(e,i,r),ji(e,s,n)}}function Ji(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Zi(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=n;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(n);s&&!s.endTag&&e._setEndLocation(n,t)}}}}function ea(e,t){e._err(t,Fr.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Gr.QUIRKS),e.insertionMode=Ui.BEFORE_HTML,e._processToken(t)}function ta(e,t){e._insertFakeRootElement(),e.insertionMode=Ui.BEFORE_HEAD,e._processToken(t)}function na(e,t){e._insertFakeElement(Yr.HEAD,Vr.HEAD),e.headElement=e.openElements.current,e.insertionMode=Ui.IN_HEAD,e._processToken(t)}function sa(e,t){switch(t.tagID){case Vr.HTML:ma(e,t);break;case Vr.BASE:case Vr.BASEFONT:case Vr.BGSOUND:case Vr.LINK:case Vr.META:e._appendElement(t,wr.HTML),t.ackSelfClosing=!0;break;case Vr.TITLE:e._switchToTextParsing(t,ei.RCDATA);break;case Vr.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,ei.RAWTEXT):(e._insertElement(t,wr.HTML),e.insertionMode=Ui.IN_HEAD_NO_SCRIPT);break;case Vr.NOFRAMES:case Vr.STYLE:e._switchToTextParsing(t,ei.RAWTEXT);break;case Vr.SCRIPT:e._switchToTextParsing(t,ei.SCRIPT_DATA);break;case Vr.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Ui.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Ui.IN_TEMPLATE);break;case Vr.HEAD:e._err(t,Fr.misplacedStartTagForHeadElement);break;default:ia(e,t)}}function ra(e,t){switch(t.tagID){case Vr.HEAD:e.openElements.pop(),e.insertionMode=Ui.AFTER_HEAD;break;case Vr.BODY:case Vr.BR:case Vr.HTML:ia(e,t);break;case Vr.TEMPLATE:e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Vr.TEMPLATE&&e._err(t,Fr.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Vr.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Fr.endTagWithoutMatchingOpenElement);break;default:e._err(t,Fr.endTagWithoutMatchingOpenElement)}}function ia(e,t){e.openElements.pop(),e.insertionMode=Ui.AFTER_HEAD,e._processToken(t)}function aa(e,t){const n=t.type===Hr.EOF?Fr.openElementsLeftAfterEof:Fr.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Ui.IN_HEAD,e._processToken(t)}function oa(e,t){e._insertFakeElement(Yr.BODY,Vr.BODY),e.insertionMode=Ui.IN_BODY,ca(e,t)}function ca(e,t){switch(t.type){case Hr.CHARACTER:la(e,t);break;case Hr.WHITESPACE_CHARACTER:ha(e,t);break;case Hr.COMMENT:Ji(e,t);break;case Hr.START_TAG:ma(e,t);break;case Hr.END_TAG:fa(e,t);break;case Hr.EOF:Aa(e,t)}}function ha(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function la(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function ua(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,wr.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function da(e){const t=$r(e,Ur.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function pa(e,t){e._switchToTextParsing(t,ei.RAWTEXT)}function Ea(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wr.HTML)}function ma(e,t){switch(t.tagID){case Vr.I:case Vr.S:case Vr.B:case Vr.U:case Vr.EM:case Vr.TT:case Vr.BIG:case Vr.CODE:case Vr.FONT:case Vr.SMALL:case Vr.STRIKE:case Vr.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wr.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Vr.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Yr.A);n&&(zi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,wr.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Vr.H1:case Vr.H2:case Vr.H3:case Vr.H4:case Vr.H5:case Vr.H6:!function(e,t){e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),jr(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,wr.HTML)}(e,t);break;case Vr.P:case Vr.DL:case Vr.OL:case Vr.UL:case Vr.DIV:case Vr.DIR:case Vr.NAV:case Vr.MAIN:case Vr.MENU:case Vr.ASIDE:case Vr.CENTER:case Vr.FIGURE:case Vr.FOOTER:case Vr.HEADER:case Vr.HGROUP:case Vr.DIALOG:case Vr.DETAILS:case Vr.ADDRESS:case Vr.ARTICLE:case Vr.SECTION:case Vr.SUMMARY:case Vr.FIELDSET:case Vr.BLOCKQUOTE:case Vr.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._insertElement(t,wr.HTML)}(e,t);break;case Vr.LI:case Vr.DD:case Vr.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){const s=e.openElements.tagIDs[t];if(n===Vr.LI&&s===Vr.LI||(n===Vr.DD||n===Vr.DT)&&(s===Vr.DD||s===Vr.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==Vr.ADDRESS&&s!==Vr.DIV&&s!==Vr.P&&e._isSpecialElement(e.openElements.items[t],s))break}e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._insertElement(t,wr.HTML)}(e,t);break;case Vr.BR:case Vr.IMG:case Vr.WBR:case Vr.AREA:case Vr.EMBED:case Vr.KEYGEN:ua(e,t);break;case Vr.HR:!function(e,t){e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._appendElement(t,wr.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case Vr.RB:case Vr.RTC:!function(e,t){e.openElements.hasInScope(Vr.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,wr.HTML)}(e,t);break;case Vr.RT:case Vr.RP:!function(e,t){e.openElements.hasInScope(Vr.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Vr.RTC),e._insertElement(t,wr.HTML)}(e,t);break;case Vr.PRE:case Vr.LISTING:!function(e,t){e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._insertElement(t,wr.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case Vr.XMP:!function(e,t){e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ei.RAWTEXT)}(e,t);break;case Vr.SVG:!function(e,t){e._reconstructActiveFormattingElements(),Hi(t),wi(t),t.selfClosing?e._appendElement(t,wr.SVG):e._insertElement(t,wr.SVG),t.ackSelfClosing=!0}(e,t);break;case Vr.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case Vr.BASE:case Vr.LINK:case Vr.META:case Vr.STYLE:case Vr.TITLE:case Vr.SCRIPT:case Vr.BGSOUND:case Vr.BASEFONT:case Vr.TEMPLATE:sa(e,t);break;case Vr.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case Vr.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._insertElement(t,wr.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case Vr.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Vr.NOBR)&&(zi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,wr.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Vr.MATH:!function(e,t){e._reconstructActiveFormattingElements(),Fi(t),wi(t),t.selfClosing?e._appendElement(t,wr.MATHML):e._insertElement(t,wr.MATHML),t.ackSelfClosing=!0}(e,t);break;case Vr.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==Gr.QUIRKS&&e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._insertElement(t,wr.HTML),e.framesetOk=!1,e.insertionMode=Ui.IN_TABLE}(e,t);break;case Vr.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,wr.HTML),da(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case Vr.PARAM:case Vr.TRACK:case Vr.SOURCE:!function(e,t){e._appendElement(t,wr.HTML),t.ackSelfClosing=!0}(e,t);break;case Vr.IMAGE:!function(e,t){t.tagName=Yr.IMG,t.tagID=Vr.IMG,ua(e,t)}(e,t);break;case Vr.BUTTON:!function(e,t){e.openElements.hasInScope(Vr.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Vr.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,wr.HTML),e.framesetOk=!1}(e,t);break;case Vr.APPLET:case Vr.OBJECT:case Vr.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wr.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case Vr.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ei.RAWTEXT)}(e,t);break;case Vr.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wr.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Ui.IN_TABLE||e.insertionMode===Ui.IN_CAPTION||e.insertionMode===Ui.IN_TABLE_BODY||e.insertionMode===Ui.IN_ROW||e.insertionMode===Ui.IN_CELL?Ui.IN_SELECT_IN_TABLE:Ui.IN_SELECT}(e,t);break;case Vr.OPTION:case Vr.OPTGROUP:!function(e,t){e.openElements.currentTagId===Vr.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,wr.HTML)}(e,t);break;case Vr.NOEMBED:pa(e,t);break;case Vr.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,wr.HTML),e.insertionMode=Ui.IN_FRAMESET)}(e,t);break;case Vr.TEXTAREA:!function(e,t){e._insertElement(t,wr.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ei.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Ui.TEXT}(e,t);break;case Vr.NOSCRIPT:e.options.scriptingEnabled?pa(e,t):Ea(e,t);break;case Vr.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(Vr.P)&&e._closePElement(),e._insertElement(t,wr.HTML),e.tokenizer.state=ei.PLAINTEXT}(e,t);break;case Vr.COL:case Vr.TH:case Vr.TD:case Vr.TR:case Vr.HEAD:case Vr.FRAME:case Vr.TBODY:case Vr.TFOOT:case Vr.THEAD:case Vr.CAPTION:case Vr.COLGROUP:break;default:Ea(e,t)}}function Ta(e,t){const n=t.tagName,s=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){const r=e.openElements.items[t],i=e.openElements.tagIDs[t];if(s===i&&(s!==Vr.UNKNOWN||e.treeAdapter.getTagName(r)===n)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(r,i))break}}function fa(e,t){switch(t.tagID){case Vr.A:case Vr.B:case Vr.I:case Vr.S:case Vr.U:case Vr.EM:case Vr.TT:case Vr.BIG:case Vr.CODE:case Vr.FONT:case Vr.NOBR:case Vr.SMALL:case Vr.STRIKE:case Vr.STRONG:zi(e,t);break;case Vr.P:!function(e){e.openElements.hasInButtonScope(Vr.P)||e._insertFakeElement(Yr.P,Vr.P),e._closePElement()}(e);break;case Vr.DL:case Vr.UL:case Vr.OL:case Vr.DIR:case Vr.DIV:case Vr.NAV:case Vr.PRE:case Vr.MAIN:case Vr.MENU:case Vr.ASIDE:case Vr.CENTER:case Vr.FIGURE:case Vr.FOOTER:case Vr.HEADER:case Vr.HGROUP:case Vr.DIALOG:case Vr.ADDRESS:case Vr.ARTICLE:case Vr.DETAILS:case Vr.SECTION:case Vr.SUMMARY:case Vr.LISTING:case Vr.FIELDSET:case Vr.BLOCKQUOTE:case Vr.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case Vr.LI:!function(e){e.openElements.hasInListItemScope(Vr.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Vr.LI),e.openElements.popUntilTagNamePopped(Vr.LI))}(e);break;case Vr.DD:case Vr.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case Vr.H1:case Vr.H2:case Vr.H3:case Vr.H4:case Vr.H5:case Vr.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case Vr.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Yr.BR,Vr.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case Vr.BODY:!function(e,t){if(e.openElements.hasInScope(Vr.BODY)&&(e.insertionMode=Ui.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case Vr.HTML:!function(e,t){e.openElements.hasInScope(Vr.BODY)&&(e.insertionMode=Ui.AFTER_BODY,Ba(e,t))}(e,t);break;case Vr.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Vr.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Vr.FORM):n&&e.openElements.remove(n))}(e);break;case Vr.APPLET:case Vr.OBJECT:case Vr.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case Vr.TEMPLATE:ra(e,t);break;default:Ta(e,t)}}function Aa(e,t){e.tmplInsertionModeStack.length>0?va(e,t):Zi(e,t)}function _a(e,t){if(Yi.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Ui.IN_TABLE_TEXT,t.type){case Hr.CHARACTER:Sa(e,t);break;case Hr.WHITESPACE_CHARACTER:Ia(e,t)}else Na(e,t)}function ga(e,t){switch(t.tagID){case Vr.TD:case Vr.TH:case Vr.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Yr.TBODY,Vr.TBODY),e.insertionMode=Ui.IN_TABLE_BODY,La(e,t)}(e,t);break;case Vr.STYLE:case Vr.SCRIPT:case Vr.TEMPLATE:sa(e,t);break;case Vr.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Yr.COLGROUP,Vr.COLGROUP),e.insertionMode=Ui.IN_COLUMN_GROUP,Da(e,t)}(e,t);break;case Vr.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,wr.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case Vr.TABLE:!function(e,t){e.openElements.hasInTableScope(Vr.TABLE)&&(e.openElements.popUntilTagNamePopped(Vr.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case Vr.TBODY:case Vr.TFOOT:case Vr.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,wr.HTML),e.insertionMode=Ui.IN_TABLE_BODY}(e,t);break;case Vr.INPUT:!function(e,t){da(t)?e._appendElement(t,wr.HTML):Na(e,t),t.ackSelfClosing=!0}(e,t);break;case Vr.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,wr.HTML),e.insertionMode=Ui.IN_CAPTION}(e,t);break;case Vr.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,wr.HTML),e.insertionMode=Ui.IN_COLUMN_GROUP}(e,t);break;default:Na(e,t)}}function Ca(e,t){switch(t.tagID){case Vr.TABLE:e.openElements.hasInTableScope(Vr.TABLE)&&(e.openElements.popUntilTagNamePopped(Vr.TABLE),e._resetInsertionMode());break;case Vr.TEMPLATE:ra(e,t);break;case Vr.BODY:case Vr.CAPTION:case Vr.COL:case Vr.COLGROUP:case Vr.HTML:case Vr.TBODY:case Vr.TD:case Vr.TFOOT:case Vr.TH:case Vr.THEAD:case Vr.TR:break;default:Na(e,t)}}function Na(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ca(e,t),e.fosterParentingEnabled=n}function Ia(e,t){e.pendingCharacterTokens.push(t)}function Sa(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ba(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===Vr.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Vr.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Vr.OPTGROUP&&e.openElements.pop();break;case Vr.OPTION:e.openElements.currentTagId===Vr.OPTION&&e.openElements.pop();break;case Vr.SELECT:e.openElements.hasInSelectScope(Vr.SELECT)&&(e.openElements.popUntilTagNamePopped(Vr.SELECT),e._resetInsertionMode());break;case Vr.TEMPLATE:ra(e,t)}}function va(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Vr.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Zi(e,t)}function Ba(e,t){var n;if(t.tagID===Vr.HTML){if(e.fragmentContext||(e.insertionMode=Ui.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Vr.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(s))||void 0===n?void 0:n.endTag)&&e._setEndLocation(s,t)}}else Fa(e,t)}function Fa(e,t){e.insertionMode=Ui.IN_BODY,ca(e,t)}function Ha(e,t){e.insertionMode=Ui.IN_BODY,ca(e,t)}function wa(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==wr.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}const Ua=new Set([Yr.AREA,Yr.BASE,Yr.BASEFONT,Yr.BGSOUND,Yr.BR,Yr.COL,Yr.EMBED,Yr.FRAME,Yr.HR,Yr.IMG,Yr.INPUT,Yr.KEYGEN,Yr.LINK,Yr.META,Yr.PARAM,Yr.SOURCE,Yr.TRACK,Yr.WBR]);const Ga={treeAdapter:bi,scriptingEnabled:!0};function Ya(e,t){return Va(e,{...Ga,...t})}function Va(e,t){return t.treeAdapter.isElementNode(e)?function(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${function(e,{treeAdapter:t}){let n="";for(const s of t.getAttrList(e)){if(n+=" ",s.namespace)switch(s.namespace){case wr.XML:n+=`xml:${s.name}`;break;case wr.XMLNS:"xmlns"!==s.name&&(n+="xmlns:"),n+=s.name;break;case wr.XLINK:n+=`xlink:${s.name}`;break;default:n+=`${s.prefix}:${s.name}`}else n+=s.name;n+=`="${re(s.value)}"`}return n}(e,t)}>${function(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===wr.HTML&&Ua.has(t.treeAdapter.getTagName(e))}(e,t)?"":`${function(e,t){let n="";const s=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===Yr.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===wr.HTML?t.treeAdapter.getTemplateContent(e):e,r=t.treeAdapter.getChildNodes(s);if(r)for(const e of r)n+=Va(e,t);return n}(e,t)}`}`}(e,t):t.treeAdapter.isTextNode(e)?function(e,t){const{treeAdapter:n}=t,s=n.getTextNodeContent(e),r=n.getParentNode(e),i=r&&n.isElementNode(r)&&n.getTagName(r);return i&&n.getNamespaceURI(r)===wr.HTML&&(a=i,o=t.scriptingEnabled,zr.has(a)||o&&a===Yr.NOSCRIPT)?s:ie(s);var a,o}(e,t):t.treeAdapter.isCommentNode(e)?function(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}(e,t):t.treeAdapter.isDocumentTypeNode(e)?function(e,{treeAdapter:t}){return``}(e,t):""}function qa(e){return new b(e)}function $a(e){const t=e.includes('"')?"'":'"';return t+e+t}const Wa={isCommentNode:v,isElementNode:P,isTextNode:x,createDocument(){const e=new k([]);return e["x-mode"]=Gr.NO_QUIRKS,e},createDocumentFragment:()=>new k([]),createElement(e,t,n){const s=Object.create(null),r=Object.create(null),i=Object.create(null);for(let e=0;enew O(e),appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const s=e.children.indexOf(n),{prev:r}=n;r&&(r.next=t,t.prev=r),n.prev=t,t.next=n,e.children.splice(s,0,t),t.parent=e},setTemplateContent(e,t){Wa.appendChild(e,t)},getTemplateContent:e=>e.children[0],setDocumentType(e,t,n,s){const r=function(e,t,n){let s="!DOCTYPE ";return e&&(s+=e),t?s+=` PUBLIC ${$a(t)}`:n&&(s+=" SYSTEM"),n&&(s+=` ${$a(n)}`),s}(t,n,s);let i=e.children.find((e=>B(e)&&"!doctype"===e.name));i?i.data=null!=r?r:null:(i=new D("!doctype",r),Wa.appendChild(e,i)),i["x-name"]=null!=t?t:void 0,i["x-publicId"]=null!=n?n:void 0,i["x-systemId"]=null!=s?s:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:s}=e;e.prev=null,e.next=null,n&&(n.next=s),s&&(s.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&x(n)?n.data+=t:Wa.appendChild(e,qa(t))},insertTextBefore(e,t,n){const s=e.children[e.children.indexOf(n)-1];s&&x(s)?s.data+=t:Wa.insertBefore(e,qa(t),n)},adoptAttributes(e,t){for(let n=0;ne.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName(e){var t;return null!==(t=e["x-name"])&&void 0!==t?t:""},getDocumentTypeNodePublicId(e){var t;return null!==(t=e["x-publicId"])&&void 0!==t?t:""},getDocumentTypeNodeSystemId(e){var t;return null!==(t=e["x-systemId"])&&void 0!==t?t:""},isDocumentTypeNode:e=>B(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};const Qa={treeAdapter:Wa};var Xa,Ka,ja;function za(e){return e===Xa.Space||e===Xa.NewLine||e===Xa.Tab||e===Xa.FormFeed||e===Xa.CarriageReturn}function Ja(e){return e===Xa.Slash||e===Xa.Gt||za(e)}function Za(e){return e>=Xa.Zero&&e<=Xa.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Num=35]="Num",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(Xa||(Xa={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(Ka||(Ka={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(ja||(ja={}));const eo={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class to{constructor({xmlMode:e=!1,decodeEntities:t=!0},n){this.cbs=n,this.state=Ka.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Ka.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=e,this.decodeEntities=t,this.entityTrie=e?q:V}reset(){this.state=Ka.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Ka.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=Ka.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===Xa.Amp&&(this.state=Ka.BeforeEntity)}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?Ja(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=Ka.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===Xa.Gt||za(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart=Xa.LowerA&&e<=Xa.LowerZ||e>=Xa.UpperA&&e<=Xa.UpperZ}(e)}startSpecial(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=Ka.SpecialStartSequence}stateBeforeTagName(e){if(e===Xa.ExclamationMark)this.state=Ka.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===Xa.Questionmark)this.state=Ka.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){const t=32|e;this.sectionStart=this.index,this.xmlMode||t!==eo.TitleEnd[2]?this.state=this.xmlMode||t!==eo.ScriptEnd[2]?Ka.InTagName:Ka.BeforeSpecialS:this.startSpecial(eo.TitleEnd,3)}else e===Xa.Slash?this.state=Ka.BeforeClosingTagName:(this.state=Ka.Text,this.stateText(e))}stateInTagName(e){Ja(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Ka.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){za(e)||(e===Xa.Gt?this.state=Ka.Text:(this.state=this.isTagStartChar(e)?Ka.InClosingTagName:Ka.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(e){(e===Xa.Gt||za(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=Ka.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===Xa.Gt||this.fastForwardTo(Xa.Gt))&&(this.state=Ka.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===Xa.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=Ka.InSpecialTag,this.sequenceIndex=0):this.state=Ka.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===Xa.Slash?this.state=Ka.InSelfClosingTag:za(e)||(this.state=Ka.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===Xa.Gt?(this.cbs.onselfclosingtag(this.index),this.state=Ka.Text,this.baseState=Ka.Text,this.sectionStart=this.index+1,this.isSpecial=!1):za(e)||(this.state=Ka.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===Xa.Eq||Ja(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Ka.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===Xa.Eq?this.state=Ka.BeforeAttributeValue:e===Xa.Slash||e===Xa.Gt?(this.cbs.onattribend(ja.NoValue,this.index),this.state=Ka.BeforeAttributeName,this.stateBeforeAttributeName(e)):za(e)||(this.cbs.onattribend(ja.NoValue,this.index),this.state=Ka.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===Xa.DoubleQuote?(this.state=Ka.InAttributeValueDq,this.sectionStart=this.index+1):e===Xa.SingleQuote?(this.state=Ka.InAttributeValueSq,this.sectionStart=this.index+1):za(e)||(this.sectionStart=this.index,this.state=Ka.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===Xa.DoubleQuote?ja.Double:ja.Single,this.index),this.state=Ka.BeforeAttributeName):this.decodeEntities&&e===Xa.Amp&&(this.baseState=this.state,this.state=Ka.BeforeEntity)}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,Xa.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,Xa.SingleQuote)}stateInAttributeValueNoQuotes(e){za(e)||e===Xa.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(ja.Unquoted,this.index),this.state=Ka.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===Xa.Amp&&(this.baseState=this.state,this.state=Ka.BeforeEntity)}stateBeforeDeclaration(e){e===Xa.OpeningSquareBracket?(this.state=Ka.CDATASequence,this.sequenceIndex=0):this.state=e===Xa.Dash?Ka.BeforeComment:Ka.InDeclaration}stateInDeclaration(e){(e===Xa.Gt||this.fastForwardTo(Xa.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=Ka.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===Xa.Gt||this.fastForwardTo(Xa.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=Ka.Text,this.sectionStart=this.index+1)}stateBeforeComment(e){e===Xa.Dash?(this.state=Ka.InCommentLike,this.currentSequence=eo.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=Ka.InDeclaration}stateInSpecialComment(e){(e===Xa.Gt||this.fastForwardTo(Xa.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Ka.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===eo.ScriptEnd[3]?this.startSpecial(eo.ScriptEnd,4):t===eo.StyleEnd[3]?this.startSpecial(eo.StyleEnd,4):(this.state=Ka.InTagName,this.stateInTagName(e))}stateBeforeEntity(e){this.entityExcess=1,this.entityResult=0,e===Xa.Num?this.state=Ka.BeforeNumericEntity:e===Xa.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=Ka.InNamedEntity,this.stateInNamedEntity(e))}stateInNamedEntity(e){if(this.entityExcess+=1,this.trieIndex=J(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];const t=this.trieCurrent&j.VALUE_LENGTH;if(t){const n=(t>>14)-1;if(this.allowLegacyEntity()||e===Xa.Semi){const e=this.index-this.entityExcess+1;e>this.sectionStart&&this.emitPartial(this.sectionStart,e),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,0===n&&this.emitNamedEntity()}else this.trieIndex+=n}}emitNamedEntity(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&j.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~j.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(e){(32|e)===Xa.LowerX?(this.entityExcess++,this.state=Ka.InHexEntity):(this.state=Ka.InNumericEntity,this.stateInNumericEntity(e))}emitNumericEntity(e){const t=this.index-this.entityExcess-1;t+2+Number(this.state===Ka.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint(X(this.entityResult))),this.state=this.baseState}stateInNumericEntity(e){e===Xa.Semi?this.emitNumericEntity(!0):Za(e)?(this.entityResult=10*this.entityResult+(e-Xa.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(e){e===Xa.Semi?this.emitNumericEntity(!0):Za(e)?(this.entityResult=16*this.entityResult+(e-Xa.Zero),this.entityExcess++):function(e){return e>=Xa.UpperA&&e<=Xa.UpperF||e>=Xa.LowerA&&e<=Xa.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-Xa.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===Ka.Text||this.baseState===Ka.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===Ka.Text||this.state===Ka.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==Ka.InAttributeValueDq&&this.state!==Ka.InAttributeValueSq&&this.state!==Ka.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index0&&i.has(this.stack[this.stack.length-1]);){const e=this.stack.pop();null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,e,!0)}this.isVoidElement(e)||(this.stack.push(e),ho.has(e)?this.foreignContext.push(!0):lo.has(e)&&this.foreignContext.push(!1)),null===(r=(s=this.cbs).onopentagname)||void 0===r||r.call(s,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&(null===(n=(t=this.cbs).onopentag)||void 0===n||n.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){var n,s,r,i,a,o;this.endIndex=t;let c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(ho.has(c)||lo.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(s=(n=this.cbs).onopentagname)||void 0===s||s.call(n,"br"),null===(i=(r=this.cbs).onopentag)||void 0===i||i.call(r,"br",{},!0),null===(o=(a=this.cbs).onclosetag)||void 0===o||o.call(a,"br",!1));else{const e=this.stack.lastIndexOf(c);if(-1!==e)if(this.cbs.onclosetag){let t=this.stack.length-e;for(;t--;)this.cbs.onclosetag(this.stack.pop(),0!==t)}else this.stack.length=e;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var t,n;const s=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===s&&(null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,s,!e),this.stack.pop())}onattribname(e,t){this.startIndex=e;const n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=Q(e)}onattribend(e,t){var n,s;this.endIndex=t,null===(s=(n=this.cbs).onattribute)||void 0===s||s.call(n,this.attribname,this.attribvalue,e===ja.Double?'"':e===ja.Single?"'":e===ja.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){const t=e.search(uo);let n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,t){this.endIndex=t;const n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${e}`,`!${n}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;const n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${e}`,`?${n}`)}this.startIndex=t+1}oncomment(e,t,n){var s,r,i,a;this.endIndex=t,null===(r=(s=this.cbs).oncomment)||void 0===r||r.call(s,this.getSlice(e,t-n)),null===(a=(i=this.cbs).oncommentend)||void 0===a||a.call(i),this.startIndex=t+1}oncdata(e,t,n){var s,r,i,a,o,c,h,l,u,d;this.endIndex=t;const p=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?(null===(r=(s=this.cbs).oncdatastart)||void 0===r||r.call(s),null===(a=(i=this.cbs).ontext)||void 0===a||a.call(i,p),null===(c=(o=this.cbs).oncdataend)||void 0===c||c.call(o)):(null===(l=(h=this.cbs).oncomment)||void 0===l||l.call(h,`[CDATA[${p}]]`),null===(d=(u=this.cbs).oncommentend)||void 0===d||d.call(u)),this.startIndex=t+1}onend(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=this.stack.length;e>0;this.cbs.onclosetag(this.stack[--e],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)}reset(){var e,t,n,s;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(s=(n=this.cbs).onparserinit)||void 0===s||s.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))}end(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndext.xmlMode||t._useHtmlParser2?function(e,t){const n=new Y(void 0,t);return new po(n,t).end(e),n.root}(e,t):function(e,t,n,s){const r={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:Wa,sourceCodeLocationInfo:t.sourceCodeLocationInfo};return n?function(e,t){return qi.parse(e,t)}(e,r):function(e,t,n){"string"==typeof e&&(n=t,t=e,e=null);const s=qi.getFragmentParser(e,n);return s.tokenizer.write(t,!0),s.getFragment()}(s,e,r)}(e,t,n,s),function(e,t,n,s){if("undefined"!=typeof Buffer&&Buffer.isBuffer(e)&&(e=e.toString()),"string"==typeof e)return mo(e,t,n,s);const r=e;if(!Array.isArray(r)&&F(r))return r;const i=new k([]);return Ks(r,i),i});var mo;const To=(Co=Eo,function e(n,s,r=!0){if(null==n)throw new Error("cheerio.load() expects a string");const i={...l,...d(s)},a=Co(n,i,r,null);class o extends Dr{_make(e,t){const n=c(e,t);return n.prevObject=this,n}_parse(e,t,n,s){return Co(e,t,n,s)}_render(e){return((e,t)=>t.xmlMode||t._useHtmlParser2?me(e,t):function(e){const t="length"in e?e:[e];for(let e=0;et=>(e.forEach((e=>t.appendNode$(e))),t);static getInstanceFromFile(e){const t=To(h.readFileSync(e));return new No(t,t.root(),t.root())}static getInstanceFromHTML(e,t=null,n=!1){const s=To(e,t,n);return new No(s,s.root(),s.root())}static insertHtmlBefore(e,t){return t.$(e).insertBefore(t.context),new No(t.$,t.rootNode,t.context.prev())}static insertHtmlAfter(e,t){return t.$(e).insertAfter(t.context),new No(t.$,t.rootNode,t.context.next())}constructor(e,t,n){this.$=e,this.rootNode=t,this.context=n}addClass$(e){return this.context.addClass(e),this}appendHTML$(e){return this.$(this.context).append(e),this}appendNode$(e){if("string"==typeof e)this.context.append(e);else{const t=e.context.clone();this.context.append(t)}return this}children(){return new No(this.$,this.root,this.context.children())}clone(){const e=new No;e.$=this.$;const t=this.$(this.context).clone();return e.rootNode=t,e.context=t,e}contents(){return new No(this.$,this.rootNode,this.context.contents())}each(e){this.context.each(((t,n)=>e(new No(this.$,this.context,this.$(n)),t)))}empty$(){return this.context.empty(),this}find(e){const t=this.$(this.context).find(e),n=new No(this.$,this.rootNode,t);return this.context=t.end(),n}first(){return new No(this.$,this.rootNode,this.context.first())}get(e){return new No(this.$,this.rootNode,this.$(this.context.get(e)))}getAttr(e){return this.context.attr(e)}hasClass(e){return this.context.hasClass(e)}html(){return this.$(this.context).html()}insertMeAfter$(e){return e.$(this.html()).insertAfter(e.context),e}insertMeBefore$(e){return e.$(this.html()).insertBefore(e.context),e}next(){return new No(this.$,this.rootNode,this.context.next())}parent(){return new No(this.$,this.rootNode,this.context.parent())}prev(){return new No(this.$,this.rootNode,this.context.prev())}remove$(e){return this.context.find(e).remove().end(),this}replaceWithHTML$(e){return this.$(e),this.context.replaceWith(e),new No(this.$,this.rootNode,this.rootNode)}root(){return new No(this.$,this.rootNode,this.rootNode)}setAttr$(e,t){return this.context.attr(e,t),this}text(e){return e?(this.$(this.context).text(e),this):this.$(this.context).text()}}const Io=No,So=e=>{const t=(n,s,r,i,a,o,c,h)=>{const l=n.depth[c]||n.depth.default,u=h?"index":o(a,i,c);if(l===i)return void e(n,u,s,r,h);const d=`div.sect${i+1}`;e(n,u,s,r.clone().remove$(d),h);const p=r.find(d);return 0!==p.length?p.each(((e,r)=>t(n,s,e,i+1,u,o,r+1,!1))):void 0};return t},bo=(e,t,n,s,r,i)=>{let a=0,o=0,c=!1,h=!1;s.find("#content").children().each(((l,u)=>{if(!l.hasClass("partintro"))return l.hasClass("sect1")?(c||h?h=!1:(h=!0,c=!0),n(r,s,l,1,"chap",i,++a,h)):l.hasClass("sect0")?(c||h?h=!1:(h=!0,c=!0),t(r,s,l,++o,h)):"preamble"===l.getAttr("id")?(h=!0,c=!0,e(r,s,l,h)):void 0}))};var Oo=r(17);const Do=require("url"),Ro=require("node:fs"),Lo=e=>c.mkdir(e,{recursive:!0}).then((t=>e),(e=>e)),ko=e=>async t=>{if(await(e=>t=>Promise.allSettled([c.stat(e),c.stat(t)]).then((([e,t])=>"rejected"===t.status||e.value.atimeMs>t.value.atimeMs)))(e)(t)){const n=Oo.dirname(t);return await Mo(n)||await Lo(n),c.copyFile(e,t).then((e=>t))}return!1},Mo=e=>c.access(e,Ro.constants.F_OK).then((e=>!0),(e=>!1)),Po=/^#|^https:|^http:|^file:|^data:/,yo=(e,t)=>n=>{const s=(e=>t=>{const n=Oo.dirname(e);return Oo.join(n,t)})(e);(e=>{const t=[];return e.find("link[href], script[src], img[src]").each(((e,n)=>{const s=e.getAttr("href")||e.getAttr("src");s.match(Po)||Oo.isAbsolute(s)||t.push((e=>{const t=Oo.basename(e),n=t.indexOf("?");return-1===n?e:Oo.join(Oo.dirname(e),t.substring(0,n))})(s))})),t})(n).forEach((e=>{return ko(s(e))((n=e,Oo.join(t,n))).catch((t=>console.log(` Local file linked from the document is missing: ${s(e)}`)));var n}))},xo=h.promises,vo=(...e)=>(...t)=>{let n=t;for(let t=0;te.find("a.footnote"),Fo=e=>{if(0===e.length)return e;const t=new Set;return e.each(((e,n)=>{const s=e.getAttr("id"),r=e.getAttr("href");if(s)return void t.add(r);if(t.has(r))return;t.add(r);const i=`_footnoteref${(a=r).substring(a.lastIndexOf("_"))}`;var a;e.setAttr$("id",i)})),e};function Ho(e,t,n){return 1===t?`${e}${n}`:2===t?`${e}_sec${n}`:`${e}-${n}`}const wo=function(){return Ho},Uo=e=>(0===e.find("#toc a[href^=#]").length&&console.log("INFO: Your TOC has no in-document links.\n"),e),Go=e=>e.addClass$("current"),Yo=e=>e.find("#content"),Vo=(e,t,n,s)=>{const i=((e,t)=>{const n=new Map,s={},r=[];let i=0;const a=(e,t)=>{s[t]=i,r[i]=t,i++,e.find("*[id]").each(((e,s)=>{const r=e.getAttr("id");r.startsWith("_footnotedef_")||n.set(r,`${t}#${r}`)})),e.getAttr("id")?n.set(e.getAttr("id"),t):n.set(e.children().first().getAttr("id"),t)},o=So(((e,t,n,s,r)=>{a(s,r?"index.html":`${t}.html`)}));return bo(((e,t,n,s)=>{a(n,s?"index.html":"preamble.html")}),((e,t,n,s,r)=>{a(n,r?"index.html":`part${s}.html`)}),o,e,t,wo()),n.set("navigation",{filename2pageNum:s,filenameList:r}),n})(t,n),a=Xo(i),o=vo($o(n),Uo,a,(c=n.outdir,e=>(e.find("style").each(((e,t)=>{const n=`style${t}.css`;c&&xo.writeFile(Oo.join(c,n),e.contents().text()),e.replaceWithHTML$(``)})),e)),(e=>t=>{const{css:n,outdir:s}=e;if(!n||0==n.length)return t;const i=t.find("head");return n.forEach((e=>{((e,t)=>{const n=Oo.basename(t);e.appendHTML$(``)})(i,e),s&&((e,t)=>{const n=Oo.basename(t),s=Oo.join(e,n);"asciidoctor-chunker.css"===t?Promise.resolve().then(r.t.bind(r,846,17)).then((e=>xo.writeFile(s,e.default))).catch((e=>{const t=Oo.dirname((0,Do.fileURLToPath)("file:///Users/shito/Documents/git-repositories/javascript/asciidoctor-chunker/src/CSS.mjs")),n=Oo.resolve(t,"css","asciidoctor-chunker.css");return ko(n)(s)})):ko(t)(s)})(s,e)})),t})(n),(e=>t=>(Io.insertHtmlBefore(`
  • ${e.titlePage}
  • `,t.find("div#toc > ul > li:first-child")),t))(n))(t);var c;const h=(l=(e=>{const t=new Set;return e.find("div.footnote").each(((e,n)=>{t.add(e.getAttr("id"))})),t})(o.find("#footnotes")),e=>t=>{if(0===t.length)return e.empty$(),t;const n=new Set([...l]);return t.each(((e,t)=>{n.delete(e.getAttr("href").substring(1))})),n.forEach((t=>{e.remove$(`#${t}`)})),t});var l;bo(((e,t,n)=>(s,r,i,a)=>{const o=a?"index":"preamble";e(o,n(s,o,t,i))})(e,o,Wo(h,i)),((e,t,n)=>(s,r,i,a,o)=>{const c=o?"index":`part${a}`;e(c,((e,t,n,s,r)=>r(e,t,n,...s.next().hasClass("partintro")?[s,s.next()]:[s]))(s,c,t,i,n))})(e,o,Wo(h,i)),((e,t,n)=>So(((s,r,i,a,o)=>{e(r,n(s,r,t,a))})))(e,o,Wo(h,i)),t,n,s)},qo=e=>(e.find("html").appendHTML$("\n + + + diff --git a/doc/docker/Dockerfile b/doc/docker/Dockerfile new file mode 100644 index 0000000..0c6da50 --- /dev/null +++ b/doc/docker/Dockerfile @@ -0,0 +1,6 @@ +FROM asciidoctor/docker-asciidoctor + +COPY asciidoctor-chunker.js /bin + +CMD ["/bin/bash"] + diff --git a/doc/docker/asciidoctor-chunker.js b/doc/docker/asciidoctor-chunker.js new file mode 100755 index 0000000..dd35f4e --- /dev/null +++ b/doc/docker/asciidoctor-chunker.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +/*! For license information please see asciidoctor-chunker.js.LICENSE.txt */ +(()=>{var e,t,n={1073:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},9125:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupSelectors=t.getDocumentRoot=void 0;var r=n(2515);t.getDocumentRoot=function(e){for(;e.parent;)e=e.parent;return e},t.groupSelectors=function(e){for(var t=[],n=[],i=0,s=e;i0&&e.some(l._compileToken(i,n))||s.some((function(t){return g(t,e,n).length>0}))}function _(e,t,n){if(0===t.length)return[];var r,i=h.groupSelectors(e),s=i[0],o=i[1];if(s.length){var a=S(t,s,n);if(0===o.length)return a;a.length&&(r=new Set(a))}for(var c=0;c0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLimit=t.isFilter=t.filterNames=void 0,t.filterNames=new Set(["first","last","eq","gt","nth","lt","even","odd"]),t.isFilter=function e(n){return"pseudo"===n.type&&(!!t.filterNames.has(n.name)||!("not"!==n.name||!Array.isArray(n.data))&&n.data.some((function(t){return t.some(e)})))},t.getLimit=function(e,t){var n=null!=t?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?n:1/0:0;case"gt":return isFinite(n)?1/0:0;default:return 1/0}}},6451:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toggleClass=t.removeClass=t.addClass=t.hasClass=t.removeAttr=t.val=t.data=t.prop=t.attr=void 0;var r=n(6634),i=n(5633),s=Object.prototype.hasOwnProperty,o=/\s+/,a="data-",c={null:null,true:!0,false:!1},l=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/^{[^]*}$|^\[[^]*]$/;function h(e,t,n){var o;if(e&&i.isTag(e))return null!==(o=e.attribs)&&void 0!==o||(e.attribs={}),t?s.call(e.attribs,t)?!n&&l.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?r.text(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function p(e,t,n){null===n?E(e,t):e.attribs[t]=""+n}function d(e,t,n){if(e&&i.isTag(e))return t in e?e[t]:!n&&l.test(t)?void 0!==h(e,t,!1):h(e,t,n)}function f(e,t,n,r){t in e?e[t]=n:p(e,t,!r&&l.test(t)?n?"":null:""+n)}function m(e,t,n){var r,i=e;null!==(r=i.data)&&void 0!==r||(i.data={}),"object"==typeof t?Object.assign(i.data,t):"string"==typeof t&&void 0!==n&&(i.data[t]=n)}function T(e,t){var n,r,o;null==t?r=(n=Object.keys(e.attribs).filter((function(e){return e.startsWith(a)}))).map((function(e){return i.camelCase(e.slice(a.length))})):(n=[a+i.cssCase(t)],r=[t]);for(var l=0;l1?this:h(this[0],e,this.options.xmlMode)},t.prop=function(e,t){var n=this;if("string"==typeof e&&void 0===t)switch(e){case"style":var r=this.css(),s=Object.keys(r);return s.forEach((function(e,t){r[t]=e})),r.length=s.length,r;case"tagName":case"nodeName":var o=this[0];return i.isTag(o)?o.name.toUpperCase():void 0;case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return d(this[0],e,this.options.xmlMode)}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw new Error("Bad combination of arguments.");return i.domEach(this,(function(r,s){i.isTag(r)&&f(r,e,t.call(r,s,d(r,e,n.options.xmlMode)),n.options.xmlMode)}))}return i.domEach(this,(function(r){i.isTag(r)&&("object"==typeof e?Object.keys(e).forEach((function(t){var i=e[t];f(r,t,i,n.options.xmlMode)})):f(r,e,t,n.options.xmlMode))}))}},t.data=function(e,t){var n,r=this[0];if(r&&i.isTag(r)){var o=r;return null!==(n=o.data)&&void 0!==n||(o.data={}),e?"object"==typeof e||void 0!==t?(i.domEach(this,(function(n){i.isTag(n)&&("object"==typeof e?m(n,e):m(n,e,t))})),this):s.call(o.data,e)?o.data[e]:T(o,e):T(o)}},t.val=function(e){var t=0===arguments.length,n=this[0];if(!n||!i.isTag(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":var s=this.find("option:selected");if(!t){if(null==this.attr("multiple")&&"object"==typeof e)return this;this.find("option").removeAttr("selected");for(var o="object"!=typeof e?[e]:e,a=0;a-1;){var s=r+e.length;if((0===r||o.test(n[r-1]))&&(s===n.length||o.test(n[s])))return!0}return!1}))},t.addClass=function e(t){if("function"==typeof t)return i.domEach(this,(function(n,r){if(i.isTag(n)){var s=n.attribs.class||"";e.call([n],t.call(n,r,s))}}));if(!t||"string"!=typeof t)return this;for(var n=t.split(o),r=this.length,s=0;s=0&&(t.splice(c,1),o=!0,a--)}o&&(e.attribs.class=t.join(" "))}}))},t.toggleClass=function e(t,n){if("function"==typeof t)return i.domEach(this,(function(r,s){i.isTag(r)&&e.call([r],t.call(r,s,r.attribs.class||"",n),n)}));if(!t||"string"!=typeof t)return this;for(var r=t.split(o),s=r.length,a="boolean"==typeof n?n?1:-1:0,c=this.length,l=0;l=0&&d<0?h.push(r[p]):a<=0&&d>=0&&h.splice(d,1)}u.attribs.class=h.join(" ")}}return this}},9806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.css=void 0;var r=n(5633);function i(e,t,n,r){if("string"==typeof t){var o=s(e),a="function"==typeof n?n.call(e,r,o[t]):n;""===a?delete o[t]:null!=a&&(o[t]=a),e.attribs.style=(c=o,Object.keys(c).reduce((function(e,t){return e+(e?" ":"")+t+": "+c[t]+";"}),""))}else"object"==typeof t&&Object.keys(t).forEach((function(n,r){i(e,n,t[n],r)}));var c}function s(e,t){if(e&&r.isTag(e)){var n=function(e){return(e=(e||"").trim())?e.split(";").reduce((function(e,t){var n=t.indexOf(":");return n<1||n===t.length-1||(e[t.slice(0,n).trim()]=t.slice(n+1).trim()),e}),{}):{}}(e.attribs.style);if("string"==typeof t)return n[t];if(Array.isArray(t)){var i={};return t.forEach((function(e){null!=n[e]&&(i[e]=n[e])})),i}return n}}t.css=function(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?r.domEach(this,(function(n,s){r.isTag(n)&&i(n,e,t,s)})):s(this[0],e)}},3432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeArray=t.serialize=void 0;var r=n(5633),i="input,select,textarea,keygen",s=/%20/g,o=/\r?\n/g;t.serialize=function(){return this.serializeArray().map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)})).join("&").replace(s,"+")},t.serializeArray=function(){var e=this;return this.map((function(t,n){var s=e._make(n);return r.isTag(n)&&"form"===n.name?s.find(i).toArray():s.filter(i).toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t,n){var r,i=e._make(n),s=i.attr("name"),a=null!==(r=i.val())&&void 0!==r?r:"";return Array.isArray(a)?a.map((function(e){return{name:s,value:e.replace(o,"\r\n")}})):{name:s,value:a.replace(o,"\r\n")}})).toArray()}},848:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.text=t.toString=t.html=t.empty=t.replaceWith=t.remove=t.insertBefore=t.before=t.insertAfter=t.after=t.wrapAll=t.unwrap=t.wrapInner=t.wrap=t.prepend=t.append=t.prependTo=t.appendTo=t._makeDomArray=void 0;var r=n(9698),i=n(7915),s=n(7915),o=r.__importStar(n(5012)),a=n(6634),c=n(5633),l=n(3719);function u(e){return function(){for(var t=this,n=[],r=0;r-1&&(d.children.splice(f,1),s===d&&t>f&&c[0]--)}p.parent=s,p.prev&&(p.prev.next=null!==(o=p.next)&&void 0!==o?o:null),p.next&&(p.next.prev=null!==(a=p.prev)&&void 0!==a?a:null),p.prev=i[h-1]||l,p.next=i[h+1]||u}return l&&(l.next=i[0]),u&&(u.prev=i[i.length-1]),e.splice.apply(e,c)}function p(e){return function(t){for(var n=this.length-1,r=this.parents().last(),i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addBack=t.add=t.end=t.slice=t.index=t.toArray=t.get=t.eq=t.last=t.first=t.has=t.not=t.is=t.filterArray=t.filter=t.map=t.each=t.contents=t.children=t.siblings=t.prevUntil=t.prevAll=t.prev=t.nextUntil=t.nextAll=t.next=t.closest=t.parentsUntil=t.parents=t.parent=t.find=void 0;var r=n(9698),i=n(7915),s=r.__importStar(n(7248)),o=n(5633),a=n(6634),c=n(3719),l=c.DomUtils.uniqueSort,u=/^\s*[~+]/;function h(e){return function(t){for(var n=[],r=1;r1&&s.length>1?n.reduce((function(e,t){return t(e)}),s):s)}}}t.find=function(e){var t;if(!e)return this._make([]);var n=this.toArray();if("string"!=typeof e){var r=o.isCheerio(e)?e.toArray():[e];return this._make(r.filter((function(e){return n.some((function(t){return a.contains(t,e)}))})))}var i=u.test(e)?n:this.children().toArray(),c={context:n,root:null===(t=this._root)||void 0===t?void 0:t[0],xmlMode:this.options.xmlMode};return this._make(s.select(e,i,c))};var p=h((function(e,t){for(var n,r=[],i=0;i0})},t.first=function(){return this.length>1?this._make(this[0]):this},t.last=function(){return this.length>0?this._make(this[this.length-1]):this},t.eq=function(e){var t;return 0==(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[]))},t.get=function(e){return null==e?this.toArray():this[e<0?this.length+e:e]},t.toArray=function(){return Array.prototype.slice.call(this)},t.index=function(e){var t,n;return null==e?(t=this.parent().children(),n=this[0]):"string"==typeof e?(t=this._make(e),n=this[0]):(t=this,n=o.isCheerio(e)?e[0]:e),Array.prototype.indexOf.call(t,n)},t.slice=function(e,t){return this._make(Array.prototype.slice.call(this,e,t))},t.end=function(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])},t.add=function(e,t){var n=this._make(e,t),i=l(r.__spreadArray(r.__spreadArray([],this.get()),n.get()));return this._make(i)},t.addBack=function(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}},7911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cheerio=void 0;var r=n(9698),i=r.__importDefault(n(5012)),s=r.__importDefault(n(2754)),o=n(5633),a=r.__importStar(n(6451)),c=r.__importStar(n(1042)),l=r.__importStar(n(848)),u=r.__importStar(n(9806)),h=r.__importStar(n(3432)),p=function(){function e(e,t,n,r){var a=this;if(void 0===r&&(r=s.default),this.length=0,this.options=r,!e)return this;if(n&&("string"==typeof n&&(n=i.default(n,this.options,!1)),this._root=new this.constructor(n,null,null,this.options),this._root._root=this._root),o.isCheerio(e))return e;var c,l="string"==typeof e&&o.isHtml(e)?i.default(e,this.options,!1).children:(c=e).name||"root"===c.type||"text"===c.type||"comment"===c.type?[e]:Array.isArray(e)?e:null;if(l)return l.forEach((function(e,t){a[t]=e})),this.length=l.length,this;var u=e,h=t?"string"==typeof t?o.isHtml(t)?this._make(i.default(t,this.options,!1)):(u=t+" "+u,this._root):o.isCheerio(t)?t:this._make(t):this._root;return h?h.find(u):this}return e.prototype._make=function(e,t){var n=new this.constructor(e,t,this._root,this.options);return n.prevObject=this,n},e}();t.Cheerio=p,p.prototype.cheerio="[cheerio object]",p.prototype.splice=Array.prototype.splice,p.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(p.prototype,a,c,l,u,h)},7503:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.root=t.parseHTML=t.merge=t.contains=void 0;var r=n(9698);r.__exportStar(n(8701),t),r.__exportStar(n(3434),t);var i=n(3434);t.default=i.load([]);var s=r.__importStar(n(6634));t.contains=s.contains,t.merge=s.merge,t.parseHTML=s.parseHTML,t.root=s.root},3434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.load=void 0;var r=n(9698),i=r.__importStar(n(2754)),s=r.__importStar(n(6634)),o=n(7911),a=r.__importDefault(n(5012));t.load=function e(t,n,c){if(void 0===c&&(c=!0),null==t)throw new Error("cheerio.load() expects a string");var l=r.__assign(r.__assign({},i.default),i.flatten(n)),u=a.default(t,l,c),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(o.Cheerio);function p(e,t,n,s){return void 0===n&&(n=u),new h(e,t,n,r.__assign(r.__assign({},l),i.flatten(s)))}return Object.assign(p,s,{load:e,_root:u,_options:l,fn:h.prototype,prototype:h.prototype}),p}},2754:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatten=void 0;var r=n(9698);t.default={xml:!1,decodeEntities:!0};var i={_useHtmlParser2:!0,xmlMode:!0};t.flatten=function(e){return(null==e?void 0:e.xml)?"boolean"==typeof e.xml?i:r.__assign(r.__assign({},i),e.xml):null!=e?e:void 0}},5012:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.update=void 0;var r=n(3719),i=n(8585),s=n(7957),o=n(7915);function a(e,t){var n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.parse=void 0;var r=n(9698),i=n(7915),s=n(2394),o=r.__importDefault(n(1906));t.parse=function(e,t,n){var r={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:o.default,sourceCodeLocationInfo:t.sourceCodeLocationInfo},i=t.context;return n?s.parse(e,r):s.parseFragment(i,e,r)},t.render=function(e){for(var t,n=("length"in e?e:[e]),a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=t.contains=t.root=t.parseHTML=t.text=t.xml=t.html=void 0;var r=n(9698),i=r.__importStar(n(2754)),s=n(7248),o=n(3719),a=n(7957),c=n(8585);function l(e,t,n){var r,i=t?"string"==typeof t?s.select(t,null!==(r=null==e?void 0:e._root)&&void 0!==r?r:[],n):t:null==e?void 0:e._root.children;return i?n.xmlMode||n._useHtmlParser2?c.render(i,n):a.render(i):""}function u(e){if(Array.isArray(e))return!0;if("object"!=typeof e||!Object.prototype.hasOwnProperty.call(e,"length")||"number"!=typeof e.length||e.length<0)return!1;for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5633:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHtml=t.cloneDom=t.domEach=t.cssCase=t.camelCase=t.isCheerio=t.isTag=void 0;var r=n(3719),i=n(7915);t.isTag=r.DomUtils.isTag,t.isCheerio=function(e){return null!=e.cheerio},t.camelCase=function(e){return e.replace(/[_.-](\w|$)/g,(function(e,t){return t.toUpperCase()}))},t.cssCase=function(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()},t.domEach=function(e,t){for(var n=e.length,r=0;r/;t.isHtml=function(e){return s.test(e)}},9698:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__extends:()=>i,__assign:()=>s,__rest:()=>o,__decorate:()=>a,__param:()=>c,__metadata:()=>l,__awaiter:()=>u,__generator:()=>h,__createBinding:()=>p,__exportStar:()=>d,__values:()=>f,__read:()=>m,__spread:()=>T,__spreadArrays:()=>E,__spreadArray:()=>_,__await:()=>g,__asyncGenerator:()=>A,__asyncDelegator:()=>C,__asyncValues:()=>N,__makeTemplateObject:()=>v,__importStar:()=>b,__importDefault:()=>S,__classPrivateFieldGet:()=>y,__classPrivateFieldSet:()=>I});var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function h(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function T(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof g?Promise.resolve(n.value.v).then(c,l):u(s[0][2],n)}catch(e){u(s[0][3],e)}var n}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function C(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function N(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function b(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return O(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function I(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},8783:(e,t,n)=>{var r=n(8614).EventEmitter,i=n(3129).spawn,s=n(5622),o=s.dirname,a=s.basename,c=n(5747);function l(e,t){this.flags=e,this.required=e.indexOf("<")>=0,this.optional=e.indexOf("[")>=0,this.bool=-1===e.indexOf("-no-"),(e=e.split(/[ ,|]+/)).length>1&&!/^[[<]/.test(e[1])&&(this.short=e.shift()),this.long=e.shift(),this.description=t||""}function u(e){this.commands=[],this.options=[],this._execs={},this._allowUnknownOption=!1,this._args=[],this._name=e||""}function h(e,t){var n=Math.max(0,t-e.length);return e+Array(n+1).join(" ")}function p(e,t){t=t||[];for(var n=0;n":"["+t+"]"}function f(e){try{if(c.statSync(e).isFile())return!0}catch(e){return!1}}n(1669).inherits(u,r),(t=e.exports=new u).Command=u,t.Option=l,l.prototype.name=function(){return this.long.replace("--","").replace("no-","")},l.prototype.attributeName=function(){return this.name().split("-").reduce((function(e,t){return e+t[0].toUpperCase()+t.slice(1)}))},l.prototype.is=function(e){return this.short===e||this.long===e},u.prototype.command=function(e,t,n){"object"==typeof t&&null!==t&&(n=t,t=null),n=n||{};var r=e.split(/ +/),i=new u(r.shift());return t&&(i.description(t),this.executables=!0,this._execs[i._name]=!0,n.isDefault&&(this.defaultExecutable=i._name)),i._noHelp=!!n.noHelp,this.commands.push(i),i.parseExpectedArgs(r),i.parent=this,t?this:i},u.prototype.arguments=function(e){return this.parseExpectedArgs(e.split(/ +/))},u.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")},u.prototype.parseExpectedArgs=function(e){if(e.length){var t=this;return e.forEach((function(e){var n={required:!1,name:"",variadic:!1};switch(e[0]){case"<":n.required=!0,n.name=e.slice(1,-1);break;case"[":n.name=e.slice(1,-1)}n.name.length>3&&"..."===n.name.slice(-3)&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&t._args.push(n)})),this}},u.prototype.action=function(e){var t=this,n=function(n,r){n=n||[],r=r||[];var i=t.parseOptions(r);p(t,i.unknown),i.unknown.length>0&&t.unknownOption(i.unknown[0]),i.args.length&&(n=i.args.concat(n)),t._args.forEach((function(e,r){e.required&&null==n[r]?t.missingArgument(e.name):e.variadic&&(r!==t._args.length-1&&t.variadicArgNotLast(e.name),n[r]=n.splice(r))})),t._args.length?n[t._args.length]=t:n.push(t),e.apply(t,n)},r=this.parent||this,i=r===this?"*":this._name;return r.on("command:"+i,n),this._alias&&r.on("command:"+this._alias,n),this},u.prototype.option=function(e,t,n,r){var i=this,s=new l(e,t),o=s.name(),a=s.attributeName();if("function"!=typeof n)if(n instanceof RegExp){var c=n;n=function(e,t){var n=c.exec(e);return n?n[0]:t}}else r=n,n=null;return(!s.bool||s.optional||s.required)&&(s.bool||(r=!0),void 0!==r&&(i[a]=r,s.defaultValue=r)),this.options.push(s),this.on("option:"+o,(function(e){null!==e&&n&&(e=n(e,void 0===i[a]?r:i[a])),"boolean"==typeof i[a]||void 0===i[a]?i[a]=null==e?!!s.bool&&(r||!0):e:null!==e&&(i[a]=e)})),this},u.prototype.allowUnknownOption=function(e){return this._allowUnknownOption=0===arguments.length||e,this},u.prototype.parse=function(e){this.executables&&this.addImplicitHelpCommand(),this.rawArgs=e,this._name=this._name||a(e[1],".js"),this.executables&&e.length<3&&!this.defaultExecutable&&e.push("--help");var t=this.parseOptions(this.normalize(e.slice(2))),n=this.args=t.args,r=this.parseArgs(this.args,t.unknown),i=r.args[0],s=null;return i&&(s=this.commands.filter((function(e){return e.alias()===i}))[0]),!0===this._execs[i]?this.executeSubCommand(e,n,t.unknown):s?(n[0]=s._name,this.executeSubCommand(e,n,t.unknown)):this.defaultExecutable?(n.unshift(this.defaultExecutable),this.executeSubCommand(e,n,t.unknown)):r},u.prototype.executeSubCommand=function(e,t,n){(t=t.concat(n)).length||this.help(),"help"===t[0]&&1===t.length&&this.help(),"help"===t[0]&&(t[0]=t[1],t[1]="--help");var r,l=e[1],u=a(l,s.extname(l))+"-"+t[0],h=c.realpathSync(l);r=o(h);var p,d=s.join(r,u),m=!1;f(d+".js")?(u=d+".js",m=!0):f(d+".ts")?(u=d+".ts",m=!0):f(d)&&(u=d),t=t.slice(1),"win32"!==process.platform?m?(t.unshift(u),t=(process.execArgv||[]).concat(t),p=i(process.argv[0],t,{stdio:"inherit",customFds:[0,1,2]})):p=i(u,t,{stdio:"inherit",customFds:[0,1,2]}):(t.unshift(u),p=i(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((function(e){process.on(e,(function(){!1===p.killed&&null===p.exitCode&&p.kill(e)}))})),p.on("close",process.exit.bind(process)),p.on("error",(function(e){"ENOENT"===e.code?console.error("error: %s(1) does not exist, try --help",u):"EACCES"===e.code&&console.error("error: %s(1) not executable. try chmod or run with root",u),process.exit(1)})),this.runningCommand=p},u.prototype.normalize=function(e){for(var t,n,r,i=[],s=0,o=e.length;s0&&(n=this.optionFor(e[s-1])),"--"===t){i=i.concat(e.slice(s));break}n&&n.required?i.push(t):t.length>1&&"-"===t[0]&&"-"!==t[1]?t.slice(1).split("").forEach((function(e){i.push("-"+e)})):/^--/.test(t)&&~(r=t.indexOf("="))?i.push(t.slice(0,r),t.slice(r+1)):i.push(t)}return i},u.prototype.parseArgs=function(e,t){var n;return e.length?(n=e[0],this.listeners("command:"+n).length?this.emit("command:"+e.shift(),e,t):this.emit("command:*",e)):(p(this,t),t.length>0&&this.unknownOption(t[0]),0===this.commands.length&&0===this._args.filter((function(e){return e.required})).length&&this.emit("command:*")),this},u.prototype.optionFor=function(e){for(var t=0,n=this.options.length;t1&&"-"===r[0]?(o.push(r),a+1e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e},u.prototype.optionHelp=function(){var e=this.padWidth();return this.options.map((function(t){return h(t.flags,e)+" "+t.description+(t.bool&&void 0!==t.defaultValue?" (default: "+JSON.stringify(t.defaultValue)+")":"")})).concat([h("-h, --help",e)+" output usage information"]).join("\n")},u.prototype.commandHelp=function(){if(!this.commands.length)return"";var e=this.prepareCommands(),t=this.padWidth();return["Commands:",e.map((function(e){var n=e[1]?" "+e[1]:"";return(n?h(e[0],t):e[0])+n})).join("\n").replace(/^/gm," "),""].join("\n")},u.prototype.helpInformation=function(){var e=[];if(this._description){e=[this._description,""];var t=this._argsDescription;if(t&&this._args.length){var n=this.padWidth();e.push("Arguments:"),e.push(""),this._args.forEach((function(r){e.push(" "+h(r.name,n)+" "+t[r.name])})),e.push("")}}var r=this._name;this._alias&&(r=r+"|"+this._alias);var i=["Usage: "+r+" "+this.usage(),""],s=[],o=this.commandHelp();o&&(s=[o]);var a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return i.concat(e).concat(a).concat(s).join("\n")},u.prototype.outputHelp=function(e){e||(e=function(e){return e}),process.stdout.write(e(this.helpInformation())),this.emit("--help")},u.prototype.help=function(e){this.outputHelp(e),process.exit()}},996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeRules=void 0;var r=n(1073),i=/[-[\]{}()*+?.,\\^$|#\s]/g;function s(e){return e.replace(i,"\\$&")}t.attributeRules={equals:function(e,t,n){var r=n.adapter,i=t.name,s=t.value;return t.ignoreCase?(s=s.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&n.length===s.length&&n.toLowerCase()===s&&e(t)}):function(t){return r.getAttributeValue(t,i)===s&&e(t)}},hyphen:function(e,t,n){var r=n.adapter,i=t.name,s=t.value,o=s.length;return t.ignoreCase?(s=s.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===o||"-"===n.charAt(o))&&n.substr(0,o).toLowerCase()===s&&e(t)}):function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===o||"-"===n.charAt(o))&&n.substr(0,o)===s&&e(t)}},element:function(e,t,n){var i=t.name,o=t.value,a=t.ignoreCase,c=n.adapter;if(/\s/.test(o))return r.falseFunc;var l=new RegExp("(?:^|\\s)"+s(o)+"(?:$|\\s)",a?"i":"");return function(t){var n=c.getAttributeValue(t,i);return null!=n&&n.length>=o.length&&l.test(n)&&e(t)}},exists:function(e,t,n){var r=t.name,i=n.adapter;return function(t){return i.hasAttrib(t,r)&&e(t)}},start:function(e,t,n){var i=n.adapter,s=t.name,o=t.value,a=o.length;return 0===a?r.falseFunc:t.ignoreCase?(o=o.toLowerCase(),function(t){var n=i.getAttributeValue(t,s);return null!=n&&n.length>=a&&n.substr(0,a).toLowerCase()===o&&e(t)}):function(t){var n;return!!(null===(n=i.getAttributeValue(t,s))||void 0===n?void 0:n.startsWith(o))&&e(t)}},end:function(e,t,n){var i=n.adapter,s=t.name,o=t.value,a=-o.length;return 0===a?r.falseFunc:t.ignoreCase?(o=o.toLowerCase(),function(t){var n;return(null===(n=i.getAttributeValue(t,s))||void 0===n?void 0:n.substr(a).toLowerCase())===o&&e(t)}):function(t){var n;return!!(null===(n=i.getAttributeValue(t,s))||void 0===n?void 0:n.endsWith(o))&&e(t)}},any:function(e,t,n){var i=n.adapter,o=t.name,a=t.value;if(""===a)return r.falseFunc;if(t.ignoreCase){var c=new RegExp(s(a),"i");return function(t){var n=i.getAttributeValue(t,o);return null!=n&&n.length>=a.length&&c.test(n)&&e(t)}}return function(t){var n;return!!(null===(n=i.getAttributeValue(t,o))||void 0===n?void 0:n.includes(a))&&e(t)}},not:function(e,t,n){var r=n.adapter,i=t.name,s=t.value;return""===s?function(t){return!!r.getAttributeValue(t,i)&&e(t)}:t.ignoreCase?(s=s.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return(null==n||n.length!==s.length||n.toLowerCase()!==s)&&e(t)}):function(t){return r.getAttributeValue(t,i)!==s&&e(t)}}}},8866:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compileToken=t.compileUnsafe=t.compile=void 0;var i=n(9751),s=n(1073),o=r(n(7353)),a=n(7177),c=n(3621),l=n(1768);function u(e,t,n){return m("string"==typeof e?i.parse(e,t):e,t,n)}function h(e){return"pseudo"===e.type&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(h)})))}t.compile=function(e,t,n){var r=u(e,t,n);return l.ensureIsTag(r,t.adapter)},t.compileUnsafe=u;var p={type:"descendant"},d={type:"_flexibleDescendant"},f={type:"pseudo",name:"scope",data:null};function m(e,t,n){var r;(e=e.filter((function(e){return e.length>0}))).forEach(o.default),n=null!==(r=t.context)&&void 0!==r?r:n;var i=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);!function(e,t,n){for(var r=t.adapter,i=!!(null==n?void 0:n.every((function(e){var t=r.isTag(e)&&r.getParent(e);return e===l.PLACEHOLDER_ELEMENT||t&&r.isTag(t)}))),s=0,o=e;s0&&a.isTraversal(c[0])&&"descendant"!==c[0].type);else{if(!i||c.some(h))continue;c.unshift(p)}c.unshift(f)}}(e,t,u);var E=!1,_=e.map((function(e){if(e.length>=2){var n=e[0],r=e[1];"pseudo"!==n.type||"scope"!==n.name||(i&&"descendant"===r.type?e[1]=d:"adjacent"!==r.type&&"sibling"!==r.type||(E=!0))}return function(e,t,n){var r;return e.reduce((function(e,r){return e===s.falseFunc?s.falseFunc:c.compileGeneralSelector(e,r,t,n,m)}),null!==(r=t.rootFunc)&&void 0!==r?r:s.trueFunc)}(e,t,u)})).reduce(T,s.falseFunc);return _.shouldTestNextSiblings=E,_}function T(e,t){return t===s.falseFunc||e===s.trueFunc?e:e===s.falseFunc||t===s.trueFunc?t:function(n){return e(n)||t(n)}}t.compileToken=m},3621:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileGeneralSelector=void 0;var r=n(996),i=n(8677);t.compileGeneralSelector=function(e,t,n,s,o){var a=n.adapter,c=n.equals;switch(t.type){case"pseudo-element":throw new Error("Pseudo-elements are not supported by css-select");case"attribute":return r.attributeRules[t.action](e,t,n);case"pseudo":return i.compilePseudoSelector(e,t,n,s,o);case"tag":return function(n){return a.getName(n)===t.name&&e(n)};case"descendant":if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){for(var n=t;n=a.getParent(n);)if(a.isTag(n)&&e(n))return!0;return!1};var l=new WeakSet;return function(t){for(var n=t;n=a.getParent(n);)if(!l.has(n)){if(a.isTag(n)&&e(n))return!0;l.add(n)}return!1};case"_flexibleDescendant":return function(t){var n=t;do{if(a.isTag(n)&&e(n))return!0}while(n=a.getParent(n));return!1};case"parent":return function(t){return a.getChildren(t).some((function(t){return a.isTag(t)&&e(t)}))};case"child":return function(t){var n=a.getParent(t);return null!=n&&a.isTag(n)&&e(n)};case"sibling":return function(t){for(var n=a.getSiblings(t),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTraversal=t.procedure=void 0,t.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1},t.isTraversal=function(e){return t.procedure[e.type]<0}},2968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=void 0,t.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},7689:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;var i=r(n(7540)),s=n(1073);function o(e,t){return function(n){var r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}function a(e){return function(t,n,r){var i=r.adapter[e];return"function"!=typeof i?s.falseFunc:function(e){return i(e)&&t(e)}}}t.filters={contains:function(e,t,n){var r=n.adapter;return function(n){return e(n)&&r.getText(n).includes(t)}},icontains:function(e,t,n){var r=n.adapter,i=t.toLowerCase();return function(t){return e(t)&&r.getText(t).toLowerCase().includes(i)}},"nth-child":function(e,t,n){var r=n.adapter,a=n.equals,c=i.default(t);return c===s.falseFunc?s.falseFunc:c===s.trueFunc?o(e,r):function(t){for(var n=r.getSiblings(t),i=0,s=0;s=0&&!a(t,n[s]);s--)r.isTag(n[s])&&i++;return c(i)&&e(t)}},"nth-of-type":function(e,t,n){var r=n.adapter,a=n.equals,c=i.default(t);return c===s.falseFunc?s.falseFunc:c===s.trueFunc?o(e,r):function(t){for(var n=r.getSiblings(t),i=0,s=0;s=0;s--){var o=n[s];if(a(t,o))break;r.isTag(o)&&r.getName(o)===r.getName(t)&&i++}return c(i)&&e(t)}},root:function(e,t,n){var r=n.adapter;return function(t){var n=r.getParent(t);return(null==n||!r.isTag(n))&&e(t)}},scope:function(e,n,r,i){var s=r.equals;return i&&0!==i.length?1===i.length?function(t){return s(i[0],t)&&e(t)}:function(t){return i.includes(t)&&e(t)}:t.filters.root(e,n,r)},hover:a("isHovered"),visited:a("isVisited"),active:a("isActive")}},8677:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compilePseudoSelector=t.aliases=t.pseudos=t.filters=void 0;var r=n(1073),i=n(9751),s=n(7689);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return s.filters}});var o=n(7221);Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return o.pseudos}});var a=n(2968);Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return a.aliases}});var c=n(1768);t.compilePseudoSelector=function(e,t,n,l,u){var h=t.name,p=t.data;if(Array.isArray(p))return c.subselects[h](e,p,n,l,u);if(h in a.aliases){if(null!=p)throw new Error("Pseudo "+h+" doesn't have any arguments");var d=i.parse(a.aliases[h],n);return c.subselects.is(e,d,n,l,u)}if(h in s.filters)return s.filters[h](e,p,n,l);if(h in o.pseudos){var f=o.pseudos[h];return o.verifyPseudoArgs(f,h,p),f===r.falseFunc?r.falseFunc:e===r.trueFunc?function(e){return f(e,n,p)}:function(t){return f(t,n,p)&&e(t)}}throw new Error("unmatched pseudo-class :"+h)}},7221:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyPseudoArgs=t.pseudos=void 0,t.pseudos={empty:function(e,t){var n=t.adapter;return!n.getChildren(e).some((function(e){return n.isTag(e)||""!==n.getText(e)}))},"first-child":function(e,t){var n=t.adapter,r=t.equals,i=n.getSiblings(e).find((function(e){return n.isTag(e)}));return null!=i&&r(e,i)},"last-child":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),s=i.length-1;s>=0;s--){if(r(e,i[s]))return!0;if(n.isTag(i[s]))break}return!1},"first-of-type":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),s=n.getName(e),o=0;o=0;o--){var a=i[o];if(r(e,a))return!0;if(n.isTag(a)&&n.getName(a)===s)break}return!1},"only-of-type":function(e,t){var n=t.adapter,r=t.equals,i=n.getName(e);return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)||n.getName(t)!==i}))},"only-child":function(e,t){var n=t.adapter,r=t.equals;return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)}))}},t.verifyPseudoArgs=function(e,t,n){if(null===n){if(e.length>2)throw new Error("pseudo-selector :"+t+" requires an argument")}else if(2===e.length)throw new Error("pseudo-selector :"+t+" doesn't have any arguments")}},1768:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7177),i={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function s(e){var t=r.procedure[e.type];if("attribute"===e.type)(t=i[e.action])===i.equals&&"id"===e.name&&(t=9),e.ignoreCase&&(t>>=1);else if("pseudo"===e.type)if(e.data)if("has"===e.name||"contains"===e.name)t=0;else if(Array.isArray(e.data)){t=0;for(var n=0;nt&&(t=o)}e.data.length>1&&t>0&&(t-=1)}else t=1;else t=3;return t}t.default=function(e){for(var t=e.map(s),n=1;n=0&&r":"child","<":"parent","~":"sibling","+":"adjacent"},a={"#":["id","equals"],".":["class","element"]},c=new Set(["has","not","matches","is","host","host-context"]),l=new Set(n(["descendant"],Object.keys(o).map((function(e){return o[e]})))),u=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function h(e){return l.has(e.type)}t.isTraversal=h;var p=new Set(["contains","icontains"]),d=new Set(['"',"'"]);function f(e,t,n){var r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function m(e){return e.replace(i,f)}function T(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function E(e,t,n,i){var l,f;void 0===n&&(n={});var g=[],A=!1;function C(e){var n=t.slice(i+e).match(r);if(!n)throw new Error("Expected name, found "+t.slice(i));var s=n[0];return i+=e+s.length,m(s)}function N(e){for(;T(t.charAt(i+e));)e++;i+=e}function v(e){for(var n=0;"\\"===t.charAt(--e);)n++;return 1==(1&n)}function O(){if(g.length>0&&h(g[g.length-1]))throw new Error("Did not expect successive traversals.")}for(N(0);""!==t;){var b=t.charAt(i);if(T(b))A=!0,N(1);else if(b in o)O(),g.push({type:o[b]}),A=!1,N(1);else if(","===b){if(0===g.length)throw new Error("Empty sub-selector");e.push(g),g=[],A=!1,N(1)}else if(t.startsWith("/*",i)){var S=t.indexOf("*/",i+2);if(S<0)throw new Error("Comment was not terminated");i=S+2}else if(A&&(O(),g.push({type:"descendant"}),A=!1),b in a){var y=a[b],I=y[0],R=y[1];g.push({type:"attribute",name:I,action:R,value:C(1),namespace:null,ignoreCase:!!n.xmlMode&&null})}else if("["===b){N(1);var k=void 0,L=null;"|"===t.charAt(i)&&(L="",i+=1),t.startsWith("*|",i)&&(L="*",i+=2),k=C(0),null===L&&"|"===t.charAt(i)&&"="!==t.charAt(i+1)&&(L=k,k=C(1)),(null!==(l=n.lowerCaseAttributeNames)&&void 0!==l?l:!n.xmlMode)&&(k=k.toLowerCase()),N(0),R="exists";var M=s.get(t.charAt(i));if(M){if(R=M,"="!==t.charAt(i+1))throw new Error("Expected `=`");N(2)}else"="===t.charAt(i)&&(R="equals",N(1));var x="",P=null;if("exists"!==R){if(d.has(t.charAt(i))){for(var D=t.charAt(i),w=i+1;w0&&i0&&0===t.length)throw new Error("Empty sub-selector");e.push(t)}t.default=function(e,t){var n=[],r=E(n,""+e,t,0);if(r ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return l(e.namespace)+"*";case"tag":return c(e);case"pseudo-element":return"::"+u(e.name);case"pseudo":return null===e.data?":"+u(e.name):"string"==typeof e.data?":"+u(e.name)+"("+u(e.data)+")":":"+u(e.name)+"("+s(e.data)+")";case"attribute":if("id"===e.name&&"equals"===e.action&&!e.ignoreCase&&!e.namespace)return"#"+u(e.value);if("class"===e.name&&"element"===e.action&&!e.ignoreCase&&!e.namespace)return"."+u(e.value);var t=c(e);return"exists"===e.action?"["+t+"]":"["+t+r[e.action]+"='"+u(e.value)+"'"+(e.ignoreCase?"i":!1===e.ignoreCase?"s":"")+"]"}}function c(e){return""+l(e.namespace)+u(e.name)}function l(e){return null!==e?("*"===e?"*":u(e))+"|":""}function u(e){return e.split("").map((function(e){return i.has(e)?"\\"+e:e})).join("")}t.default=s},7837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},7220:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n";case a.Comment:return"\x3c!--"+e.data+"--\x3e";case a.CDATA:return function(e){return""}(e);case a.Script:case a.Style:case a.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=l.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&f.has(e.parent.name)&&(t=r(r({},t),{xmlMode:!1}))),!t.xmlMode&&m.has(e.name)&&(t=r(r({},t),{xmlMode:"foreign"}));var i="<"+e.name,s=function(e,t){if(e)return Object.keys(e).map((function(n){var r,i,s=null!==(r=e[n])&&void 0!==r?r:"";return"foreign"===t.xmlMode&&(n=null!==(i=l.attributeNames.get(n))&&void 0!==i?i:n),t.emptyAttrs||t.xmlMode||""!==s?n+'="'+(!1!==t.decodeEntities?c.encodeXML(s):s.replace(/"/g,"""))+'"':n})).join(" ")}(e.attribs,t);return s&&(i+=" "+s),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&h.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),!t.xmlMode&&h.has(e.name)||(i+="")),i}(e,t);case a.Text:return function(e,t){var n=e.data||"";return!1===t.decodeEntities||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=c.encodeXML(n)),n}(e,t)}}t.default=p;var f=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var s=n(9960),o=n(7790);i(n(7790),t);var a=/\s+/g,c={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=c),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:c,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){var e;this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null!==(e=this.parser)&&void 0!==e?e:null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?s.ElementType.Tag:void 0,r=new o.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===s.ElementType.Text)t?n.data=(n.data+e).replace(a," "):n.data+=e;else{t&&(e=e.replace(a," "));var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.NodeWithChildren(s.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new o.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(c);t.NodeWithChildren=d;var f=function(e){function t(t){return e.call(this,o.ElementType.Root,t)||this}return i(t,e),t}(d);t.Document=f;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var s=e.call(this,i,r)||this;return s.name=t,s.attribs=n,s}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function T(e){return o.isTag(e)}function E(e){return e.type===o.ElementType.CDATA}function _(e){return e.type===o.ElementType.Text}function g(e){return e.type===o.ElementType.Comment}function A(e){return e.type===o.ElementType.Directive}function C(e){return e.type===o.ElementType.Root}function N(e,t){var n;if(void 0===t&&(t=!1),_(e))n=new u(e.data);else if(g(e))n=new h(e.data);else if(T(e)){var r=t?v(e.children):[],i=new m(e.name,s({},e.attribs),r);r.forEach((function(e){return e.parent=i})),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=s({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=s({},e["x-attribsPrefix"])),n=i}else if(E(e)){r=t?v(e.children):[];var a=new d(o.ElementType.CDATA,r);r.forEach((function(e){return e.parent=a})),n=a}else if(C(e)){r=t?v(e.children):[];var c=new f(r);r.forEach((function(e){return e.parent=c})),e["x-mode"]&&(c["x-mode"]=e["x-mode"]),n=c}else{if(!A(e))throw new Error("Not implemented yet: "+e.type);var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,n}function v(e){for(var t=e.map((function(e){return N(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var r=n(7915);function i(e,t){var n=[],i=[];if(e===t)return 0;for(var s=r.hasChildren(e)?e:e.parent;s;)n.unshift(s),s=s.parent;for(s=r.hasChildren(t)?t:t.parent;s;)i.unshift(s),s=s.parent;for(var o=Math.min(n.length,i.length),a=0;al.indexOf(h)?c===t?20:4:c===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,t){var n=i(e,t);return 2&n?-1:4&n?1:0})),e}},9432:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(n(3346),t),i(n(5010),t),i(n(6765),t),i(n(8043),t),i(n(3905),t),i(n(4975),t);var s=n(7915);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return s.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return s.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return s.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return s.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})},3905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=n(7915),i=n(8043),s={tag_name:function(e){return"function"==typeof e?function(t){return r.isTag(t)&&e(t.name)}:"*"===e?r.isTag:function(t){return r.isTag(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return r.isText(t)&&e(t.data)}:function(t){return r.isText(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(n){return r.isTag(n)&&t(n.attribs[e])}:function(n){return r.isTag(n)&&n.attribs[e]===t}}function a(e,t){return function(n){return e(n)||t(n)}}function c(e){var t=Object.keys(e).map((function(t){var n=e[t];return t in s?s[t](n):o(t,n)}));return 0===t.length?null:t.reduce(a)}t.testElement=function(e,t){var n=c(e);return!n||n(t)},t.getElements=function(e,t,n,r){void 0===r&&(r=1/0);var s=c(e);return s?i.filter(s,t,n,r):[]},t.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),i.findOne(o("id",e),t,n)},t.getElementsByTagName=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),i.filter(s.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),i.filter(s.tag_type(e),t,n,r)}},6765:(e,t)=>{"use strict";function n(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=n,t.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var s=i.children;s[s.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(n(t),t.next=null,t.parent=e,e.children.push(t)>1){var r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null},t.append=function(e,t){n(t);var r=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=r,i){if(i.prev=t,r){var s=r.children;s.splice(s.lastIndexOf(i),0,t)}}else r&&r.children.push(t)},t.prependChild=function(e,t){if(n(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var r=e.children[1];r.prev=t,t.next=r}else t.next=null},t.prepend=function(e,t){n(t);var r=e.parent;if(r){var i=r.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}},8043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(7915);function i(e,t,n,s){for(var o=[],a=0,c=t;a0){var u=i(e,l.children,n,s);if(o.push.apply(o,u),(s-=u.length)<=0)break}}return o}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,r)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var s=null,o=0;o0&&(s=e(t,a.children)))}return s},t.existsOne=function e(t,n){return n.some((function(n){return r.isTag(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,s=[],o=t.filter(r.isTag);i=o.shift();){var a=null===(n=i.children)||void 0===n?void 0:n.filter(r.isTag);a&&a.length>0&&o.unshift.apply(o,a),e(i)&&s.push(i)}return s}},3346:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=n(7915),s=r(n(7220)),o=n(9960);function a(e,t){return s.default(e,t)}t.getOuterHTML=a,t.getInnerHTML=function(e,t){return i.hasChildren(e)?e.children.map((function(e){return a(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):i.isTag(t)?"br"===t.name?"\n":e(t.children):i.isCDATA(t)?e(t.children):i.isText(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):i.isTag(t)||i.isCDATA(t)?e(t.children):i.isText(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):i.hasChildren(t)&&t.type===o.ElementType.Tag||i.isCDATA(t)?e(t.children):i.isText(t)?t.data:""}},5010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var r=n(7915),i=[];function s(e){var t;return null!==(t=e.children)&&void 0!==t?t:i}function o(e){return e.parent||null}t.getChildren=s,t.getParent=o,t.getSiblings=function(e){var t=o(e);if(null!=t)return s(t);for(var n=[e],r=e.prev,i=e.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=i;)n.push(i),i=i.next;return n},t.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!r.isTag(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!r.isTag(t);)t=t.prev;return t}},4076:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var i=r(n(4007)),s=r(n(7802)),o=r(n(2228)),a=r(n(26)),c=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function l(e){var t=h(e);return function(e){return String(e).replace(c,t)}}t.decodeXML=l(o.default),t.decodeHTMLStrict=l(i.default);var u=function(e,t){return e65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"�":(e in i.default&&(e=i.default[e]),s(e))}},7322:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var i=u(r(n(2228)).default),s=h(i);t.encodeXML=T(i);var o,a,c=u(r(n(4007)).default),l=h(c);function u(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function h(e){for(var t=[],n=[],r=0,i=Object.keys(e);r1?d(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var m=new RegExp(s.source+"|"+p.source,"g");function T(e){return function(t){return t.replace(m,(function(t){return e[t]||f(t)}))}}t.escape=function(e){return e.replace(m,f)},t.escapeUTF8=function(e){return e.replace(s,f)}},5863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var r=n(4076),i=n(7322);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?i.encodeXML:i.encodeHTML)(e)};var s=n(7322);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return s.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return s.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return s.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return s.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return s.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return s.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return s.encodeHTML}});var o=n(4076);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return o.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return o.decodeXML}})},4589:e=>{"use strict";e.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},4007:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},7802:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},2228:e=>{"use strict";e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')},3870:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return o(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var l,u,h=c(n(7915)),p=a(n(9432)),d=n(763);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(l||(l={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var f=function(e){function t(t,n){return"object"==typeof t&&(n=t=void 0),e.call(this,t,n)||this}return i(t,e),t.prototype.onend=function(){var e,t,n=E(C,this.dom);if(n){var r={};if("feed"===n.name){var i=n.children;r.type="atom",A(r,"id","id",i),A(r,"title","title",i);var s=g("href",E("link",i));s&&(r.link=s),A(r,"description","subtitle",i),(o=_("updated",i))&&(r.updated=new Date(o)),A(r,"author","email",i,!0),r.items=T("entry",i).map((function(e){var t={},n=e.children;A(t,"id","id",n),A(t,"title","title",n);var r=g("href",E("link",n));r&&(t.link=r);var i=_("summary",n)||_("content",n);i&&(t.description=i);var s=_("updated",n);return s&&(t.pubDate=new Date(s)),t.media=m(n),t}))}else{var o;i=null!==(t=null===(e=E("channel",n.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[],r.type=n.name.substr(0,3),r.id="",A(r,"title","title",i),A(r,"link","link",i),A(r,"description","description",i),(o=_("lastBuildDate",i))&&(r.updated=new Date(o)),A(r,"author","managingEditor",i,!0),r.items=T("item",n.children).map((function(e){var t={},n=e.children;A(t,"id","guid",n),A(t,"title","title",n),A(t,"link","link",n),A(t,"description","description",n);var r=_("pubDate",n);return r&&(t.pubDate=new Date(r)),t.media=m(n),t}))}this.feed=r,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(h.default);function m(e){return T("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function T(e,t){return p.getElementsByTagName(e,t,!0)}function E(e,t){return p.getElementsByTagName(e,t,!0,1)[0]}function _(e,t,n){return void 0===n&&(n=!1),p.getText(p.getElementsByTagName(e,t,n,1)).trim()}function g(e,t){return t?t.attribs[e]:null}function A(e,t,n,r,i){void 0===i&&(i=!1);var s=_(n,r,i);s&&(e[t]=s)}function C(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=f,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var n=new f(t);return new d.Parser(n,t).end(e),n.feed}},763:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=r(n(9889)),s=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),a={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:o,h1:o,h2:o,h3:o,h4:o,h5:o,h6:o,select:s,input:s,output:s,button:s,datalist:s,textarea:s,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:o,article:o,aside:o,blockquote:o,details:o,div:o,dl:o,fieldset:o,figcaption:o,figure:o,footer:o,form:o,header:o,hr:o,main:o,nav:o,ol:o,pre:o,section:o,table:o,ul:o,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},c=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),h=/\s|\//,p=function(){function e(e,t){var n,r,s,o,a;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(s=t.Tokenizer)&&void 0!==s?s:i.default)(this.options,this),null===(a=(o=this.cbs).onparserinit)||void 0===a||a.call(o,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,n;this.updatePosition(1),this.endIndex--,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,e)},e.prototype.onopentagname=function(e){var t,n;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(a,e))for(var r=void 0;this.stack.length>0&&a[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);!this.options.xmlMode&&c.has(e)||(this.stack.push(e),l.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(n=(t=this.cbs).onopentagname)||void 0===n||n.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&c.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(l.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&c.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,n),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,n;null===(n=(t=this.cbs).onattribute)||void 0===n||n.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(h),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,n,r,i;this.updatePosition(4),null===(n=(t=this.cbs).oncomment)||void 0===n||n.call(t,e),null===(i=(r=this.cbs).oncommentend)||void 0===i||i.call(r)},e.prototype.oncdata=function(e){var t,n,r,i,s,o;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(t=this.cbs).oncdatastart)||void 0===n||n.call(t),null===(i=(r=this.cbs).ontext)||void 0===i||i.call(r,e),null===(o=(s=this.cbs).oncdataend)||void 0===o||o.call(s)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,n;null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=p},9889:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(26)),s=r(n(4007)),o=r(n(7802)),a=r(n(2228));function c(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function l(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,n){var r=e.toLowerCase();return e===r?function(e,i){i===r?e._state=t:(e._state=n,e._index--)}:function(i,s){s===r||s===e?i._state=t:(i._state=n,i._index--)}}function h(e,t){var n=e.toLowerCase();return function(r,i){i===n||i===e?r._state=t:(r._state=3,r._index--)}}var p=u("C",24,16),d=u("D",25,16),f=u("A",26,16),m=u("T",27,16),T=u("A",28,16),E=h("R",35),_=h("I",36),g=h("P",37),A=h("T",38),C=u("R",40,1),N=u("I",41,1),v=u("P",42,1),O=u("T",43,1),b=h("Y",45),S=h("L",46),y=h("E",47),I=u("Y",49,1),R=u("L",50,1),k=u("E",51,1),L=h("I",54),M=h("T",55),x=h("L",56),P=h("E",57),D=u("I",58,1),w=u("T",59,1),H=u("L",60,1),F=u("E",61,1),U=u("#",63,64),B=u("X",66,65),G=function(){function e(e,t){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(n=null==e?void 0:e.decodeEntities)||void 0===n||n}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._indexthis.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.isTagStartChar=function(e){return l(e)||this.xmlMode&&!c(e)&&"/"!==e&&">"!==e},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||c(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||c(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){c(e)||(">"===e?this._state=1:1!==this.special?4===this.special||"s"!==e&&"S"!==e?4!==this.special||"t"!==e&&"T"!==e?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||c(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:c(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):c(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||c(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):c(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):c(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){c(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||c(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||c(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?a.default:s.default),this.sectionStart+1=2;){var n=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(o.default,n))return this.emitPartial(o.default[n]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1"9")&&!l(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(o.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,n){var r=this.sectionStart+e;if(r!==this._index){var s=this.buffer.substring(r,this._index),o=parseInt(s,t);this.emitPartial(i.default(o)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=void 0;var r=n(1073);t.compile=function(e){var t=e[0],n=e[1]-1;if(n<0&&t<=0)return r.falseFunc;if(-1===t)return function(e){return e<=n};if(0===t)return function(e){return e===n};if(1===t)return n<0?r.trueFunc:function(e){return e>=n};var i=Math.abs(t),s=(n%i+i)%i;return t>1?function(e){return e>=n&&e%i===s}:function(e){return e<=n&&e%i===s}}},7540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=t.parse=void 0;var r=n(7766);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return r.parse}});var i=n(9769);Object.defineProperty(t,"compile",{enumerable:!0,get:function(){return i.compile}}),t.default=function(e){return i.compile(r.parse(e))}},7766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var n=/^([+-]?\d*n)?\s*(?:([+-]?)\s*(\d+))?$/;t.parse=function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t,r=e.match(n);if(!r)throw new Error("n-th rule couldn't be parsed ('"+e+"')");return r[1]?(t=parseInt(r[1],10),isNaN(t)&&(t=r[1].startsWith("-")?-1:1)):t=0,[t,("-"===r[2]?-1:1)*(r[3]?parseInt(r[3],10):0)]}},1906:(e,t,n)=>{"use strict";const r=n(1515),{DOCUMENT_MODE:i}=n(6152),s={element:1,text:3,cdata:4,comment:8},o={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};class a{constructor(e){for(const t of Object.keys(e))this[t]=e[t]}get firstChild(){const e=this.children;return e&&e[0]||null}get lastChild(){const e=this.children;return e&&e[e.length-1]||null}get nodeType(){return s[this.type]||s.element}}Object.keys(o).forEach((e=>{const t=o[e];Object.defineProperty(a.prototype,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})),t.createDocument=function(){return new a({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":i.NO_QUIRKS})},t.createDocumentFragment=function(){return new a({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},t.createElement=function(e,t,n){const r=Object.create(null),i=Object.create(null),s=Object.create(null);for(let e=0;e{"use strict";const{DOCUMENT_MODE:r}=n(6152),i="html",s=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],o=s.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),a=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],c=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],l=c.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function u(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function h(e,t){for(let n=0;n-1)return r.QUIRKS;let e=null===t?o:s;if(h(n,e))return r.QUIRKS;if(e=null===t?c:l,h(n,e))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+u(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+u(n)),r}},1734:e=>{"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},8779:(e,t,n)=>{"use strict";const r=n(5763),i=n(6152),s=i.TAG_NAMES,o=i.NAMESPACES,a=i.ATTRS,c={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},l={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:o.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:o.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:o.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:o.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:o.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:o.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:o.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:o.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:o.XML},"xml:space":{prefix:"xml",name:"space",namespace:o.XML},xmlns:{prefix:"",name:"xmlns",namespace:o.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:o.XMLNS}},u=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},h={[s.B]:!0,[s.BIG]:!0,[s.BLOCKQUOTE]:!0,[s.BODY]:!0,[s.BR]:!0,[s.CENTER]:!0,[s.CODE]:!0,[s.DD]:!0,[s.DIV]:!0,[s.DL]:!0,[s.DT]:!0,[s.EM]:!0,[s.EMBED]:!0,[s.H1]:!0,[s.H2]:!0,[s.H3]:!0,[s.H4]:!0,[s.H5]:!0,[s.H6]:!0,[s.HEAD]:!0,[s.HR]:!0,[s.I]:!0,[s.IMG]:!0,[s.LI]:!0,[s.LISTING]:!0,[s.MENU]:!0,[s.META]:!0,[s.NOBR]:!0,[s.OL]:!0,[s.P]:!0,[s.PRE]:!0,[s.RUBY]:!0,[s.S]:!0,[s.SMALL]:!0,[s.SPAN]:!0,[s.STRONG]:!0,[s.STRIKE]:!0,[s.SUB]:!0,[s.SUP]:!0,[s.TABLE]:!0,[s.TT]:!0,[s.U]:!0,[s.UL]:!0,[s.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!(t!==s.FONT||null===r.getTokenAttr(e,a.COLOR)&&null===r.getTokenAttr(e,a.SIZE)&&null===r.getTokenAttr(e,a.FACE))||h[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t{"use strict";const n=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const r=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[n.HTML]:{[r.ADDRESS]:!0,[r.APPLET]:!0,[r.AREA]:!0,[r.ARTICLE]:!0,[r.ASIDE]:!0,[r.BASE]:!0,[r.BASEFONT]:!0,[r.BGSOUND]:!0,[r.BLOCKQUOTE]:!0,[r.BODY]:!0,[r.BR]:!0,[r.BUTTON]:!0,[r.CAPTION]:!0,[r.CENTER]:!0,[r.COL]:!0,[r.COLGROUP]:!0,[r.DD]:!0,[r.DETAILS]:!0,[r.DIR]:!0,[r.DIV]:!0,[r.DL]:!0,[r.DT]:!0,[r.EMBED]:!0,[r.FIELDSET]:!0,[r.FIGCAPTION]:!0,[r.FIGURE]:!0,[r.FOOTER]:!0,[r.FORM]:!0,[r.FRAME]:!0,[r.FRAMESET]:!0,[r.H1]:!0,[r.H2]:!0,[r.H3]:!0,[r.H4]:!0,[r.H5]:!0,[r.H6]:!0,[r.HEAD]:!0,[r.HEADER]:!0,[r.HGROUP]:!0,[r.HR]:!0,[r.HTML]:!0,[r.IFRAME]:!0,[r.IMG]:!0,[r.INPUT]:!0,[r.LI]:!0,[r.LINK]:!0,[r.LISTING]:!0,[r.MAIN]:!0,[r.MARQUEE]:!0,[r.MENU]:!0,[r.META]:!0,[r.NAV]:!0,[r.NOEMBED]:!0,[r.NOFRAMES]:!0,[r.NOSCRIPT]:!0,[r.OBJECT]:!0,[r.OL]:!0,[r.P]:!0,[r.PARAM]:!0,[r.PLAINTEXT]:!0,[r.PRE]:!0,[r.SCRIPT]:!0,[r.SECTION]:!0,[r.SELECT]:!0,[r.SOURCE]:!0,[r.STYLE]:!0,[r.SUMMARY]:!0,[r.TABLE]:!0,[r.TBODY]:!0,[r.TD]:!0,[r.TEMPLATE]:!0,[r.TEXTAREA]:!0,[r.TFOOT]:!0,[r.TH]:!0,[r.THEAD]:!0,[r.TITLE]:!0,[r.TR]:!0,[r.TRACK]:!0,[r.UL]:!0,[r.WBR]:!0,[r.XMP]:!0},[n.MATHML]:{[r.MI]:!0,[r.MO]:!0,[r.MN]:!0,[r.MS]:!0,[r.MTEXT]:!0,[r.ANNOTATION_XML]:!0},[n.SVG]:{[r.TITLE]:!0,[r.FOREIGN_OBJECT]:!0,[r.DESC]:!0}}},4284:(e,t)=>{"use strict";const n=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="�",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||n.indexOf(e)>-1}},3843:(e,t,n)=>{"use strict";const r=n(1704);e.exports=class extends r{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},2232:(e,t,n)=>{"use strict";const r=n(3843),i=n(50),s=n(6110),o=n(1704);e.exports=class extends r{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),o.install(this.tokenizer,i,e.opts),o.install(this.tokenizer,s)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t)}}}}},3288:(e,t,n)=>{"use strict";const r=n(3843),i=n(7930),s=n(1704);e.exports=class extends r{constructor(e,t){super(e,t),this.posTracker=s.install(e,i),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},50:(e,t,n)=>{"use strict";const r=n(3843),i=n(3288),s=n(1704);e.exports=class extends r{constructor(e,t){super(e,t);const n=s.install(e.preprocessor,i,t);this.posTracker=n.posTracker}}},1077:(e,t,n)=>{"use strict";const r=n(1704);e.exports=class extends r{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}},452:(e,t,n)=>{"use strict";const r=n(1704),i=n(5763),s=n(6110),o=n(1077),a=n(6152).TAG_NAMES;e.exports=class extends r{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),s={};t.type===i.END_TAG_TOKEN&&r===t.tagName?(s.endTag=Object.assign({},n),s.endLine=n.endLine,s.endCol=n.endCol,s.endOffset=n.endOffset):(s.endLine=n.startLine,s.endCol=n.startCol,s.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}_getOverriddenMethods(e,t){return{_bootstrap(n,i){t._bootstrap.call(this,n,i),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const a=r.install(this.tokenizer,s);e.posTracker=a.posTracker,r.install(this.openElements,o,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===i.END_TAG_TOKEN&&(n.tagName===a.HTML||n.tagName===a.BODY&&this.openElements.hasInScope(a.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];if(this.treeAdapter.getTagName(r)===n.tagName){e._setEndLocation(r,n);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const n=this.treeAdapter.getChildNodes(this.document),r=n.length;for(let t=0;t{"use strict";const r=n(1704),i=n(5763),s=n(7930);e.exports=class extends r{constructor(e){super(e),this.tokenizer=e,this.posTracker=r.install(e.preprocessor,s),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){const n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc},_createCharacterToken(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===i.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(i.MODE).forEach((r=>{const s=i.MODE[r];n[s]=function(n){e.ctLoc=e._getCurrentLocation(),t[s].call(this,n)}})),n}}},7930:(e,t,n)=>{"use strict";const r=n(1704);e.exports=class extends r{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const n=this.pos;t.dropParsedChunk.call(this);const r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}},2394:(e,t,n)=>{"use strict";const r=n(7045),i=n(3988);t.parse=function(e,t){return new r(t).parse(e)},t.parseFragment=function(e,t,n){return"string"==typeof e&&(n=t,t=e,e=null),new r(n).parseFragment(t,e)},t.serialize=function(e,t){return new i(e,t).serialize()}},2484:e=>{"use strict";class t{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const n=[];if(this.length>=3){const r=this.treeAdapter.getAttrList(e).length,i=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const o=this.entries[e];if(o.type===t.MARKER_ENTRY)break;const a=o.element,c=this.treeAdapter.getAttrList(a);this.treeAdapter.getTagName(a)===i&&this.treeAdapter.getNamespaceURI(a)===s&&c.length===r&&n.push({idx:e,attrs:c})}}return n.length<3?[]:n}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let n=t.length;if(n){const r=this.treeAdapter.getAttrList(e),i=r.length,s=Object.create(null);for(let e=0;e=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:t.MARKER_ENTRY}),this.length++}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.push({type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++}insertElementAfterBookmark(e,n){let r=this.length-1;for(;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===t.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===t.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===e)return r}return null}getElementEntry(e){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===t.ELEMENT_ENTRY&&r.element===e)return r}return null}}t.MARKER_ENTRY="MARKER_ENTRY",t.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=t},7045:(e,t,n)=>{"use strict";const r=n(5763),i=n(6519),s=n(2484),o=n(452),a=n(2232),c=n(1704),l=n(7296),u=n(8904),h=n(1515),p=n(8779),d=n(1734),f=n(4284),m=n(6152),T=m.TAG_NAMES,E=m.NAMESPACES,_=m.ATTRS,g={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:l},A="hidden",C="INITIAL_MODE",N="BEFORE_HTML_MODE",v="BEFORE_HEAD_MODE",O="IN_HEAD_MODE",b="IN_HEAD_NO_SCRIPT_MODE",S="AFTER_HEAD_MODE",y="IN_BODY_MODE",I="TEXT_MODE",R="IN_TABLE_MODE",k="IN_TABLE_TEXT_MODE",L="IN_CAPTION_MODE",M="IN_COLUMN_GROUP_MODE",x="IN_TABLE_BODY_MODE",P="IN_ROW_MODE",D="IN_CELL_MODE",w="IN_SELECT_MODE",H="IN_SELECT_IN_TABLE_MODE",F="IN_TEMPLATE_MODE",U="AFTER_BODY_MODE",B="IN_FRAMESET_MODE",G="AFTER_FRAMESET_MODE",j="AFTER_AFTER_BODY_MODE",K="AFTER_AFTER_FRAMESET_MODE",q={[T.TR]:P,[T.TBODY]:x,[T.THEAD]:x,[T.TFOOT]:x,[T.CAPTION]:L,[T.COLGROUP]:M,[T.TABLE]:R,[T.BODY]:y,[T.FRAMESET]:B},Y={[T.CAPTION]:R,[T.COLGROUP]:R,[T.TBODY]:R,[T.TFOOT]:R,[T.THEAD]:R,[T.COL]:M,[T.TR]:x,[T.TD]:P,[T.TH]:P},V={[C]:{[r.CHARACTER_TOKEN]:oe,[r.NULL_CHARACTER_TOKEN]:oe,[r.WHITESPACE_CHARACTER_TOKEN]:ee,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const n=t.forceQuirks?m.DOCUMENT_MODE.QUIRKS:h.getDocumentMode(t);h.isConforming(t)||e._err(d.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=N},[r.START_TAG_TOKEN]:oe,[r.END_TAG_TOKEN]:oe,[r.EOF_TOKEN]:oe},[N]:{[r.CHARACTER_TOKEN]:ae,[r.NULL_CHARACTER_TOKEN]:ae,[r.WHITESPACE_CHARACTER_TOKEN]:ee,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){t.tagName===T.HTML?(e._insertElement(t,E.HTML),e.insertionMode=v):ae(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n!==T.HTML&&n!==T.HEAD&&n!==T.BODY&&n!==T.BR||ae(e,t)},[r.EOF_TOKEN]:ae},[v]:{[r.CHARACTER_TOKEN]:ce,[r.NULL_CHARACTER_TOKEN]:ce,[r.WHITESPACE_CHARACTER_TOKEN]:ee,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:te,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.HEAD?(e._insertElement(t,E.HTML),e.headElement=e.openElements.current,e.insertionMode=O):ce(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HEAD||n===T.BODY||n===T.HTML||n===T.BR?ce(e,t):e._err(d.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:ce},[O]:{[r.CHARACTER_TOKEN]:he,[r.NULL_CHARACTER_TOKEN]:he,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:te,[r.START_TAG_TOKEN]:le,[r.END_TAG_TOKEN]:ue,[r.EOF_TOKEN]:he},[b]:{[r.CHARACTER_TOKEN]:pe,[r.NULL_CHARACTER_TOKEN]:pe,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:te,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.BASEFONT||n===T.BGSOUND||n===T.HEAD||n===T.LINK||n===T.META||n===T.NOFRAMES||n===T.STYLE?le(e,t):n===T.NOSCRIPT?e._err(d.nestedNoscriptInHead):pe(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.NOSCRIPT?(e.openElements.pop(),e.insertionMode=O):n===T.BR?pe(e,t):e._err(d.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:pe},[S]:{[r.CHARACTER_TOKEN]:de,[r.NULL_CHARACTER_TOKEN]:de,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:te,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.BODY?(e._insertElement(t,E.HTML),e.framesetOk=!1,e.insertionMode=y):n===T.FRAMESET?(e._insertElement(t,E.HTML),e.insertionMode=B):n===T.BASE||n===T.BASEFONT||n===T.BGSOUND||n===T.LINK||n===T.META||n===T.NOFRAMES||n===T.SCRIPT||n===T.STYLE||n===T.TEMPLATE||n===T.TITLE?(e._err(d.abandonedHeadElementChild),e.openElements.push(e.headElement),le(e,t),e.openElements.remove(e.headElement)):n===T.HEAD?e._err(d.misplacedStartTagForHeadElement):de(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.BODY||n===T.HTML||n===T.BR?de(e,t):n===T.TEMPLATE?ue(e,t):e._err(d.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:de},[y]:{[r.CHARACTER_TOKEN]:me,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:Se,[r.END_TAG_TOKEN]:ke,[r.EOF_TOKEN]:Le},[I]:{[r.CHARACTER_TOKEN]:ie,[r.NULL_CHARACTER_TOKEN]:ie,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ee,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:ee,[r.END_TAG_TOKEN]:function(e,t){t.tagName===T.SCRIPT&&(e.pendingScript=e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode},[r.EOF_TOKEN]:function(e,t){e._err(d.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}},[R]:{[r.CHARACTER_TOKEN]:Me,[r.NULL_CHARACTER_TOKEN]:Me,[r.WHITESPACE_CHARACTER_TOKEN]:Me,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:xe,[r.END_TAG_TOKEN]:Pe,[r.EOF_TOKEN]:Le},[k]:{[r.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0},[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t)},[r.COMMENT_TOKEN]:we,[r.DOCTYPE_TOKEN]:we,[r.START_TAG_TOKEN]:we,[r.END_TAG_TOKEN]:we,[r.EOF_TOKEN]:we},[L]:{[r.CHARACTER_TOKEN]:me,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.CAPTION||n===T.COL||n===T.COLGROUP||n===T.TBODY||n===T.TD||n===T.TFOOT||n===T.TH||n===T.THEAD||n===T.TR?e.openElements.hasInTableScope(T.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R,e._processToken(t)):Se(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.CAPTION||n===T.TABLE?e.openElements.hasInTableScope(T.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R,n===T.TABLE&&e._processToken(t)):n!==T.BODY&&n!==T.COL&&n!==T.COLGROUP&&n!==T.HTML&&n!==T.TBODY&&n!==T.TD&&n!==T.TFOOT&&n!==T.TH&&n!==T.THEAD&&n!==T.TR&&ke(e,t)},[r.EOF_TOKEN]:Le},[M]:{[r.CHARACTER_TOKEN]:He,[r.NULL_CHARACTER_TOKEN]:He,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.COL?(e._appendElement(t,E.HTML),t.ackSelfClosing=!0):n===T.TEMPLATE?le(e,t):He(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.COLGROUP?e.openElements.currentTagName===T.COLGROUP&&(e.openElements.pop(),e.insertionMode=R):n===T.TEMPLATE?ue(e,t):n!==T.COL&&He(e,t)},[r.EOF_TOKEN]:Le},[x]:{[r.CHARACTER_TOKEN]:Me,[r.NULL_CHARACTER_TOKEN]:Me,[r.WHITESPACE_CHARACTER_TOKEN]:Me,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,E.HTML),e.insertionMode=P):n===T.TH||n===T.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(T.TR),e.insertionMode=P,e._processToken(t)):n===T.CAPTION||n===T.COL||n===T.COLGROUP||n===T.TBODY||n===T.TFOOT||n===T.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R,e._processToken(t)):xe(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.TBODY||n===T.TFOOT||n===T.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R):n===T.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R,e._processToken(t)):(n!==T.BODY&&n!==T.CAPTION&&n!==T.COL&&n!==T.COLGROUP||n!==T.HTML&&n!==T.TD&&n!==T.TH&&n!==T.TR)&&Pe(e,t)},[r.EOF_TOKEN]:Le},[P]:{[r.CHARACTER_TOKEN]:Me,[r.NULL_CHARACTER_TOKEN]:Me,[r.WHITESPACE_CHARACTER_TOKEN]:Me,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.TH||n===T.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,E.HTML),e.insertionMode=D,e.activeFormattingElements.insertMarker()):n===T.CAPTION||n===T.COL||n===T.COLGROUP||n===T.TBODY||n===T.TFOOT||n===T.THEAD||n===T.TR?e.openElements.hasInTableScope(T.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x,e._processToken(t)):xe(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.TR?e.openElements.hasInTableScope(T.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x):n===T.TABLE?e.openElements.hasInTableScope(T.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x,e._processToken(t)):n===T.TBODY||n===T.TFOOT||n===T.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(T.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x,e._processToken(t)):(n!==T.BODY&&n!==T.CAPTION&&n!==T.COL&&n!==T.COLGROUP||n!==T.HTML&&n!==T.TD&&n!==T.TH)&&Pe(e,t)},[r.EOF_TOKEN]:Le},[D]:{[r.CHARACTER_TOKEN]:me,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.CAPTION||n===T.COL||n===T.COLGROUP||n===T.TBODY||n===T.TD||n===T.TFOOT||n===T.TH||n===T.THEAD||n===T.TR?(e.openElements.hasInTableScope(T.TD)||e.openElements.hasInTableScope(T.TH))&&(e._closeTableCell(),e._processToken(t)):Se(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.TD||n===T.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P):n===T.TABLE||n===T.TBODY||n===T.TFOOT||n===T.THEAD||n===T.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==T.BODY&&n!==T.CAPTION&&n!==T.COL&&n!==T.COLGROUP&&n!==T.HTML&&ke(e,t)},[r.EOF_TOKEN]:Le},[w]:{[r.CHARACTER_TOKEN]:ie,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:Fe,[r.END_TAG_TOKEN]:Ue,[r.EOF_TOKEN]:Le},[H]:{[r.CHARACTER_TOKEN]:ie,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.CAPTION||n===T.TABLE||n===T.TBODY||n===T.TFOOT||n===T.THEAD||n===T.TR||n===T.TD||n===T.TH?(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e._processToken(t)):Fe(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.CAPTION||n===T.TABLE||n===T.TBODY||n===T.TFOOT||n===T.THEAD||n===T.TR||n===T.TD||n===T.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e._processToken(t)):Ue(e,t)},[r.EOF_TOKEN]:Le},[F]:{[r.CHARACTER_TOKEN]:me,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;if(n===T.BASE||n===T.BASEFONT||n===T.BGSOUND||n===T.LINK||n===T.META||n===T.NOFRAMES||n===T.SCRIPT||n===T.STYLE||n===T.TEMPLATE||n===T.TITLE)le(e,t);else{const r=Y[n]||y;e._popTmplInsertionMode(),e._pushTmplInsertionMode(r),e.insertionMode=r,e._processToken(t)}},[r.END_TAG_TOKEN]:function(e,t){t.tagName===T.TEMPLATE&&ue(e,t)},[r.EOF_TOKEN]:Be},[U]:{[r.CHARACTER_TOKEN]:Ge,[r.NULL_CHARACTER_TOKEN]:Ge,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0])},[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){t.tagName===T.HTML?Se(e,t):Ge(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===T.HTML?e.fragmentContext||(e.insertionMode=j):Ge(e,t)},[r.EOF_TOKEN]:se},[B]:{[r.CHARACTER_TOKEN]:ee,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.FRAMESET?e._insertElement(t,E.HTML):n===T.FRAME?(e._appendElement(t,E.HTML),t.ackSelfClosing=!0):n===T.NOFRAMES&&le(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName!==T.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===T.FRAMESET||(e.insertionMode=G))},[r.EOF_TOKEN]:se},[G]:{[r.CHARACTER_TOKEN]:ee,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:ie,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.NOFRAMES&&le(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===T.HTML&&(e.insertionMode=K)},[r.EOF_TOKEN]:se},[j]:{[r.CHARACTER_TOKEN]:je,[r.NULL_CHARACTER_TOKEN]:je,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:re,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){t.tagName===T.HTML?Se(e,t):je(e,t)},[r.END_TAG_TOKEN]:je,[r.EOF_TOKEN]:se},[K]:{[r.CHARACTER_TOKEN]:ee,[r.NULL_CHARACTER_TOKEN]:ee,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:re,[r.DOCTYPE_TOKEN]:ee,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.NOFRAMES&&le(e,t)},[r.END_TAG_TOKEN]:ee,[r.EOF_TOKEN]:se}};function W(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Re(e,t),n}function Q(e,t){let n=null;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function z(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,o=i;o!==n;s++,o=i){i=e.openElements.getCommonAncestor(o);const n=e.activeFormattingElements.getElementEntry(o),a=n&&s>=3;!n||a?(a&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=X(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function X(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function $(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===T.TEMPLATE&&i===E.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function J(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s)}function Z(e,t){let n;for(let r=0;r<8&&(n=W(e,t),n);r++){const t=Q(e,n);if(!t)break;e.activeFormattingElements.bookmark=n;const r=z(e,t,n.element),i=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(r),$(e,i,r),J(e,t,n)}}function ee(){}function te(e){e._err(d.misplacedDoctype)}function ne(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function re(e,t){e._appendCommentNode(t,e.document)}function ie(e,t){e._insertCharacters(t)}function se(e){e.stopped=!0}function oe(e,t){e._err(d.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,m.DOCUMENT_MODE.QUIRKS),e.insertionMode=N,e._processToken(t)}function ae(e,t){e._insertFakeRootElement(),e.insertionMode=v,e._processToken(t)}function ce(e,t){e._insertFakeElement(T.HEAD),e.headElement=e.openElements.current,e.insertionMode=O,e._processToken(t)}function le(e,t){const n=t.tagName;n===T.HTML?Se(e,t):n===T.BASE||n===T.BASEFONT||n===T.BGSOUND||n===T.LINK||n===T.META?(e._appendElement(t,E.HTML),t.ackSelfClosing=!0):n===T.TITLE?e._switchToTextParsing(t,r.MODE.RCDATA):n===T.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,r.MODE.RAWTEXT):(e._insertElement(t,E.HTML),e.insertionMode=b):n===T.NOFRAMES||n===T.STYLE?e._switchToTextParsing(t,r.MODE.RAWTEXT):n===T.SCRIPT?e._switchToTextParsing(t,r.MODE.SCRIPT_DATA):n===T.TEMPLATE?(e._insertTemplate(t,E.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F,e._pushTmplInsertionMode(F)):n===T.HEAD?e._err(d.misplacedStartTagForHeadElement):he(e,t)}function ue(e,t){const n=t.tagName;n===T.HEAD?(e.openElements.pop(),e.insertionMode=S):n===T.BODY||n===T.BR||n===T.HTML?he(e,t):n===T.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==T.TEMPLATE&&e._err(d.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(d.endTagWithoutMatchingOpenElement)}function he(e,t){e.openElements.pop(),e.insertionMode=S,e._processToken(t)}function pe(e,t){const n=t.type===r.EOF_TOKEN?d.openElementsLeftAfterEof:d.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode=O,e._processToken(t)}function de(e,t){e._insertFakeElement(T.BODY),e.insertionMode=y,e._processToken(t)}function fe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function me(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Te(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,E.HTML)}function Ee(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,E.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function _e(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ge(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ae(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,E.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ce(e,t){e._appendElement(t,E.HTML),t.ackSelfClosing=!0}function Ne(e,t){e._switchToTextParsing(t,r.MODE.RAWTEXT)}function ve(e,t){e.openElements.currentTagName===T.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,E.HTML)}function Oe(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,E.HTML)}function be(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E.HTML)}function Se(e,t){const n=t.tagName;switch(n.length){case 1:n===T.I||n===T.S||n===T.B||n===T.U?_e(e,t):n===T.P?Te(e,t):n===T.A?function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(T.A);n&&(Z(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,E.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):be(e,t);break;case 2:n===T.DL||n===T.OL||n===T.UL?Te(e,t):n===T.H1||n===T.H2||n===T.H3||n===T.H4||n===T.H5||n===T.H6?function(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement();const n=e.openElements.currentTagName;n!==T.H1&&n!==T.H2&&n!==T.H3&&n!==T.H4&&n!==T.H5&&n!==T.H6||e.openElements.pop(),e._insertElement(t,E.HTML)}(e,t):n===T.LI||n===T.DD||n===T.DT?function(e,t){e.framesetOk=!1;const n=t.tagName;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.items[t],i=e.treeAdapter.getTagName(r);let s=null;if(n===T.LI&&i===T.LI?s=T.LI:n!==T.DD&&n!==T.DT||i!==T.DD&&i!==T.DT||(s=i),s){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(i!==T.ADDRESS&&i!==T.DIV&&i!==T.P&&e._isSpecialElement(r))break}e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,E.HTML)}(e,t):n===T.EM||n===T.TT?_e(e,t):n===T.BR?Ae(e,t):n===T.HR?function(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._appendElement(t,E.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):n===T.RB?Oe(e,t):n===T.RT||n===T.RP?function(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(T.RTC),e._insertElement(t,E.HTML)}(e,t):n!==T.TH&&n!==T.TD&&n!==T.TR&&be(e,t);break;case 3:n===T.DIV||n===T.DIR||n===T.NAV?Te(e,t):n===T.PRE?Ee(e,t):n===T.BIG?_e(e,t):n===T.IMG||n===T.WBR?Ae(e,t):n===T.XMP?function(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===T.SVG?function(e,t){e._reconstructActiveFormattingElements(),p.adjustTokenSVGAttrs(t),p.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,E.SVG):e._insertElement(t,E.SVG),t.ackSelfClosing=!0}(e,t):n===T.RTC?Oe(e,t):n!==T.COL&&be(e,t);break;case 4:n===T.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):n===T.BASE||n===T.LINK||n===T.META?le(e,t):n===T.BODY?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t):n===T.MAIN||n===T.MENU?Te(e,t):n===T.FORM?function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,E.HTML),n||(e.formElement=e.openElements.current))}(e,t):n===T.CODE||n===T.FONT?_e(e,t):n===T.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(T.NOBR)&&(Z(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,E.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):n===T.AREA?Ae(e,t):n===T.MATH?function(e,t){e._reconstructActiveFormattingElements(),p.adjustTokenMathMLAttrs(t),p.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,E.MATHML):e._insertElement(t,E.MATHML),t.ackSelfClosing=!0}(e,t):n===T.MENU?function(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,E.HTML)}(e,t):n!==T.HEAD&&be(e,t);break;case 5:n===T.STYLE||n===T.TITLE?le(e,t):n===T.ASIDE?Te(e,t):n===T.SMALL?_e(e,t):n===T.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==m.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,E.HTML),e.framesetOk=!1,e.insertionMode=R}(e,t):n===T.EMBED?Ae(e,t):n===T.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,E.HTML);const n=r.getTokenAttr(t,_.TYPE);n&&n.toLowerCase()===A||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):n===T.PARAM||n===T.TRACK?Ce(e,t):n===T.IMAGE?function(e,t){t.tagName=T.IMG,Ae(e,t)}(e,t):n!==T.FRAME&&n!==T.TBODY&&n!==T.TFOOT&&n!==T.THEAD&&be(e,t);break;case 6:n===T.SCRIPT?le(e,t):n===T.CENTER||n===T.FIGURE||n===T.FOOTER||n===T.HEADER||n===T.HGROUP||n===T.DIALOG?Te(e,t):n===T.BUTTON?function(e,t){e.openElements.hasInScope(T.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,E.HTML),e.framesetOk=!1}(e,t):n===T.STRIKE||n===T.STRONG?_e(e,t):n===T.APPLET||n===T.OBJECT?ge(e,t):n===T.KEYGEN?Ae(e,t):n===T.SOURCE?Ce(e,t):n===T.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===T.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E.HTML),e.framesetOk=!1,e.insertionMode===R||e.insertionMode===L||e.insertionMode===x||e.insertionMode===P||e.insertionMode===D?e.insertionMode=H:e.insertionMode=w}(e,t):n===T.OPTION?ve(e,t):be(e,t);break;case 7:n===T.BGSOUND?le(e,t):n===T.DETAILS||n===T.ADDRESS||n===T.ARTICLE||n===T.SECTION||n===T.SUMMARY?Te(e,t):n===T.LISTING?Ee(e,t):n===T.MARQUEE?ge(e,t):n===T.NOEMBED?Ne(e,t):n!==T.CAPTION&&be(e,t);break;case 8:n===T.BASEFONT?le(e,t):n===T.FRAMESET?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,E.HTML),e.insertionMode=B)}(e,t):n===T.FIELDSET?Te(e,t):n===T.TEXTAREA?function(e,t){e._insertElement(t,E.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=I}(e,t):n===T.TEMPLATE?le(e,t):n===T.NOSCRIPT?e.options.scriptingEnabled?Ne(e,t):be(e,t):n===T.OPTGROUP?ve(e,t):n!==T.COLGROUP&&be(e,t);break;case 9:n===T.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,E.HTML),e.tokenizer.state=r.MODE.PLAINTEXT}(e,t):be(e,t);break;case 10:n===T.BLOCKQUOTE||n===T.FIGCAPTION?Te(e,t):be(e,t);break;default:be(e,t)}}function ye(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Ie(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Re(e,t){const n=t.tagName;for(let t=e.openElements.stackTop;t>0;t--){const r=e.openElements.items[t];if(e.treeAdapter.getTagName(r)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(r);break}if(e._isSpecialElement(r))break}}function ke(e,t){const n=t.tagName;switch(n.length){case 1:n===T.A||n===T.B||n===T.I||n===T.S||n===T.U?Z(e,t):n===T.P?function(e){e.openElements.hasInButtonScope(T.P)||e._insertFakeElement(T.P),e._closePElement()}(e):Re(e,t);break;case 2:n===T.DL||n===T.UL||n===T.OL?ye(e,t):n===T.LI?function(e){e.openElements.hasInListItemScope(T.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(T.LI),e.openElements.popUntilTagNamePopped(T.LI))}(e):n===T.DD||n===T.DT?function(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t):n===T.H1||n===T.H2||n===T.H3||n===T.H4||n===T.H5||n===T.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):n===T.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(T.BR),e.openElements.pop(),e.framesetOk=!1}(e):n===T.EM||n===T.TT?Z(e,t):Re(e,t);break;case 3:n===T.BIG?Z(e,t):n===T.DIR||n===T.DIV||n===T.NAV||n===T.PRE?ye(e,t):Re(e,t);break;case 4:n===T.BODY?function(e){e.openElements.hasInScope(T.BODY)&&(e.insertionMode=U)}(e):n===T.HTML?function(e,t){e.openElements.hasInScope(T.BODY)&&(e.insertionMode=U,e._processToken(t))}(e,t):n===T.FORM?function(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(T.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(T.FORM):e.openElements.remove(n))}(e):n===T.CODE||n===T.FONT||n===T.NOBR?Z(e,t):n===T.MAIN||n===T.MENU?ye(e,t):Re(e,t);break;case 5:n===T.ASIDE?ye(e,t):n===T.SMALL?Z(e,t):Re(e,t);break;case 6:n===T.CENTER||n===T.FIGURE||n===T.FOOTER||n===T.HEADER||n===T.HGROUP||n===T.DIALOG?ye(e,t):n===T.APPLET||n===T.OBJECT?Ie(e,t):n===T.STRIKE||n===T.STRONG?Z(e,t):Re(e,t);break;case 7:n===T.ADDRESS||n===T.ARTICLE||n===T.DETAILS||n===T.SECTION||n===T.SUMMARY||n===T.LISTING?ye(e,t):n===T.MARQUEE?Ie(e,t):Re(e,t);break;case 8:n===T.FIELDSET?ye(e,t):n===T.TEMPLATE?ue(e,t):Re(e,t);break;case 10:n===T.BLOCKQUOTE||n===T.FIGCAPTION?ye(e,t):Re(e,t);break;default:Re(e,t)}}function Le(e,t){e.tmplInsertionModeStackTop>-1?Be(e,t):e.stopped=!0}function Me(e,t){const n=e.openElements.currentTagName;n===T.TABLE||n===T.TBODY||n===T.TFOOT||n===T.THEAD||n===T.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=k,e._processToken(t)):De(e,t)}function xe(e,t){const n=t.tagName;switch(n.length){case 2:n===T.TD||n===T.TH||n===T.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(T.TBODY),e.insertionMode=x,e._processToken(t)}(e,t):De(e,t);break;case 3:n===T.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(T.COLGROUP),e.insertionMode=M,e._processToken(t)}(e,t):De(e,t);break;case 4:n===T.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,E.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):De(e,t);break;case 5:n===T.TABLE?function(e,t){e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):n===T.STYLE?le(e,t):n===T.TBODY||n===T.TFOOT||n===T.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,E.HTML),e.insertionMode=x}(e,t):n===T.INPUT?function(e,t){const n=r.getTokenAttr(t,_.TYPE);n&&n.toLowerCase()===A?e._appendElement(t,E.HTML):De(e,t),t.ackSelfClosing=!0}(e,t):De(e,t);break;case 6:n===T.SCRIPT?le(e,t):De(e,t);break;case 7:n===T.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,E.HTML),e.insertionMode=L}(e,t):De(e,t);break;case 8:n===T.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,E.HTML),e.insertionMode=M}(e,t):n===T.TEMPLATE?le(e,t):De(e,t);break;default:De(e,t)}}function Pe(e,t){const n=t.tagName;n===T.TABLE?e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode()):n===T.TEMPLATE?ue(e,t):n!==T.BODY&&n!==T.CAPTION&&n!==T.COL&&n!==T.COLGROUP&&n!==T.HTML&&n!==T.TBODY&&n!==T.TD&&n!==T.TFOOT&&n!==T.TH&&n!==T.THEAD&&n!==T.TR&&De(e,t)}function De(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function we(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0?(e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function Ge(e,t){e.insertionMode=y,e._processToken(t)}function je(e,t){e.insertionMode=y,e._processToken(t)}e.exports=class{constructor(e){this.options=u(g,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&c.install(this,o),this.options.onParseError&&c.install(this,a,{onParseError:this.options.onParseError})}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(T.TEMPLATE,E.HTML,[]));const n=this.treeAdapter.createElement("documentmock",E.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===T.TEMPLATE&&this._pushTmplInsertionMode(F),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const r=this.treeAdapter.getFirstChild(n),i=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,i),i}_bootstrap(e,t){this.tokenizer=new r(this.options),this.stopped=!1,this.insertionMode=C,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new i(this.document,this.treeAdapter),this.activeFormattingElements=new s(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===r.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===r.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e()}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==E.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,E.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=I}switchToPlaintextParsing(){this.insertionMode=I,this.originalInsertionMode=y,this.tokenizer.state=r.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===T.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===E.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===T.TITLE||e===T.TEXTAREA?this.tokenizer.state=r.MODE.RCDATA:e===T.STYLE||e===T.XMP||e===T.IFRAME||e===T.NOEMBED||e===T.NOFRAMES||e===T.NOSCRIPT?this.tokenizer.state=r.MODE.RAWTEXT:e===T.SCRIPT?this.tokenizer.state=r.MODE.SCRIPT_DATA:e===T.PLAINTEXT&&(this.tokenizer.state=r.MODE.PLAINTEXT)}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,E.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,E.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(T.HTML,E.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;const n=this.treeAdapter.getNamespaceURI(t);if(n===E.HTML)return!1;if(this.treeAdapter.getTagName(t)===T.ANNOTATION_XML&&n===E.MATHML&&e.type===r.START_TAG_TOKEN&&e.tagName===T.SVG)return!1;const i=e.type===r.CHARACTER_TOKEN||e.type===r.NULL_CHARACTER_TOKEN||e.type===r.WHITESPACE_CHARACTER_TOKEN;return!((e.type===r.START_TAG_TOKEN&&e.tagName!==T.MGLYPH&&e.tagName!==T.MALIGNMARK||i)&&this._isIntegrationPoint(t,E.MATHML)||(e.type===r.START_TAG_TOKEN||i)&&this._isIntegrationPoint(t,E.HTML)||e.type===r.EOF_TOKEN)}_processToken(e){V[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){V.IN_BODY_MODE[e.type](this,e)}_processTokenInForeignContent(e){e.type===r.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===r.NULL_CHARACTER_TOKEN?function(e,t){t.chars=f.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===r.WHITESPACE_CHARACTER_TOKEN?ie(this,e):e.type===r.COMMENT_TOKEN?ne(this,e):e.type===r.START_TAG_TOKEN?function(e,t){if(p.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==E.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===E.MATHML?p.adjustTokenMathMLAttrs(t):r===E.SVG&&(p.adjustTokenSVGTagName(t),p.adjustTokenSVGAttrs(t)),p.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):e.type===r.END_TAG_TOKEN&&function(e,t){for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===E.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===r.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(d.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){const n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return p.isIntegrationPoint(n,r,i,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,n=null;do{if(t--,n=this.activeFormattingElements.entries[t],n.type===s.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(let r=t;r=0;e--){let n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));const r=this.treeAdapter.getTagName(n),i=q[r];if(i){this.insertionMode=i;break}if(!(t||r!==T.TD&&r!==T.TH)){this.insertionMode=D;break}if(!t&&r===T.HEAD){this.insertionMode=O;break}if(r===T.SELECT){this._resetInsertionModeForSelect(e);break}if(r===T.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===T.HTML){this.insertionMode=this.headElement?S:v;break}if(t){this.insertionMode=y;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],n=this.treeAdapter.getTagName(e);if(n===T.TEMPLATE)break;if(n===T.TABLE)return void(this.insertionMode=H)}this.insertionMode=w}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),i=this.treeAdapter.getNamespaceURI(n);if(r===T.TEMPLATE&&i===E.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===T.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return m.SPECIAL_ELEMENTS[n][t]}}},6519:(e,t,n)=>{"use strict";const r=n(6152),i=r.TAG_NAMES,s=r.NAMESPACES;function o(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI;case 3:return e===i.RTC;case 6:return e===i.OPTION;case 8:return e===i.OPTGROUP}return!1}function a(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI||e===i.TD||e===i.TH||e===i.TR;case 3:return e===i.RTC;case 5:return e===i.TBODY||e===i.TFOOT||e===i.THEAD;case 6:return e===i.OPTION;case 7:return e===i.CAPTION;case 8:return e===i.OPTGROUP||e===i.COLGROUP}return!1}function c(e,t){switch(e.length){case 2:if(e===i.TD||e===i.TH)return t===s.HTML;if(e===i.MI||e===i.MO||e===i.MN||e===i.MS)return t===s.MATHML;break;case 4:if(e===i.HTML)return t===s.HTML;if(e===i.DESC)return t===s.SVG;break;case 5:if(e===i.TABLE)return t===s.HTML;if(e===i.MTEXT)return t===s.MATHML;if(e===i.TITLE)return t===s.SVG;break;case 6:return(e===i.APPLET||e===i.OBJECT)&&t===s.HTML;case 7:return(e===i.CAPTION||e===i.MARQUEE)&&t===s.HTML;case 8:return e===i.TEMPLATE&&t===s.HTML;case 13:return e===i.FOREIGN_OBJECT&&t===s.SVG;case 14:return e===i.ANNOTATION_XML&&t===s.MATHML}return!1}e.exports=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===i.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===s.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){const n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===s.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.H1||e===i.H2||e===i.H3||e===i.H4||e===i.H5||e===i.H6&&t===s.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.TD||e===i.TH&&t===s.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==i.TABLE&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==i.TBODY&&this.currentTagName!==i.TFOOT&&this.currentTagName!==i.THEAD&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==i.TR&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===i.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===i.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===s.HTML)return!0;if(c(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===i.H1||t===i.H2||t===i.H3||t===i.H4||t===i.H5||t===i.H6)&&n===s.HTML)return!0;if(c(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===s.HTML)return!0;if((n===i.UL||n===i.OL)&&r===s.HTML||c(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===s.HTML)return!0;if(n===i.BUTTON&&r===s.HTML||c(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(n===e)return!0;if(n===i.TABLE||n===i.TEMPLATE||n===i.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===s.HTML){if(t===i.TBODY||t===i.THEAD||t===i.TFOOT)return!0;if(t===i.TABLE||t===i.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(n===e)return!0;if(n!==i.OPTION&&n!==i.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;o(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;a(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;o(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}},3988:(e,t,n)=>{"use strict";const r=n(7296),i=n(8904),s=n(1515),o=n(6152),a=o.TAG_NAMES,c=o.NAMESPACES,l={treeAdapter:r},u=/&/g,h=/\u00a0/g,p=/"/g,d=//g;class m{constructor(e,t){this.options=i(l,t),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=e}serialize(){return this._serializeChildNodes(this.startNode),this.html}_serializeChildNodes(e){const t=this.treeAdapter.getChildNodes(e);if(t)for(let e=0,n=t.length;e",t!==a.AREA&&t!==a.BASE&&t!==a.BASEFONT&&t!==a.BGSOUND&&t!==a.BR&&t!==a.COL&&t!==a.EMBED&&t!==a.FRAME&&t!==a.HR&&t!==a.IMG&&t!==a.INPUT&&t!==a.KEYGEN&&t!==a.LINK&&t!==a.META&&t!==a.PARAM&&t!==a.SOURCE&&t!==a.TRACK&&t!==a.WBR){const r=t===a.TEMPLATE&&n===c.HTML?this.treeAdapter.getTemplateContent(e):e;this._serializeChildNodes(r),this.html+=""}}_serializeAttributes(e){const t=this.treeAdapter.getAttrList(e);for(let e=0,n=t.length;e"}}m.escapeString=function(e,t){return e=e.replace(u,"&").replace(h," "),t?e.replace(p,"""):e.replace(d,"<").replace(f,">")},e.exports=m},5763:(e,t,n)=>{"use strict";const r=n(7118),i=n(4284),s=n(5482),o=n(1734),a=i.CODE_POINTS,c=i.CODE_POINT_SEQUENCES,l={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},u="DATA_STATE",h="RCDATA_STATE",p="RAWTEXT_STATE",d="SCRIPT_DATA_STATE",f="PLAINTEXT_STATE",m="TAG_OPEN_STATE",T="END_TAG_OPEN_STATE",E="TAG_NAME_STATE",_="RCDATA_LESS_THAN_SIGN_STATE",g="RCDATA_END_TAG_OPEN_STATE",A="RCDATA_END_TAG_NAME_STATE",C="RAWTEXT_LESS_THAN_SIGN_STATE",N="RAWTEXT_END_TAG_OPEN_STATE",v="RAWTEXT_END_TAG_NAME_STATE",O="SCRIPT_DATA_LESS_THAN_SIGN_STATE",b="SCRIPT_DATA_END_TAG_OPEN_STATE",S="SCRIPT_DATA_END_TAG_NAME_STATE",y="SCRIPT_DATA_ESCAPE_START_STATE",I="SCRIPT_DATA_ESCAPE_START_DASH_STATE",R="SCRIPT_DATA_ESCAPED_STATE",k="SCRIPT_DATA_ESCAPED_DASH_STATE",L="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",M="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",x="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",P="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",D="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",w="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",H="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",F="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",U="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",B="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",G="BEFORE_ATTRIBUTE_NAME_STATE",j="ATTRIBUTE_NAME_STATE",K="AFTER_ATTRIBUTE_NAME_STATE",q="BEFORE_ATTRIBUTE_VALUE_STATE",Y="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",V="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",W="ATTRIBUTE_VALUE_UNQUOTED_STATE",Q="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",z="SELF_CLOSING_START_TAG_STATE",X="BOGUS_COMMENT_STATE",$="MARKUP_DECLARATION_OPEN_STATE",J="COMMENT_START_STATE",Z="COMMENT_START_DASH_STATE",ee="COMMENT_STATE",te="COMMENT_LESS_THAN_SIGN_STATE",ne="COMMENT_LESS_THAN_SIGN_BANG_STATE",re="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",ie="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",se="COMMENT_END_DASH_STATE",oe="COMMENT_END_STATE",ae="COMMENT_END_BANG_STATE",ce="DOCTYPE_STATE",le="BEFORE_DOCTYPE_NAME_STATE",ue="DOCTYPE_NAME_STATE",he="AFTER_DOCTYPE_NAME_STATE",pe="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",de="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",fe="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",me="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",Te="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Ee="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",_e="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",ge="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Ae="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",Ce="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Ne="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",ve="BOGUS_DOCTYPE_STATE",Oe="CDATA_SECTION_STATE",be="CDATA_SECTION_BRACKET_STATE",Se="CDATA_SECTION_END_STATE",ye="CHARACTER_REFERENCE_STATE",Ie="NAMED_CHARACTER_REFERENCE_STATE",Re="AMBIGUOS_AMPERSAND_STATE",ke="NUMERIC_CHARACTER_REFERENCE_STATE",Le="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Me="DECIMAL_CHARACTER_REFERENCE_START_STATE",xe="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Pe="DECIMAL_CHARACTER_REFERENCE_STATE",De="NUMERIC_CHARACTER_REFERENCE_END_STATE";function we(e){return e===a.SPACE||e===a.LINE_FEED||e===a.TABULATION||e===a.FORM_FEED}function He(e){return e>=a.DIGIT_0&&e<=a.DIGIT_9}function Fe(e){return e>=a.LATIN_CAPITAL_A&&e<=a.LATIN_CAPITAL_Z}function Ue(e){return e>=a.LATIN_SMALL_A&&e<=a.LATIN_SMALL_Z}function Be(e){return Ue(e)||Fe(e)}function Ge(e){return Be(e)||He(e)}function je(e){return e>=a.LATIN_CAPITAL_A&&e<=a.LATIN_CAPITAL_F}function Ke(e){return e>=a.LATIN_SMALL_A&&e<=a.LATIN_SMALL_F}function qe(e){return e+32}function Ye(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function Ve(e){return String.fromCharCode(qe(e))}function We(e,t){const n=s[++e];let r=++e,i=r+n-1;for(;r<=i;){const e=r+i>>>1,o=s[e];if(ot))return s[e+n];i=e-1}}return-1}class Qe{constructor(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=u,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Qe.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,i=!0;const s=e.length;let o,c=0,l=t;for(;c0&&(l=this._consume(),r++),l===a.EOF){i=!1;break}if(o=e[c],l!==o&&(n||l!==qe(o))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==c.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(o.endTagWithAttributes),e.selfClosing&&this._err(o.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Qe.CHARACTER_TOKEN;we(e)?t=Qe.WHITESPACE_CHARACTER_TOKEN:e===a.NULL&&(t=Qe.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,Ye(e))}_emitSeveralCodePoints(e){for(let t=0;t-1;){const e=s[r],i=e<7;i&&1&e&&(t=2&e?[s[++r],s[++r]]:[s[++r]],n=0);const o=this._consume();if(this.tempBuff.push(o),n++,o===a.EOF)break;r=i?4&e?We(r,o):-1:o===e?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return this.returnState===Y||this.returnState===V||this.returnState===W}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===a.EQUALS_SIGN||Ge(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e")):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.state=R,this._emitChars(i.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=R,this._emitCodePoint(e))}[M](e){e===a.SOLIDUS?(this.tempBuff=[],this.state=x):Be(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(D)):(this._emitChars("<"),this._reconsumeInState(R))}[x](e){Be(e)?(this._createEndTagToken(),this._reconsumeInState(P)):(this._emitChars("")):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.state=w,this._emitChars(i.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=w,this._emitCodePoint(e))}[U](e){e===a.SOLIDUS?(this.tempBuff=[],this.state=B,this._emitChars("/")):this._reconsumeInState(w)}[B](e){we(e)||e===a.SOLIDUS||e===a.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?R:w,this._emitCodePoint(e)):Fe(e)?(this.tempBuff.push(qe(e)),this._emitCodePoint(e)):Ue(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(w)}[G](e){we(e)||(e===a.SOLIDUS||e===a.GREATER_THAN_SIGN||e===a.EOF?this._reconsumeInState(K):e===a.EQUALS_SIGN?(this._err(o.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j):(this._createAttr(""),this._reconsumeInState(j)))}[j](e){we(e)||e===a.SOLIDUS||e===a.GREATER_THAN_SIGN||e===a.EOF?(this._leaveAttrName(K),this._unconsume()):e===a.EQUALS_SIGN?this._leaveAttrName(q):Fe(e)?this.currentAttr.name+=Ve(e):e===a.QUOTATION_MARK||e===a.APOSTROPHE||e===a.LESS_THAN_SIGN?(this._err(o.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ye(e)):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.name+=i.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ye(e)}[K](e){we(e)||(e===a.SOLIDUS?this.state=z:e===a.EQUALS_SIGN?this.state=q:e===a.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(j)))}[q](e){we(e)||(e===a.QUOTATION_MARK?this.state=Y:e===a.APOSTROPHE?this.state=V:e===a.GREATER_THAN_SIGN?(this._err(o.missingAttributeValue),this.state=u,this._emitCurrentToken()):this._reconsumeInState(W))}[Y](e){e===a.QUOTATION_MARK?this.state=Q:e===a.AMPERSAND?(this.returnState=Y,this.state=ye):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(o.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ye(e)}[V](e){e===a.APOSTROPHE?this.state=Q:e===a.AMPERSAND?(this.returnState=V,this.state=ye):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(o.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ye(e)}[W](e){we(e)?this._leaveAttrValue(G):e===a.AMPERSAND?(this.returnState=W,this.state=ye):e===a.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===a.QUOTATION_MARK||e===a.APOSTROPHE||e===a.LESS_THAN_SIGN||e===a.EQUALS_SIGN||e===a.GRAVE_ACCENT?(this._err(o.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ye(e)):e===a.EOF?(this._err(o.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ye(e)}[Q](e){we(e)?this._leaveAttrValue(G):e===a.SOLIDUS?this._leaveAttrValue(z):e===a.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInTag),this._emitEOFToken()):(this._err(o.missingWhitespaceBetweenAttributes),this._reconsumeInState(G))}[z](e){e===a.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInTag),this._emitEOFToken()):(this._err(o.unexpectedSolidusInTag),this._reconsumeInState(G))}[X](e){e===a.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===a.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):this.currentToken.data+=Ye(e)}[$](e){this._consumeSequenceIfMatch(c.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=J):this._consumeSequenceIfMatch(c.DOCTYPE_STRING,e,!1)?this.state=ce:this._consumeSequenceIfMatch(c.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=Oe:(this._err(o.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=X):this._ensureHibernation()||(this._err(o.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(X))}[J](e){e===a.HYPHEN_MINUS?this.state=Z:e===a.GREATER_THAN_SIGN?(this._err(o.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):this._reconsumeInState(ee)}[Z](e){e===a.HYPHEN_MINUS?this.state=oe:e===a.GREATER_THAN_SIGN?(this._err(o.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[ee](e){e===a.HYPHEN_MINUS?this.state=se:e===a.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=te):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ye(e)}[te](e){e===a.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=ne):e===a.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ee)}[ne](e){e===a.HYPHEN_MINUS?this.state=re:this._reconsumeInState(ee)}[re](e){e===a.HYPHEN_MINUS?this.state=ie:this._reconsumeInState(se)}[ie](e){e!==a.GREATER_THAN_SIGN&&e!==a.EOF&&this._err(o.nestedComment),this._reconsumeInState(oe)}[se](e){e===a.HYPHEN_MINUS?this.state=oe:e===a.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[oe](e){e===a.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===a.EXCLAMATION_MARK?this.state=ae:e===a.HYPHEN_MINUS?this.currentToken.data+="-":e===a.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ee))}[ae](e){e===a.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=se):e===a.GREATER_THAN_SIGN?(this._err(o.incorrectlyClosedComment),this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ee))}[ce](e){we(e)?this.state=le:e===a.GREATER_THAN_SIGN?this._reconsumeInState(le):e===a.EOF?(this._err(o.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(le))}[le](e){we(e)||(Fe(e)?(this._createDoctypeToken(Ve(e)),this.state=ue):e===a.NULL?(this._err(o.unexpectedNullCharacter),this._createDoctypeToken(i.REPLACEMENT_CHARACTER),this.state=ue):e===a.GREATER_THAN_SIGN?(this._err(o.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===a.EOF?(this._err(o.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ye(e)),this.state=ue))}[ue](e){we(e)?this.state=he:e===a.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):Fe(e)?this.currentToken.name+=Ve(e):e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.name+=i.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ye(e)}[he](e){we(e)||(e===a.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(c.PUBLIC_STRING,e,!1)?this.state=pe:this._consumeSequenceIfMatch(c.SYSTEM_STRING,e,!1)?this.state=_e:this._ensureHibernation()||(this._err(o.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(ve)))}[pe](e){we(e)?this.state=de:e===a.QUOTATION_MARK?(this._err(o.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=fe):e===a.APOSTROPHE?(this._err(o.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=me):e===a.GREATER_THAN_SIGN?(this._err(o.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ve))}[de](e){we(e)||(e===a.QUOTATION_MARK?(this.currentToken.publicId="",this.state=fe):e===a.APOSTROPHE?(this.currentToken.publicId="",this.state=me):e===a.GREATER_THAN_SIGN?(this._err(o.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ve)))}[fe](e){e===a.QUOTATION_MARK?this.state=Te:e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(o.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ye(e)}[me](e){e===a.APOSTROPHE?this.state=Te:e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(o.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ye(e)}[Te](e){we(e)?this.state=Ee:e===a.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===a.QUOTATION_MARK?(this._err(o.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Ae):e===a.APOSTROPHE?(this._err(o.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Ce):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ve))}[Ee](e){we(e)||(e===a.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===a.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ae):e===a.APOSTROPHE?(this.currentToken.systemId="",this.state=Ce):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ve)))}[_e](e){we(e)?this.state=ge:e===a.QUOTATION_MARK?(this._err(o.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Ae):e===a.APOSTROPHE?(this._err(o.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Ce):e===a.GREATER_THAN_SIGN?(this._err(o.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ve))}[ge](e){we(e)||(e===a.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ae):e===a.APOSTROPHE?(this.currentToken.systemId="",this.state=Ce):e===a.GREATER_THAN_SIGN?(this._err(o.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ve)))}[Ae](e){e===a.QUOTATION_MARK?this.state=Ne:e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(o.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ye(e)}[Ce](e){e===a.APOSTROPHE?this.state=Ne:e===a.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(o.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ye(e)}[Ne](e){we(e)||(e===a.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===a.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(ve)))}[ve](e){e===a.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===a.NULL?this._err(o.unexpectedNullCharacter):e===a.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[Oe](e){e===a.RIGHT_SQUARE_BRACKET?this.state=be:e===a.EOF?(this._err(o.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[be](e){e===a.RIGHT_SQUARE_BRACKET?this.state=Se:(this._emitChars("]"),this._reconsumeInState(Oe))}[Se](e){e===a.GREATER_THAN_SIGN?this.state=u:e===a.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Oe))}[ye](e){this.tempBuff=[a.AMPERSAND],e===a.NUMBER_SIGN?(this.tempBuff.push(e),this.state=ke):Ge(e)?this._reconsumeInState(Ie):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Ie](e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[a.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===a.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(o.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=Re}[Re](e){Ge(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ye(e):this._emitCodePoint(e):(e===a.SEMICOLON&&this._err(o.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[ke](e){this.charRefCode=0,e===a.LATIN_SMALL_X||e===a.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Le):this._reconsumeInState(Me)}[Le](e){!function(e){return He(e)||je(e)||Ke(e)}(e)?(this._err(o.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(xe)}[Me](e){He(e)?this._reconsumeInState(Pe):(this._err(o.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[xe](e){je(e)?this.charRefCode=16*this.charRefCode+e-55:Ke(e)?this.charRefCode=16*this.charRefCode+e-87:He(e)?this.charRefCode=16*this.charRefCode+e-48:e===a.SEMICOLON?this.state=De:(this._err(o.missingSemicolonAfterCharacterReference),this._reconsumeInState(De))}[Pe](e){He(e)?this.charRefCode=10*this.charRefCode+e-48:e===a.SEMICOLON?this.state=De:(this._err(o.missingSemicolonAfterCharacterReference),this._reconsumeInState(De))}[De](){if(this.charRefCode===a.NULL)this._err(o.nullCharacterReference),this.charRefCode=a.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(o.characterReferenceOutsideUnicodeRange),this.charRefCode=a.REPLACEMENT_CHARACTER;else if(i.isSurrogate(this.charRefCode))this._err(o.surrogateCharacterReference),this.charRefCode=a.REPLACEMENT_CHARACTER;else if(i.isUndefinedCodePoint(this.charRefCode))this._err(o.noncharacterCharacterReference);else if(i.isControlCodePoint(this.charRefCode)||this.charRefCode===a.CARRIAGE_RETURN){this._err(o.controlCharacterReference);const e=l[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}Qe.CHARACTER_TOKEN="CHARACTER_TOKEN",Qe.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",Qe.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",Qe.START_TAG_TOKEN="START_TAG_TOKEN",Qe.END_TAG_TOKEN="END_TAG_TOKEN",Qe.COMMENT_TOKEN="COMMENT_TOKEN",Qe.DOCTYPE_TOKEN="DOCTYPE_TOKEN",Qe.EOF_TOKEN="EOF_TOKEN",Qe.HIBERNATION_TOKEN="HIBERNATION_TOKEN",Qe.MODE={DATA:u,RCDATA:h,RAWTEXT:p,SCRIPT_DATA:d,PLAINTEXT:f},Qe.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=Qe},5482:e=>{"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},7118:(e,t,n)=>{"use strict";const r=n(4284),i=n(1734),s=r.CODE_POINTS;e.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(r.isSurrogatePair(t))return this.pos++,this._addGap(),r.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,s.EOF;return this._err(i.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,s.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===s.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===s.CARRIAGE_RETURN?(this.skipNextNewLine=!0,s.LINE_FEED):(this.skipNextNewLine=!1,r.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===s.LINE_FEED||e===s.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){r.isControlCodePoint(e)?this._err(i.controlCharacterInInputStream):r.isUndefinedCodePoint(e)&&this._err(i.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},7296:(e,t,n)=>{"use strict";const{DOCUMENT_MODE:r}=n(6152);t.createDocument=function(){return{nodeName:"#document",mode:r.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const i=function(e){return{nodeName:"#text",value:e,parentNode:null}},s=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},o=t.insertBefore=function(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,n,r){let i=null;for(let t=0;t{"use strict";e.exports=function(e,t){return[e,t=t||Object.create(null)].reduce(((e,t)=>(Object.keys(t).forEach((n=>{e[n]=t[n]})),e)),Object.create(null))}},1704:e=>{"use strict";class t{constructor(e){const t={},n=this._getOverriddenMethods(this,t);for(const r of Object.keys(n))"function"==typeof n[r]&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}}t.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let n=0;n{"use strict";e.exports=".nav {\n margin: 0;\n max-width: 150px;\n min-width: 90px;\n justify-content: center;\n align-content: center;\n font-size: 40px;\n color: #ccc;\n text-align: center;\n text-decoration: none;\n text-rendering: auto;\n -webkit-transition: all 350ms ease;\n -moz-transition: all 350ms ease;\n -o-transition: all 350ms ease;\n transition: all 350ms ease\n}\n\n.nav:hover {\n text-decoration: none;\n color: #444\n}\n\n.nav-next {\n float: right;\n display: block;\n}\n\n.nav-prev {\n float: left;\n display: block;\n}\n\n#toc li {\n padding: 0.07rem;\n}\n\nli.current {\n border-radius: 0.5rem;\n background-color: rgb(226, 231, 235);\n /* rgb(226, 231, 235); */\n /* rgb(255, 247, 229); */\n}\n"},3129:e=>{"use strict";e.exports=require("child_process")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},5622:e=>{"use strict";e.exports=require("path")},1669:e=>{"use strict";e.exports=require("util")}},r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={exports:{}};return n[e].call(t.exports,t,t.exports,i),t.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var s=Object.create(null);i.r(s);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>n[e]));return o.default=()=>n,i.d(s,o),s},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=i(5747),t=i(5622),n=i(7503),r=i(7911);const s=(...e)=>(...t)=>{let n=t;for(let t=0;to.mkdir(e,{recursive:!0}).then((t=>e),(e=>e)),c=e=>async n=>{if(await(e=>t=>Promise.allSettled([o.stat(e),o.stat(t)]).then((([e,t])=>"rejected"===t.status||e.value.atimeMs>t.value.atimeMs)))(e)(n)){const r=t.dirname(n);return await l(r)||await a(r),o.copyFile(e,n).then((e=>n))}return!1},l=t=>o.access(t,e.constants.F_OK).then((e=>!0),(e=>!1)),u=require("url"),h=e.promises,p=e=>("#content",e=>e.find("#content"))(e),d=(e,t)=>(n,r,i,...o)=>{const a=_(t),c=o.map(a),l=i.clone();return s(p,((...e)=>t=>(e.forEach((e=>t.append(e.clone()))),t.end()))(...c),O(e(l.find("#footnotes"))),I(r,t.get("navigation")),b(r),D)(l)},f=e=>{const t=(n,i,s,o,a,c,l)=>{const u=n.depth[c]||n.depth.default,h=l?"index":((e,t,n)=>1===t?`${e}${n}`:2===t?`${e}_sec${n}`:`${e}-${n}`)(a,o,c);if(u===o)return void e(n,h,i,s,l);const p=`div.sect${o+1}`;var d;e(n,h,i,(d=p,e=>e.clone().find(d).remove().end())(s),l);const f=s.find(p);return 0!==f.length?f.each(((e,s)=>t(n,i,new r.Cheerio(s),o+1,h,e+1,!1))):void 0};return t},m=(e,t,n,i,s)=>{const o=i.clone();let a=0,c=0,l=!1,u=!1;o.find("#content").children().each(((i,h)=>{const p=new r.Cheerio(h);if(!p.hasClass("partintro"))return p.hasClass("sect1")?(l||u?u=!1:(u=!0,l=!0),n(s,o,p,1,"chap",++a,u)):p.hasClass("sect0")?(l||u?u=!1:(u=!0,l=!0),t(s,o,p,++c,u)):"preamble"===p.attr("id")?(u=!0,l=!0,e(s,o,p,u)):void 0}))},T=(e,t,n)=>{const i=((e,t)=>{const n=new Map,i={},s=[];let o=0;const a=(e,t)=>{i[t]=o,s[o]=t,o++,e.find("*[id]").each(((e,i)=>{const s=new r.Cheerio(i).attr("id");s.startsWith("_footnotedef_")||n.set(s,`${t}#${s}`)})),e.attr("id")?n.set(e.attr("id"),t):n.set(e.children().first().attr("id"),t)},c=f(((e,t,n,r,i)=>{a(r,i?"index.html":`${t}.html`)}));return m(((e,t,n,r)=>{a(n,r?"index.html":"preamble.html")}),((e,t,n,r,i)=>{a(n,i?"index.html":`part${r}.html`)}),c,e,t),n.set("navigation",{filename2pageNum:i,filenameList:s}),n})(t.root(),n),o=_(i),a=s((e=>t=>{const{strictMode:n}=e,r=t.root().clone().find("#content > #preamble, #content > .partintro, #content > .sect1, #content > .sect0").remove().end(),i=r.find("#content");return n?(i.children().length>0&&(s=i,console.log("INFO: Non-Asciidoc contents encountered under
    .\nINFO: They are ignored and not included in chunked html by default.\nINFO: If you want them to be included, use the '--no-strictMode' command option."),s.html().trim().split(/\n+/).forEach((e=>console.log(`INFO: Found content => ${e}`))),console.log()),i.empty().end()):r;var s})(n),E,o,M(n.outdir),x(n),(e=>t=>(new r.Cheerio(`
  • ${e.titlePage}
  • `).insertBefore(t.find("div#toc > ul > li:first-child")),t))(n))(t),c=C(g(t("#footnotes")));m(((e,t,n)=>(r,i,s,o)=>{const a=o?"index":"preamble";e(a,n(r,a,t,s))})(e,a,d(c,i)),((e,t,n)=>(r,i,s,o,a)=>{const c=a?"index":`part${o}`;e(c,((e,t,n,r,i)=>i(e,t,n,...r.next().hasClass("partintro")?[r,r.next()]:[r]))(r,c,t,s,n))})(e,a,d(c,i)),((e,t,n)=>f(((r,i,s,o,a)=>{e(i,n(r,i,t,o))})))(e,a,d(c,i)),t.root(),n)},E=e=>(0===e.find("#toc a[href^=#]").length&&console.log("INFO: Your TOC has no in-document links.\n"),e),_=e=>t=>(t.find("a[href^=#]").each(((t,n)=>{const i=new r.Cheerio(n),s=i.attr("href");if(!s.startsWith("#_footnotedef_")&&!s.startsWith("#_footnoteref_")){const t=s.substring(1);i.attr("href",`${e.get(t)}`)}})),t),g=e=>{const t=new Set;return e.find("div.footnote").each(((e,n)=>{t.add(new r.Cheerio(n).attr("id"))})),t},A=e=>e.find("a.footnote"),C=e=>t=>n=>{if(0===n.length)return t.empty().end(),n;const i=new Set([...e]);return n.each(((e,t)=>{i.delete(new r.Cheerio(t).attr("href").substring(1))})),i.forEach((e=>{t.find(`#${e}`).remove().end()})),n},N=e=>{if(0===e.length)return e;const t=new Set;return e.each(((e,n)=>{const i=new r.Cheerio(n);if(i.attr("id"))return;const s=i.attr("href");if(t.has(s))return;t.add(s);const o=v(s);i.attr("id",o)})),e},v=e=>`_footnoteref${e.substring(e.lastIndexOf("_"))}`,O=e=>t=>(s(p,A,e,N)(t),t),b=e=>t=>(s(S(e),y)(t),t),S=e=>t=>t.find(`#toc a[href^="${e}.html"]`).parent(),y=e=>e.addClass("current"),I=(e,{filename2pageNum:t,filenameList:n})=>i=>{const s=t[`${e}.html`],o=s>0?n[s-1]:null,a=s div:last-of-type");return"footer"===l.attr("id")?new r.Cheerio(c).insertBefore(l):new r.Cheerio(c).insertAfter(l),i},R=(e,t)=>`\n\n`,k=/^#|https:|http:|file:/,L=(e,n)=>i=>{const s=(e=>n=>{const r=t.dirname(e);return t.join(r,n)})(e);(e=>{const n=[];return e.find("link[href], script[src], img[src]").each(((e,i)=>{const s=new r.Cheerio(i),o=s.attr("href")||s.attr("src");o.match(k)||t.isAbsolute(o)||n.push((e=>{const n=t.basename(e),r=n.indexOf("?");return-1===r?e:t.join(t.dirname(e),n.substring(0,r))})(o))})),n})(i).forEach((e=>{return c(s(e))((r=e,t.join(n,r))).catch((t=>console.log(` Local file linked from the document is missing: ${s(e)}`)));var r}))},M=e=>n=>(n.find("style").each(((n,i)=>{const s=`style${n}.css`,o=new r.Cheerio(i);h.writeFile(t.join(e,s),new r.Cheerio(i).contents().text()),o.replaceWith(new r.Cheerio(``))})),n),x=e=>t=>{const{css:n,outdir:r}=e;if(!n||0==n.length)return t;const i=t.find("head");return n.forEach((e=>i.append(P(r,e)))),t},P=(e,n)=>{const r=t.basename(n),s=t.join(e,r);return"asciidoctor-chunker.css"===n?Promise.resolve().then(i.t.bind(i,184,17)).then((e=>h.writeFile(s,e.default))).catch((e=>{const n=t.dirname((0,u.fileURLToPath)("file:///Users/shito/Documents/git-repositories/javascript/asciidoctor-chunker/src/DOM.mjs")),r=t.resolve(n,"css","asciidoctor-chunker.css");c(r)(s)})):c(n)(s),``},D=e=>(e.find("html").append("\n + + + + + + + + + + +
    +
    +

    1. INTRODUCTION

    +
    +
    +

    Pmodules is the environment modules system at PSI. Since it uses AFS as storage backend it is an easy and convinient solution for software distribution.

    +
    +
    +

    It is available for all PSI supported Linux systems including

    +
    +
    +
      +
    • +

      login.psi.ch (llc.psi.ch)

      +
    • +
    • +

      Merlin6

      +
    • +
    • +

      Ra

      +
    • +
    +
    +
    +

    A list of available modules and changes is avail here.

    +
    +
    + + + + + +
    + + +
    +

    Some parts of this documentation has been copied from the documentation +of Environment Modules and +Lmod.

    +
    +
    +
    +
    +
    +
    +

    2. PMODULES IN A NUTSHELL

    +
    +
    +

    Before reading this section you should be familiar with an environment module system - either Environment Modules or Lmod.

    +
    +
    +

    Pmodules organizes modules in groups like Tools, Programming, Libraries, System etc. for a clear arrangement. Groups of modules can easily be added to the available modules. Read section Module groups for more details about module groups.

    +
    +
    +

    One issue with Environment Modules is the flat naming scheme. Pmodules and Lmod solves the issue by organizing the modules hierarchically. Providing modules for a toolkit like parallel HDF5 ends up in dozen of modules. One user wants to use GCC 4.8.4 and OpenMPI 1.6.5 another Intel C 15 and MPICH 3.1.4, a third user requires GCC 4.9.2 with MPICH 3.1.4. After a couple of month, some users want new versions. In a flat naming scheme you see all installed versions, even if you just want to see what is available for particular compiler. The solution to this problem is a hierarchical organization of the modules. In section Module hierarchies we describe how to load and search for modules in a module hierarchy.

    +
    +
    +

    Neither Lmod nor Environment Modules provides something like a life cycle management. A module is either available or not. There is no way to inform the users, whether a module is still unstable or already deprecated. Pmodules solves this problem by introducing releases like unstable, stable and deprecated. In section Module lifecycle we explain what this means to the user.

    +
    +
    +
    +

    2.1. Motivation

    +
    +

    Environment module systems provide a solution for the dynamic +modification of a user’s environment by loading special files named +'modulefiles'.

    +
    +
    +

    Each modulefile contains the information needed to configure the shell +for an application or library. The environment can be modified on a +per-module basis using the module command which interprets +modulefiles. Typically modulefiles instruct the module command to +alter or set shell environment variables such as PATH, MANPATH +etc. modulefiles may be shared by many users on a system and users may +have their own collection to supplement or replace the shared +modulefiles.

    +
    +
    +

    Environment module systems are widely used on HPC systems to provide +multiple compilers and multiple versions of the same library or API +implementations to the users. The +Environment Modules system is the +most widely used implementation. Another - more recent - +implementation is +Lmod. Lmod +addresses some weaknesses of the Environment Modules, but solves only +some of them.

    +
    +
    +

    One issue with the Environment Modules is the flat naming scheme. The +Lmod system and Pmodules solves the problem by organizing the modules +hierarchically. What is the problem with a flat naming scheme? Provide +different versions of the same library, like openmpi 1.6.5/1.8.4, +compiled with different (versions) of compilers, like gcc +4.7.4/4.8.4/4.9.2 and Intel 14.0.2/15.2, the number of modules is +growing quite fast. Providing dozens of libraries will end up in +hundreds of modules - not very clear to the users.

    +
    +
    +

    Neither Environment Modules nor Lmod have build-in support for phasing +out modules or marking modules as unstable. Pmodules solves this +problem by introducing 'releases' like stable, unstable and +deprecated. A user will be warned while loading a non-stable module.

    +
    +
    +

    With Environment Modules and Lmod everything must be coded in the +modulefile - even things which are obvious. If a bin directory +exists, why not adding this directory to the PATH variable +automatically? The same can be done for MANPATH, LD_LIBRARY_PATH +and other environment variables.

    +
    +
    +

    Usually modules are installed on a network file-systems. In some cases +it is convenient or even required to install modules locally. Pmodules +provides a tool to install all or a sub-set of the modules from any +location to another location.

    +
    +
    +

    Pmodules has its own (simple) build environment. For a new module you +have to write a build script and a modulefile. Updating an existing +modules is very simple. In most cases it’s downloading the new version +and calling the build script. Anyway, nobody forces you to use this +build environment, but in most cases it is very handy.

    +
    +
    +
    +

    2.2. Module groups

    +
    +

    Pmodules organizes modules in groups. By default only the groups +Tools and Programming are visible. To get a list of 'used' and +'unused' groups, run the command module use:

    +
    +
    +
    +
    $ module use
    +Used groups:
    +	Tools
    +	Programming
    +
    +Unused groups:
    +	Libraries
    +	System
    +...
    +
    +
    +
    +

    To make the modules in a given group available, run the command

    +
    +
    +
    +
    $ module use GROUP
    +
    +
    +
    +
    +
    Example
    +
    +
    +
    +
    +
    $ module use System
    +$ module avail
    +--------------------------------------------- System ---------------------------------------------
    +
    +fsstress/1.0.0  nmap/6.46
    +
    +--------------------------------------------- Tools ---------------------------------------------
    +
    +Eclipse/4.4.2   Firefox/31.0    Opera/23.0      Thunderbird/31.0                emacs/24.4
    +global/6.3.1    gnuplot/4.6.3
    +
    +------------------------------------------ Programming ------------------------------------------
    +
    +Python/3.4.0    Python/3.4.3    autoconf/2.69   automake/1.14   cmake/2.8.12.2  gcc/4.7.4
    +gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       libtool/2.4.2   m4/1.4.17
    +
    +
    +
    +

    To make groups unavailable, run the command

    +
    +
    +
    +
    $ module unuse GROUP
    +
    +
    +
    +
    +
    Example
    +
    +

    Make modules in the groups System and Programming unavailable:

    +
    +
    +
    +
    +
    +
    $ module unuse System Programming
    +$ module avail
    +--------------------------------------------- Tools ---------------------------------------------
    +
    +Eclipse/4.4.2   Firefox/31.0    Opera/23.0      Thunderbird/31.0                dialog/1.2.1(u)
    +emacs/24.4      emacs/24.5(u)   git/2.3.3(u)    global/6.3.1    gnuplot/4.6.3   gnuplot/5.0.0(u)
    +
    +
    +
    +
    +
    +

    2.3. Module hierarchies

    +
    +

    Unstructured, flat naming schemes are confusing. Why? Lets assume we have to +provide modules for the compilers gcc-4.8.4, gcc-4.9.2, intel-15.2, +the MPI implementations openmpi-1.6.5, openmpi-1.8.4, mpich-3.1.4 +and parallel versions of hdf5-1.8.10 and hdf5-1.8.14 compiled with +all compiler/MPI combinations. So, we have to provide 30(!) modules:

    +
    +
    +
      +
    • +

      3 compiler modules

      +
    • +
    • +

      9 MPI modules

      +
    • +
    • +

      18 hdf5 modules

      +
    • +
    +
    +
    +

    Even with a reasonable naming convention this is quite confusing. In a flat naming scheme a listing of available modules might look like:

    +
    +
    +
    +
    $ module avail
    +gcc-4.8.4
    +gcc-4.9.2
    +hdf5-1.8.10-mpi-3.1.4-gcc-4.8.4
    +hdf5-1.8.10-mpi-3.1.4-gcc-4.9.2
    +hdf5-1.8.10-mpi-3.1.4-intel-15.2
    +hdf5-1.8.10-openmpi-1.6.5-gcc-4.8.4
    +hdf5-1.8.10-openmpi-1.6.5-gcc-4.9.2
    +hdf5-1.8.10-openmpi-1.6.5-intel-15.2
    +hdf5-1.8.10-openmpi-1.8.4-gcc-4.8.4
    +hdf5-1.8.10-openmpi-1.8.4-gcc-4.9.2
    +hdf5-1.8.10-openmpi-1.8.4-intel-15.2
    +hdf5-1.8.14-mpi-3.1.4-gcc-4.8.4
    +hdf5-1.8.14-mpi-3.1.4-gcc-4.9.2
    +hdf5-1.8.14-mpi-3.1.4-intel-15.2
    +hdf5-1.8.14-openmpi-1.6.5-gcc-4.8.4
    +hdf5-1.8.14-openmpi-1.6.5-intel-15.2
    +hdf5-1.8.14-openmpi-1.8.4-gcc-4.8.4
    +hdf5-1.8.14-openmpi-1.8.4-gcc-4.9.2
    +hdf5-1.8.14-openmpi-1.8.4-intel-15.2
    +intel-15.3
    +mpi-3.1.4-gcc-4.8.4
    +mpi-3.1.4-gcc-4.9.2
    +mpi-3.1.4-intel-15.2
    +openmpi-1.6.5-gcc-4.8.4
    +openmpi-1.6.5-gcc-4.9.2
    +openmpi-1.6.5-intel-15.2
    +openmpi-1.8.4-gcc-4.8.4
    +openmpi-1.8.4-gcc-4.9.2
    +openmpi-1.8.4-intel-15.2
    +
    +
    +
    +

    Got it? One combination is missing. But which one?

    +
    +
    +

    Actually we have to provide more compilers than the three mentioned above: while writing this documentation the number is already seven(!): five GCC versions and two Intel C versions.

    +
    +
    +

    Another issue with a flat naming scheme is, that all modules are listed independent of already loaded modules. But listing a module providing hdf5 1.8.14 compiled with Intel 15.2 and mpich 3.1.4 makes not much sense if modules for gcc 4.9.2 and openmpi 1.8.4 are already loaded. A solution to these issues is a to structure the modules hierarchically.

    +
    +
    +
    +
                      ... _________________________________________|________________________________________...
    +                     /                                         |                                        \
    +                    gcc                                       gcc                                      intel
    +                   4.8.4                                     4.9.2                                     15.2
    +        _____________|_____________               _____________|_____________               _____________|_____________
    +       /             |             \             /             |             \             /             |             \
    +    openmpi       openmpi        mpich        openmpi       openmpi        mpich        openmpi       openmpi        mpich
    +     1.6.5         1.8.4         3.1.4         1.6.5         1.8.4         3.1.4         1.6.5         1.8.4         3.1.4
    +     __|__         __|__         __|__         __|__         __|__         __|__         __|__         __|__         __|__
    +    /     \       /     \       /     \       /     \       /     \       /     \       /     \       /     \       /     \
    +  hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5   hdf5
    + 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14
    +
    +
    +
    + + + + + +
    + + +In a hierarchical structured module environment the command module +avail does '''not''' reveal all modules. Modules like openmpi and +hdf5 are not listed as long as the dependencies are not loaded. +
    +
    +
    +
    +
    Example
    +
    +

    Before you can load a hdf5 module, you must first

    +
    +
      +
    • +

      load a particular compiler module,

      +
    • +
    • +

      than a particular MPI module

      +
    • +
    • +

      and then the desired hdf5 module.

      +
    • +
    +
    +
    +
    +
    +
    +
    +
    $ module list
    +No Modulefiles Currently Loaded.
    +$ module avail
    + ------------------------------------------ Programming ------------------------------------------
    +
    +autoconf/2.69   automake/1.14   binutils/2.25(u)                cmake/2.8.12.2  cmake/3.1.3
    +gcc/4.7.4       gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       gcc/5.1.0(u)    intel/14.0.3
    +intel/15.2(u)   libtool/2.4.2   m4/1.4.17       psi-python27/2.1.0(u)
    +psi-python34/2.1.0(u)           Python/3.4.3    Tcl/8.6.3(u)    Tcl/8.6.4(u)    Tk/8.6.4(u)
    +
    +
    +
    +

    After loading the module gcc/4.9.2 we see the available MPI implementations compiled with this compiler:

    +
    +
    +
    +
    $ module load gcc/4.9.2
    +$ module avail
    +------------------------------------------ Programming ------------------------------------------
    +
    +autoconf/2.69   automake/1.14   binutils/2.25(u)                cmake/2.8.12.2  cmake/3.1.3
    +gcc/4.7.4       gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       gcc/5.1.0(u)    intel/14.0.3
    +intel/15.2(u)   libtool/2.4.2   m4/1.4.17       psi-python27/2.1.0(u)
    +psi-python34/2.1.0(u)           Python/3.4.3    Tcl/8.6.3(u)    Tcl/8.6.4(u)    Tk/8.6.4(u)
    +
    +--------------------------------------- Compiler/gcc/4.9.2 ---------------------------------------
    +
    +boost/1.55.0    boost/1.57.0    gsl/1.15        hdf5_serial/1.8.12              hdf5_serial/1.8.13
    +hdf5_serial/1.8.14              mpich/3.1.4(u)  OpenBLAS/0.2.9  OpenBLAS_OMP/0.2.9
    +openmpi/1.6.5   openmpi/1.8.2   openmpi/1.8.4   root/5.34.19    root/5.34.26    SuperLU/4.3
    +UMFPACK/5.6.2   vtk/5.10.1
    +
    +
    +
    +

    Next step is loading a MPI module:

    +
    +
    +
    +
    $ module load openmpi/1.8.4
    +$ module avail
    +------------------------------------------ Programming ------------------------------------------
    +
    +autoconf/2.69   automake/1.14   binutils/2.25(u)                cmake/2.8.12.2  cmake/3.1.3
    +gcc/4.7.4       gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       gcc/5.1.0(u)    intel/14.0.3
    +intel/15.2(u)   libtool/2.4.2   m4/1.4.17       psi-python27/2.1.0(u)
    +psi-python34/2.1.0(u)           Python/3.4.3    Tcl/8.6.3(u)    Tcl/8.6.4(u)    Tk/8.6.4(u)
    +
    +--------------------------------------- Compiler/gcc/4.9.2 ---------------------------------------
    +
    +boost/1.55.0    boost/1.57.0    gsl/1.15        hdf5_serial/1.8.12              hdf5_serial/1.8.13
    +hdf5_serial/1.8.14              mpich/3.1.4(u)  OpenBLAS/0.2.9  OpenBLAS_OMP/0.2.9
    +openmpi/1.6.5   openmpi/1.8.2   openmpi/1.8.4   root/5.34.19    root/5.34.26    SuperLU/4.3
    +UMFPACK/5.6.2   vtk/5.10.1
    +
    +---------------------------------- MPI/gcc/4.9.2/openmpi/1.8.4 ----------------------------------
    +
    +BoxLib/2014-02-28               hdf5/1.8.12     hdf5/1.8.13     hdf5/1.8.14     ippl/1.1.4
    +parmetis/3.2.0  SuperLU_DIST/3.3                trilinos/11.10.2                trilinos/11.12.1
    +trilinos/11.14.1
    +
    +
    +
    +

    Now you can load the HDF5 module:

    +
    +
    +
    +
    $ module load hdf5/1.8.14
    +
    +
    +
    +

    Instead of

    +
    +
    +
    +
    $ module load gcc/4.9.2
    +$ module load openmpi/1.8.4
    +$ module load hdf5/1.8.14
    +
    +
    +
    +

    you can also execute

    +
    +
    +
    +
    $ module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14
    +
    +
    +
    + + + + + +
    + + +Modules marked with (u) are unstable. +--- +
    +
    +
    +
    +

    2.4. Searching the module hierarchy

    +
    +

    Now you may ask: How do I know which hdf5 (or Trilinos, boost…​) modules are really available? To get an answer to this question you can run the module search command.

    +
    +
    +
    +
    Example
    +
    +

    To get a list of all installed hdf5 modules run

    +
    +
    +
    +
    +
    +
    $ module search hdf5 --all-releases
    +Module               Release    Group        Requires
    +------------------------------------------------------------
    +hdf5/1.8.12          unstable   MPI          gcc/4.7.4 mpich/3.1.4
    +hdf5/1.8.12          stable     MPI          gcc/4.7.4 openmpi/1.6.5
    +hdf5/1.8.12          stable     MPI          gcc/4.7.4 openmpi/1.8.2
    +hdf5/1.8.12          stable     MPI          gcc/4.7.4 openmpi/1.8.4
    +hdf5/1.8.12          stable     MPI          gcc/4.8.3 openmpi/1.6.5
    +hdf5/1.8.12          stable     MPI          gcc/4.8.3 openmpi/1.8.2
    +hdf5/1.8.12          stable     MPI          gcc/4.8.3 openmpi/1.8.4
    +hdf5/1.8.12          unstable   MPI          gcc/4.8.4 mpich/3.1.4
    +hdf5/1.8.12          stable     MPI          gcc/4.8.4 openmpi/1.6.5
    +hdf5/1.8.12          stable     MPI          gcc/4.8.4 openmpi/1.8.2
    +hdf5/1.8.12          stable     MPI          gcc/4.8.4 openmpi/1.8.4
    +hdf5/1.8.12          unstable   MPI          gcc/4.9.2 mpich/3.1.4
    +hdf5/1.8.12          stable     MPI          gcc/4.9.2 openmpi/1.6.5
    +hdf5/1.8.12          stable     MPI          gcc/4.9.2 openmpi/1.8.2
    +hdf5/1.8.12          stable     MPI          gcc/4.9.2 openmpi/1.8.4
    +hdf5/1.8.12          unstable   MPI          gcc/5.1.0 mpich/3.1.4
    +hdf5/1.8.12          unstable   MPI          gcc/5.1.0 openmpi/1.6.5
    +hdf5/1.8.12          unstable   MPI          gcc/5.1.0 openmpi/1.8.4
    +hdf5/1.8.12          unstable   MPI          intel/15.2 mpich/3.1.4
    +hdf5/1.8.12          unstable   MPI          intel/15.2 openmpi/1.6.5
    +hdf5/1.8.12          unstable   MPI          intel/15.2 openmpi/1.8.4
    +hdf5/1.8.13          stable     MPI          gcc/4.7.4 openmpi/1.6.5
    +hdf5/1.8.13          stable     MPI          gcc/4.7.4 openmpi/1.8.2
    +hdf5/1.8.13          stable     MPI          gcc/4.7.4 openmpi/1.8.4
    +hdf5/1.8.13          stable     MPI          gcc/4.8.3 openmpi/1.6.5
    +hdf5/1.8.13          stable     MPI          gcc/4.8.3 openmpi/1.8.2
    +hdf5/1.8.13          stable     MPI          gcc/4.8.3 openmpi/1.8.4
    +hdf5/1.8.13          stable     MPI          gcc/4.8.4 openmpi/1.6.5
    +hdf5/1.8.13          stable     MPI          gcc/4.8.4 openmpi/1.8.2
    +hdf5/1.8.13          stable     MPI          gcc/4.8.4 openmpi/1.8.4
    +hdf5/1.8.13          stable     MPI          gcc/4.9.2 openmpi/1.6.5
    +hdf5/1.8.13          stable     MPI          gcc/4.9.2 openmpi/1.8.2
    +hdf5/1.8.13          stable     MPI          gcc/4.9.2 openmpi/1.8.4
    +hdf5/1.8.14          unstable   MPI          gcc/4.7.4 mpich/3.1.4
    +hdf5/1.8.14          stable     MPI          gcc/4.7.4 openmpi/1.6.5
    +hdf5/1.8.14          stable     MPI          gcc/4.7.4 openmpi/1.8.2
    +hdf5/1.8.14          stable     MPI          gcc/4.7.4 openmpi/1.8.4
    +hdf5/1.8.14          stable     MPI          gcc/4.8.3 openmpi/1.6.5
    +hdf5/1.8.14          stable     MPI          gcc/4.8.3 openmpi/1.8.2
    +hdf5/1.8.14          stable     MPI          gcc/4.8.3 openmpi/1.8.4
    +hdf5/1.8.14          unstable   MPI          gcc/4.8.4 mpich/3.1.4
    +hdf5/1.8.14          stable     MPI          gcc/4.8.4 openmpi/1.6.5
    +hdf5/1.8.14          stable     MPI          gcc/4.8.4 openmpi/1.8.2
    +hdf5/1.8.14          stable     MPI          gcc/4.8.4 openmpi/1.8.4
    +hdf5/1.8.14          unstable   MPI          gcc/4.9.2 mpich/3.1.4
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.6.5
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.8.2
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.8.4
    +hdf5/1.8.14          unstable   MPI          gcc/5.1.0 mpich/3.1.4
    +hdf5/1.8.14          unstable   MPI          gcc/5.1.0 openmpi/1.6.5
    +hdf5/1.8.14          unstable   MPI          gcc/5.1.0 openmpi/1.8.4
    +hdf5/1.8.14          unstable   MPI          intel/15.2 mpich/3.1.4
    +hdf5/1.8.14          unstable   MPI          intel/15.2 openmpi/1.6.5
    +hdf5/1.8.14          unstable   MPI          intel/15.2 openmpi/1.8.4
    +hdf5_serial/1.8.12   stable     Compiler     gcc/4.7.4
    +hdf5_serial/1.8.12   stable     Compiler     gcc/4.8.3
    +hdf5_serial/1.8.12   stable     Compiler     gcc/4.8.4
    +hdf5_serial/1.8.12   stable     Compiler     gcc/4.9.2
    +hdf5_serial/1.8.12   unstable   Compiler     intel/15.2
    +hdf5_serial/1.8.14   stable     Compiler     gcc/4.7.4
    +hdf5_serial/1.8.14   stable     Compiler     gcc/4.8.3
    +hdf5_serial/1.8.14   stable     Compiler     gcc/4.8.4
    +hdf5_serial/1.8.14   stable     Compiler     gcc/4.9.2
    +hdf5_serial/1.8.14   unstable   Compiler     intel/15.2
    +
    +
    +
    +
    +
    Example
    +
    +

    To get a list of all installed hdf5 modules compiled with GCC 4.9.2, run

    +
    +
    +
    +
    +
    +
    $ module search hdf5 --with=gcc/4.9.2 --all-releases
    +Module               Release    Group        Requires
    +------------------------------------------------------------
    +hdf5/1.8.12          unstable   MPI          gcc/4.9.2 mpich/3.1.4
    +hdf5/1.8.12          stable     MPI          gcc/4.9.2 openmpi/1.6.5
    +hdf5/1.8.12          stable     MPI          gcc/4.9.2 openmpi/1.8.2
    +hdf5/1.8.12          stable     MPI          gcc/4.9.2 openmpi/1.8.4
    +hdf5/1.8.13          stable     MPI          gcc/4.9.2 openmpi/1.6.5
    +hdf5/1.8.13          stable     MPI          gcc/4.9.2 openmpi/1.8.2
    +hdf5/1.8.13          stable     MPI          gcc/4.9.2 openmpi/1.8.4
    +hdf5/1.8.14          unstable   MPI          gcc/4.9.2 mpich/3.1.4
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.6.5
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.8.2
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.8.4
    +hdf5_serial/1.8.12   stable     Compiler     gcc/4.9.2
    +hdf5_serial/1.8.13   stable     Compiler     gcc/4.9.2
    +hdf5_serial/1.8.14   stable     Compiler     gcc/4.9.2
    +
    +
    +
    +
    +
    Example
    +
    +

    To get a list of all installed modules providing (parallel) HDF5 1.8.14, execute

    +
    +
    +
    +
    +
    +
    $ module search hdf5/1.8.14 --with=gcc/4.9.2 --all-releases
    +Module               Release    Group        Requires
    +------------------------------------------------------------
    +hdf5/1.8.14          unstable   MPI          gcc/4.9.2 mpich/3.1.4
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.6.5
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.8.2
    +hdf5/1.8.14          stable     MPI          gcc/4.9.2 openmpi/1.8.4
    +
    +
    +
    + + + + + +
    + + +Without the option --all-releases, only modules of "used" releases are listed. +
    +
    +
    +
    +
    +

    2.5. Module lifecycle

    +
    +

    Pmodules supports a simple lifecycle management. This solves the +problem of introducing new modules, which are still in development or +considered to be unstable and it supports phasing out old and +deprecated modules. The lifecycle of a module is unstable → +stabledeprecated. By default only stable modules are +visible. If you want to use unstable or deprecated modules, you have +to run

    +
    +
    +
    +
    $ module use unstable
    +
    +
    +
    +

    or

    +
    +
    +
    +
    $ module use deprecated
    +
    +
    +
    +

    first.

    +
    +
    +

    All modules start as unstable. This implies something like "use on +your on risk". Unstable modules may be changed without warning or even +be removed. If you load an unstable module, a warning will be printed.

    +
    +
    +

    A stable module is, well, stable. It will not be changed during the +remaining life time and the provided software is considered to be +stable.

    +
    +
    +

    A deprecated module should not be used any more. Deprecated modules +might be removed without further warning. While loading a deprecated +module, a warning will be printed. Kind module developers might add an +end of life message with more detailed information.

    +
    +
    +
    +

    2.6. Overlays

    +
    +

    TBW

    +
    +
    +
    +
    +
    +

    3. THE module COMMAND

    +
    +
    +

    Table of Content
    +The module-command: module
    +List available modules: module avail
    +Clear list of loaded modules: module clear
    +Display information about chances in environment when loaded: module display
    +Print sub-command or module-specific help: module help
    +Add or remove modules from shell’s initialization file: module initcmds
    +Search for keywords in 'whatis': [module-keyword]
    +List loaded modules: module list
    +Load and unload modules: module load|unload
    +Purge all loaded modules: module purge
    +Refresh loaded modules: module refresh
    +Search installed modules: module search
    +Replace a loaded module by another: module swap
    +Manipulate module path, used releases, groups and overlays: module use
    +Search for keywords in 'whatis': module whatis|keyword

    +
    +
    +

    3.1. module - using Pmodules

    +
    +

    NAME

    +
    +

    module - command line interface to the Pmodules package

    +
    +
    +
    +

    SYNOPSIS

    +
    +

    module [ switches ] [ sub-command ] [ sub-command-args ]

    +
    +
    +
    +

    DESCRIPTION

    +
    +

    Environment Modules provide a convenient way to dynamically change the +users' environment through modulefiles. This includes easily adding or +removing directories to the PATH environment variable. +A modulefile contains the necessary information to allow a user to run +a particular application or provide access to a particular +library. All of this can be done dynamically without logging out and +back in. Modulefiles for applications modify the user’s shell +environment to make access easy. Modulefiles for Library packages +provide environment variables that specify where the library and +header files can be found. +Packages can be loaded and unloaded cleanly through the module command.

    +
    +
    +

    Available sub-commands are:

    +
    +
    +

    List available modules: module avail

    +
    +
    +

    Clear list of loaded modules: module clear

    +
    +
    +

    Display information about chances in environment when loaded: module display

    +
    +
    +

    Print sub-command or module-specific help: module help

    +
    +
    +

    Add or remove modules from shell’s initialization file: module initcmds

    +
    +
    +

    Search for keywords in 'whatis': [module-keyword]

    +
    +
    +

    List loaded modules: module list

    +
    +
    +

    Load and unload modules: module load|unload

    +
    +
    +

    Purge all loaded modules: module purge

    +
    +
    +

    Refresh loaded modules: module refresh

    +
    +
    +

    Search installed modules: module search

    +
    +
    +

    Replace a loaded module by another: module swap

    +
    +
    +

    Manipulate module path, used releases, groups and overlays: module use

    +
    +
    +

    Search for keywords in 'whatis': module whatis|keyword

    +
    +
    + + + + + +
    + + +
    +

    For the time being Pmodules supports bash, tcsh and zsh only.

    +
    +
    +
    +
    +
    +
    +

    3.2. Sub-commands

    +
    +

    3.2.1. List available/loadable modules

    +
    +
    NAME
    +
    +

    module avail - list loadable modules

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module avail [OPTIONS] [string…​]

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    List all available module in the current MODULEPATH. If an argument is given, then each directory in the MODULEPATH is searched for modules whose pathname match the argument.

    +
    +
    +

    This command does not display all installed modules on the system. Only loadable modules are listed. To get a list of all installed modules use the command module search.

    +
    +
    +

    The list of available modules may change either by loading other modules, e.g. a compiler, or by using/accepting unstable or deprecated modules. For the later read the description of module use.

    +
    +
    +

    With the switches you can change the output format. The default output format is 'human' (readable). For the time being terse and long output are identical.

    +
    +
    +
    +
    OPTIONS
    +
    +
    +
    -a
    +
    +

    List loadable modules in all release-stages. Unstable modules are marked with (u), +deprecated modules with (d).

    +
    +
    -t | --terse
    +
    +

    Terse output.

    +
    +
    -h | --human
    +
    +

    Human readable output. This is the default.

    +
    +
    -l | --long
    +
    +

    Long output.

    +
    +
    +
    +
    +
    +
    EXAMPLES
    +
    +
    +
    $ module avail git
    +----------------------------------------- Tools -----------------------------------------
    +
    +ygit/2.3.3       git/2.8.1       git/2.21.0      git/2.22.0      git/2.30.0      git/2.33.1
    +
    +$ module avail -a gcc
    +-------------------------------------- Programming --------------------------------------
    +
    +gcc/4.7.4       gcc/4.8.2       gcc/4.8.3       gcc/4.8.4       gcc/4.8.5       gcc/4.9.2
    +gcc/4.9.3       gcc/4.9.4       gcc/5.1.0(d)    gcc/5.2.0(d)    gcc/5.3.0       gcc/5.4.0
    +gcc/5.5.0       gcc/6.1.0       gcc/6.2.0       gcc/6.3.0       gcc/6.4.0       gcc/6.5.0
    +gcc/7.1.0       gcc/7.2.0       gcc/7.3.0       gcc/7.4.0       gcc/7.5.0       gcc/8.1.0
    +gcc/8.2.0       gcc/8.3.0       gcc/8.4.0       gcc/8.5.0       gcc/9.1.0       gcc/9.2.0
    +gcc/9.3.0       gcc/9.5.0       gcc/10.1.0      gcc/10.2.0      gcc/10.3.0      gcc/11.2.0
    +gcc/11.3.0      gcc/12.1.0
    +
    +
    + +
    +
    +
    +

    3.2.2. Clear list of loaded modules

    +
    +
    NAME
    +
    +

    module clear - clear list of loaded modules.

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module clear

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Force the Pmodules package to believe that no modules are currently loaded. The sub-command clear does not unload the loaded modules! In other words: changes made to the shell’s environment by loaded modules are not reverted.

    +
    +
    +
    +
    EXAMPLES
    +
    +

    After loading the module for gcc/4.9.2 the following environment variables are set:

    +
    +
    +
    +
    $ env | grep ^GCC
    +GCC_HOME=/opt/psi/Programming/gcc/4.9.2
    +GCC_DIR=/opt/psi/Programming/gcc/4.9.2
    +GCC_PREFIX=/opt/psi/Programming/gcc/4.9.2
    +GCC_VERSION=4.9.2
    +GCC_INCLUDE_DIR=/opt/psi/Programming/gcc/4.9.2/include
    +GCC_LIBRARY_DIR=/opt/psi/Programming/gcc/4.9.2/lib
    +
    +
    +
    +

    After clearing the list of loaded modules the environment variables set by the GCC module are still set

    +
    +
    +
    +
    $ module clear
    +$ module list
    +No Modulefiles Currently Loaded.
    +$ env | grep ^GCC
    +GCC_HOME=/opt/psi/Programming/gcc/4.9.2
    +GCC_DIR=/opt/psi/Programming/gcc/4.9.2
    +GCC_PREFIX=/opt/psi/Programming/gcc/4.9.2
    +GCC_VERSION=4.9.2
    +GCC_INCLUDE_DIR=/opt/psi/Programming/gcc/4.9.2/include
    +GCC_LIBRARY_DIR=/opt/psi/Programming/gcc/4.9.2/lib
    +
    +
    +
    +
    +
    SEE ALSO
    + +
    +
    +
    +

    3.2.3. Display information about a module

    +
    +
    NAME
    +
    +

    module display\|show - display information about chances in environment

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module display modulefile…​
    +module show modulefile…​

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Display information about modulefile(s). The display sub-command will list the full path of the modulefile(s) and all of the environment changes the modulefile(s) will make if loaded. (It will not display any environment changes found within conditional statements.)

    +
    +
    +
    +
    EXAMPLES
    +
    +

    Display chances the module gcc/5.4.0 will make to the environment if loaded:

    +
    +
    +
    +
    $ module display gcc/5.4.0
    +-------------------------------------------------------------------
    +/opt/psi/Programming/modulefiles/gcc/5.4.0:
    +
    +module-whatis	 GNU Compiler Collection
    +conflict	 gcc
    +setenv		 GCC_VERSION 5.4.0
    +setenv		 GCC_PREFIX /opt/psi/Programming/gcc/5.4.0
    +setenv		 GCC_DIR /opt/psi/Programming/gcc/5.4.0
    +setenv		 GCC_HOME /opt/psi/Programming/gcc/5.4.0
    +prepend-path	 PATH /opt/psi/Programming/gcc/5.4.0/bin
    +prepend-path	 MANPATH /opt/psi/Programming/gcc/5.4.0/share/man
    +prepend-path	 C_INCLUDE_PATH /opt/psi/Programming/gcc/5.4.0/include
    +prepend-path	 CPLUS_INCLUDE_PATH /opt/psi/Programming/gcc/5.4.0/include
    +setenv		 GCC_INCLUDE_DIR /opt/psi/Programming/gcc/5.4.0/include
    +prepend-path	 LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib
    +prepend-path	 LD_LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib
    +setenv		 GCC_LIBRARY_DIR /opt/psi/Programming/gcc/5.4.0/lib
    +prepend-path	 LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib64
    +prepend-path	 LD_LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib64
    +setenv		 GCC_LIBRARY_DIR /opt/psi/Programming/gcc/5.4.0/lib64
    +append-path	 PMODULES_LOADED_PROGRAMMING gcc/5.4.0
    +remove-path	 PMODULES_LOADED_PROGRAMMING --APPMARKER--
    +setenv		 COMPILER gcc
    +setenv		 COMPILER_VERSION 5.4.0
    +setenv		 CC /opt/psi/Programming/gcc/5.4.0/bin/gcc
    +setenv		 CXX /opt/psi/Programming/gcc/5.4.0/bin/g++
    +setenv		 F77 /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +setenv		 F90 /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +setenv		 FC /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +setenv		 FORTRAN /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +-------------------------------------------------------------------
    +
    +
    +
    +
    +
    SEE ALSO
    + +
    +
    +
    +

    3.2.4. Print sub-command or module-specific help

    +
    +
    NAME
    +
    +

    module help - print sub-command or module-specific help

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module help [module|sub-command…​]

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Print help for specific modules, sub-commands or the module command itself.

    +
    +
    +
    +
    EXAMPLES
    +
    +

    Get help for the module git/2.3.3:

    +
    +
    +
    +
    $ module help git/2.3.3
    +
    +----------- Module Specific Help for 'git/2.3.3' ------------------
    +
    +distributed version control system
    +Version:    2.3.3
    +Homepage:   http://git-scm.com/
    +License:    GNU GPL v2
    +Maintainer: Achim Gsell <achim.gsell@psi.ch>
    +
    +Git is a free and open source distributed version control system
    +designed to handle everything from small to very large projects
    +with speed and efficiency.
    +
    +Git is easy to learn and has a tiny footprint with lightning fast
    +performance. It outclasses SCM tools like Subversion, CVS, Perforce,
    +and ClearCase with features like cheap local branching, convenient
    +staging areas, and multiple workflows.
    +
    +
    +
    +

    Print help for the sub-command load:

    +
    +
    +
    +
    $ module help load
    +
    +USAGE:
    +        module add     modulefile...
    +        module load    modulefile...
    +                Load modulefile(s) into the shell environment. Loading a
    +		'group-head' will extend the MODULEPATH. E.g.: loading a
    +		compiler makes additional modules like openmpi and libraries
    +		compiled with this compiler available.
    +
    +
    +
    +
    +
    SEE ALSO
    + +
    +
    +
    +

    3.2.5. Manipulate shell’s initialization file

    +
    +
    NAME
    +
    +

    module initadd|initprepend|initrm|initswitch|initrm|initlist|initclear - add or remove modules from shell’s initialization file

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module initadd module…​
    +module initprepend module…​
    +module initrm module…​
    +module initswitch module1 module2
    +module initlist
    +module initclear

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Add modulefile(s) to, list modulefile(s) in or remove modulefile(s) from the shell’s initialization file in the user’s home directory. The startup files checked (in order) are:

    +
    +
    +
    +
    csh
    +
    +

    .modules, .cshrc(.ext), .csh_variables, and .login(.ext)

    +
    +
    tcsh
    +
    +

    .modules, .tcshrc, .cshrc(.ext), .csh_variables, and .login(.ext)

    +
    +
    bash
    +
    +

    .modules, .bash_profile, .bash_login, .profile(.ext), and .bashrc(.ext)

    +
    +
    zsh
    +
    +

    .modules, .zcshrc(.ext), .zshenv(.ext), and .zlogin(.ext)

    +
    +
    module initadd module…​
    +
    +

    If a module load line is found in any of these files, the modulefile(s) is(are) appended to any existing list of modulefiles. The module load line must be located in at least one of the files listed above for any of the init sub-commands to work properly. If the module load line is found in multiple shell initialization files, all of the lines are changed.

    +
    +
    module initprepend module…​
    +
    +

    Does the same as initadd but prepends the given modules to the beginning of the list.

    +
    +
    module initrm module…​
    +
    +

    Remove modulefile(s) from the shell’s initialization files.

    +
    +
    module initswitch module1 module2
    +
    +

    Switch module1 with module2 in the shell’s initialization files.

    +
    +
    module initlist
    +
    +

    List all of the module(s) loaded from the shell’s initialization file.

    +
    +
    module initclear
    +
    +

    Clear all of the module(s) from the shell’s initialization files.

    +
    +
    +
    +
    + +
    +
    +

    3.2.6. List loaded modules

    +
    +
    NAME
    +
    +

    module list - list loaded modules

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module list [OPTIONS]

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    List loaded modules.

    +
    +
    +
    +
    OPTIONS
    +
    +
    +
    -t | --terse
    +
    +

    Terse output.

    +
    +
    -h | --human
    +
    +

    Human readable output. This is the default.

    +
    +
    -l | --long
    +
    +

    Long output.

    +
    +
    +
    +
    +
    +
    EXAMPLES
    +
    +

    Assuming the modules gcc/4.8.3, openmpi/1.8.2 and hdf5/1.8.12. List with default (human readable) output:

    +
    +
    +
    +
    $ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.8.3       2) openmpi/1.8.2   3) hdf5/1.8.12
    +
    +
    +
    +

    List in terse output:

    +
    +
    +
    +
    $ module list -t
    +Currently Loaded Modulefiles:
    +gcc/4.8.3
    +openmpi/1.8.2
    +hdf5/1.8.12
    +
    +
    +
    +

    Long listing:

    +
    +
    +
    +
    $ module list -l
    +- Package -----------------------------+- Versions -+- Last mod. ------
    +Currently Loaded Modulefiles:
    +gcc/4.8.3                                            2014/12/05 17:39:24
    +openmpi/1.8.2                                        2014/11/25  8:15:40
    +hdf5/1.8.12                                          2014/11/25  8:15:40
    +
    +
    +
    +
    +
    SEE ALSO
    + +
    +
    +
    +

    3.2.7. Load and unloading a module

    +
    +
    NAME
    +
    +

    module add|load - load modules
    +module rm|unload - unload modules

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module add [OPTIONS] modulefile…​
    +module load [OPTIONS] modulefile…​
    +module rm modulefile…​
    +module unload modulefile…​

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Load modulefile(s) into shell environment. Loading a group-head will extend the MODULEPATH. E.g.: loading a compiler makes additional modules like openmpi and other libraries/packages compiled with this compiler available.

    +
    +
    +

    If you try to load a module which is not available in the current MODULEPATH but installed in the module hierarchy, a message will be printed showing prerequisite modules.

    +
    +
    +

    If you load a deprecated or unstable module, a warning will be printed.

    +
    +
    +

    You can change the verbosity of the load sub-command by setting the environment variable PMODULES_VERBOSITY to silent, warn or verbose.

    +
    +
    +
    +
    silent
    +
    +

    Print error messages only.

    +
    +
    warn
    +
    +

    Print a warning message, when loading a deprecated or unstable module.

    +
    +
    verbose
    +
    +

    Print warning messages and print prerequisite modules if the module to load is not available, but installed in hierarchy.

    +
    +
    +
    +
    +
    +
    OPTIONS / FLAGS
    +
    +
    +
    -f | --force
    +
    +

    Force active dependency resolution. This will result in modules found on a prereq command inside a module file being load automatically. Unloading module files using this switch will result in all required modules which have been loaded automatically using the -f switch being unload. This switch is experimental at the moment.

    +
    +
    -v | --verbose
    +
    +

    Set verbosity level to verbose.

    +
    +
    -w | --warn
    +
    +

    Set verbosity level to warn.

    +
    +
    -s | --silent
    +
    +

    Set verbosity level to silent.

    +
    +
    +
    +
    +
    +
    EXAMPLES (add|load)
    +
    +

    Loading the modules gcc/4.9.2, openmpi/1.8.4 and hdf5/1.8.14:

    +
    +
    +
    +
    $ module load gcc/4.9.2
    +$ module load openmpi/1.8.4
    +$ module load hdf5/1.8.14
    +$ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2       2) openmpi/1.8.4   3) hdf5/1.8.14
    +
    +
    +
    +

    or

    +
    +
    +
    +
    $ module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14
    +
    +
    +
    +

    If you try to load hdf5/1.8.14 without the prerequisite modules, some "hints" will be printed, if the default verbosity level is set:

    +
    +
    +
    +
    $ module purge
    +$ module load hdf5/1.8.14
    +The module 'hdf5/1.8.14' cannot be loaded!
    +Try with one of the following command(s):
    +
    +module load gcc/4.7.4 openmpi/1.6.5 hdf5/1.8.14
    +module load gcc/4.7.4 openmpi/1.8.2 hdf5/1.8.14
    +module load gcc/4.7.4 openmpi/1.8.4 hdf5/1.8.14
    +module load gcc/4.8.3 openmpi/1.6.5 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.3 openmpi/1.8.2 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.3 openmpi/1.8.4 hdf5/1.8.14
    +module load gcc/4.8.4 openmpi/1.6.5 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.4 openmpi/1.8.2 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.4 openmpi/1.8.4 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.4 openmpi/1.8.8 hdf5/1.8.14
    +module use deprecated; module load gcc/4.9.2 openmpi/1.6.5 hdf5/1.8.14
    +module use deprecated; module load gcc/4.9.2 openmpi/1.8.2 hdf5/1.8.14
    +module use deprecated; module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14
    +
    +
    +
    +

    Use verbosity level warn to suppress the hints:

    +
    +
    +
    +
    $ module load hdf5/1.8.14 --warn
    +module load: module unavailable -- hdf5/1.8.14
    +
    +
    +
    +

    Loading an unstable module:

    +
    +
    +
    +
    $ module use unstable
    +$ module load cmake/3.1.3
    +Warning: the unstable module 'cmake/3.1.3' has been loaded.
    +
    +
    +
    +

    To supress the warning, use the --silent option.

    +
    +
    +
    +
    EXAMPLES (rm|unload)
    +
    +
    +
    $ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2       2) openmpi/1.8.4   3) hdf5/1.8.14
    +$ module rm openmpi/1.8.4
    +$ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2
    +
    +
    +
    +

    The module hdf5/1.8.14 is unloaded as a dependency of openmpi/1.8.4.

    +
    +
    + +
    +
    +

    3.2.8. Purge all loaded modules

    +
    +
    NAME
    +
    +

    module purge - purge all loaded modules

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module purge

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Unload all loaded module and reset everything to original state.

    +
    +
    +
    +
    EXAMPLES
    +
    +

    List loaded modules:

    +
    +
    +
    +
    $ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.8.3       2) openmpi/1.8.2   3) gnuplot/4.6.3
    +
    +
    +
    +

    Now we purge everything and list the loaded modules again:

    +
    +
    +
    +
    $ module purge
    +$ module list
    +No Modulefiles Currently Loaded.
    +
    +
    +
    + +
    +
    +

    3.2.9. Refresh loaded modules

    +
    +
    NAME
    +
    +

    module refresh - refresh loaded modules

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module refresh

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Force a refresh of all non-persistent components of currently loaded modules. This should be used on derived shells where aliases need to be reinitialized but the environment variables have already been set by the currently loaded modules.

    +
    +
    +
    +
    SEE ALSO
    + +
    +
    +
    + +
    +
    NAME
    +
    +

    module search - search installed modules

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module search [switches] string…​

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    List all modules in the current MODULEPATH and the module hierarchy. If an argument is given, search for modules whose name match the argument. +Options

    +
    +
    +
    +
    OPTIONS
    +
    +
    +
    --no-header
    +
    +

    Suppress output of a header.

    +
    +
    --release=RELEASE
    +
    +

    Search for modules within this release. You can specify this switch multiple times. Without this switch, the used releases will be searched.

    +
    +
    -a|--all-releases
    +
    +

    Search within all releases.

    +
    +
    --with=STRING
    +
    +

    Search for modules compiled with modules matching string. The command. See example below.

    +
    +
    --src=dir
    +
    +

    Search module hierarchy in dir. +Eine Textbeschreibung der Funktionsweise des Befehls oder der Funktion. (Üblicherweise jedoch nicht der Benutzung, siehe unten.)

    +
    +
    +
    +
    +
    +
    EXAMPLES
    +
    +

    Get list of all installed GCC:

    +
    +
    +
    +
    $ module search --all-releases gcc
    +Module               Release    Group        Requires
    +------------------------------------------------------------
    +gcc/4.7.4            stable     Programming
    +gcc/4.8.2            stable     Programming
    +gcc/4.8.3            stable     Programming
    +gcc/4.8.4            stable     Programming
    +gcc/4.8.5            stable     Programming
    +gcc/4.9.2            stable     Programming
    +gcc/4.9.3            stable     Programming
    +gcc/4.9.4            stable     Programming
    +gcc/5.1.0            deprecated Programming
    +gcc/5.2.0            deprecated Programming
    +gcc/5.3.0            stable     Programming
    +gcc/5.4.0            stable     Programming
    +gcc/6.1.0            stable     Programming
    +gcc/6.2.0            stable     Programming
    +gcc/6.3.0            stable     Programming
    +gcc/6.4.0            stable     Programming
    +gcc/7.1.0            stable     Programming
    +gcc/7.2.0            stable     Programming
    +
    +
    +
    +

    Get list of all open-mpi versions compiled with GCC 5.4.0:

    +
    +
    +
    +
    $ module search --all-releases openmpi --with=gcc/5.4.0
    +Module               Release    Group        Requires
    +------------------------------------------------------------
    +openmpi/1.10.2       stable     Compiler     gcc/5.4.0
    +openmpi/1.10.4       stable     Compiler     gcc/5.4.0
    +openmpi/2.0.1        stable     Compiler     gcc/5.4.0
    +
    +
    +
    +
    +
    SEE ALSO
    + +
    +
    +
    +

    3.2.11. Swapping modules

    +
    +
    NAME
    +
    +

    module swap|switch - replace a loaded module by another

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module swap [modulefile1] modulefile2
    +module switch [modulefile1] modulefile2

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    Switch loaded modulefile1 with modulefile2. If modulefile1 is not specified, then it is assumed to be the currently loaded module with the same root name as modulefile2.

    +
    +
    +
    +
    OPTIONS / FLAGS
    +
    +

    None

    +
    +
    +
    +
    EXAMPLES
    +
    +
    +
    $ module load gcc/4.8.4
    +$ module swap gcc/4.9.2
    +$ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2
    +
    +
    +
    +
    +
    BUGS
    +
    +

    You can only swap between different version. The following commands are working (assuming that gcc/4.8.2 is loaded):

    +
    +
    +
    +
    $ module swap gcc/4.9.2
    +$ module swap gcc/4.9.2 gcc/5.4.0
    +
    +
    +
    +

    The following command does not working as expected:

    +
    +
    +
    +
    $ module swap gcc/4.8.2 intel/15.0
    +
    +
    +
    +

    This command does not work with the Tcl implementation (environment variable PMOUDLE_PURETCL set).

    +
    +
    + +
    +
    +

    3.2.12. Manipulate module path, used releases, groups or overlays

    +
    +
    NAME
    +
    +

    module use|unuse - manipulate module path, used releases or groups

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module use [OPTIONS] [string…​]

    +
    +
    +

    module unuse string…​

    +
    +
    +
    +
    DESCRIPTION
    +
    +

    If called without arguments, print a summary about used groups, releases and additional directories in MODULEPATH.

    +
    +
    +

    If string is a directory, append, prepend or remove this directory to/from MODULEPATH.

    +
    +
    +

    If string is a group name, append, prepend or remove the corresponding directory to/from MODULEPATH.

    +
    +
    +

    If string is a releases name, make all modules with this release available/unavailable. Known releases are;

    +
    +
    +
    +
    stable
    +
    +

    Modules released as stable are considered to be production ready. The files of a stable module will never change.

    +
    +
    unstable
    +
    +

    These modules are still unstable. They may not be ready for production use. The files of unstable modules may change to fix bugs or add functionality. Use at your own risk.

    +
    +
    deprecated
    +
    +

    Deprecated modules should not be used any more and may be removed without further notice.

    +
    +
    +
    +
    +

    If string matches flag=[-_a-zA-Z0-9]* the RHS will be interpreted as use-flag.

    +
    +
    +
    +
    OPTIONS / FLAGS
    +
    +
    +
    -a | --append
    +
    +

    append directory or group to MODULEPATH.

    +
    +
    -p | --prepend
    +
    +

    prepend directory or group to MODULEPATH.

    +
    +
    +
    +
    +
    +
    EXAMPLES
    +
    +

    List used/unused groups, releases and additional directories in MODULEPATH:

    +
    +
    +
    +
    $ module use
    +Used groups:
    +	Tools
    +	Programming
    +	Compiler
    +
    +Unused groups:
    +	Legacy
    +	Libraries
    +	System
    +
    +Used releases:
    +	stable
    +	unstable
    +
    +Unused releases:
    +	deprecated
    +
    +Used flags:
    +	omp
    +
    +Additonal directories in MODULEPATH:
    +	none
    +
    +
    +
    +

    Adding the 'System' group

    +
    +
    +
    +
    $ module use System
    +$ module avail
    +-------------------------------------------- System:  --------------------------------------------
    +
    +filebench/1.4.9.1               fsstress/1.0.0  nmap/6.46       patchelf/0.8.1
    +
    +-------------------------------------------- Tools:  --------------------------------------------
    +
    +ANSYS/18.2      emacs/24.4      git/2.3.3       global/6.3.1    gnuplot/4.6.3   gnuplot/5.0.0
    +...
    +
    +----------------------------------------- Programming:  -----------------------------------------
    +
    +autoconf/2.69   automake/1.14   automake/1.15   binutils/2.25   cmake/2.8.12.2  cmake/3.1.3
    +cmake/3.6.3     gcc/4.7.4       gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       gcc/4.8.5
    +...
    +
    +
    +
    +

    Adding a directory to MODULEPATH

    +
    +
    +
    +
    $ module use /afs/psi.ch/project/amas/modulefiles
    +$ module avail
    +----------------------------------- /afs/psi.ch/project/amas:  -----------------------------------
    +
    +H5hut_parallel-toolchain/2.0    H5hut_serial-toolchain/2.0      OPAL/1.6        OPAL/1.6.0rc5
    +opal-toolschain/1.6             opal-toolschain/2.0
    +
    +-------------------------------------------- Tools:  --------------------------------------------
    +
    +ANSYS/18.2      emacs/24.4      git/2.3.3       global/6.3.1    gnuplot/4.6.3   gnuplot/5.0.0
    +...
    +----------------------------------------- Programming:  -----------------------------------------
    +
    +autoconf/2.69   automake/1.14   automake/1.15   binutils/2.25   cmake/2.8.12.2  cmake/3.1.3
    +cmake/3.6.3     gcc/4.7.4       gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       gcc/4.8.5
    +...
    +
    +
    +
    +
    +
    $ module unuse /afs/psi.ch/project/amas/modulefiles
    +$ module unuse System
    +$ module unuse unstable
    +
    +
    +
    + +
    +
    +

    3.2.13. Show/search 'what is' information

    +
    +
    NAME
    +
    +

    module whatis - print one-line information about module +module keyword|apropos - search for keywords in 'whatis'

    +
    +
    +
    +
    SYNOPSIS
    +
    +

    module whatis [module…​]
    +module apropos string…​
    +module keyword string…​

    +
    +
    +
    +
    DESCRIPTION
    +
    +
    +
    whatis
    +
    +

    Display the information set up by the module-whatis commands inside +the specified modulefile(s). If no modulefile is specified, all whatis +lines will be shown.

    +
    +
    keyword|apropos
    +
    +

    Search through the 'whatis' informations of all modulefiles for the +specified string. All whatis informations matching the string will be +displayed.

    +
    +
    +
    +
    +
    +
    EXAMPLES
    +
    +

    Get whatis for all available Git modules

    +
    +
    +
    +
    $ module  whatis git
    +----------- /opt/psi/Tools/modulefiles -------------
    +           git/2.3.3: distributed version control system
    +           git/2.5.2: distributed version control system
    +           git/2.8.1: distributed version control system
    +          git/2.11.1: distributed version control system
    +----------- /opt/psi/Programming/modulefiles -------------
    +
    +
    +
    +
    +
    SEE ALSO
    + +
    +
    +
    +
    +
    +
    +

    4. BUILDING PMODULES

    +
    +
    +

    4.1. Introduction

    +
    +

    In the simplest case adding a Pmodule can be done by adding a modulefile to a certain directory. Below is an example of a "do nothing" modulefile in the group Sandbox.

    +
    +
    +
    Example: /opt/psi/Sandbox/modulefiles/null/1.0.0
    +
    +
    #%Pmodule
    +
    +module-whatis           "does absolutely nothing"
    +module-maintainer       "Achim Gsell <achim.gsell@psi.ch>"
    +module-license          "MIT"
    +
    +module-help     "
    +This is a do nothing module.
    +"
    +
    +
    +
    +

    In addition to the modulefile a corresponding configuration file - defining for example the release stage - should be installed in the same directory as the modulefile. See next section for a detailed documentation of configuration files.

    +
    +
    +
    Example: configuration file /opt/psi/Sandbox/modulefiles/null/.release-1.0.0 for the null/1.0.0 module
    +
    +
    stable
    +
    +
    +
    +

    Modulefiles are written in the Tool Command Language (Tcl). See section [modulefiles] for a detailed documentation. In Pmodules version 1.1.16 and newer modulefiles written in Lua are also supported but with some limitations.

    +
    +
    +

    The above example doesn’t provide any software. In the following example we show a simple 'HelloWorld' module with a 'Hello, world!' program.

    +
    +
    +
    Example: modulefile /opt/psi/Sandbox/modulefiles/HelloWorld/1.0.0:
    +
    +
    #%Pmodule
    +
    +module-whatis           "'Hello, world!' module"
    +module-maintainer       "Achim Gsell <achim.gsell@psi.ch>"
    +module-license          "MIT"
    +module-url              "http://pmodules.gitpages.psi.ch"
    +
    +module-help     "
    +The module provides a 'Hello, world!' program.
    +"
    +
    +
    +
    +
    Example: configuration file /opt/psi/Sandbox/modulefiles/HelloWorld/.release-1.0.0 for the HelloWorld/1.0.0 module
    +
    +
    unstable
    +
    +
    +
    +
    Example: /opt/psi/Sandbox/HelloWorld/1.0.0/bin/hello:
    +
    +
    #!/usr/bin/env python3
    +
    +print("Hello, world!")
    +
    +
    +
    +

    In principal, it is possible to install modules 'by hand' by installing the software, module- and configuration files at the right place. For reproducibility, documentation and re-usability it is highly recommended to write build-recipes for each module or - at least - a README and host everything on a PSI Gitlab server.

    +
    +
    +

    Overall the main cases for building modules are:

    +
    +
    +
      +
    • +

      Building a module from source. This is the most common case. Examples: git, +gnuplot, openmpi, hdf5, …​
      +In this case it is highly recommended to code each step - usually download, configure, compile and install - in a script, write a modulefile and a configuration file.

      +
    • +
    • +

      Building a module with a binary package. Examples: Intel compiler, Matlab, +ANSYS, Mathematica, …​
      +In this case best practice is to install the package by hand and write a "dummy" build script, a modulefile and a configuration file. If it is possible and simple to script the installation, code this in the build script. If you cannot easily script the installation, document each step in a README file.

      +
    • +
    +
    +
    + + + + + +
    + + +
    +

    In any case: keep everything in a Git repository on either gitlab.psi.ch or git.psi.ch. +The Git repository for the groups Tool, Programming, Compiler, HDF5, HDF_serial and System is Pmodules/buildblock. Other groups can be hosted anywhere. But to keep everything together a project in Pmodules might be a good choice.

    +
    +
    +
    +
    +

    Many modules for the Pmodules environment have to be build from +source. The building plan of a module is coded in a so called +build-block. A build-block consists at least of a build-script with instruction how to download, compile and install a dedicated piece of +software, a modulefile and a configuration file.

    +
    +
    +

    To avoid problems with dependencies to system libraries or installed software it is best practice to build modules on dedicated systems. At PSI:

    +
    +
    +
      +
    • +

      For modules which should be able to run on all RHEL7 and newer systems, use the system pmod7.psi.ch. If you need access to the system please contact achim.gsell@psi.ch.

      +
    • +
    • +

      Merlin6 specific modules - like openmpi, mpich and modules depending on them - must be compiled on a Merlin6 login node.

      +
    • +
    • +

      Modules specific for a beamline should be compiled on a Ra login node with RHEL8 or a dedicated RHEL8 beamline system.

      +
    • +
    +
    +
    + + + + + +
    + + +
    +

    If you build a module on RHEL7, it might not run on RHEL8 due to newer versions of system libraries. In must cases this can be solved by installing these system libraries in the module itself and setting the RPATH. The recommended path in this case is $PREFIX/lib/system whereby $PREFIX is the installation prefix of the software.

    +
    +
    +
    +
    +

    In the next section we describe how to write build recipes.

    +
    +
    +
    +

    4.2. Predefined variables

    +
    +

    Since we use BASH for our build-scripts and Tcl for modulefiles, we use BASH/Tcl syntax for variables in this documentation. So, if VARIABLE is the name of a variable, $VARIABLE the value of it.

    +
    +
    +

    In modulefiles and build-scripts the following variables are predefined:

    +
    +
    +
    +
    P
    +
    +

    the name of the module

    +
    +
    V
    +
    +

    the module version. The version number consists of a major- and a minor version number, a patch-level and a release number. All numbers but the major version number are optional. Major-, minor number and patch-level are separated by dots, the release number by a minus. Example: 1.0.3-2

    +
    +
    V_MAJOR
    +
    +

    the major version number. Example: 1

    +
    +
    V_MINOR
    +
    +

    the minor version number. Example: 0

    +
    +
    V_PATCHLVL
    +
    +

    the patch-level. Example: 3

    +
    +
    V_RELEASE
    +
    +

    the release number. Example: 2

    +
    +
    V_PKG
    +
    +

    version number without release.

    +
    +
    GROUP
    +
    +

    group the module is in.

    +
    +
    PREFIX
    +
    +

    installation prefix of the module.

    +
    +
    PMODULES_ROOT
    +
    +

    root of Pmodules installation. At PSI this is /opt/psi.

    +
    +
    +
    +
    +

    In build-scripts the following variables are predefined too:

    +
    +
    +
    +
    TEMP_DIR
    +
    +

    directory for temporary files.

    +
    +
    SRC_DIR
    +
    +

    directory of unpacked sources, set to $PMODULES_TMPDIR/$P-$V/src

    +
    +
    BUILD_DIR
    +
    +

    build directory, set to $PMODULES_TMPDIR/$P-$V/build

    +
    +
    BUILDBLOCK_DIR
    +
    +

    Directory where the build-script is in.

    +
    +
    BUILD_SCRIPT
    +
    +

    Name of the build script.

    +
    +
    SYSTEM,OS
    +
    +

    Can be set with the --system option. The value defaults to the string returned by uname -s. The use of OS is obsolete.

    +
    +
    +
    +
    +

    In modulefiles the following variables are predefined too:

    +
    +
    +
    +
    name
    +
    +

    Same as P (obsolete, for historical reasons).

    +
    +
    version
    +
    +

    Same as V (obsolete, for historical reasons).

    +
    +
    group
    +
    +

    The group the module is member of.

    +
    +
    +
    +
    +
    +

    4.3. Building a Pmodule

    +
    +

    To simplify the building of modules, Pmodules has a simple build system. The build system of Pmodules is far less powerful than the build system of Spack or NixOS, but fulfills its purpose for many modules.

    +
    +
    +

    Perform the following steps for a new Pmodule:

    +
    +
    +
      +
    1. +

      Create a directory with the name of the module.

      +
    2. +
    3. +

      Write the configuration file. See section Writing build configuration files.

      +
    4. +
    5. +

      Write the modulefile. See section Writing modulefiles.

      +
    6. +
    7. +

      Code all required steps to install a software in a script. If it is not possible to script everything, code as much as possible and document additional steps in a README file. See section Writing build scripts.

      +
    8. +
    +
    +
    +

    The first - and sometimes also to most challenging - step in building a Pmodule from source is to learn how to download, configure, compile and install a software package and dependencies the package has. The next steps are writing a configuration file, a modulefile and a script to download, configure, compile and install it.

    +
    +
    +

    In general the following steps needs to be performed:

    +
    +
    +
    +
    prepare
    +
    +

    Download, unpack, apply patches (optional). Downloading the software might not be scriptable due to password protection or other measurements.

    +
    +
    configure
    +
    +

    (only for software distributed as source code) This step heavily depends on the software itself. In many cases autotools or CMake is used, in some cases you have to deal with Makefiles or other tools.

    +
    +
    build
    +
    +

    (only for software distributed as source code) compile/build everything

    +
    +
    install
    +
    +

    Install everything in the target directory. In case of a binary package this might not be scriptable.

    +
    +
    +
    +
    +

    4.3.1. Writing a build configuration file

    +
    + + + + + +
    + + +
    +

    In Pmodules 1.1.22 and newer support for the old ("legacy") +configuration files has been dropped. In the appendix you find the +documentation of tje legacy configuration files for Pmodules 1.0

    +
    +
    +
    +
    +
    +

    4.3.2. The build configuration file

    +
    +

    The build configuration file is written in the YAML format. In the file +most information required to build a module is defined. This includes

    +
    +
    +
      +
    • +

      which versions to build

      +
    • +
    • +

      dependencies to build and run the software in the module

      +
    • +
    • +

      where to download the software

      +
    • +
    • +

      options/arguments how to configure the software for compilation

      +
    • +
    • +

      sub-packages which have to be build and installed in the module +(like git-lfs in the Git module)

      +
    • +
    • +

      the release stage

      +
    • +
    • +

      …​

      +
    • +
    +
    +
    +

    The default path to the configuration file is

    +
    +
    +

    build-recipe-dir/files/config.yaml

    +
    +
    +

    This can be overwritten with the command line option --config-file.

    +
    +
    +
    +

    4.3.3. Format

    +
    +

    The general format of the YAML configuration file is:

    +
    +
    +
    +
    format: 1                              (1)
    +name-1:
    +  type: module | sub_package           (2)
    +  defaults:                            (3)
    +    config-block
    +  shasums:                             (4)
    +    filename-1: sha256sum-1
    +    ...
    +  versions:
    +    version-key-1:
    +      config:                          (5)
    +        config-block
    +      variants:                        (6)
    +        - config-block-1
    +        - ...
    +    ...
    +name-N:
    +  ...
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    1For now the format must be set to 1.
    2Required if type is sub_package.
    3Optional.
    4Optional, but highly recommended!
    5Optional, but then defaults have to be set.
    6Required if there is more than one variant.
    +
    +
    +

    The top-level format of the configuration file is pretty simple:

    +
    +
    +
    +
    format: 1
    +name-1:
    +  config for module 1
    +name-2:
    +  config for module 2
    +...
    +name-N:
    +  config for module N
    +
    +
    + ++++ + + + + + + + + + + + + + + + + +
    Field-NameDescription
    +
    +
    format: 1
    +name_i:
    +  configuration_i
    +
    +
    +

    Format version of the YAML configuration file. For now it must be 1

    +
    +
    +
    format: 1
    +name_i:
    +  configuration_i
    +
    +
    +

    Configuration for the Pmodule name-i. It is good practice to + have one configuration file per module.
    + Example: openmpi

    +
    +
    +

    On the second level of the YAML configuration file is the per module +configuration with the following keys:

    +
    +
    +
    +
      type: module | sub_package
    +  defaults:
    +    config-block
    +  shasums:
    +    filename-1: sha256sum-1
    +    ...
    +  versions:
    +    map with configurations for different versions
    +
    +
    + ++++ + + + + + + + + + + + + + + + + + + + + + + + + +
    Field-NameDescription
    +
    +
      type: module|sub_package
    +  defaults:
    +    default_config
    +  shasums:
    +    SHA256 sums
    +  versions:
    +    ...
    +
    +
    +

    Type of configuration, either module or sub_package.
    + Optional if type is module.

    +
    +
    +
      type: module|sub_package
    +  defaults:
    +    default_config
    +  shasums:
    +    SHA256 sums
    +  versions:
    +    ...
    +
    +
    +

    Default configuration.
    + Optional, but useful to define defaults for the release stage, download URL etc.

    +
    +
    +
      type: module|sub_package
    +  defaults:
    +    default_config
    +  shasums:
    +    SHA256 sums
    +  versions:
    +    ...
    +
    +
    +

    SHA256 hash sums of source files. Keys are filenames, the value the
    + corresponding SHA256 hash sum. This block is optional. A warning is + printed if a hash-sum is missing for a required file.
    + Optional, but highly recommended!

    +
    +
    +
      type: module|sub_package
    +  defaults:
    +    default_config
    +  shasums:
    +    SHA256 sums
    +  versions:
    +    ...
    +
    +
    +

    Configurations for different versions. See table Table 3 + documentation.

    +
    +
    +

    TBW

    +
    + + ++++ + + + + + + + + + + + + + + + + + + + + +
    Table 3 YAML structure to define and configure versions
    Field-NameDescription
    +
    +
    versions:
    +   version_i:
    +    config:
    +      config for version i
    +    variants:
    +      - config for first variant
    +      ...
    +      - config for last variant
    +
    +
    +

    Configurations for this version keys + A version key is a semicolon separated string of version + numbers. Version numbers can be specified with shell brace + expansion. Example:
    + 5.4.{0,1,2,3,4,5,8,9};5.2.{0,4,6,7,8};5.0.0;4.6.3

    +
    +
    +
    versions:
    +  version_i:
    +    config:
    +      config for version i
    +    variants:
    +      - config for first variant
    +      ...
    +      - config for last variant
    +
    +
    +

    Optional, version specific configuration block. Configurations + specified here are overriding the defaults.
    + Optional.

    +
    +
    +
    versions:
    +  version_i:
    +    config:
    +      config for version i
    +    variants:
    +      - config for first variant
    +      ...
    +      - config for last variant
    +
    +
    +

    Variants can be used to compile the some software with different + options. Example: openmpi` with and without Slurm support are + variants of the same software.
    + Optional.

    +
    +
    +
    +

    4.3.4. Configuration blocks

    +
    + + + + + +
    + + +
    +

    In configuration blocks everything is optional!

    +
    +
    +
    +
    +
    config-block
    +
    +
    build_requires: [build-req-1, ...]
    +compile_in_sourcetree: bool
    +configure_with: auto|autotools|cmake
    +default_variant: variant
    +docfiles: [file-1, ...]
    +group: group
    +group_deps:
    +  compilers:
    +    cpmpiler-1: [version-1, ...]
    +  mpi:
    +    mpi-implemation-1: [version-1, ...]
    +  hdf5:
    +    hdf5: [version-1, ...]
    +  hdf5_serial:
    +    hdf5[_serial]: [_version-1, ...]
    +overlay: overlay
    +relstage: release-stage
    +runtime_deps: [rt-dep-1, ...]
    +suffix: suffix
    +systems: [system-1, ...]
    +urls:
    +  - url: link
    +    name: filename
    +  - ...
    +variant: [variant-1, ...]
    +
    +
    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Field-NameTypeDescription

    build_requires

    sequence of string

    +

    Modules required to build this module

    +
    +
    +
    Example
    +
    +
    build_requires:
    +  - pmix/5.0.3
    +  - hwloc/2.11.1
    +  - patchelf/0.14.5
    +
    +

    build_functions

    map

    +

    Functions to build the module. The functions must be defined either in the build script or available. The following keys are allowed:

    +
    +
    +
    +
    prep, configure, comile, install
    +
    +

    sequence of function for each target.

    +
    +
    Default
    +
    +
    prep:
    +  - pbuild::pre_prep
    +  - pbuild::prep
    +  - pbuild::post_prep
    +configure:
    +  - pbuild::pre_configure
    +  - pbuild::configure
    +  - pbuild::post_configure
    +compile:
    +  - pbuild::pre_compile
    +  - pbuild::compile
    +  - pbuild::post_compile
    +install:
    +  - pbuild::pre_install
    +  - pbuild::install
    +  - pbuild::post_install
    +
    +
    +
    +
    +
    +
    +
    Example
    +
    +
    build_functions:
    +  install:
    +    - pbuild::post_install
    +    - post_install_no_slurm
    +
    +

    build_variants

    sequence of strings

    compile_in_sourcetree

    boolean

    +

    Compile in source tree or in a dedicate build directory. The default is false.

    +
    +
    +
    Example
    +
    +
    compile_in_sourcetree: true
    +
    +

    configure_with

    string

    +

    Choose software configuration system. Allowed values are:
    + auto: use autotools if available
    + autotools: use autotools
    + cmake: use cmake
    + Using this key is only required if both configuration systems are supported by the software and you don’t want to use the default (i.e. autotools).

    +
    +
    +
    Example
    +
    +
    configure_with: cmake
    +
    +

    configure_args
    + configure_args+

    sequence of strings

    docfiles
    + docfiles+

    sequence of string

    +

    Array with documentation files to be installed in share/doc/

    +
    +
    +
    Example
    +
    +
    docfiles:
    +  - AUtHORS
    +  - LICENSE
    +  - NEWS
    +  - README
    +
    +

    download_dir

    string

    group

    string

    +

    Group of the module

    +

    group_deps

    group-deps-object

    +

    Group/hierarchical dependencies like compiler, MPI, HDF5 modules

    +

    kernels

    string

    overlay

    string

    +

    Overlay of the module

    +

    patch_files
    + patch_files+

    sequence of strings

    relstage

    string

    +

    Release stage of the module. Allowed values are:
    +unstable: the module is still under development
    +stable: the module is ready to be used
    +deprecated: the module is deprecated
    +remove: the module is deprecated and marked to be removed
    +removed: the module has been removed

    +

    runtime_deps

    sequence of strings

    +

    Module to be loaded at runtime

    +

    suffix

    string

    +

    This string will be added to the version of the module

    +

    systems

    sequence of strings

    +

    A 'system' is either a hostname or OS name like rhel8. For
    + hostnames shell glob pattern matching like merlin-* can be used.

    +

    sub_packages

    map

    target_cpus

    urls

    sequence of links and optional file-names

    +

    Software which must be downloaded to build a specific module.
    + url: Download link
    + name: optional output filename. The filename defaults the last + component of the url.
    + Default URLs can be defined by using the variables P, V, + V_PKG, V_MAJOR, V_MINOR and V_PATCHLVL. Example:
    + https://sourceforge.net/projects/gnuplot/files/$P/$V/$P-${V_PKG}.tar.gz

    +

    use_flags

    sequence of strings

    use_overlays

    sequence of strings

    +
    +
    +

    4.3.5. Examples

    +
    +
    Example: Gnuplot
    +
    +
    format: 1
    +gnuplot:
    +  defaults:                                             (1)
    +    group: Tools                                        (2)
    +    overlay: base                                       (3)
    +    relstage: stable                                    (4)
    +    systems: [rhel8, rhel7, rhel6]                      (5)
    +    docfiles: [Copyright, NEWS, README]                 (6)
    +    urls:                                               (7)
    +      - url: https://sourceforge.net/projects/gnuplot/files/$P/$V/$P-${V_PKG}.tar.gz
    +  shasums:                                              (8)
    +    gnuplot-5.4.10.tar.gz: 975d8c1cc2c41c7cedc4e323aff035d977feb9a97f0296dd2a8a66d197a5b27c
    +    gnuplot-5.4.9.tar.gz: a328a021f53dc05459be6066020e9a71e8eab6255d3381e22696120d465c6a97
    +    gnuplot-5.4.8.tar.gz: 931279c7caad1aff7d46cb4766f1ff41c26d9be9daf0bcf0c79deeee3d91f5cf
    +    gnuplot-5.4.5.tar.gz: 66f679115dd30559e110498fc94d926949d4d370b4999a042e724b8e910ee478
    +    gnuplot-5.4.4.tar.gz: 372300b7867f5b3538b25fc5d0ac7734af6e3fe0d202b6db926e4369913f0902
    +    gnuplot-5.4.3.tar.gz: 51f89bbab90f96d3543f95235368d188eb1e26eda296912256abcd3535bd4d84
    +    gnuplot-5.4.2.tar.gz: e57c75e1318133951d32a83bcdc4aff17fed28722c4e71f2305cfc2ae1cae7ba
    +    gnuplot-5.4.1.tar.gz: 6b690485567eaeb938c26936e5e0681cf70c856d273cc2c45fabf64d8bc6590e
    +    gnuplot-5.4.0.tar.gz: eb4082f03a399fd1e9e2b380cf7a4f785e77023d8dcc7e17570c1b5570a49c47
    +    gnuplot-5.2.8.tar.gz: 60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37
    +    gnuplot-5.2.7.tar.gz: 97fe503ff3b2e356fe2ae32203fc7fd2cf9cef1f46b60fe46dc501a228b9f4ed
    +    gnuplot-5.2.6.tar.gz: 35dd8f013139e31b3028fac280ee12d4b1346d9bb5c501586d1b5a04ae7a94ee
    +    gnuplot-5.2.4.tar.gz: 1515f000bd373aaa53b16183f274189d4f5e0ae47d22f434857933d16a4770cb
    +    gnuplot-5.0.0.tar.gz: 417d4bc5bc914a60409bb75cf18dd14f48b07f53c6ad3c4a4d3cd9a8d7370faf
    +    gnuplot-4.6.3.tar.gz: df5ffafa25fb32b3ecc0206a520f6bca8680e6dcc961efd30df34c0a1b7ea7f5
    +  versions:
    +    5.4.{0,1,2,3,4,5,8,9};5.2.{0,4,6,7,8};5.0.0;4.6.3:  (9)
    +    5.4.10:                                             (10)
    +      config:
    +        relstage: unstable
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    1Configuration is for gnuplot
    2will be installed in the group Tools
    3will be installed in the base overlay (/opt/psi)
    4the default release stage is stable
    5the module is available on these systems
    6install these files to $PREFIX/share/doc/gnuplot
    7download via this link
    8SHA256 hash sums for all available versions
    9no specific configuration required for these versions
    10release stage of version 5.4.10 is still unstable, override +default release stage. +---
    +
    +
    +
    Example: HDF5
    +
    +
    ---
    +# yamllint disable rule:line-length             (1)
    +format: 1
    +hdf5:                                           (2)
    +  defaults:
    +    group: MPI                                  (3)
    +    overlay: base                               (4)
    +    relstage: stable                            (5)
    +    systems: [rhel7, rhel8, rhel9]              (6)
    +    urls:                                       (7)
    +      - url: https://support.hdfgroup.org/ftp/HDF5/releases/$P-${V_MAJOR}.${V_MINOR}/$P-${V_PKG}/src/$P-${V_PKG}.tar.bz2
    +  shasums:                                      (8)
    +    hdf5-1.8.10-patch1.tar.bz2: 292afb3615ad9e68f4d5d18ebb11e4a73f2aece39f2da3875a457ff1e109fc41
    +    hdf5-1.8.12.tar.bz2: 10a369a4fc207bb09245f57c758e587420e06dfc0e445e337a58b0848b75a949
    +    ...
    +    hdf5-1.13.1.tar.bz2: e16973ec893e2d5aa9c8dc73e196db9b99a605578e7317b421c713936f8bf57d
    +
    +  versions:
    +    1.8.12:
    +      config:
    +        relstage: deprecated                    (9)
    +      variants:
    +        -
    +          group_deps:
    +            compiler: {gcc: [4.7.4, 4.8.3, 4.8.4, 4.9.2]}
    +            mpi: {openmpi: [1.6.5, 1.8.2, 1.8.4]}
    +        -
    +          group_deps:
    +            compiler: {gcc: [4.8.2]}
    +            mpi: {openmpi: [1.6.5]}
    +        ...
    +        -
    +          group_deps:
    +            compiler: {gcc: [5.1.0], intel: [15.2, 15.3]}
    +            mpi: {openmpi: [1.8.4]}
    +    ...
    +    1.10.8_slurm:
    +      variants:                                (10)
    +        -
    +          group_deps:
    +            compiler: {gcc: [10.4.0]}
    +            mpi: {openmpi: [4.1.4_slurm]}
    +        -
    +          relstage: unstable
    +          group_deps:
    +            compiler: {gcc: [9.5.0, 10.4.0, 11.4.0, 12.3.0, 13.1.0]}
    +            mpi: {openmpi: [4.1.5_slurm]}
    +    ...
    +    1.12.0:
    +      variants:
    +        -
    +          group_deps:
    +            compiler: {gcc: [7.5.0, 8.4.0, 9.3.0, 10.2.0]}
    +            mpi: {openmpi: [4.0.5]}
    +        -
    +          relstage: unstable
    +          group_deps:
    +            compiler: {pgi: [21.5]}
    +            mpi: {pgi-mpi: [21.5]}
    +
    +    1.13.1:
    +      variants:
    +        -
    +          suffix: _slurm                        (11)
    +          variant: [_slurm]
    +          relstage: unstable
    +          group_deps:
    +            compiler: {gcc: [11.2.0]}
    +            mpi: {openmpi: [4.1.3_slurm]}
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    1disable rule to check line length in yamllint. Default is 80.
    2this configuration is for HDF5
    3default group is MPI.
    4default overlay is base
    5default release stage is stable
    6this build-block can be used on RHEL7, RHEL8 and RHEL9
    7download via this link
    8SHA256 hash sums for all available versions
    9all variants of version 1.8.12 are deprecated
    10hdf5/1.10.8_slurm has two variants. The first variant compiled with GCC 10.4.0 and openmpi/4.1.4_slurm. The second variant is unstable and compiled with with GCC 9.5.0, 10.4.0, 11.4.0, 12.3.0, 13.1.0 and openmpi/4.1.5_slurm.
    11TBW
    +
    +
    +
    +
    +
    +

    4.4. Writing modulefiles

    +
    +

    4.4.1. modulefiles

    +
    +
    4.4.1.1. NAME
    +
    +

    modulefile - files containing Tcl code for the Modules package

    +
    +
    +
    +
    4.4.1.2. DESCRIPTION
    +
    +

    modulefiles are written in the Tool Command Language, Tcl(n) and are +interpreted by the modulecmd program via the module(1) user +interface. modulefiles can be loaded, unloaded, or switched on-the-fly +while the user is working; and can be used to implement site policies +regarding the access and use of applications.

    +
    +
    +

    A modulefile begins with the shebang, ‘#%Pmodule’ or +‘#%Module’. The shebang ‘#%Pmodule’ should be used in modulefiles +using the Pmodules extension. A version number may be placed after +this string. The version number is useful as the modulefile format may +change. If a version number doesn’t exist, then modulecmd will assume +the modulefile is compatible with the latest version. The current +modulefile version is 1.0. Files without the magic cookie will not be +interpreted by modulecmd.

    +
    +
    +

    Each modulefile contains the changes to a user’s environment needed to +access an application. Tcl is a simple programming language which +permits modulefiles to be arbitrarily complex, depending upon the +application’s and the modulefile writer’s needs.

    +
    +
    +

    A typical modulefiles is a simple bit of code that set or add entries +to the PATH, MANPATH, or other environment variables. Tcl has +conditional statements that are evaluated when the modulefile is +loaded. This is very effective for managing path or environment +changes due to different OS releases or architectures. The user +environment information is encapsulated into a single modulefile kept +in a central location. The same modulefile is used by every user on +any machine. So, from the user’s perspective, starting an application +is exactly the same irrespective of the machine or platform they are +on.

    +
    +
    +

    modulefiles also hide the notion of different types of shells. From +the user’s perspective, changing the environment for one shell looks +exactly the same as changing the environment for another shell. This +is useful for new or novice users and eliminates the need for +statements such as "if you’re using the C Shell do this …​, otherwise +if you’re using the Bourne shell do this …​". Announcing and +accessing new software is uniform and independent of the user’s +shell. From the modulefile writer’s perspective, this means one set of +information will take care of every type of shell.

    +
    +
    +
    Module specific commands
    +
    +

    The Pmodules Package uses commands which are extensions to the "standard" Tool Command Language Tcl(n) package.

    +
    +
    + + + + + +
    + + +
    +

    The following commands are Pmodules extensions:

    +
    +
    +
      +
    • +

      module-addgroup

      +
    • +
    • +

      module-url

      +
    • +
    • +

      module-license

      +
    • +
    • +

      module-maintainer

      +
    • +
    +
    +
    +
    +
    +

    Unless otherwise specified, the Module commands return the empty string. Some commands behave differently when a modulefile is loaded or unloaded. The command descriptions assume the modulefile is being loaded.

    +
    +
    +
    +
    break
    +
    +

    This is not a Modules-specific command, it’s actually part of Tcl, which has been overloaded similar to the continue and exit commands to have the effect of causing the module not to be listed as loaded and not affect other modules being loaded concurrently. All non-environment commands within the module will be performed up to this point and processing will continue on to the next module on the command line. The break command will only have this effect if not used within a Tcl loop though.

    +
    +

    An example: Suppose that a full selection of modulefiles are needed for various different architectures, but some of the modulefiles are not needed and the user should be alerted. Having the unnecessary modulefile be a link to the following notavail modulefile will perform the task as required.

    +
    +
    +
    +
    #%Module1.0
    +## notavail modulefile
    +##
    +proc ModulesHelp { } {
    +            puts stderr "This module does nothing but alert the user"
    +            puts stderr "that the [module-info name] module is not available"
    +}
    +
    +module-whatis "Notifies user that module is not available."
    +set curMod [module-info name]
    +if { [ module-info mode load ] } {
    +            puts stderr "Note: '$curMod' is not available for [uname sysname]."
    +}
    +break
    +
    +
    +
    +
    chdir directory
    +
    +

    Set the current working directory to directory.

    +
    +
    continue
    +
    +

    This is not a modules specific command but another overloaded Tcl command and is similar to the break or exit commands except the module will be listed as loaded as well as performing any environment or Tcl commands up to this point and then continuing on to the next module on the command line. The continue command will only have this effect if not used within a Tcl loop though.

    +
    +
    exit [N]
    +
    +

    This is not a modules specific command but another overloaded Tcl command and is similar to the break or continue commands. However, this command will cause the immediate cessation of this module and any additional ones on the command line. This module and the subsequent modules will not be listed as loaded. No environment commands will be performed in the current module.

    +
    +
    setenv variable value
    +
    +

    Set environment variable to value. The setenv command will also change the process' environment. A reference using Tcl’s env associative array will reference changes made with the setenv command. Changes made using Tcl’s env associative array will NOT change the user’s environment variable like the setenv command. An environment change made this way will only affect the module parsing process. The setenv command is also useful for changing the environment prior to the exec or system command. When a modulefile is unloaded, setenv becomes unsetenv. If the environment variable had been defined it will be overwritten while loading the modulefile. A subsequent unload will unset the environment variable - the previous value cannot be restored! (Unless you handle it explicitly …​ see below.)

    +
    +
    unsetenv variable [value]
    +
    +

    Unsets environment variable. However, if there is an optional value, then when unloading a module, it will set variable to value. The unsetenv command changes the process' environment like setenv.

    +
    +
    append-path|prepend-path [-d C|--delim C|--delim=C] variable value
    +
    +

    Append or prepend value to environment variable. The variable is a colon, or delimiter, separated list such as PATH=directory:directory:directory. The default delimiter is a colon ':', but an arbitrary one can be given by the --delim option. For example a space can be used instead (which will need to be handled in the Tcl specially by enclosing it in " " or { }). A space, however, can not be specified by the --delim=C form.

    +
    +

    If the variable is not set, it is created. When a modulefile is unloaded, append-path and prepend-path become remove-path.

    +
    +
    +
    remove-path [-d C|--delim C|--delim=C] variable value
    +
    +

    Remove value from the colon, or delimiter, separated list in variable. See prepend-path or append-path for further explanation of using an arbitrary delimiter. Every string between colons, or delimiters, in variable is compared to value. If the two match, value is removed from variable.

    +
    +
    prereq|conflict modulefile…​
    +
    +

    prereq and conflict control whether or not the modulefile will be loaded. The prereq command lists modulefiles which must have been previously loaded before the current modulefile will be loaded. Similarly, the conflict command lists modulefiles which conflict with the current modulefile. If a list contains more than one modulefile, then each member of the list acts as a Boolean OR operation. Multiple prereq and conflict commands may be used to create a Boolean AND operation. If one of the requirements have not been satisfied, an error is reported and the current modulefile makes no changes to the user’s environment.

    +
    +
    +
    +
    +

    If an argument for prereq is a directory and any modulefile from the directory has been loaded, then the prerequisite is met. For example, specifying X11 as a prereq means that any version of X11, X11/R4 or X11/R5, must be loaded before proceeding.

    +
    +
    +

    If an argument for conflict is a directory and any other modulefile from that directory has been loaded, then a conflict will occur. For example, specifying X11 as a conflict will stop X11/R4 and X11/R5 from being loaded at the same time.

    +
    +
    +
    +
    is-loaded modulefile…​
    +
    +

    The is-loaded command returns a true value if any of the listed modulefiles has been loaded. If a list contains more than one modulefile, then each member acts as a boolean OR operation. If an argument for is-loaded is a directory and any modulefile from the directory has been loaded is-loaded would return a true value.

    +
    +
    module [sub-command] [sub-command-args]
    +
    +

    Contains the same sub-commands as described in the module(1) man page in the Module Sub-Commands section. This command permits a modulefile to load or unload other modulefiles. No checks are made to ensure that the modulefile does not try to load itself. Often it is useful to have a single modulefile that performs a number of module load commands. For example, if every user on the system requires a basic set of applications loaded, then a core modulefile would contain the necessary +module load commands.

    +
    +
    module-info mode [modetype]
    +
    +

    Returns the current modulecmd’s mode as a string if no modetype is given.

    +
    +

    Returns 1 if modulecmd’s mode is modetype. modetype can be: load, unload, remove, switch, display, help, test or whatis.

    +
    +
    +
    module-info name
    +
    +

    Return the name of the modulefile. This is not the full pathname for modulefile. See the Modules Variables section for information on the full pathname.

    +
    +
    module-info specified
    +
    +

    Return the name of the modulefile specified on the command line.

    +
    +
    module-info shell [shellname]
    +
    +

    Return the current shell under which modulecmd.tcl was invoked if no shellname is given. The current shell is the first parameter of modulecmd.tcl, which is normally hidden by the module alias.

    +
    +

    If a shellname is given, returns 1 if modulecmd.tcl’s current shell is shellname, returns 0 elsewhere. shellname can be: sh, bash, ksh, zsh, csh, tcsh, fish, tcl, perl, python, ruby, lisp, cmake, r.

    +
    +
    +
    module-info shelltype [shelltypename]
    +
    +

    Return the family of the shell under which modulefile was invoked if no shelltypename is given. As of module-info shell this depends on the first parameter of modulecmd.tcl. The output reflects a shell type determining the shell syntax of the commands produced by modulecmd.tcl.

    +
    +

    If a shelltypename is given, returns 1 if modulecmd.tcl’s current shell type is shelltypename, returns 0 elsewhere. shelltypename can be: sh, csh, fish, tcl, perl, python, ruby, lisp, cmake, r.

    +
    +
    +
    module-info alias name
    +
    +

    Returns the full modulefile name to which the modulefile alias name is assigned

    +
    +
    module-info version modulefile
    +
    +

    Returns the physical module name and version of the passed symbolic version modulefile. The parameter modulefile might either be a full qualified modulefile with name and version, another symbolic modulefile name or a modulefile alias.

    +
    +
    module-info symbols modulefile
    +
    +

    Returns a list of all symbolic versions assigned to the passed modulefile. The parameter modulefile might either be a full qualified modulefile with name and version, another symbolic modulefile name or a modulefile alias.

    +
    +
    module-version modulefile version-name…​
    +
    +

    Assigns the symbolic version-name to the modulefile. This command should be placed in one of the modulecmd.tcl rc files in order to provide shorthand invocations of frequently used modulefile names.

    +
    +

    The special version-name default specifies the default version to be used for module commands, if no specific version is given. This replaces the definitions made in the .version file in former modulecmd releases.

    +
    +
    +

    The parameter modulefile may be either +* a fully or partially qualified modulefile with name / version. If name is '.' then the current directory name is assumed to be the module name. (Use this for deep modulefile directories.) +* a symbolic modulefile name +* another modulefile alias

    +
    +
    +
    module-alias name modulefile
    +
    +

    Assigns the modulefile to the alias name. This command should be placed in one of the modulecmd rc files in order to provide shorthand invocations of frequently used modulefile names.

    +
    +

    The parameter modulefile may be either

    +
    +
    +
      +
    • +

      a fully qualified modulefile with name and version

      +
    • +
    • +

      a symbolic modulefile name

      +
    • +
    • +

      another modulefile alias

      +
    • +
    +
    +
    +
    module-whatis string
    +
    +

    Defines a string which is displayed in case of the invocation of the module whatis command. There may be more than one module-whatis line in a modulefile. This command takes no actions in case of load, display, etc. invocations of modulecmd.

    +
    +

    The string parameter has to be enclosed in double-quotes if there’s more than one word specified. Words are defined to be separated by white-space characters (space, tab, cr).

    +
    +
    +
    module-url url
    +
    +

    Sets an URL which is displayed in case of the invocation of the module help command. The URL should point to the home-page of the software loaded by the module if any.

    +
    +
    module-license string
    +
    +

    Defines a string which is displayed in case of the invocation of the module help command. The string should either be the name of a well known license (like GPL V2) or a filename with the license text installed in the module.

    +
    +
    module-maintainer email
    +
    +

    Defines a string which is displayed in case of the invocation of the module help command. The +string should be the email address of the module maintainer.

    +
    +
    module-addgroup group
    +
    +

    Add the hierarchical group group to MODULEPATH.

    +
    +
    set-alias alias-name alias-string
    +
    +

    Sets an alias or function with the name alias-name in the user’s environment to the string alias-string. For some shells, aliases are not possible and the command has no effect. When a modulefile is unloaded, set-alias becomes unset-alias.

    +
    +
    unset-alias alias-name
    +
    +

    Unsets an alias with the name alias-name in the user’s environment.

    +
    +
    system string
    +
    +

    Pass string to the Tcl built-in command exec(n). For the exec(n) call modulecmd redirects stdout to stderr since stdout would be parsed by the evaluating shell. The exit status of the executed command is returned.

    +
    +
    uname field
    +
    +

    Provide lookup of system information. Most field information are retrieved from the tcl_platform array (see tclvars(n) man page). Uname will return the string "unknown" if information is unavailable for the field.

    +
    +

    uname will invoke uname(1) command in order to get the operating system version and domainname(1) to figure out the name of the domain.

    +
    +
    +

    field values are: +* sysname: the operating system name +* nodename: the hostname +* domain: the name of the domain +* release: the operating system release +* version: the operating system version +* machine: a standard name that identifies the system’s hardware

    +
    +
    +
    x-resource [resource-string|filename]
    +
    +

    Merge resources into the X11 resource database. The resources are used to control look and behavior of X11 applications. The command will attempt to read resources from filename. If the argument isn’t a valid file name, then string will be interpreted as a resource. Either filename or resource-string is then passed down to be xrdb(1) command.

    +
    +

    modulefiles that use this command, should in most cases contain one or more x-resource lines, each defining one X11 resource. The DISPLAY environment variable should be properly set and the X11 server should be accessible. If x-resource can’t manipulate the X11 resource database, the modulefile will exit with an error message.

    +
    +
    +

    Examples:

    +
    +
    +
    +
    +
    +
    +
    x-resource /u2/staff/leif/.xres/Ileaf
    +
    +
    +
    +

    The content of the Ileaf file is merged into the X11 resource database.

    +
    +
    +
    +
    x-resource [glob ~/.xres/ileaf]
    +
    +
    +
    +

    The Tcl glob function is used to have the modulefile read different resource files for different users.

    +
    +
    +
    +
    x-resource {Ileaf.popup.saveUnder: True}
    +
    +
    +
    +

    Merge the Ileaf resource into the X11 resource database.

    +
    +
    +
    +
    Modules Variables
    +
    +

    The ModulesCurrentModulefile variable contains the full pathname of the modulefile being interpreted.

    +
    +
    +
    +
    Locating Modulefiles
    +
    +

    Every directory in MODULEPATH is searched to find the modulefile. A directory in MODULEPATH can have an arbitrary number of sub-directories. If the user names a modulefile to be loaded which is actually a directory, the directory is opened and a search begins for an actual modulefile. First, modulecmd looks for a file with the name .modulerc in the directory. If this file exists, its contents will be evaluated as if it was a modulefile to be loaded. You may place module-version and module-alias commands inside this file.

    +
    +
    +

    Additionally, before seeking for .modulerc files in the module directory, the global modulerc file is sourced, too. If a named version default now exists for the modulefile to be loaded, the assigned modulefile now will be sourced. Otherwise the file .version is looked up in the directory.

    +
    +
    +

    If the .version file exists, it is opened and interpreted as Tcl code and takes precedence over a .modulerc file in the same directory. If the Tcl variable ModulesVersion is set by the .version file, modulecmd will use the name as if it specifies a modulefile in the directory. This will become the default modulefile in this case.

    +
    +
    +

    If ModulesVersion is a directory, the search begins anew down that directory. If the name does not match any files located in the current directory, the search continues through the remaining directories in MODULEPATH.

    +
    +
    +

    Every .version and .modulerc file found is Tcl interpreted. The difference is that .version only applies to the current directory, and the .modulerc applies to the current directory and all subdirectories. Changes made in these files will affect the subsequently interpreted modulefile.

    +
    +
    +

    If no default version may be figured out, then the highest numerically sorted modulefile or module alias under the directory will be used. The dictionary comparison method of the lsort(n) Tcl command is used to achieve this sort. If highest numerically sorted element is an alias, search continues on its modulefile target.

    +
    +
    +

    For example, it is possible for a user to have a directory named X11 which simply contains a .version file specifying which version of X11 is to be loaded. Such a file would look like:

    +
    +
    +
    +
    #%Module1.0
    +##
    +##  The desired version of X11
    +##
    +set ModulesVersion "R4"
    +
    +
    +
    +

    The equivalent .modulerc would look like:

    +
    +
    +
    +
    #%Module1.0
    +##
    +##  The desired version of X11
    +##
    +module-version "./R4" default
    +
    +
    +
    +

    If user names a modulefile that cannot be found in the first modulepath directory, modulefile will be searched in next modulepath directory and so on until a matching modulefile is found. If search goes through a module alias or a symbolic version, this alias or symbol is resolved by first looking at the modulefiles in the modulepath where this alias or symbol is defined. If not found, resolution looks at the other modulepaths in their definition order.

    +
    +
    +

    When locating modulefiles, if a .modulerc, a .version, a directory or a modulefile cannot be read during the search it is simply ignored with no error message produced. Visibility of modulefiles can thus be adapted to the rights the user has been granted. Exception is made when trying to directly access a directory or a modulefile. In this case, the access issue is returned as an error message.

    +
    +
    +

    A modulefile whose name or element in its name starts with a '.' dot is considered hidden. Hidden modulefile is not displayed or taken into account except if it is explicitly named. By inheritance, a symbolic version-name assigned to a hidden modulefile is displayed or taken into account only if explicitly named. Module alias targeting a hidden modulefile appears like any other module alias.

    +
    +
    +
    +
    Modulefile Specific Help
    +
    +

    Users can request help about a specific modulefile through the module(1) command. The modulefile can print helpful information or start help oriented programs by defining a ModulesHelp subroutine. The subroutine will be called when the module help modulefile command is used.

    +
    +
    +
    +
    Modulefile Specific Test
    +
    +

    Users can request test of a specific modulefile through the module(1) command. The modulefile can perform some sanity checks on its definition or on its underlying programs by defining a ModulesTest subroutine. The subroutine will be called when the module test modulefile command is used. The subroutine should return 1 in case of success. If no or any other value is returned, test is considered failed.

    +
    +
    +
    +
    Modulefile Display
    +
    +

    The module display modulefile command will detail all changes that will be made to the environment. After displaying all of the environment changes modulecmd.tcl will call the ModulesDisplay subroutine. The ModulesDisplay subroutine is a good place to put additional descriptive information about the modulefile.

    +
    +
    +
    +
    +
    4.4.1.3. ENVIRONMENT
    +
    +
    +
    MODULEPATH
    +
    +

    Path of directories containing modulefiles.

    +
    +
    +
    +
    +
    +
    4.4.1.4. SEE ALSO
    +
    +

    module(1), Tcl(n), TclX(n), xrdb(1), exec(n), uname(1), domainname(1), tclvars(n), lsort(n)

    +
    +
    +
    +
    4.4.1.5. NOTES
    +
    +

    Tcl was developed by John Ousterhout at the University of California at Berkeley.

    +
    +
    +

    TclX was developed by Karl Lehenbauer and Mark Diekhans.

    +
    +
    +

    Modules is covered by the GNU General Public License, version 2 and the GNU Lesser General Public License, version 2.1. Copyright © 1996-1999 John L. Furlani & Peter W. Osel, © 1998-2017 R.K.Owen, © 2002-2004 Mark Lakata, © 2004-2017 Kent Mein, © 2016-2017 Xavier Delaruelle. All rights reserved. Trademarks used are the property of their respective owners.

    +
    +
    +
    +
    +
    +
    +

    4.5. Writing build scripts

    +
    +

    Pmodules has it’s own 'interpreter' to run build-scripts written in Bash. The name of the interpreter is modbuild. Thus the first line (the so called 'shebang') of a build-script must be

    +
    +
    +
    +
    #!/usr/bin/env modbuild
    +
    +
    +
    +

    As already mentioned the four steps 'prepare', 'configure', 'build' and 'install' has to be performed to build a Pmodule. These steps maps to the functions:

    +
    +
    +
    +
    prepare
    +
    +

    pbuild::pre_prep()
    +pbuild::prep()
    +pbuild::post_prep()

    +
    +
    configure
    +
    +

    pbuild::pre_configure()
    +pbuild::configure()
    +pbuild::post_configure()

    +
    +
    compile
    +
    +

    pbuild::pre_compile()
    +pbuild::compile()
    +pbuild::post_compile()

    +
    +
    install
    +
    +

    pbuild::pre_install()
    +pbuild::install()
    +pbuild::post_install()

    +
    +
    +
    +
    +

    In many cases you don’t have to implement the the functions pbuild::prep(), pbuild::configure(), pbuild::compile() and pbuild::install() or at least not all of them. The build-system provides default implementations for these functions. In the simplest case, the build script consists only of the shebang line (only for Pmodules >= 1.1). In this case all further information for building the module is in the configuration file. For software that uses autotools or CMake for configuration and creation of Makefiles, the standard functions can practically always be used. The functions pbuild::pre_STEP and pbuild::post_STEP can be used to hook into each step before and after the default function has been called. For example pbuild::pre_configure() can be used to set arguments for autotools or CMake as in the build-script for Gnuplot:

    +
    +
    +
    Example: build script for Gnuplot
    +
    +
    #!/usr/bin/env modbuild
    +
    +pbuild::pre_configure() {
    +        pbuild::add_configure_args '--with-latex=no'
    +        pbuild::add_configure_args '--with-qt=no'
    +}
    +
    +
    +
    +

    4.5.1. Overloading the default implementations

    +
    +

    If the build-system of the software package isn’t autotools or CMake you have to overload the default implementation of pbuild::configure.

    +
    +
    +
    +
    pbuild::configure(){
    +        # add code to configure the software package
    +}
    +
    +
    +
    +

    In case where no configuration is required, overload the default function with

    +
    +
    +
    +
    pbuild::configure(){
    +        : # do nothing
    +}
    +
    +
    +
    +

    You can do the same with the other default implementation.

    +
    +
    +
    +

    4.5.2. Modules from binary packages

    +
    +

    If you have a binary package like Matlab, Mathematica, ANSYS, it might not be possible to script the installation. In this case you should use a dummy build-script like below and document the installation in a README.md:

    +
    +
    +
    +
    #!/usr/bin/env modbuild
    +
    +pbuild::prep() { :; }
    +pbuild::configure() { :; }
    +pbuild::compile() { :; }
    +pbuild::install() { :; }
    +
    +
    +
    +

    If the installation can be scripted, code this in the function pbuild::install.

    +
    +
    +
    +
    #!/usr/bin/env modbuild
    +
    +pbuild::prep() { :; }
    +pbuild::configure() { :; }
    +pbuild::compile() { :; }
    +pbuild::install() {
    +        # add code to call the installer here
    +}
    +
    +
    +
    +
    +

    4.5.3. Calling the build-script

    +
    +

    To call the build-script, cd into the directory of the script and run

    +
    +
    +
    +
    ./build VERSION_TO_BE_BUILD
    +
    +
    +
    +
    Example with output
    +
    +
    pmod7:~/HelloWorld$ ./build 1.0.0
    +Using YAML configuration file - /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml
    +HelloWorld/1.0.0: building ...
    +HelloWorld/1.0.0:
    +HelloWorld/1.0.0: start building ...
    +HelloWorld/1.0.0: preparing sources ...
    +HelloWorld/1.0.0: configuring ...
    +HelloWorld/1.0.0: compiling ...
    +HelloWorld/1.0.0: installing ...
    +HelloWorld/1.0.0: running post-installation for Linux ...
    +HelloWorld/1.0.0: Installing documentation to /opt/psi/Sandbox/HelloWorld/1.0.0/share/doc/HelloWorld
    +HelloWorld/1.0.0: adding modulefile to overlay 'base' ...
    +HelloWorld/1.0.0: Cleaning up '/var/tmp/gsell/HelloWorld-1.0.0/build'...
    +HelloWorld/1.0.0: Cleaning up '/var/tmp/gsell/HelloWorld-1.0.0/src'...
    +HelloWorld/1.0.0: Done ...
    +* * * * *
    +
    +pmod7:~/HelloWorld$
    +
    +
    +
    +

    You can run

    +
    +
    +
    +
    ./build --help
    +
    +
    +
    +

    to get a list of all option with a description. The most common option are

    +
    +
    +
    +
    -f
    +
    +

    to force a rebuild.

    +
    +
    --clean-install
    +
    +

    remove everything in the build directory and the module itself - if already exists - as first step.

    +
    +
    --verbose
    +
    +

    to see more verbose output.

    +
    +
    --debug
    +
    +

    to get a full debug trace.

    +
    +
    +
    +
    +
    +

    4.5.4. Setup functions

    +
    +
    4.5.4.1. Adding patches to be applied: pbuild::add_patch
    +
    +
    Synopsis
    +
    +
    +
    pbuild::add_patch patch_fname [strip_num_dirs]
    +
    +
    +
    +
    +
    Description
    +
    +

    Apply a patch to the unpacked sources. The argument patch_fname must be a relative file-name to the build-block directory. The argument strip_num_dirs is optional and defaults to 1. Please read the patch(1) manual page for more details. The patches are applied inside the source directory with the command:

    +
    +
    +
    +
    patch --strip=strip_num_dirs < "${BUILDBLOCK_DIR}/patch_fname"
    +
    +
    +
    +
    +
    Example
    +
    +
    +
    pbuild::pre_prep(){
    +        pbuild::add_patch 'files/Makefile.pncf.sed.patch'
    +}
    +
    +
    +
    +
    +
    +
    +
    4.5.4.2. Set configuration options: pbuild::add_configure_args
    +
    +
    Synopsis
    +
    +
    +
    pbuild::add_configure_args arg...
    +
    +
    +
    +
    +
    Description
    +
    +

    Add arguments/options to the call of configure or cmake.

    +
    +
    +
    +
    Example
    +
    +

    autotools:

    +
    +
    +
    +
    pbuild::pre_configure(){
    +        pbuild::add_configure_args "--disable-shared"
    +        pbuild::add_configure_args "CFLAGS=-fPIC"
    +}
    +
    +
    +
    +

    CMake:

    +
    +
    +
    +
    pbuild::pre_configure(){
    +        pbuild::add_configure_args "-DMETIS_PATH=${SRC_DIR}/metis"
    +        pbuild::add_configure_args "-DGKLIB_PATH=${SRC_DIR}/metis/GKlib"
    +}
    +
    +
    +
    +
    +
    +
    +
    +

    4.5.5. Functions to compare versions

    +
    +
    4.5.5.1. Compare two versions: pbuild::version_compare
    +
    +
    Synopsis
    +
    +
    +
    pbuild::version_compare VERSION1 VERSION2
    +pbuild::version_lt VERSION1 VERSION2
    +pbuild::version_le VERSION1 VERSION2
    +pbuild::version_gt VERSION1 VERSION2
    +pbuild::version_ge VERSION1 VERSION2
    +pbuild::version_eq VERSION1 VERSION2
    +
    +
    +
    +
    +
    Description
    +
    +

    The function splits the version strings at the dots an compares each component. If a component is a number the comparison is numerical otherwise lexical.

    +
    +
    +

    pbuild::version_compare VERSION1 VERSION2 returns
    + 0 if the versions are equal
    + 1 if VERSION1 is higher then VERSION2
    + 2 if VERSION1 is lower then VERSION2

    +
    +
    +

    pbuild::version_lt VERSION1 VERSION2 returns
    +0 if VERSION1 is lower then VERSION2 otherwise a values greater than zero.

    +
    +
    +

    pbuild::version_le VERSION1 VERSION2 returns
    +0 if VERSION1 is lower then or equal to VERSION2 otherwise a values greater than zero.

    +
    +
    +

    pbuild::version_gt VERSION1 VERSION2 returns
    +0 if VERSION1 is higher then VERSION2 otherwise a values greater than zero.

    +
    +
    +

    pbuild::version_ge VERSION1 VERSION2 returns
    +0 if VERSION1 is higher then or equal to VERSION2 otherwise a values greater than zero.

    +
    +
    +

    pbuild::version_eq VERSION1 VERSION2 returns
    +0 if VERSION1 is equal to VERSION2 otherwise a values greater than zero.

    +
    +
    +
    +
    Example
    +
    +
    +
    pbuild::version_lt '1.1.0' '1.2.2'  # result is 0
    +pbuild::version_ge '9.1.2' '10.0.0' # result is greater zero
    +
    +
    +
    +
    +
    +
    +

    4.5.6. Build functions

    +
    +
    4.5.6.1. Download and unpack: pbuild::prep
    +
    +
    Synopsis
    +
    +
    +
    pbuild::pre_prep
    +pbuild::prep
    +pbuild::post_prep
    +
    +
    +
    +
    +
    Description
    +
    +

    Functions to prepare the sources. This includes

    +
    +
    +
      +
    • +

      downloading required files a verifying the checksums

      +
    • +
    • +

      unpacking

      +
    • +
    • +

      applying patches

      +
    • +
    +
    +
    +

    Before the prep-functions are called, the build-system changes to the source +directory (${SRC_DIR}).

    +
    +
    +

    In the most uses cases the default function pbuild::prep provided by +the build-system can be used and nothing must be implemented in the +build-script. In some rare cases pre- or post-hooks are required to +make the default function feasible. One use case with autotools for a post-hook is to create the configure scripts, if only configure.ac is shipped with the software.

    +
    +
    +

    The default hooks provided by the build system are only stubs and do +nothing.

    +
    +
    +

    If the default function cannot be used, it must be implemented in the build-script.

    +
    +
    +
    +
    Example
    +
    +

    The source distribution of the IOAPI library contains object files! These files must be removed after unpacking:

    +
    +
    +
    +
    pbuild::post_prep() {
    +        find "${SRC_DIR}" -name "*.mod" -exec rm {} \;
    +        find "${SRC_DIR}" -name "*.o" -exec rm {} \;
    +}
    +
    +
    +
    +
    +
    +
    +
    4.5.6.2. Configure software: pbuild::configure
    +
    +
    Synopsis
    +
    +
    +
    pbuild::pre_configure
    +pbuild::configure
    +pbuild::post_configure
    +
    +
    +
    +
    +
    Description
    +
    +

    Configure the software for compilation.

    +
    +
    +

    Before these functions are called, the build-system changes to the +build directory (${BUILD_DIR}).

    +
    +
    +

    In the most uses cases the default function pbuild::configure provided by +the build-system can be used and nothing must be implemented in the +build-script.

    +
    +
    +

    The default function first searches whether the software can be +configured with autotools. If yes, configuration with autotools will +be performed. Otherwise the existence of a CMake script will be +checked. If found, configuration will be done via CMake. If scripts +for both configuration tools exist, the to be used tool can be +selected with pbuild::use_autotools or +pbuild::use_cmake. Arguments to configure or +cmake can be set with +pbuild::add_configure_args.

    +
    +
    +

    A common use case for the pre-configure hooks is to define arguments +passed to autotools or CMake by the default function.

    +
    +
    +

    If the default function cannot be used, the pbuild::configure +function must be implemented in the build-script.

    +
    +
    +
    +
    Examples
    +
    +

    Excerpt from the parallel HDF5 build-script

    +
    +
    +
    +
    pbuild::pre_configure() {
    +        pbuild::add_configure_args "CC=${MPICC}"
    +        pbuild::add_configure_args "CXX=${MPICXX}"
    +
    +        pbuild::add_configure_args "--enable-shared"
    +        pbuild::add_configure_args "--enable-parallel"
    +        pbuild::add_configure_args "--enable-cxx"
    +        pbuild::add_configure_args "--enable-unsupported"
    +        #pbuild::add_configure_args "--enable-threadsafe"
    +        pbuild::add_configure_args "--with-pic"
    +
    +        local enable_fortran='yes'
    +
    +        case "${COMPILER}" in
    +                clang-macos )
    +                        enable_fortran='no'
    +                        # we do not have Fortran in Xcode
    +                        ;;
    +                pgi )
    +                        # PGI uses GCC's include files, some object files and
    +                        # the STL implementation!
    +                        # The PGI C pre-processor is broken and doesn't work
    +                        # for HDF5. We use the pre-processor of the underlying
    +                        # GCC...
    +                        # This is a bit hackish!
    +                        #
    +                        # The following eval sets GCCDIR! Which is something
    +                        # like:
    +                        # /opt/psi/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0
    +                        #
    +                        eval $(pgcc -show 2>/dev/null | \
    +                                awk '/^GCCDIR[[:space:]]*=/{gsub(/[[:space:]]/,""); print $0}')
    +                        pbuild::add_configure_args "CPP=${GCCDIR%%/..*}/cpp"
    +                        pbuild::add_configure_args "CFLAGS=-fPIC"
    +                        pbuild::add_configure_args "CXXFLAGS=-fPIC"
    +                        pbuild::add_configure_args "FCFLAGS=-fPIC"
    +                        ;;
    +        esac
    +
    +        if [[ "${enable_fortran}" ===== 'yes' ]]; then
    +                pbuild::add_configure_args "F77=${MPIF77}"
    +                pbuild::add_configure_args "F90=${MPIF90}"
    +                pbuild::add_configure_args "FC=${MPIFC}"
    +                pbuild::add_configure_args "FORTRAN=${MPIFORTRAN}"
    +                pbuild::add_configure_args "--enable-fortran"
    +        fi
    +
    +
    +
    +

    Simplified excerpt from the OpenBLAS build-script

    +
    +
    +
    +
    pbuild::configure() {
    +        case ${COMPILER} in
    +        gcc )
    +                CC='gcc'
    +                ;;
    +        intel )
    +                CC='icc'
    +                ;;
    +        clang-macos )
    +                CC='gcc'
    +                ;;
    +        * )
    +                die 3 "Oops: unknown compiler: ${COMPILER}"
    +                ;;
    +        esac
    +        cat <<EOF > "${SRC_DIR}/make.inc"
    +SHELL = /bin/sh
    +PLAT =
    +DRVOPTS  = \$(NOOPT)
    +ARCHFLAGS= -ru
    +EOF
    +        echo "USE_SIMPLE_THREADED_LEVEL3 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX2 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        if pbuild::use_flag "omp"; then
    +                echo "USE_THREAD = 1" >> "${SRC_DIR}/Makefile.rule"
    +        else
    +                echo "USE_THREAD = 0" >> "${SRC_DIR}/Makefile.rule"
    +        fi
    +}
    +
    +
    +
    +
    +
    +
    +
    4.5.6.3. Compile software: pbuild::compile
    +
    +
    Synopsis
    +
    +
    +
    pbuild::pre_compile
    +pbuild::compile
    +pbuild::post_compile
    +
    +
    +
    +
    +
    Description
    +
    +

    Compile the software.

    +
    +
    +

    Before these functions are called, the build-system changes to the +build directory (${BUILD_DIR}).

    +
    +
    +

    In the most uses cases the default function pbuild::compile provided by +the build-system can be used and nothing must be implemented in the +build-script. The pre- and post-hooks might be useful in cases where

    +
    +
    +
      +
    • +

      to run other make targets than all

      +
    • +
    • +

      multiple packages must be compiled into one module

      +
    • +
    • +

      to compile a dependency required by the main package.

      +
    • +
    +
    +
    +

    If the default function cannot be used, the pbuild::compile +function must be implemented in the build-script.

    +
    +
    +
    +
    Example
    +
    +

    Excerpt from perl build-script

    +
    +
    +
    +
    pbuild::post_compile() {
    +        make test
    +}
    +
    +
    +
    +
    +
    +
    +
    4.5.6.4. Install software: pbuild::install
    +
    +
    Synopsis
    +
    +
    +
    pbuild::pre_install
    +pbuild::install
    +pbuild::post_install
    +
    +
    +
    +
    +
    Description
    +
    +

    Compile the software.

    +
    +
    +

    Before these functions are called, the build-system changes to the +build directory (${BUILD_DIR}).

    +
    +
    +

    In the many uses cases the default function pbuild::install provided by +the build-system can be used and nothing must be implemented in the +build-script. A typical use case for the post-install hook is to install required libraries from other modules or the system to reduce or eliminate run-time dependencies

    +
    +
    +

    If the default function cannot be used, the pbuild::install +function must be implemented in the build-script.

    +
    +
    +
    +
    Example
    +
    +
    +
    TBW
    +
    +
    +
    +
    +
    +
    +
    +

    4.6. Runtime configuration files

    +
    +

    Table of Contents
    +Pmodules 1.0 configuration file .release-version
    +Pmodules 1.1 and newer configuration file .config-version

    +
    +
    + + + + + +
    + + +
    +

    The runtime configuration files are evaluated only for modules inside +the Pmodules hierarchy. If you use modbuild these files are created +automatically. Otherwise you have to create them by hand.

    +
    +
    +
    +
    +

    4.6.1. Pmodules 1.0: .release-version

    +
    +

    In .release-version the release stage of a module is +defined. The file must be in the same directory as the modulefile. The +content is a single line defining the release stage. Allowed text is

    +
    +
    +
      +
    • +

      unstable

      +
    • +
    • +

      stable

      +
    • +
    • +

      deprecated

      +
    • +
    +
    +
    +

    If the file doesn’t exist and the module is inside the Pmodule +hierarchy unstable. All modules outside the Pmodules hierarchy are +considered as stable.

    +
    +
    + + + + + +
    + + +
    +

    This configuration file is deprecated in version 1.1 and newer. Please +see next section.

    +
    +
    +
    +
    +
    +

    4.6.2. Pmodules 1.1 and newer: .config-version

    +
    +

    In .config-version the following properties of a module can be +configured:

    +
    +
    +
      +
    • +

      the release stage

      +
    • +
    • +

      the systems on which a module is available

      +
    • +
    • +

      the systems on which a module is unavailable

      +
    • +
    +
    +
    +

    The format of the file is YAML.

    +
    +
    +
    +
    relstage
    +
    +

    The release stage of the module. Allowed values are +unstable, stable and deprecated.

    +
    +
    systems
    +
    +

    Sequence of systems on which the module is available. Systems +can be hostnames with shell style glob pattern or OS names like +(rhel7, rhel8).

    +
    +
    blocklist
    +
    +

    Sequence of systems on which the module is no +available. Systems can be hostnames with shell style glob patterns or +OS names.

    +
    +
    +
    +
    +

    Example:

    +
    +
    +
    +
    relstage: unstable
    +systems: [merlin-*, ra-*]
    +blocklist: []
    +
    +
    +
    +
    +
    +

    Appendix A: "legacy" configuration files in Pmodules 1.0

    +
    + + + + + +
    + + +
    +

    These type of configuration file is deprecated in version 1.1 and +newer. Starting with version 1.2 the use of YAML configuration files +documented in the next section is recommended.

    +
    +
    +
    +
    +

    In the Pmodules 1.0 configuration files the following properties are +defined per version:

    +
    +
    +
      +
    • +

      module name and version

      +
    • +
    • +

      release stage

      +
    • +
    • +

      dependencies

      +
    • +
    +
    +
    +

    Each definition must be on a single line.

    +
    +
    +

    4.A.1. Configuration filenames and search order

    +
    +

    Configuration files are searched in the following order:

    +
    +
    +
      +
    1. +

      build-recipe-dir/files/variants.system

      +
    2. +
    3. +

      build-recipe-dir/files/variants.OS

      +
    4. +
    5. +

      build-recipe-dir/files/variants

      +
    6. +
    +
    +
    +

    Whereby

    +
    +
    +
    +
    system
    +
    +

    If the build script is called with the option +-system=sytem, this configuration file is used.

    +
    +
    OS
    +
    +

    Is the operating system/kernel name returned by uname +-s. On Linux this is Linux on macOS this is Darwin.

    +
    +
    +
    +
    +
    +

    4.A.2. Format

    +
    +

    A line in a configuration file is either

    +
    +
    +
      +
    • +

      a comment line starting with #

      +
    • +
    • +

      a empty line or a with white-space only

      +
    • +
    • +

      a definition of a variant

      +
    • +
    +
    +
    +
    +

    4.A.3. Variant specifications

    +
    +

    The form of a variant specification is

    +
    +
    +

    module-name release_stage dependencies

    +
    +
    +

    Whereby:

    +
    +
    +
    +
    module-name
    +
    +

    Is the name of the module including the version, an +optional release number and an optional suffix. The general form is

    +
    +

    P/V[-V_RELEASE][_SUFFIX]

    +
    +
    +
    release_stage
    +
    +

    Defines the release stage of this module +variant. Allowed values are unstable, stable, deprecated, +remove and removed. If the release stage is remove or removed, +this module variant will be removed (if not already removed).

    +
    +
    dependencies
    +
    +

    Defines the module dependencies. Dependencies can +be either a hierarchical dependency, a runtime dependency or a build +dependency. Hierarchical and runtime dependencies are loaded before +a module itself. Build dependencies are only loaded during build-time +and must be prefixed with b:.

    +
    +

    Dependencies are loaded in the specified order. It is recommended to +specify the dependencies of a the (hierarchical) group first, then +additional modules required at run-time and the modules required to +build it at the end.

    +
    +
    +

    If the module is in a hierarchical group like MPI, you must specify +the modules required for this group. For modules in the group

    +
    +
    +
      +
    • +

      Compiler a compiler must be specified.

      +
    • +
    • +

      MPI a compiler and a MPI implementation must be specified.

      +
    • +
    • +

      HDF5 a compiler, a MPI implementation and a parallel HDF5 module +must be specified.

      +
    • +
    • +

      HDF5_serial a compiler and a serial HDF5 module +must be specified.

      +
    • +
    +
    +
    +
    +
    +
    +
    Example
    +
    +
    parmetis/4.0.3  stable gcc/7.3.0 openmpi/3.0.0  b:cmake/3.6.3
    +
    +
    +
    +
    +
    +
    +

    Appendix B: Legacy build function (Pmodules version 1.0)

    +
    + + + + + +
    + + +
    +

    These functions are deprecated in Pmodules 1.1 and newer!

    +
    +
    +
    +
    +

    4.B.1. Define the group of a module: pbuild::add_to_group

    +
    +
    4.B.1.1. Synopsis
    +
    +
    +
    pbuild::add_to_group GROUP
    +
    +
    +
    +
    +
    4.B.1.2. Description
    +
    +

    Define the group the module will be installed in. Sometimes it is not obvious in which group a module should go. If in doubt, Tools might be the best.

    +
    +
    +

    A (incomplete) list of available groups:

    +
    +
    +
    +
    Tools
    +
    +

    Group for tools like Gnuplot, Git, vim, Emacs, openssl. This group is visible by default.

    +
    +
    Programming
    +
    +

    Group for compilers, scripting languages and tools used for programming, like GCC, Python, CMake, autotools, Matlab. This group is visible by default.

    +
    +
    Compiler
    +
    +

    Hierarchical group for modules compiled with a certain compiler module. Examples: open-mpi, MPICH, serial HDF5.

    +
    +
    HDF5_serial
    +
    +

    Hierarchical group for modules compiled with a certain compiler and serial HDF5 module. Examples: netCDF, H5hut.

    +
    +
    MPI
    +
    +

    Hierarchical group for modules compiled with a certain compiler and MPI module. Examples: parallel Boost, parallel HDF5, ParMETIS, Gromacs.

    +
    +
    HDF5
    +
    +

    Hierarchical group for modules compiled with a certain compiler, MPI and parallel HDF5 module. Examples: netCDF, H5hut, Trilinos.

    +
    +
    System
    +
    +

    Group for system tools. This group is not visible by default. Examples: filebench, fsstress, nmap, patchelf.

    +
    +
    Libraries
    +
    +

    Group for libraries required to compile other modules but not providing (useful) tools. This group is not visible by default. Examples: GMP, MPC, MPFR

    +
    +
    MX
    +
    +

    Group for special tools used at the MX beam-line. This group is visible only on dedicated systems.

    +
    +
    EM
    +
    +

    Group for Ra specific software. This group is only visible and available on Ra.

    +
    +
    +
    +
    +
    +
    4.B.1.3. Example
    +
    +
    Example 1. Define the group for the Gnuplot module:
    +
    +
    +
    +
    pbuild::add_to_group 'Tools'
    +
    +
    +
    +
    +
    +
    +
    +
    +

    4.B.2. Set download URL: pbuild::set_download_url

    +
    +
    4.B.2.1. Synopsis
    +
    +
    +
    pbuild::set_download_url URL [fname]
    +
    +
    +
    +
    +
    4.B.2.2. Description
    +
    +

    Tell the build system where to download the required (source-)files. If fname is passed, it will be used as the output file-name of the download.

    +
    +
    +

    In some cases software must be downloaded from a Git repository on Github, Bitbucket or Gitlab.

    +
    +
    +

    To download a certain tag/version from Github, Bitbucket or Gitlab use:

    +
    +
    +
    +
    https://github.com/OWNER/PROJECT/archive/${V_PKG}/$P-${V_PKG}.tar.gz
    +https://bitbucket.org/OWNER/PROJECT/get/${V_PKG}.tar.gz#/$P-%{V_PKG}.tar.gz
    +https://gitlab.com/OWNER/PROJECT/-/archive/${V_PKG}/$P-${V_PKG}.tar.gz
    +
    +
    +
    +
    +
    4.B.2.3. Examples
    +
    +

    Excerpt from Trilinos build-script:

    +
    +
    +
    +
    pbuild::set_download_url \
    +        "https://github.com/$P/$P/tarball/$P-release-${V//./-}" \
    +        "$P-$V.tar.gz"
    +
    +
    +
    +
    +
    4.B.2.4. Compile in source tree: pbuild::compile_in_sourcetree (Pmodules 1.0)
    +
    +
    Synopsis
    +
    +
    +
    pbuild::compile_in_sourcetree
    +
    +
    +
    +
    +
    Description
    +
    +

    By default the build-system compiles software in a separate build-directory. This is not possible with all software. With the function pbuild::compile_in_sourcetree the build-directory is set to the source-directory.

    +
    +
    +
    +
    Example
    +
    +
    +
    pbuild::compile_in_sourcetree
    +
    +
    +
    +
    +
    +
    +
    4.B.2.5. Set documentation files to be installed: pbuild::install_docfiles (Pmodules 1.0)
    +
    +
    Synopsis
    +
    +
    +
    pbuild::install_docfiles fname...
    +
    +
    +
    +
    +
    Description
    +
    +

    Install the passed files into $PREFIX/share/doc/$P. At least the file containing the license and copyright should be installed.

    +
    +
    +
    +
    Example
    +
    +

    Excerpt from parallel-netcdf build-script:

    +
    +
    +
    +
    pbuild::add_docfiles 'AUTHORS' 'CREDITS'
    +pbuild::add_docfiles 'COPYING' 'COPYRIGHT'
    +pbuild::add_docfiles 'ChangeLog' 'NEWS'
    +pbuild::add_docfiles 'RELEASE_NOTES'
    +
    +
    +
    +
    +
    +
    +
    4.B.2.6. Pass SHA256 hash sum to build-system: pbuild::set_sha256sum (Pmodules 1.0)
    +
    +
    Synopsis
    +
    +
    +
    pbuild::set_sha256sum SHA256_HASH
    +
    +
    +
    +
    +
    Description
    +
    +

    Tell the build-system which SHA256 hash sum a file must have. The format of the argument is file-name:hash-sum.

    +
    +
    +
    +
    Examples
    +
    +

    Excerpt from Trilinos build-script:

    +
    +
    +
    +
    pbuild::set_sha256sum \
    +	"trilinos-12.12.1.tar.gz:c8f2029fa36230b9f384c56139aaa33111227bcf653e73f7daf3c9efdecc1d2d"
    +
    +
    +
    +
    +
    +
    +
    4.B.2.7. Supported compilers: pbuild::set_supported_compilers (Pmodules 1.0)
    +
    +
    Synopsis
    +
    +
    +
    pbuild::supported_compilers STRING...
    +
    +
    +
    +
    +
    Description
    +
    +

    Set list of compiler which can be used to compile the module.

    +
    +
    +
    +
    Example
    +
    +
    +
    pbuild::supported_compilers gcc clang
    +
    +
    +
    +
    +
    +
    +
    4.B.2.8. Set which OS are supported: pbuild::supported_systems (Pmodules 1.0)
    +
    +
    Synopsis
    +
    +
    +
    pbuild::supported_system STRING...
    +
    +
    +
    +
    +
    Description
    +
    +

    Some modules can be build only for dedicated operating systems. This is particularly the case for operating system specific tools like patchelf.

    +
    +
    +
    +
    +
    +
    4.B.2.9. Forece use of autotools: pbuild::use_autotools (Pmodules 1.0)
    +
    +
    Synopsis
    +
    +
    +
    pbuild::use_autotools
    +
    +
    +
    +
    +
    Description
    +
    +

    Force the use of autotools.

    +
    +
    +
    +
    +
    +
    4.B.2.10. Force use of CMake: pbuild::use_cmake
    +
    +
    Synopsis
    +
    +
    +
    pbuild::use_cmake
    +
    +
    +
    +
    +
    Description
    +
    +

    Force the use of CMake.

    +
    +
    +
    +
    +
    +
    + +
    +

    4.C.1. Other implementation of environment module systems

    +
    + +
    +
    + +
    +

    4.C.3. Talks

    +
    + +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/links.html b/doc/html/links.html new file mode 100644 index 0000000..67199d1 --- /dev/null +++ b/doc/html/links.html @@ -0,0 +1,72 @@ + + + + + + + +Links + + + + + +
    +
    +

    Other implementation of environment module systems

    +
    +
    + +
    +
    +
    + +
    +

    Talks

    +
    +
    + +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-avail.html b/doc/html/man1/module-avail.html new file mode 100644 index 0000000..5f03448 --- /dev/null +++ b/doc/html/man1/module-avail.html @@ -0,0 +1,122 @@ + + + + + + + + +List available/loadable modules + + + + + +
    +
    +
    +
    +

    module avail - list loadable modules

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module avail [OPTIONS] [string…​]

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    List all available module in the current MODULEPATH. If an argument is given, then each directory in the MODULEPATH is searched for modules whose pathname match the argument.

    +
    +
    +

    This command does not display all installed modules on the system. Only loadable modules are listed. To get a list of all installed modules use the command module search.

    +
    +
    +

    The list of available modules may change either by loading other modules, e.g. a compiler, or by using/accepting unstable or deprecated modules. For the later read the description of module use.

    +
    +
    +

    With the switches you can change the output format. The default output format is 'human' (readable). For the time being terse and long output are identical.

    +
    +
    +
    +
    +

    OPTIONS

    +
    +
    +
    +
    -a
    +
    +

    List loadable modules in all release-stages. Unstable modules are marked with (u), +deprecated modules with (d).

    +
    +
    -t | --terse
    +
    +

    Terse output.

    +
    +
    -h | --human
    +
    +

    Human readable output. This is the default.

    +
    +
    -l | --long
    +
    +

    Long output.

    +
    +
    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +
    +
    $ module avail git
    +----------------------------------------- Tools -----------------------------------------
    +
    +ygit/2.3.3       git/2.8.1       git/2.21.0      git/2.22.0      git/2.30.0      git/2.33.1
    +
    +$ module avail -a gcc
    +-------------------------------------- Programming --------------------------------------
    +
    +gcc/4.7.4       gcc/4.8.2       gcc/4.8.3       gcc/4.8.4       gcc/4.8.5       gcc/4.9.2
    +gcc/4.9.3       gcc/4.9.4       gcc/5.1.0(d)    gcc/5.2.0(d)    gcc/5.3.0       gcc/5.4.0
    +gcc/5.5.0       gcc/6.1.0       gcc/6.2.0       gcc/6.3.0       gcc/6.4.0       gcc/6.5.0
    +gcc/7.1.0       gcc/7.2.0       gcc/7.3.0       gcc/7.4.0       gcc/7.5.0       gcc/8.1.0
    +gcc/8.2.0       gcc/8.3.0       gcc/8.4.0       gcc/8.5.0       gcc/9.1.0       gcc/9.2.0
    +gcc/9.3.0       gcc/9.5.0       gcc/10.1.0      gcc/10.2.0      gcc/10.3.0      gcc/11.2.0
    +gcc/11.3.0      gcc/12.1.0
    +
    +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-clear.html b/doc/html/man1/module-clear.html new file mode 100644 index 0000000..e97e886 --- /dev/null +++ b/doc/html/man1/module-clear.html @@ -0,0 +1,97 @@ + + + + + + + + +Clear list of loaded modules + + + + + +
    +
    +
    +
    +

    module clear - clear list of loaded modules.

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module clear

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Force the Pmodules package to believe that no modules are currently loaded. The sub-command clear does not unload the loaded modules! In other words: changes made to the shell’s environment by loaded modules are not reverted.

    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    After loading the module for gcc/4.9.2 the following environment variables are set:

    +
    +
    +
    +
    $ env | grep ^GCC
    +GCC_HOME=/opt/psi/Programming/gcc/4.9.2
    +GCC_DIR=/opt/psi/Programming/gcc/4.9.2
    +GCC_PREFIX=/opt/psi/Programming/gcc/4.9.2
    +GCC_VERSION=4.9.2
    +GCC_INCLUDE_DIR=/opt/psi/Programming/gcc/4.9.2/include
    +GCC_LIBRARY_DIR=/opt/psi/Programming/gcc/4.9.2/lib
    +
    +
    +
    +

    After clearing the list of loaded modules the environment variables set by the GCC module are still set

    +
    +
    +
    +
    $ module clear
    +$ module list
    +No Modulefiles Currently Loaded.
    +$ env | grep ^GCC
    +GCC_HOME=/opt/psi/Programming/gcc/4.9.2
    +GCC_DIR=/opt/psi/Programming/gcc/4.9.2
    +GCC_PREFIX=/opt/psi/Programming/gcc/4.9.2
    +GCC_VERSION=4.9.2
    +GCC_INCLUDE_DIR=/opt/psi/Programming/gcc/4.9.2/include
    +GCC_LIBRARY_DIR=/opt/psi/Programming/gcc/4.9.2/lib
    +
    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-display.html b/doc/html/man1/module-display.html new file mode 100644 index 0000000..963be59 --- /dev/null +++ b/doc/html/man1/module-display.html @@ -0,0 +1,106 @@ + + + + + + + + +Display information about a module + + + + + +
    +
    +
    +
    +

    module display\|show - display information about chances in environment

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module display modulefile…​
    +module show modulefile…​

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Display information about modulefile(s). The display sub-command will list the full path of the modulefile(s) and all of the environment changes the modulefile(s) will make if loaded. (It will not display any environment changes found within conditional statements.)

    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    Display chances the module gcc/5.4.0 will make to the environment if loaded:

    +
    +
    +
    +
    $ module display gcc/5.4.0
    +-------------------------------------------------------------------
    +/opt/psi/Programming/modulefiles/gcc/5.4.0:
    +
    +module-whatis	 GNU Compiler Collection
    +conflict	 gcc
    +setenv		 GCC_VERSION 5.4.0
    +setenv		 GCC_PREFIX /opt/psi/Programming/gcc/5.4.0
    +setenv		 GCC_DIR /opt/psi/Programming/gcc/5.4.0
    +setenv		 GCC_HOME /opt/psi/Programming/gcc/5.4.0
    +prepend-path	 PATH /opt/psi/Programming/gcc/5.4.0/bin
    +prepend-path	 MANPATH /opt/psi/Programming/gcc/5.4.0/share/man
    +prepend-path	 C_INCLUDE_PATH /opt/psi/Programming/gcc/5.4.0/include
    +prepend-path	 CPLUS_INCLUDE_PATH /opt/psi/Programming/gcc/5.4.0/include
    +setenv		 GCC_INCLUDE_DIR /opt/psi/Programming/gcc/5.4.0/include
    +prepend-path	 LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib
    +prepend-path	 LD_LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib
    +setenv		 GCC_LIBRARY_DIR /opt/psi/Programming/gcc/5.4.0/lib
    +prepend-path	 LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib64
    +prepend-path	 LD_LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib64
    +setenv		 GCC_LIBRARY_DIR /opt/psi/Programming/gcc/5.4.0/lib64
    +append-path	 PMODULES_LOADED_PROGRAMMING gcc/5.4.0
    +remove-path	 PMODULES_LOADED_PROGRAMMING --APPMARKER--
    +setenv		 COMPILER gcc
    +setenv		 COMPILER_VERSION 5.4.0
    +setenv		 CC /opt/psi/Programming/gcc/5.4.0/bin/gcc
    +setenv		 CXX /opt/psi/Programming/gcc/5.4.0/bin/g++
    +setenv		 F77 /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +setenv		 F90 /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +setenv		 FC /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +setenv		 FORTRAN /opt/psi/Programming/gcc/5.4.0/bin/gfortran
    +-------------------------------------------------------------------
    +
    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-help.html b/doc/html/man1/module-help.html new file mode 100644 index 0000000..780cbce --- /dev/null +++ b/doc/html/man1/module-help.html @@ -0,0 +1,107 @@ + + + + + + + + +Print sub-command or module-specific help + + + + + +
    +
    +
    +
    +

    module help - print sub-command or module-specific help

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module help [module|sub-command…​]

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Print help for specific modules, sub-commands or the module command itself.

    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    Get help for the module git/2.3.3:

    +
    +
    +
    +
    $ module help git/2.3.3
    +
    +----------- Module Specific Help for 'git/2.3.3' ------------------
    +
    +distributed version control system
    +Version:    2.3.3
    +Homepage:   http://git-scm.com/
    +License:    GNU GPL v2
    +Maintainer: Achim Gsell <achim.gsell@psi.ch>
    +
    +Git is a free and open source distributed version control system
    +designed to handle everything from small to very large projects
    +with speed and efficiency.
    +
    +Git is easy to learn and has a tiny footprint with lightning fast
    +performance. It outclasses SCM tools like Subversion, CVS, Perforce,
    +and ClearCase with features like cheap local branching, convenient
    +staging areas, and multiple workflows.
    +
    +
    +
    +

    Print help for the sub-command load:

    +
    +
    +
    +
    $ module help load
    +
    +USAGE:
    +        module add     modulefile...
    +        module load    modulefile...
    +                Load modulefile(s) into the shell environment. Loading a
    +		'group-head' will extend the MODULEPATH. E.g.: loading a
    +		compiler makes additional modules like openmpi and libraries
    +		compiled with this compiler available.
    +
    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-initcmds.html b/doc/html/man1/module-initcmds.html new file mode 100644 index 0000000..c68455b --- /dev/null +++ b/doc/html/man1/module-initcmds.html @@ -0,0 +1,107 @@ + + + + + + + +Manipulate shell’s initialization file + + + + + +
    +
    +

    NAME

    +
    +
    +

    module initadd|initprepend|initrm|initswitch|initrm|initlist|initclear - add or remove modules from shell’s initialization file

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module initadd module…​
    +module initprepend module…​
    +module initrm module…​
    +module initswitch module1 module2
    +module initlist
    +module initclear

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Add modulefile(s) to, list modulefile(s) in or remove modulefile(s) from the shell’s initialization file in the user’s home directory. The startup files checked (in order) are:

    +
    +
    +
    +
    csh
    +
    +

    .modules, .cshrc(.ext), .csh_variables, and .login(.ext)

    +
    +
    tcsh
    +
    +

    .modules, .tcshrc, .cshrc(.ext), .csh_variables, and .login(.ext)

    +
    +
    bash
    +
    +

    .modules, .bash_profile, .bash_login, .profile(.ext), and .bashrc(.ext)

    +
    +
    zsh
    +
    +

    .modules, .zcshrc(.ext), .zshenv(.ext), and .zlogin(.ext)

    +
    +
    module initadd module…​
    +
    +

    If a module load line is found in any of these files, the modulefile(s) is(are) appended to any existing list of modulefiles. The module load line must be located in at least one of the files listed above for any of the init sub-commands to work properly. If the module load line is found in multiple shell initialization files, all of the lines are changed.

    +
    +
    module initprepend module…​
    +
    +

    Does the same as initadd but prepends the given modules to the beginning of the list.

    +
    +
    module initrm module…​
    +
    +

    Remove modulefile(s) from the shell’s initialization files.

    +
    +
    module initswitch module1 module2
    +
    +

    Switch module1 with module2 in the shell’s initialization files.

    +
    +
    module initlist
    +
    +

    List all of the module(s) loaded from the shell’s initialization file.

    +
    +
    module initclear
    +
    +

    Clear all of the module(s) from the shell’s initialization files.

    +
    +
    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-keyword.html b/doc/html/man1/module-keyword.html new file mode 100644 index 0000000..128eae2 --- /dev/null +++ b/doc/html/man1/module-keyword.html @@ -0,0 +1,78 @@ + + + + + + + + +Show/search 'whatis' information + + + + + +
    +
    +
    +
    +

    module keyword|apropos - search for keywords in 'whatis'

    +
    +
    +
    +
    +

    SYN[]OPSIS

    +
    +
    +

    module apropos string…​
    +module keyword string…​

    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Search through the 'whatis' informations of all modulefiles for the specified string. All whatis informations matching the string will be displayed.

    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +
    +
    $ module keyword editor
    +----------- /opt/psi/Tools/modulefiles -------------
    +          emacs/24.3: extensible, customizable text editor—and more
    +          emacs/24.4: extensible, customizable text editor—and more
    +          emacs/24.5: extensible, customizable text editor—and more
    +          emacs/25.1: extensible, customizable text editor—and more
    +----------- /opt/psi/Programming/modulefiles -------------
    +
    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-list.html b/doc/html/man1/module-list.html new file mode 100644 index 0000000..ff6c9c0 --- /dev/null +++ b/doc/html/man1/module-list.html @@ -0,0 +1,122 @@ + + + + + + + + +List loaded modules + + + + + +
    +
    +
    +
    +

    module list - list loaded modules

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module list [OPTIONS]

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    List loaded modules.

    +
    +
    +
    +
    +

    OPTIONS

    +
    +
    +
    +
    -t | --terse
    +
    +

    Terse output.

    +
    +
    -h | --human
    +
    +

    Human readable output. This is the default.

    +
    +
    -l | --long
    +
    +

    Long output.

    +
    +
    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    Assuming the modules gcc/4.8.3, openmpi/1.8.2 and hdf5/1.8.12. List with default (human readable) output:

    +
    +
    +
    +
    $ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.8.3       2) openmpi/1.8.2   3) hdf5/1.8.12
    +
    +
    +
    +

    List in terse output:

    +
    +
    +
    +
    $ module list -t
    +Currently Loaded Modulefiles:
    +gcc/4.8.3
    +openmpi/1.8.2
    +hdf5/1.8.12
    +
    +
    +
    +

    Long listing:

    +
    +
    +
    +
    $ module list -l
    +- Package -----------------------------+- Versions -+- Last mod. ------
    +Currently Loaded Modulefiles:
    +gcc/4.8.3                                            2014/12/05 17:39:24
    +openmpi/1.8.2                                        2014/11/25  8:15:40
    +hdf5/1.8.12                                          2014/11/25  8:15:40
    +
    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-load.html b/doc/html/man1/module-load.html new file mode 100644 index 0000000..342d0c9 --- /dev/null +++ b/doc/html/man1/module-load.html @@ -0,0 +1,207 @@ + + + + + + + + +Load and unloading a module + + + + + +
    +
    +
    +
    +

    module add|load - load modules
    +module rm|unload - unload modules

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module add [OPTIONS] modulefile…​
    +module load [OPTIONS] modulefile…​
    +module rm modulefile…​
    +module unload modulefile…​

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Load modulefile(s) into shell environment. Loading a group-head will extend the MODULEPATH. E.g.: loading a compiler makes additional modules like openmpi and other libraries/packages compiled with this compiler available.

    +
    +
    +

    If you try to load a module which is not available in the current MODULEPATH but installed in the module hierarchy, a message will be printed showing prerequisite modules.

    +
    +
    +

    If you load a deprecated or unstable module, a warning will be printed.

    +
    +
    +

    You can change the verbosity of the load sub-command by setting the environment variable PMODULES_VERBOSITY to silent, warn or verbose.

    +
    +
    +
    +
    silent
    +
    +

    Print error messages only.

    +
    +
    warn
    +
    +

    Print a warning message, when loading a deprecated or unstable module.

    +
    +
    verbose
    +
    +

    Print warning messages and print prerequisite modules if the module to load is not available, but installed in hierarchy.

    +
    +
    +
    +
    +
    +
    +

    OPTIONS / FLAGS

    +
    +
    +
    +
    -f | --force
    +
    +

    Force active dependency resolution. This will result in modules found on a prereq command inside a module file being load automatically. Unloading module files using this switch will result in all required modules which have been loaded automatically using the -f switch being unload. This switch is experimental at the moment.

    +
    +
    -v | --verbose
    +
    +

    Set verbosity level to verbose.

    +
    +
    -w | --warn
    +
    +

    Set verbosity level to warn.

    +
    +
    -s | --silent
    +
    +

    Set verbosity level to silent.

    +
    +
    +
    +
    +
    +
    +

    EXAMPLES (add|load)

    +
    +
    +

    Loading the modules gcc/4.9.2, openmpi/1.8.4 and hdf5/1.8.14:

    +
    +
    +
    +
    $ module load gcc/4.9.2
    +$ module load openmpi/1.8.4
    +$ module load hdf5/1.8.14
    +$ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2       2) openmpi/1.8.4   3) hdf5/1.8.14
    +
    +
    +
    +

    or

    +
    +
    +
    +
    $ module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14
    +
    +
    +
    +

    If you try to load hdf5/1.8.14 without the prerequisite modules, some "hints" will be printed, if the default verbosity level is set:

    +
    +
    +
    +
    $ module purge
    +$ module load hdf5/1.8.14
    +The module 'hdf5/1.8.14' cannot be loaded!
    +Try with one of the following command(s):
    +
    +module load gcc/4.7.4 openmpi/1.6.5 hdf5/1.8.14
    +module load gcc/4.7.4 openmpi/1.8.2 hdf5/1.8.14
    +module load gcc/4.7.4 openmpi/1.8.4 hdf5/1.8.14
    +module load gcc/4.8.3 openmpi/1.6.5 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.3 openmpi/1.8.2 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.3 openmpi/1.8.4 hdf5/1.8.14
    +module load gcc/4.8.4 openmpi/1.6.5 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.4 openmpi/1.8.2 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.4 openmpi/1.8.4 hdf5/1.8.14
    +module use deprecated; module load gcc/4.8.4 openmpi/1.8.8 hdf5/1.8.14
    +module use deprecated; module load gcc/4.9.2 openmpi/1.6.5 hdf5/1.8.14
    +module use deprecated; module load gcc/4.9.2 openmpi/1.8.2 hdf5/1.8.14
    +module use deprecated; module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14
    +
    +
    +
    +

    Use verbosity level warn to suppress the hints:

    +
    +
    +
    +
    $ module load hdf5/1.8.14 --warn
    +module load: module unavailable -- hdf5/1.8.14
    +
    +
    +
    +

    Loading an unstable module:

    +
    +
    +
    +
    $ module use unstable
    +$ module load cmake/3.1.3
    +Warning: the unstable module 'cmake/3.1.3' has been loaded.
    +
    +
    +
    +

    To supress the warning, use the --silent option.

    +
    +
    +
    +
    +

    EXAMPLES (rm|unload)

    +
    +
    +
    +
    $ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2       2) openmpi/1.8.4   3) hdf5/1.8.14
    +$ module rm openmpi/1.8.4
    +$ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2
    +
    +
    +
    +

    The module hdf5/1.8.14 is unloaded as a dependency of openmpi/1.8.4.

    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-purge.html b/doc/html/man1/module-purge.html new file mode 100644 index 0000000..6cee22b --- /dev/null +++ b/doc/html/man1/module-purge.html @@ -0,0 +1,86 @@ + + + + + + + + +Purge all loaded modules + + + + + +
    +
    +
    +
    +

    module purge - purge all loaded modules

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module purge

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Unload all loaded module and reset everything to original state.

    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    List loaded modules:

    +
    +
    +
    +
    $ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.8.3       2) openmpi/1.8.2   3) gnuplot/4.6.3
    +
    +
    +
    +

    Now we purge everything and list the loaded modules again:

    +
    +
    +
    +
    $ module purge
    +$ module list
    +No Modulefiles Currently Loaded.
    +
    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-refresh.html b/doc/html/man1/module-refresh.html new file mode 100644 index 0000000..a165694 --- /dev/null +++ b/doc/html/man1/module-refresh.html @@ -0,0 +1,61 @@ + + + + + + + + +Refresh loaded modules + + + + + +
    +
    +
    +
    +

    module refresh - refresh loaded modules

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module refresh

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Force a refresh of all non-persistent components of currently loaded modules. This should be used on derived shells where aliases need to be reinitialized but the environment variables have already been set by the currently loaded modules.

    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-search.html b/doc/html/man1/module-search.html new file mode 100644 index 0000000..226c338 --- /dev/null +++ b/doc/html/man1/module-search.html @@ -0,0 +1,138 @@ + + + + + + + + +Search modules + + + + + +
    +
    +
    +
    +

    module search - search installed modules

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module search [switches] string…​

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    List all modules in the current MODULEPATH and the module hierarchy. If an argument is given, search for modules whose name match the argument. +Options

    +
    +
    +
    +
    +

    OPTIONS

    +
    +
    +
    +
    --no-header
    +
    +

    Suppress output of a header.

    +
    +
    --release=RELEASE
    +
    +

    Search for modules within this release. You can specify this switch multiple times. Without this switch, the used releases will be searched.

    +
    +
    -a|--all-releases
    +
    +

    Search within all releases.

    +
    +
    --with=STRING
    +
    +

    Search for modules compiled with modules matching string. The command. See example below.

    +
    +
    --src=dir
    +
    +

    Search module hierarchy in dir. +Eine Textbeschreibung der Funktionsweise des Befehls oder der Funktion. (Üblicherweise jedoch nicht der Benutzung, siehe unten.)

    +
    +
    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    Get list of all installed GCC:

    +
    +
    +
    +
    $ module search --all-releases gcc
    +Module               Release    Group        Requires
    +------------------------------------------------------------
    +gcc/4.7.4            stable     Programming
    +gcc/4.8.2            stable     Programming
    +gcc/4.8.3            stable     Programming
    +gcc/4.8.4            stable     Programming
    +gcc/4.8.5            stable     Programming
    +gcc/4.9.2            stable     Programming
    +gcc/4.9.3            stable     Programming
    +gcc/4.9.4            stable     Programming
    +gcc/5.1.0            deprecated Programming
    +gcc/5.2.0            deprecated Programming
    +gcc/5.3.0            stable     Programming
    +gcc/5.4.0            stable     Programming
    +gcc/6.1.0            stable     Programming
    +gcc/6.2.0            stable     Programming
    +gcc/6.3.0            stable     Programming
    +gcc/6.4.0            stable     Programming
    +gcc/7.1.0            stable     Programming
    +gcc/7.2.0            stable     Programming
    +
    +
    +
    +

    Get list of all open-mpi versions compiled with GCC 5.4.0:

    +
    +
    +
    +
    $ module search --all-releases openmpi --with=gcc/5.4.0
    +Module               Release    Group        Requires
    +------------------------------------------------------------
    +openmpi/1.10.2       stable     Compiler     gcc/5.4.0
    +openmpi/1.10.4       stable     Compiler     gcc/5.4.0
    +openmpi/2.0.1        stable     Compiler     gcc/5.4.0
    +
    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-swap.html b/doc/html/man1/module-swap.html new file mode 100644 index 0000000..b9686c5 --- /dev/null +++ b/doc/html/man1/module-swap.html @@ -0,0 +1,109 @@ + + + + + + + + +Swapping modules + + + + + +
    +
    +
    +
    +

    module swap|switch - replace a loaded module by another

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module swap [modulefile1] modulefile2
    +module switch [modulefile1] modulefile2

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Switch loaded modulefile1 with modulefile2. If modulefile1 is not specified, then it is assumed to be the currently loaded module with the same root name as modulefile2.

    +
    +
    +
    +
    +

    OPTIONS / FLAGS

    +
    +
    +

    None

    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +
    +
    $ module load gcc/4.8.4
    +$ module swap gcc/4.9.2
    +$ module list
    +Currently Loaded Modulefiles:
    +  1) gcc/4.9.2
    +
    +
    +
    +
    +
    +

    BUGS

    +
    +
    +

    You can only swap between different version. The following commands are working (assuming that gcc/4.8.2 is loaded):

    +
    +
    +
    +
    $ module swap gcc/4.9.2
    +$ module swap gcc/4.9.2 gcc/5.4.0
    +
    +
    +
    +

    The following command does not working as expected:

    +
    +
    +
    +
    $ module swap gcc/4.8.2 intel/15.0
    +
    +
    +
    +

    This command does not work with the Tcl implementation (environment variable PMOUDLE_PURETCL set).

    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-use.html b/doc/html/man1/module-use.html new file mode 100644 index 0000000..aadbc13 --- /dev/null +++ b/doc/html/man1/module-use.html @@ -0,0 +1,197 @@ + + + + + + + + +Manipulate module path, used releases, groups or overlays + + + + + +
    +
    +
    +
    +

    module use|unuse - manipulate module path, used releases or groups

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module use [OPTIONS] [string…​]

    +
    +
    +

    module unuse string…​

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    If called without arguments, print a summary about used groups, releases and additional directories in MODULEPATH.

    +
    +
    +

    If string is a directory, append, prepend or remove this directory to/from MODULEPATH.

    +
    +
    +

    If string is a group name, append, prepend or remove the corresponding directory to/from MODULEPATH.

    +
    +
    +

    If string is a releases name, make all modules with this release available/unavailable. Known releases are;

    +
    +
    +
    +
    stable
    +
    +

    Modules released as stable are considered to be production ready. The files of a stable module will never change.

    +
    +
    unstable
    +
    +

    These modules are still unstable. They may not be ready for production use. The files of unstable modules may change to fix bugs or add functionality. Use at your own risk.

    +
    +
    deprecated
    +
    +

    Deprecated modules should not be used any more and may be removed without further notice.

    +
    +
    +
    +
    +

    If string matches flag=[-_a-zA-Z0-9]* the RHS will be interpreted as use-flag.

    +
    +
    +
    +
    +

    OPTIONS / FLAGS

    +
    +
    +
    +
    -a | --append
    +
    +

    append directory or group to MODULEPATH.

    +
    +
    -p | --prepend
    +
    +

    prepend directory or group to MODULEPATH.

    +
    +
    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    List used/unused groups, releases and additional directories in MODULEPATH:

    +
    +
    +
    +
    $ module use
    +Used groups:
    +	Tools
    +	Programming
    +	Compiler
    +
    +Unused groups:
    +	Legacy
    +	Libraries
    +	System
    +
    +Used releases:
    +	stable
    +	unstable
    +
    +Unused releases:
    +	deprecated
    +
    +Used flags:
    +	omp
    +
    +Additonal directories in MODULEPATH:
    +	none
    +
    +
    +
    +

    Adding the 'System' group

    +
    +
    +
    +
    $ module use System
    +$ module avail
    +-------------------------------------------- System:  --------------------------------------------
    +
    +filebench/1.4.9.1               fsstress/1.0.0  nmap/6.46       patchelf/0.8.1
    +
    +-------------------------------------------- Tools:  --------------------------------------------
    +
    +ANSYS/18.2      emacs/24.4      git/2.3.3       global/6.3.1    gnuplot/4.6.3   gnuplot/5.0.0
    +...
    +
    +----------------------------------------- Programming:  -----------------------------------------
    +
    +autoconf/2.69   automake/1.14   automake/1.15   binutils/2.25   cmake/2.8.12.2  cmake/3.1.3
    +cmake/3.6.3     gcc/4.7.4       gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       gcc/4.8.5
    +...
    +
    +
    +
    +

    Adding a directory to MODULEPATH

    +
    +
    +
    +
    $ module use /afs/psi.ch/project/amas/modulefiles
    +$ module avail
    +----------------------------------- /afs/psi.ch/project/amas:  -----------------------------------
    +
    +H5hut_parallel-toolchain/2.0    H5hut_serial-toolchain/2.0      OPAL/1.6        OPAL/1.6.0rc5
    +opal-toolschain/1.6             opal-toolschain/2.0
    +
    +-------------------------------------------- Tools:  --------------------------------------------
    +
    +ANSYS/18.2      emacs/24.4      git/2.3.3       global/6.3.1    gnuplot/4.6.3   gnuplot/5.0.0
    +...
    +----------------------------------------- Programming:  -----------------------------------------
    +
    +autoconf/2.69   automake/1.14   automake/1.15   binutils/2.25   cmake/2.8.12.2  cmake/3.1.3
    +cmake/3.6.3     gcc/4.7.4       gcc/4.8.3       gcc/4.8.4       gcc/4.9.2       gcc/4.8.5
    +...
    +
    +
    +
    +
    +
    $ module unuse /afs/psi.ch/project/amas/modulefiles
    +$ module unuse System
    +$ module unuse unstable
    +
    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module-whatis.html b/doc/html/man1/module-whatis.html new file mode 100644 index 0000000..2362f80 --- /dev/null +++ b/doc/html/man1/module-whatis.html @@ -0,0 +1,96 @@ + + + + + + + + +Show/search 'what is' information + + + + + +
    +
    +
    +
    +

    module whatis - print one-line information about module +module keyword|apropos - search for keywords in 'whatis'

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module whatis [module…​]
    +module apropos string…​
    +module keyword string…​

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +
    +
    whatis
    +
    +

    Display the information set up by the module-whatis commands inside +the specified modulefile(s). If no modulefile is specified, all whatis +lines will be shown.

    +
    +
    keyword|apropos
    +
    +

    Search through the 'whatis' informations of all modulefiles for the +specified string. All whatis informations matching the string will be +displayed.

    +
    +
    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +

    Get whatis for all available Git modules

    +
    +
    +
    +
    $ module  whatis git
    +----------- /opt/psi/Tools/modulefiles -------------
    +           git/2.3.3: distributed version control system
    +           git/2.5.2: distributed version control system
    +           git/2.8.1: distributed version control system
    +          git/2.11.1: distributed version control system
    +----------- /opt/psi/Programming/modulefiles -------------
    +
    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man1/module.html b/doc/html/man1/module.html new file mode 100644 index 0000000..1c33970 --- /dev/null +++ b/doc/html/man1/module.html @@ -0,0 +1,119 @@ + + + + + + + +module - using Pmodules + + + + + +
    +
    +

    NAME

    +
    +
    +

    module - command line interface to the Pmodules package

    +
    +
    +
    +
    +

    SYNOPSIS

    +
    +
    +

    module [ switches ] [ sub-command ] [ sub-command-args ]

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    Environment Modules provide a convenient way to dynamically change the +users' environment through modulefiles. This includes easily adding or +removing directories to the PATH environment variable. +A modulefile contains the necessary information to allow a user to run +a particular application or provide access to a particular +library. All of this can be done dynamically without logging out and +back in. Modulefiles for applications modify the user’s shell +environment to make access easy. Modulefiles for Library packages +provide environment variables that specify where the library and +header files can be found. +Packages can be loaded and unloaded cleanly through the module command.

    +
    +
    +

    Available sub-commands are:

    +
    +
    +

    List available modules: [module-avail]

    +
    +
    +

    Clear list of loaded modules: [module-clear]

    +
    +
    +

    Display information about chances in environment when loaded: [module-display]

    +
    +
    +

    Print sub-command or module-specific help: [module-help]

    +
    +
    +

    Add or remove modules from shell’s initialization file: [module-initcmds]

    +
    +
    +

    Search for keywords in 'whatis': [module-keyword]

    +
    +
    +

    List loaded modules: [module-list]

    +
    +
    +

    Load and unload modules: [module-load]

    +
    +
    +

    Purge all loaded modules: [module-purge]

    +
    +
    +

    Refresh loaded modules: [module-refresh]

    +
    +
    +

    Search installed modules: [module-search]

    +
    +
    +

    Replace a loaded module by another: [module-swap]

    +
    +
    +

    Manipulate module path, used releases, groups and overlays: [module-use]

    +
    +
    +

    Search for keywords in 'whatis': [module-whatis]

    +
    +
    + + + + + +
    + + +
    +

    For the time being Pmodules supports bash, tcsh and zsh only.

    +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/add_configure_args.html b/doc/html/man3/add_configure_args.html new file mode 100644 index 0000000..8847b1c --- /dev/null +++ b/doc/html/man3/add_configure_args.html @@ -0,0 +1,67 @@ + + + + + + + +pbuild::add_configure_args: Set configuration options + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::add_configure_args arg...
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Add arguments/options to the call of configure or cmake.

    +
    +
    +
    +
    +

    Example

    +
    +
    +

    Excerpt from libtasn1 build-script (autotools):

    +
    +
    +
    +
    pbuild::add_configure_args "--disable-shared"
    +pbuild::add_configure_args "CFLAGS=-fPIC"
    +
    +
    +
    +

    Excerpt from ParMETIS build-script (CMake):

    +
    +
    +
    +
    pbuild::add_configure_args "-DMETIS_PATH=${SRC_DIR}/metis"
    +pbuild::add_configure_args "-DGKLIB_PATH=${SRC_DIR}/metis/GKlib"
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/add_patch.html b/doc/html/man3/add_patch.html new file mode 100644 index 0000000..23143ff --- /dev/null +++ b/doc/html/man3/add_patch.html @@ -0,0 +1,62 @@ + + + + + + + +pbuild::add_patch: Adding patches to be applied + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::add_patch patch_fname [strip_num_dirs]
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Apply a patch to the unpacked sources. The argument patch_fname must be a relative file-name to the build-block directory. The argument strip_num_dirs is optional and defaults to 1. Please read the patch(1) manual page for more details. The patches are applied inside the source directory with the command:

    +
    +
    +
    +
    patch --strip=strip_num_dirs < "${BUILDBLOCK_DIR}/patch_fname"
    +
    +
    +
    +
    +
    +

    Example

    +
    +
    +

    Excerpt from ioapi build-script:

    +
    +
    +
    +
    pbuild::add_patch 'files/Makefile.pncf.sed.patch'
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/add_to_group.html b/doc/html/man3/add_to_group.html new file mode 100644 index 0000000..4385d2c --- /dev/null +++ b/doc/html/man3/add_to_group.html @@ -0,0 +1,106 @@ + + + + + + + +pbuild::add_to_group: Define the group of a module + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::add_to_group GROUP
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Define the group the module will be installed in. Sometimes it is not obvious in which group a module should go. If in doubt, Tools might be the best.

    +
    +
    +

    A (incomplete) list of available groups:

    +
    +
    +
    +
    Tools
    +
    +

    Group for tools like Gnuplot, Git, vim, Emacs, openssl. This group is visible by default.

    +
    +
    Programming
    +
    +

    Group for compilers, scripting languages and tools used for programming, like GCC, Python, CMake, autotools, Matlab. This group is visible by default.

    +
    +
    Compiler
    +
    +

    Hierarchical group for modules compiled with a certain compiler module. Examples: open-mpi, MPICH, serial HDF5.

    +
    +
    HDF5_serial
    +
    +

    Hierarchical group for modules compiled with a certain compiler and serial HDF5 module. Examples: netCDF, H5hut.

    +
    +
    MPI
    +
    +

    Hierarchical group for modules compiled with a certain compiler and MPI module. Examples: parallel Boost, parallel HDF5, ParMETIS, Gromacs.

    +
    +
    HDF5
    +
    +

    Hierarchical group for modules compiled with a certain compiler, MPI and parallel HDF5 module. Examples: netCDF, H5hut, Trilinos.

    +
    +
    System
    +
    +

    Group for system tools. This group is not visible by default. Examples: filebench, fsstress, nmap, patchelf.

    +
    +
    Libraries
    +
    +

    Group for libraries required to compile other modules but not providing (useful) tools. This group is not visible by default. Examples: GMP, MPC, MPFR

    +
    +
    MX
    +
    +

    Group for special tools used at the MX beam-line. This group is visible only on dedicated systems.

    +
    +
    EM
    +
    +

    Group for Ra specific software. This group is only visible and available on Ra.

    +
    +
    +
    +
    +
    +
    +

    Example

    +
    +
    +
    Example 1. Define the group for the Gnuplot module:
    +
    +
    +
    +
    pbuild::add_to_group 'Tools'
    +
    +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/compile.html b/doc/html/man3/compile.html new file mode 100644 index 0000000..aff6c07 --- /dev/null +++ b/doc/html/man3/compile.html @@ -0,0 +1,89 @@ + + + + + + + +pbuild::compile: Compile software + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::pre_compile_${SYSTEM}
    +pbuild::pre_compile
    +pbuild::compile
    +pbuild::post_compile_${SYSTEM}
    +pbuild::post_compile
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Compile the software.

    +
    +
    +

    Before these functions are called, the build-system changes to the +build directory (${BUILD_DIR}).

    +
    +
    +

    In the most uses cases the default function pbuild::compile provided by +the build-system can be used and nothing must be implemented in the +build-script. The pre- and post-hooks might be useful in cases where

    +
    +
    +
      +
    • +

      to run other make targets than all

      +
    • +
    • +

      multiple packages must be compiled into one module

      +
    • +
    • +

      to compile a dependency required by the main package.

      +
    • +
    +
    +
    +

    If the default function cannot be used, the pbuild::compile +function must be implemented in the build-script.

    +
    +
    +
    +
    +

    Example

    +
    +
    +

    Excerpt from perl build-script

    +
    +
    +
    +
    pbuild::post_compile() {
    +        make test
    +}
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/compile_in_sourcetree.html b/doc/html/man3/compile_in_sourcetree.html new file mode 100644 index 0000000..d4bfec5 --- /dev/null +++ b/doc/html/man3/compile_in_sourcetree.html @@ -0,0 +1,60 @@ + + + + + + + + +pbuild::compile_in_sourcetree + + + + + +
    +
    +
    +
    +
    +
    pbuild::compile_in_sourcetree
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    By default the build-system compiles software in a separate build-directory. This is not possible with all software. With the function pbuild::compile_in_sourcetree the build-directory is set to the source-directory.

    +
    +
    +
    +
    +

    Example

    +
    +
    +
    +
    pbuild::compile_in_sourcetree
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/configure.html b/doc/html/man3/configure.html new file mode 100644 index 0000000..8d8db5f --- /dev/null +++ b/doc/html/man3/configure.html @@ -0,0 +1,176 @@ + + + + + + + +pbuild::configure: Configure software + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::pre_configure_${SYSTEM}
    +pbuild::pre_configure
    +pbuild::configure
    +pbuild::post_configure_${SYSTEM}
    +pbuild::post_configure
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Configure the software for compilation.

    +
    +
    +

    Before these functions are called, the build-system changes to the +build directory (${BUILD_DIR}).

    +
    +
    +

    In the most uses cases the default function pbuild::configure provided by +the build-system can be used and nothing must be implemented in the +build-script.

    +
    +
    +

    The default function first searches whether the software can be +configured with autotools. If yes, configuration with autotools will +be performed. Otherwise the existence of a CMake script will be +checked. If found, configuration will be done via CMake. If scripts +for both configuration tools exist, the to be used tool can be +selected with pbuild::use_autotools or +pbuild::use_cmake. Arguments to configure or +cmake can be set with +pbuild::add_configure_args.

    +
    +
    +

    A common use case for the pre-configure hooks is to define arguments +passed to autotools or CMake by the default function.

    +
    +
    +

    If the default function cannot be used, the pbuild::configure +function must be implemented in the build-script.

    +
    +
    +
    +
    +

    Examples

    +
    +
    +

    Excerpt from the parallel HDF5 build-script

    +
    +
    +
    +
    pbuild::pre_configure() {
    +        pbuild::add_configure_args "CC=${MPICC}"
    +        pbuild::add_configure_args "CXX=${MPICXX}"
    +
    +        pbuild::add_configure_args "--enable-shared"
    +        pbuild::add_configure_args "--enable-parallel"
    +        pbuild::add_configure_args "--enable-cxx"
    +        pbuild::add_configure_args "--enable-unsupported"
    +        #pbuild::add_configure_args "--enable-threadsafe"
    +        pbuild::add_configure_args "--with-pic"
    +
    +        local enable_fortran='yes'
    +
    +        case "${COMPILER}" in
    +                clang-macos )
    +                        enable_fortran='no'
    +                        # we do not have Fortran in Xcode
    +                        ;;
    +                pgi )
    +                        # PGI uses GCC's include files, some object files and
    +                        # the STL implementation!
    +                        # The PGI C pre-processor is broken and doesn't work
    +                        # for HDF5. We use the pre-processor of the underlying
    +                        # GCC...
    +                        # This is a bit hackish!
    +                        #
    +                        # The following eval sets GCCDIR! Which is something
    +                        # like:
    +                        # /opt/psi/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0
    +                        #
    +                        eval $(pgcc -show 2>/dev/null | \
    +                                awk '/^GCCDIR[[:space:]]*=/{gsub(/[[:space:]]/,""); print $0}')
    +                        pbuild::add_configure_args "CPP=${GCCDIR%%/..*}/cpp"
    +                        pbuild::add_configure_args "CFLAGS=-fPIC"
    +                        pbuild::add_configure_args "CXXFLAGS=-fPIC"
    +                        pbuild::add_configure_args "FCFLAGS=-fPIC"
    +                        ;;
    +        esac
    +
    +        if [[ "${enable_fortran}" ===== 'yes' ]]; then
    +                pbuild::add_configure_args "F77=${MPIF77}"
    +                pbuild::add_configure_args "F90=${MPIF90}"
    +                pbuild::add_configure_args "FC=${MPIFC}"
    +                pbuild::add_configure_args "FORTRAN=${MPIFORTRAN}"
    +                pbuild::add_configure_args "--enable-fortran"
    +        fi
    +
    +
    +
    +

    Simplified excerpt from the OpenBLAS build-script

    +
    +
    +
    +
    pbuild::configure() {
    +        case ${COMPILER} in
    +        gcc )
    +                CC='gcc'
    +                ;;
    +        intel )
    +                CC='icc'
    +                ;;
    +        clang-macos )
    +                CC='gcc'
    +                ;;
    +        * )
    +                die 3 "Oops: unknown compiler: ${COMPILER}"
    +                ;;
    +        esac
    +        cat <<EOF > "${SRC_DIR}/make.inc"
    +SHELL = /bin/sh
    +PLAT =
    +DRVOPTS  = \$(NOOPT)
    +ARCHFLAGS= -ru
    +EOF
    +        echo "USE_SIMPLE_THREADED_LEVEL3 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX2 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        if pbuild::use_flag "omp"; then
    +                echo "USE_THREAD = 1" >> "${SRC_DIR}/Makefile.rule"
    +        else
    +                echo "USE_THREAD = 0" >> "${SRC_DIR}/Makefile.rule"
    +        fi
    +}
    +
    +pbuild::post_configure_Darwin() {
    +        sed -i.bak "s/MACOSX_DEPLOYMENT_TARGET=.*/MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET/" \
    +                "${SRC_DIR}/Makefile.system"
    +}
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/install.html b/doc/html/man3/install.html new file mode 100644 index 0000000..94a1260 --- /dev/null +++ b/doc/html/man3/install.html @@ -0,0 +1,71 @@ + + + + + + + +pbuild::install: Install software + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::pre_install_${SYSTEM}
    +pbuild::pre_install
    +pbuild::install
    +pbuild::post_install_${SYSTEM}
    +pbuild::post_install
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Compile the software.

    +
    +
    +

    Before these functions are called, the build-system changes to the +build directory (${BUILD_DIR}).

    +
    +
    +

    In the many uses cases the default function pbuild::install provided by +the build-system can be used and nothing must be implemented in the +build-script. A typical use case for the post-install hook is to install required libraries from other modules or the system to reduce or eliminate run-time dependencies

    +
    +
    +

    If the default function cannot be used, the pbuild::install +function must be implemented in the build-script.

    +
    +
    +
    +
    +

    Example

    +
    +
    +
    +
    pbuild::
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/install_docfile.html b/doc/html/man3/install_docfile.html new file mode 100644 index 0000000..cd32b55 --- /dev/null +++ b/doc/html/man3/install_docfile.html @@ -0,0 +1,60 @@ + + + + + + + +pbuild::install_docfiles: Set documentation files to be installed + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::install_docfiles fname...
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Install the passed files into $PREFIX/share/doc/$P. At least the file containing the license and copyright should be installed.

    +
    +
    +
    +
    +

    Example

    +
    +
    +

    Excerpt from parallel-netcdf build-script:

    +
    +
    +
    +
    pbuild::add_docfiles 'AUTHORS' 'CREDITS'
    +pbuild::add_docfiles 'COPYING' 'COPYRIGHT'
    +pbuild::add_docfiles 'ChangeLog' 'NEWS'
    +pbuild::add_docfiles 'RELEASE_NOTES'
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/prep.html b/doc/html/man3/prep.html new file mode 100644 index 0000000..3fcd813 --- /dev/null +++ b/doc/html/man3/prep.html @@ -0,0 +1,94 @@ + + + + + + + +pbuild::prep: Download and unpack + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::pre_prep_${SYSTEM}
    +pbuild::pre_prep
    +pbuild::prep
    +pbuild::post_prep_${SYSTEM}
    +pbuild::post_prep
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Functions to prepare the sources. This includes

    +
    +
    +
      +
    • +

      downloading required files a verifying the checksums

      +
    • +
    • +

      unpacking

      +
    • +
    • +

      applying patches

      +
    • +
    +
    +
    +

    Before the prep-functions are called, the build-system changes to the source +directory (${SRC_DIR}).

    +
    +
    +

    In the most uses cases the default function pbuild::prep provided by +the build-system can be used and nothing must be implemented in the +build-script. In some rare cases pre- or post-hooks are required to +make the default function feasible. One use case with autotools for a post-hook is to create the configure scripts, if only configure.ac is shipped with the software.

    +
    +
    +

    The default hooks provided by the build system are only stubs and do +nothing.

    +
    +
    +

    If the default function cannot be used, it must be implemented in the build-script.

    +
    +
    +
    +
    +

    Example

    +
    +
    +

    The source distribution of the IOAPI library contains object files! These files must be removed after unpacking:

    +
    +
    +
    +
    pbuild::post_prep() {
    +        find "${SRC_DIR}" -name "*.mod" -exec rm {} \;
    +        find "${SRC_DIR}" -name "*.o" -exec rm {} \;
    +}
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/set_download_url.html b/doc/html/man3/set_download_url.html new file mode 100644 index 0000000..2c84a2c --- /dev/null +++ b/doc/html/man3/set_download_url.html @@ -0,0 +1,72 @@ + + + + + + + +pbuild::set_download_url: Set download URL + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::set_download_url URL [fname]
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Tell the build system where to download the required (source-)files. If fname is passed, it will be used as the output file-name of the download.

    +
    +
    +

    In some cases software must be downloaded from a Git repository on Github, Bitbucket or Gitlab.

    +
    +
    +

    To download a certain tag/version from Github, Bitbucket or Gitlab use:

    +
    +
    +
    +
    https://github.com/OWNER/PROJECT/archive/${V_PKG}/$P-${V_PKG}.tar.gz
    +https://bitbucket.org/OWNER/PROJECT/get/${V_PKG}.tar.gz#/$P-%{V_PKG}.tar.gz
    +https://gitlab.com/OWNER/PROJECT/-/archive/${V_PKG}/$P-${V_PKG}.tar.gz
    +
    +
    +
    +
    +
    +

    Examples

    +
    +
    +

    Excerpt from Trilinos build-script:

    +
    +
    +
    +
    pbuild::set_download_url \
    +        "https://github.com/$P/$P/tarball/$P-release-${V//./-}" \
    +        "$P-$V.tar.gz"
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/set_sha256sum.html b/doc/html/man3/set_sha256sum.html new file mode 100644 index 0000000..705808c --- /dev/null +++ b/doc/html/man3/set_sha256sum.html @@ -0,0 +1,58 @@ + + + + + + + +pbuild::set_sha256sum: Pass SHA256 hash sum to build-system + + + + + +
    +
    +

    Synopsis

    +
    +
    +
    +
    pbuild::set_sha256sum SHA256_HASH
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Tell the build-system which SHA256 hash sum a file must have. The format of the argument is file-name:hash-sum.

    +
    +
    +
    +
    +

    Examples

    +
    +
    +

    Excerpt from Trilinos build-script:

    +
    +
    +
    +
    pbuild::set_sha256sum \
    +	"trilinos-12.12.1.tar.gz:c8f2029fa36230b9f384c56139aaa33111227bcf653e73f7daf3c9efdecc1d2d"
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/supported_compilers.html b/doc/html/man3/supported_compilers.html new file mode 100644 index 0000000..8a09e1b --- /dev/null +++ b/doc/html/man3/supported_compilers.html @@ -0,0 +1,60 @@ + + + + + + + + +pbuild::set_supported_compilers + + + + + +
    +
    +
    +
    +
    +
    pbuild::supported_compilers STRING...
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Set list of compiler which can be used to compile the module.

    +
    +
    +
    +
    +

    Example

    +
    +
    +
    +
    pbuild::
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/supported_os.html b/doc/html/man3/supported_os.html new file mode 100644 index 0000000..96f5589 --- /dev/null +++ b/doc/html/man3/supported_os.html @@ -0,0 +1,50 @@ + + + + + + + + +pbuild::supported_systems + + + + + +
    +
    +
    +
    +
    +
    pbuild::supported_system STRING...
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Some modules can be build only for dedicated operating systems. This is particularly the case for operating system specific tools like patchelf.

    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/use_autotools.html b/doc/html/man3/use_autotools.html new file mode 100644 index 0000000..8cabadc --- /dev/null +++ b/doc/html/man3/use_autotools.html @@ -0,0 +1,56 @@ + + + + + + + + +pbuild::use_autotools + + + + + +
    +
    +
    +
    +
    +
    pbuild::use_autotools
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Force the use of autotools.

    +
    +
    +
    +
    +

    Example

    +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/use_cmake.html b/doc/html/man3/use_cmake.html new file mode 100644 index 0000000..c968d12 --- /dev/null +++ b/doc/html/man3/use_cmake.html @@ -0,0 +1,56 @@ + + + + + + + + +pbuild::use_cmake + + + + + +
    +
    +
    +
    +
    +
    pbuild::use_cmake
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Force the use of CMake.

    +
    +
    +
    +
    +

    Example

    +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man3/use_flag.html b/doc/html/man3/use_flag.html new file mode 100644 index 0000000..1c7b0da --- /dev/null +++ b/doc/html/man3/use_flag.html @@ -0,0 +1,92 @@ + + + + + + + + +pbuild::use_flag + + + + + +
    +
    +
    +
    +
    +
    pbuild::use_flag FLAG
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Test whether we are building with FLAG.

    +
    +
    +
    +
    +

    Example

    +
    +
    +

    Excerpt from OpenBLAS build-script

    +
    +
    +
    +
    pbuild::configure() {
    +        case ${COMPILER} in
    +        gcc )
    +                CC='gcc'
    +                ;;
    +        intel )
    +                CC='icc'
    +                ;;
    +        clang-macos )
    +                CC='gcc'
    +                ;;
    +        * )
    +                die 3 "Oops: unknown compiler: ${COMPILER}"
    +                ;;
    +        esac
    +        cat <<EOF > "${SRC_DIR}/make.inc"
    +SHELL = /bin/sh
    +PLAT =
    +DRVOPTS  = \$(NOOPT)
    +ARCHFLAGS= -ru
    +EOF
    +        echo "USE_SIMPLE_THREADED_LEVEL3 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX2 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        if pbuild::use_flag "omp"; then
    +                echo "USE_THREAD = 1" >> "${SRC_DIR}/Makefile.rule"
    +        else
    +                echo "USE_THREAD = 0" >> "${SRC_DIR}/Makefile.rule"
    +        fi
    +}
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man4/module_config.html b/doc/html/man4/module_config.html new file mode 100644 index 0000000..195725d --- /dev/null +++ b/doc/html/man4/module_config.html @@ -0,0 +1,145 @@ + + + + + + + +Pmodules 1.0: .release-version + + + + + +
    +
    +

    Table of Contents
    +Pmodules 1.0 configuration file .release-version
    +Pmodules 1.1 and newer configuration file .config-version

    +
    +
    + + + + + +
    + + +
    +

    The runtime configuration files are evaluated only for modules inside +the Pmodules hierarchy. If you use modbuild these files are created +automatically. Otherwise you have to create them by hand.

    +
    +
    +
    +
    +

    Pmodules 1.0: .release-version

    +
    +
    +

    In .release-version the release stage of a module is +defined. The file must be in the same directory as the modulefile. The +content is a single line defining the release stage. Allowed text is

    +
    +
    +
      +
    • +

      unstable

      +
    • +
    • +

      stable

      +
    • +
    • +

      deprecated

      +
    • +
    +
    +
    +

    If the file doesn’t exist and the module is inside the Pmodule +hierarchy unstable. All modules outside the Pmodules hierarchy are +considered as stable.

    +
    +
    + + + + + +
    + + +
    +

    This configuration file is deprecated in version 1.1 and newer. Please +see next section.

    +
    +
    +
    +
    +
    +
    +

    Pmodules 1.1 and newer: .config-version

    +
    +
    +

    In .config-version the following properties of a module can be +configured:

    +
    +
    +
      +
    • +

      the release stage

      +
    • +
    • +

      the systems on which a module is available

      +
    • +
    • +

      the systems on which a module is unavailable

      +
    • +
    +
    +
    +

    The format of the file is YAML.

    +
    +
    +
    +
    relstage
    +
    +

    The release stage of the module. Allowed values are +unstable, stable and deprecated.

    +
    +
    systems
    +
    +

    Sequence of systems on which the module is available. Systems +can be hostnames with shell style glob pattern or OS names like +(rhel7, rhel8).

    +
    +
    blocklist
    +
    +

    Sequence of systems on which the module is no +available. Systems can be hostnames with shell style glob patterns or +OS names.

    +
    +
    +
    +
    +

    Example:

    +
    +
    +
    +
    relstage: unstable
    +systems: [merlin-*, ra-*]
    +blocklist: []
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man4/modulefile.html b/doc/html/man4/modulefile.html new file mode 100644 index 0000000..1a9b68b --- /dev/null +++ b/doc/html/man4/modulefile.html @@ -0,0 +1,480 @@ + + + + + + + +modulefiles + + + + + +
    +
    +

    NAME

    +
    +
    +

    modulefile - files containing Tcl code for the Modules package

    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    modulefiles are written in the Tool Command Language, Tcl(n) and are +interpreted by the modulecmd program via the module(1) user +interface. modulefiles can be loaded, unloaded, or switched on-the-fly +while the user is working; and can be used to implement site policies +regarding the access and use of applications.

    +
    +
    +

    A modulefile begins with the shebang, ‘#%Pmodule’ or +‘#%Module’. The shebang ‘#%Pmodule’ should be used in modulefiles +using the Pmodules extension. A version number may be placed after +this string. The version number is useful as the modulefile format may +change. If a version number doesn’t exist, then modulecmd will assume +the modulefile is compatible with the latest version. The current +modulefile version is 1.0. Files without the magic cookie will not be +interpreted by modulecmd.

    +
    +
    +

    Each modulefile contains the changes to a user’s environment needed to +access an application. Tcl is a simple programming language which +permits modulefiles to be arbitrarily complex, depending upon the +application’s and the modulefile writer’s needs.

    +
    +
    +

    A typical modulefiles is a simple bit of code that set or add entries +to the PATH, MANPATH, or other environment variables. Tcl has +conditional statements that are evaluated when the modulefile is +loaded. This is very effective for managing path or environment +changes due to different OS releases or architectures. The user +environment information is encapsulated into a single modulefile kept +in a central location. The same modulefile is used by every user on +any machine. So, from the user’s perspective, starting an application +is exactly the same irrespective of the machine or platform they are +on.

    +
    +
    +

    modulefiles also hide the notion of different types of shells. From +the user’s perspective, changing the environment for one shell looks +exactly the same as changing the environment for another shell. This +is useful for new or novice users and eliminates the need for +statements such as "if you’re using the C Shell do this …​, otherwise +if you’re using the Bourne shell do this …​". Announcing and +accessing new software is uniform and independent of the user’s +shell. From the modulefile writer’s perspective, this means one set of +information will take care of every type of shell.

    +
    +
    +

    Module specific commands

    +
    +

    The Pmodules Package uses commands which are extensions to the "standard" Tool Command Language Tcl(n) package.

    +
    +
    + + + + + +
    + + +
    +

    The following commands are Pmodules extensions:

    +
    +
    +
      +
    • +

      module-addgroup

      +
    • +
    • +

      module-url

      +
    • +
    • +

      module-license

      +
    • +
    • +

      module-maintainer

      +
    • +
    +
    +
    +
    +
    +

    Unless otherwise specified, the Module commands return the empty string. Some commands behave differently when a modulefile is loaded or unloaded. The command descriptions assume the modulefile is being loaded.

    +
    +
    +
    +
    break
    +
    +

    This is not a Modules-specific command, it’s actually part of Tcl, which has been overloaded similar to the continue and exit commands to have the effect of causing the module not to be listed as loaded and not affect other modules being loaded concurrently. All non-environment commands within the module will be performed up to this point and processing will continue on to the next module on the command line. The break command will only have this effect if not used within a Tcl loop though.

    +
    +

    An example: Suppose that a full selection of modulefiles are needed for various different architectures, but some of the modulefiles are not needed and the user should be alerted. Having the unnecessary modulefile be a link to the following notavail modulefile will perform the task as required.

    +
    +
    +
    +
    #%Module1.0
    +## notavail modulefile
    +##
    +proc ModulesHelp { } {
    +            puts stderr "This module does nothing but alert the user"
    +            puts stderr "that the [module-info name] module is not available"
    +}
    +
    +module-whatis "Notifies user that module is not available."
    +set curMod [module-info name]
    +if { [ module-info mode load ] } {
    +            puts stderr "Note: '$curMod' is not available for [uname sysname]."
    +}
    +break
    +
    +
    +
    +
    chdir directory
    +
    +

    Set the current working directory to directory.

    +
    +
    continue
    +
    +

    This is not a modules specific command but another overloaded Tcl command and is similar to the break or exit commands except the module will be listed as loaded as well as performing any environment or Tcl commands up to this point and then continuing on to the next module on the command line. The continue command will only have this effect if not used within a Tcl loop though.

    +
    +
    exit [N]
    +
    +

    This is not a modules specific command but another overloaded Tcl command and is similar to the break or continue commands. However, this command will cause the immediate cessation of this module and any additional ones on the command line. This module and the subsequent modules will not be listed as loaded. No environment commands will be performed in the current module.

    +
    +
    setenv variable value
    +
    +

    Set environment variable to value. The setenv command will also change the process' environment. A reference using Tcl’s env associative array will reference changes made with the setenv command. Changes made using Tcl’s env associative array will NOT change the user’s environment variable like the setenv command. An environment change made this way will only affect the module parsing process. The setenv command is also useful for changing the environment prior to the exec or system command. When a modulefile is unloaded, setenv becomes unsetenv. If the environment variable had been defined it will be overwritten while loading the modulefile. A subsequent unload will unset the environment variable - the previous value cannot be restored! (Unless you handle it explicitly …​ see below.)

    +
    +
    unsetenv variable [value]
    +
    +

    Unsets environment variable. However, if there is an optional value, then when unloading a module, it will set variable to value. The unsetenv command changes the process' environment like setenv.

    +
    +
    append-path|prepend-path [-d C|--delim C|--delim=C] variable value
    +
    +

    Append or prepend value to environment variable. The variable is a colon, or delimiter, separated list such as PATH=directory:directory:directory. The default delimiter is a colon ':', but an arbitrary one can be given by the --delim option. For example a space can be used instead (which will need to be handled in the Tcl specially by enclosing it in " " or { }). A space, however, can not be specified by the --delim=C form.

    +
    +

    If the variable is not set, it is created. When a modulefile is unloaded, append-path and prepend-path become remove-path.

    +
    +
    +
    remove-path [-d C|--delim C|--delim=C] variable value
    +
    +

    Remove value from the colon, or delimiter, separated list in variable. See prepend-path or append-path for further explanation of using an arbitrary delimiter. Every string between colons, or delimiters, in variable is compared to value. If the two match, value is removed from variable.

    +
    +
    prereq|conflict modulefile…​
    +
    +

    prereq and conflict control whether or not the modulefile will be loaded. The prereq command lists modulefiles which must have been previously loaded before the current modulefile will be loaded. Similarly, the conflict command lists modulefiles which conflict with the current modulefile. If a list contains more than one modulefile, then each member of the list acts as a Boolean OR operation. Multiple prereq and conflict commands may be used to create a Boolean AND operation. If one of the requirements have not been satisfied, an error is reported and the current modulefile makes no changes to the user’s environment.

    +
    +
    +
    +
    +

    If an argument for prereq is a directory and any modulefile from the directory has been loaded, then the prerequisite is met. For example, specifying X11 as a prereq means that any version of X11, X11/R4 or X11/R5, must be loaded before proceeding.

    +
    +
    +

    If an argument for conflict is a directory and any other modulefile from that directory has been loaded, then a conflict will occur. For example, specifying X11 as a conflict will stop X11/R4 and X11/R5 from being loaded at the same time.

    +
    +
    +
    +
    is-loaded modulefile…​
    +
    +

    The is-loaded command returns a true value if any of the listed modulefiles has been loaded. If a list contains more than one modulefile, then each member acts as a boolean OR operation. If an argument for is-loaded is a directory and any modulefile from the directory has been loaded is-loaded would return a true value.

    +
    +
    module [sub-command] [sub-command-args]
    +
    +

    Contains the same sub-commands as described in the module(1) man page in the Module Sub-Commands section. This command permits a modulefile to load or unload other modulefiles. No checks are made to ensure that the modulefile does not try to load itself. Often it is useful to have a single modulefile that performs a number of module load commands. For example, if every user on the system requires a basic set of applications loaded, then a core modulefile would contain the necessary +module load commands.

    +
    +
    module-info mode [modetype]
    +
    +

    Returns the current modulecmd’s mode as a string if no modetype is given.

    +
    +

    Returns 1 if modulecmd’s mode is modetype. modetype can be: load, unload, remove, switch, display, help, test or whatis.

    +
    +
    +
    module-info name
    +
    +

    Return the name of the modulefile. This is not the full pathname for modulefile. See the Modules Variables section for information on the full pathname.

    +
    +
    module-info specified
    +
    +

    Return the name of the modulefile specified on the command line.

    +
    +
    module-info shell [shellname]
    +
    +

    Return the current shell under which modulecmd.tcl was invoked if no shellname is given. The current shell is the first parameter of modulecmd.tcl, which is normally hidden by the module alias.

    +
    +

    If a shellname is given, returns 1 if modulecmd.tcl’s current shell is shellname, returns 0 elsewhere. shellname can be: sh, bash, ksh, zsh, csh, tcsh, fish, tcl, perl, python, ruby, lisp, cmake, r.

    +
    +
    +
    module-info shelltype [shelltypename]
    +
    +

    Return the family of the shell under which modulefile was invoked if no shelltypename is given. As of module-info shell this depends on the first parameter of modulecmd.tcl. The output reflects a shell type determining the shell syntax of the commands produced by modulecmd.tcl.

    +
    +

    If a shelltypename is given, returns 1 if modulecmd.tcl’s current shell type is shelltypename, returns 0 elsewhere. shelltypename can be: sh, csh, fish, tcl, perl, python, ruby, lisp, cmake, r.

    +
    +
    +
    module-info alias name
    +
    +

    Returns the full modulefile name to which the modulefile alias name is assigned

    +
    +
    module-info version modulefile
    +
    +

    Returns the physical module name and version of the passed symbolic version modulefile. The parameter modulefile might either be a full qualified modulefile with name and version, another symbolic modulefile name or a modulefile alias.

    +
    +
    module-info symbols modulefile
    +
    +

    Returns a list of all symbolic versions assigned to the passed modulefile. The parameter modulefile might either be a full qualified modulefile with name and version, another symbolic modulefile name or a modulefile alias.

    +
    +
    module-version modulefile version-name…​
    +
    +

    Assigns the symbolic version-name to the modulefile. This command should be placed in one of the modulecmd.tcl rc files in order to provide shorthand invocations of frequently used modulefile names.

    +
    +

    The special version-name default specifies the default version to be used for module commands, if no specific version is given. This replaces the definitions made in the .version file in former modulecmd releases.

    +
    +
    +

    The parameter modulefile may be either +* a fully or partially qualified modulefile with name / version. If name is '.' then the current directory name is assumed to be the module name. (Use this for deep modulefile directories.) +* a symbolic modulefile name +* another modulefile alias

    +
    +
    +
    module-alias name modulefile
    +
    +

    Assigns the modulefile to the alias name. This command should be placed in one of the modulecmd rc files in order to provide shorthand invocations of frequently used modulefile names.

    +
    +

    The parameter modulefile may be either

    +
    +
    +
      +
    • +

      a fully qualified modulefile with name and version

      +
    • +
    • +

      a symbolic modulefile name

      +
    • +
    • +

      another modulefile alias

      +
    • +
    +
    +
    +
    module-whatis string
    +
    +

    Defines a string which is displayed in case of the invocation of the module whatis command. There may be more than one module-whatis line in a modulefile. This command takes no actions in case of load, display, etc. invocations of modulecmd.

    +
    +

    The string parameter has to be enclosed in double-quotes if there’s more than one word specified. Words are defined to be separated by white-space characters (space, tab, cr).

    +
    +
    +
    module-url url
    +
    +

    Sets an URL which is displayed in case of the invocation of the module help command. The URL should point to the home-page of the software loaded by the module if any.

    +
    +
    module-license string
    +
    +

    Defines a string which is displayed in case of the invocation of the module help command. The string should either be the name of a well known license (like GPL V2) or a filename with the license text installed in the module.

    +
    +
    module-maintainer email
    +
    +

    Defines a string which is displayed in case of the invocation of the module help command. The +string should be the email address of the module maintainer.

    +
    +
    module-addgroup group
    +
    +

    Add the hierarchical group group to MODULEPATH.

    +
    +
    set-alias alias-name alias-string
    +
    +

    Sets an alias or function with the name alias-name in the user’s environment to the string alias-string. For some shells, aliases are not possible and the command has no effect. When a modulefile is unloaded, set-alias becomes unset-alias.

    +
    +
    unset-alias alias-name
    +
    +

    Unsets an alias with the name alias-name in the user’s environment.

    +
    +
    system string
    +
    +

    Pass string to the Tcl built-in command exec(n). For the exec(n) call modulecmd redirects stdout to stderr since stdout would be parsed by the evaluating shell. The exit status of the executed command is returned.

    +
    +
    uname field
    +
    +

    Provide lookup of system information. Most field information are retrieved from the tcl_platform array (see tclvars(n) man page). Uname will return the string "unknown" if information is unavailable for the field.

    +
    +

    uname will invoke uname(1) command in order to get the operating system version and domainname(1) to figure out the name of the domain.

    +
    +
    +

    field values are: +* sysname: the operating system name +* nodename: the hostname +* domain: the name of the domain +* release: the operating system release +* version: the operating system version +* machine: a standard name that identifies the system’s hardware

    +
    +
    +
    x-resource [resource-string|filename]
    +
    +

    Merge resources into the X11 resource database. The resources are used to control look and behavior of X11 applications. The command will attempt to read resources from filename. If the argument isn’t a valid file name, then string will be interpreted as a resource. Either filename or resource-string is then passed down to be xrdb(1) command.

    +
    +

    modulefiles that use this command, should in most cases contain one or more x-resource lines, each defining one X11 resource. The DISPLAY environment variable should be properly set and the X11 server should be accessible. If x-resource can’t manipulate the X11 resource database, the modulefile will exit with an error message.

    +
    +
    +

    Examples:

    +
    +
    +
    +
    +
    +
    +
    x-resource /u2/staff/leif/.xres/Ileaf
    +
    +
    +
    +

    The content of the Ileaf file is merged into the X11 resource database.

    +
    +
    +
    +
    x-resource [glob ~/.xres/ileaf]
    +
    +
    +
    +

    The Tcl glob function is used to have the modulefile read different resource files for different users.

    +
    +
    +
    +
    x-resource {Ileaf.popup.saveUnder: True}
    +
    +
    +
    +

    Merge the Ileaf resource into the X11 resource database.

    +
    +
    +
    +

    Modules Variables

    +
    +

    The ModulesCurrentModulefile variable contains the full pathname of the modulefile being interpreted.

    +
    +
    +
    +

    Locating Modulefiles

    +
    +

    Every directory in MODULEPATH is searched to find the modulefile. A directory in MODULEPATH can have an arbitrary number of sub-directories. If the user names a modulefile to be loaded which is actually a directory, the directory is opened and a search begins for an actual modulefile. First, modulecmd looks for a file with the name .modulerc in the directory. If this file exists, its contents will be evaluated as if it was a modulefile to be loaded. You may place module-version and module-alias commands inside this file.

    +
    +
    +

    Additionally, before seeking for .modulerc files in the module directory, the global modulerc file is sourced, too. If a named version default now exists for the modulefile to be loaded, the assigned modulefile now will be sourced. Otherwise the file .version is looked up in the directory.

    +
    +
    +

    If the .version file exists, it is opened and interpreted as Tcl code and takes precedence over a .modulerc file in the same directory. If the Tcl variable ModulesVersion is set by the .version file, modulecmd will use the name as if it specifies a modulefile in the directory. This will become the default modulefile in this case.

    +
    +
    +

    If ModulesVersion is a directory, the search begins anew down that directory. If the name does not match any files located in the current directory, the search continues through the remaining directories in MODULEPATH.

    +
    +
    +

    Every .version and .modulerc file found is Tcl interpreted. The difference is that .version only applies to the current directory, and the .modulerc applies to the current directory and all subdirectories. Changes made in these files will affect the subsequently interpreted modulefile.

    +
    +
    +

    If no default version may be figured out, then the highest numerically sorted modulefile or module alias under the directory will be used. The dictionary comparison method of the lsort(n) Tcl command is used to achieve this sort. If highest numerically sorted element is an alias, search continues on its modulefile target.

    +
    +
    +

    For example, it is possible for a user to have a directory named X11 which simply contains a .version file specifying which version of X11 is to be loaded. Such a file would look like:

    +
    +
    +
    +
    #%Module1.0
    +##
    +##  The desired version of X11
    +##
    +set ModulesVersion "R4"
    +
    +
    +
    +

    The equivalent .modulerc would look like:

    +
    +
    +
    +
    #%Module1.0
    +##
    +##  The desired version of X11
    +##
    +module-version "./R4" default
    +
    +
    +
    +

    If user names a modulefile that cannot be found in the first modulepath directory, modulefile will be searched in next modulepath directory and so on until a matching modulefile is found. If search goes through a module alias or a symbolic version, this alias or symbol is resolved by first looking at the modulefiles in the modulepath where this alias or symbol is defined. If not found, resolution looks at the other modulepaths in their definition order.

    +
    +
    +

    When locating modulefiles, if a .modulerc, a .version, a directory or a modulefile cannot be read during the search it is simply ignored with no error message produced. Visibility of modulefiles can thus be adapted to the rights the user has been granted. Exception is made when trying to directly access a directory or a modulefile. In this case, the access issue is returned as an error message.

    +
    +
    +

    A modulefile whose name or element in its name starts with a '.' dot is considered hidden. Hidden modulefile is not displayed or taken into account except if it is explicitly named. By inheritance, a symbolic version-name assigned to a hidden modulefile is displayed or taken into account only if explicitly named. Module alias targeting a hidden modulefile appears like any other module alias.

    +
    +
    +
    +

    Modulefile Specific Help

    +
    +

    Users can request help about a specific modulefile through the module(1) command. The modulefile can print helpful information or start help oriented programs by defining a ModulesHelp subroutine. The subroutine will be called when the module help modulefile command is used.

    +
    +
    +
    +

    Modulefile Specific Test

    +
    +

    Users can request test of a specific modulefile through the module(1) command. The modulefile can perform some sanity checks on its definition or on its underlying programs by defining a ModulesTest subroutine. The subroutine will be called when the module test modulefile command is used. The subroutine should return 1 in case of success. If no or any other value is returned, test is considered failed.

    +
    +
    +
    +

    Modulefile Display

    +
    +

    The module display modulefile command will detail all changes that will be made to the environment. After displaying all of the environment changes modulecmd.tcl will call the ModulesDisplay subroutine. The ModulesDisplay subroutine is a good place to put additional descriptive information about the modulefile.

    +
    +
    +
    +
    +
    +

    ENVIRONMENT

    +
    +
    +
    +
    MODULEPATH
    +
    +

    Path of directories containing modulefiles.

    +
    +
    +
    +
    +
    +
    +

    SEE ALSO

    +
    +
    +

    module(1), Tcl(n), TclX(n), xrdb(1), exec(n), uname(1), domainname(1), tclvars(n), lsort(n)

    +
    +
    +
    +
    +

    NOTES

    +
    +
    +

    Tcl was developed by John Ousterhout at the University of California at Berkeley.

    +
    +
    +

    TclX was developed by Karl Lehenbauer and Mark Diekhans.

    +
    +
    +

    Modules is covered by the GNU General Public License, version 2 and the GNU Lesser General Public License, version 2.1. Copyright © 1996-1999 John L. Furlani & Peter W. Osel, © 1998-2017 R.K.Owen, © 2002-2004 Mark Lakata, © 2004-2017 Kent Mein, © 2016-2017 Xavier Delaruelle. All rights reserved. Trademarks used are the property of their respective owners.

    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man5/config_yaml.html b/doc/html/man5/config_yaml.html new file mode 100644 index 0000000..187babe --- /dev/null +++ b/doc/html/man5/config_yaml.html @@ -0,0 +1,520 @@ + + + + + + + +YAML configuration files in Pmodules 1.1 and newer + + + + + +
    +
    +
    +
    + + + + + +
    + + +
    +

    Pmodules 1.1 and newer are supporting configuration files in YAML +format. For backward compatibility the build-systems supports both +types of configuration files with the YAML configuration file as +default.

    +
    +
    +
    +
    +

    The old format of the variants file is simple but very limited and +almost impossible to extend for new features. To overcome the +limitations a new format using YAML for variants files has been +introduced. For the time being both format are supported. But it is +highly recommended to use the YAML format for new modules and to +migrate existing variants files in the old format to the new.

    +
    +
    +
    +
    +

    Path to configuration file

    +
    +
    +

    The path to the configuration file is

    +
    +
    +

    build-recipe-dir/files/config.yaml

    +
    +
    +
    +
    +

    Format

    +
    +
    +
    +
    format: 1
    +module-name-1:
    +  defaults:                                       # optional
    +    config-block
    +  shasums:                                        # optional
    +    filename-1: sha256sum-1
    +    ...
    +  versions:
    +    version-keys-1:
    +      config:                                     # optional
    +        config-block
    +      variants:                                   # optional
    +        - config-block-1
    +        - ...
    +    ...
    +module-name-2:
    +  ...
    +
    +
    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Field-NameTypeDescription

    format

    unsigned int

    Format version of the YAML configuration file. For now it must be 1

    module-name-N

    config-block

    Configuration for the Pmodule module-name-N. Example: openmpi

    defaults

    config-block

    Default configuration. This block is optional.

    shasums

    MAP of string

    SHA256 hash sums of source files. Keys are filenames, the value the
    + corresponding SHA256 hash sum. This block is optional. A warning is + printed if a hash-sum is missing for a required file.

    versions

    MAP of configurations for different version keys

    A version key is a semicolon separated string of version + numbers. Version numbers can be specified with shell brace + expansion. Example:
    + 5.4.{0,1,2,3,4,5,8,9};5.2.{0,4,6,7,8};5.0.0;4.6.3

    config

    config-block

    Optional, version specific configuration block. Configurations + specified here are overriding the defaults.

    variants

    map of config-block

    Variants can be used to compile the some software with different

    +
    +
    +
    +

    Configuration blocks

    +
    +
    + + + + + +
    + + +
    +

    In configuration blocks everything is optional!

    +
    +
    +
    +
    +
    config-block
    +
    +
    build_requires: [build-req-1, ...]
    +compile_in_sourcetree: bool
    +configure_with: auto|autotools|cmake
    +default_variant: variant
    +docfiles: [file-1, ...]
    +group: group
    +group_deps:
    +  compilers:
    +    cpmpiler-1: [version-1, ...]
    +  mpi:
    +    mpi-implemation-1: [version-1, ...]
    +  hdf5:
    +    hdf5: [version-1, ...]
    +  hdf5_serial:
    +    hdf5[_serial]: [_version-1, ...]
    +overlay: overlay
    +relstage: release-stage
    +runtime_deps: [rt-dep-1, ...]
    +suffix: suffix
    +systems: [system-1, ...]
    +urls:
    +  - url: link
    +    name: filename
    +  - ...
    +variant: [variant-1, ...]
    +
    +
    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Field-NameTypeDescription

    build_requires

    array of string

    Modules required to build this module

    compile_in_sourcetree

    boolean

    Compile in source tree or in a dedicate build directory.

    configure_with

    string

    Choose software configuration system. Allowed values are:
    + auto: use autotools if available
    + autotools: use autotools
    + cmake: use cmake

    default_variant

    string

    (opt) Specifies the default variant to build if no variant is specified

    docfiles

    array of string

    Array with documentation files to be installed in share/doc/

    group

    string

    Group of the module

    group_deps

    group-deps-object

    Group/hierarchical dependencies like compiler, MPI, HDF5 modules

    overlay

    string

    Overlay of the module

    relstage

    string

    Release stage of the module. Allowed values are:
    +unstable: the module is still under development
    +stable: the module is ready to be used
    +deprecated: the module is deprecated
    +remove: the module is deprecated and marked to be removed
    +removed: the module has been removed

    runtime_deps

    sequence of strings

    Module to be loaded at runtime

    suffix

    string

    This string will be added to the version of the module

    systems

    sequence of strings

    A 'system' is either a hostname or OS name like rhel8. For
    + hostnames shell glob pattern matching like merlin-* can be used.

    urls

    sequence of links and optional file-names

    Software which must be downloaded to build a specific module.
    + url: Download link
    + name: optional output filename. The filename defaults the last + component of the url.
    + Default URLs can be defined by using the variables P, V, + V_PKG, V_MAJOR, V_MINOR and V_PATCHLVL. Example:
    + https://sourceforge.net/projects/gnuplot/files/$P/$V/$P-${V_PKG}.tar.gz

    variant

    sequence of strings

    Sequence of synonyms for a variant.

    +
    +
    +
    +

    Examples

    +
    +
    +
    Example: Gnuplot
    +
    +
    format: 1
    +gnuplot:
    +  defaults:                                             (1)
    +    group: Tools                                        (2)
    +    overlay: base                                       (3)
    +    relstage: stable                                    (4)
    +    systems: [rhel8, rhel7, rhel6]                      (5)
    +    docfiles: [Copyright, NEWS, README]                 (6)
    +    urls:                                               (7)
    +      - url: https://sourceforge.net/projects/gnuplot/files/$P/$V/$P-${V_PKG}.tar.gz
    +  shasums:                                              (8)
    +    gnuplot-5.4.10.tar.gz: 975d8c1cc2c41c7cedc4e323aff035d977feb9a97f0296dd2a8a66d197a5b27c
    +    gnuplot-5.4.9.tar.gz: a328a021f53dc05459be6066020e9a71e8eab6255d3381e22696120d465c6a97
    +    gnuplot-5.4.8.tar.gz: 931279c7caad1aff7d46cb4766f1ff41c26d9be9daf0bcf0c79deeee3d91f5cf
    +    gnuplot-5.4.5.tar.gz: 66f679115dd30559e110498fc94d926949d4d370b4999a042e724b8e910ee478
    +    gnuplot-5.4.4.tar.gz: 372300b7867f5b3538b25fc5d0ac7734af6e3fe0d202b6db926e4369913f0902
    +    gnuplot-5.4.3.tar.gz: 51f89bbab90f96d3543f95235368d188eb1e26eda296912256abcd3535bd4d84
    +    gnuplot-5.4.2.tar.gz: e57c75e1318133951d32a83bcdc4aff17fed28722c4e71f2305cfc2ae1cae7ba
    +    gnuplot-5.4.1.tar.gz: 6b690485567eaeb938c26936e5e0681cf70c856d273cc2c45fabf64d8bc6590e
    +    gnuplot-5.4.0.tar.gz: eb4082f03a399fd1e9e2b380cf7a4f785e77023d8dcc7e17570c1b5570a49c47
    +    gnuplot-5.2.8.tar.gz: 60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37
    +    gnuplot-5.2.7.tar.gz: 97fe503ff3b2e356fe2ae32203fc7fd2cf9cef1f46b60fe46dc501a228b9f4ed
    +    gnuplot-5.2.6.tar.gz: 35dd8f013139e31b3028fac280ee12d4b1346d9bb5c501586d1b5a04ae7a94ee
    +    gnuplot-5.2.4.tar.gz: 1515f000bd373aaa53b16183f274189d4f5e0ae47d22f434857933d16a4770cb
    +    gnuplot-5.0.0.tar.gz: 417d4bc5bc914a60409bb75cf18dd14f48b07f53c6ad3c4a4d3cd9a8d7370faf
    +    gnuplot-4.6.3.tar.gz: df5ffafa25fb32b3ecc0206a520f6bca8680e6dcc961efd30df34c0a1b7ea7f5
    +  versions:
    +    5.4.{0,1,2,3,4,5,8,9};5.2.{0,4,6,7,8};5.0.0;4.6.3:  (9)
    +    5.4.10:                                             (10)
    +      config:
    +        relstage: unstable
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    1Configuration is for gnuplot
    2will be installed in the group Tools
    3will be installed in the base overlay (/opt/psi)
    4the default release stage is stable
    5the module is available on these systems
    6install these files to $PREFIX/share/doc/gnuplot
    7download via this link
    8SHA256 hash sums for all available versions
    9no specific configuration required for these versions
    10release stage of version 5.4.10 is still unstable, override +default release stage. +---
    +
    +
    +
    Example: HDF5
    +
    +
    ---
    +# yamllint disable rule:line-length             (1)
    +format: 1
    +hdf5:                                           (2)
    +  defaults:
    +    group: MPI                                  (3)
    +    overlay: base                               (4)
    +    relstage: stable                            (5)
    +    systems: [rhel7, rhel8, rhel9]              (6)
    +    urls:                                       (7)
    +      - url: https://support.hdfgroup.org/ftp/HDF5/releases/$P-${V_MAJOR}.${V_MINOR}/$P-${V_PKG}/src/$P-${V_PKG}.tar.bz2
    +  shasums:                                      (8)
    +    hdf5-1.8.10-patch1.tar.bz2: 292afb3615ad9e68f4d5d18ebb11e4a73f2aece39f2da3875a457ff1e109fc41
    +    hdf5-1.8.12.tar.bz2: 10a369a4fc207bb09245f57c758e587420e06dfc0e445e337a58b0848b75a949
    +    ...
    +    hdf5-1.13.1.tar.bz2: e16973ec893e2d5aa9c8dc73e196db9b99a605578e7317b421c713936f8bf57d
    +
    +  versions:
    +    1.8.12:
    +      config:
    +        relstage: deprecated                    (9)
    +      variants:
    +        -
    +          group_deps:
    +            compiler: {gcc: [4.7.4, 4.8.3, 4.8.4, 4.9.2]}
    +            mpi: {openmpi: [1.6.5, 1.8.2, 1.8.4]}
    +        -
    +          group_deps:
    +            compiler: {gcc: [4.8.2]}
    +            mpi: {openmpi: [1.6.5]}
    +        ...
    +        -
    +          group_deps:
    +            compiler: {gcc: [5.1.0], intel: [15.2, 15.3]}
    +            mpi: {openmpi: [1.8.4]}
    +    ...
    +    1.10.8_slurm:
    +      variants:
    +        -
    +          group_deps:                           (10)
    +            compiler: {gcc: [10.4.0]}
    +            mpi: {openmpi: [4.1.4_slurm]}
    +        -
    +          relstage: unstable                    (11)
    +          group_deps:
    +            compiler: {gcc: [9.5.0, 10.4.0, 11.4.0, 12.3.0, 13.1.0]}
    +            mpi: {openmpi: [4.1.5_slurm]}
    +    ...
    +    1.12.0:
    +      variants:
    +        -
    +          group_deps:                           (12)
    +            compiler: {gcc: [7.5.0, 8.4.0, 9.3.0, 10.2.0]}
    +            mpi: {openmpi: [4.0.5]}
    +        -
    +          relstage: unstable                    (13)
    +          group_deps:
    +            compiler: {pgi: [21.5]}
    +            mpi: {pgi-mpi: [21.5]}
    +
    +    1.13.1:
    +      variants:
    +        -
    +          suffix: _slurm                        (14)
    +          variant: [_slurm]
    +          relstage: unstable
    +          group_deps:
    +            compiler: {gcc: [11.2.0]}
    +            mpi: {openmpi: [4.1.3_slurm]}
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    1disable rule to check line length in yamllint. Default is 80.
    2this configuration is for HDF5
    3TBW
    4TBW
    5TBW
    6TBW
    7TBW
    8TBW
    9TBW
    10TBW
    11TBW
    12TBW
    13TBW
    14TBW
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/man5/variants.html b/doc/html/man5/variants.html new file mode 100644 index 0000000..5e7abc4 --- /dev/null +++ b/doc/html/man5/variants.html @@ -0,0 +1,201 @@ + + + + + + + +"legacy" configuration files in Pmodules 1.0 + + + + + +
    +
    +
    +
    + + + + + +
    + + +
    +

    These type of configuration file is deprecated in version 1.1 and +newer. Starting with version 1.2 the use of YAML configuration files +documented in the next section is recommended.

    +
    +
    +
    +
    +

    In the Pmodules 1.0 configuration files the following properties are +defined per version:

    +
    +
    +
      +
    • +

      module name and version

      +
    • +
    • +

      release stage

      +
    • +
    • +

      dependencies

      +
    • +
    +
    +
    +

    Each definition must be on a single line.

    +
    +
    +
    +
    +

    Configuration filenames and search order

    +
    +
    +

    Configuration files are searched in the following order:

    +
    +
    +
      +
    1. +

      build-recipe-dir/files/variants.system

      +
    2. +
    3. +

      build-recipe-dir/files/variants.OS

      +
    4. +
    5. +

      build-recipe-dir/files/variants

      +
    6. +
    +
    +
    +

    Whereby

    +
    +
    +
    +
    system
    +
    +

    If the build script is called with the option +-system=sytem, this configuration file is used.

    +
    +
    OS
    +
    +

    Is the operating system/kernel name returned by uname +-s. On Linux this is Linux on macOS this is Darwin.

    +
    +
    +
    +
    +
    +
    +

    Format

    +
    +
    +

    A line in a configuration file is either

    +
    +
    +
      +
    • +

      a comment line starting with #

      +
    • +
    • +

      a empty line or a with white-space only

      +
    • +
    • +

      a definition of a variant

      +
    • +
    +
    +
    +
    +
    +

    Variant specifications

    +
    +
    +

    The form of a variant specification is

    +
    +
    +

    module-name release_stage dependencies

    +
    +
    +

    Whereby:

    +
    +
    +
    +
    module-name
    +
    +

    Is the name of the module including the version, an +optional release number and an optional suffix. The general form is

    +
    +

    P/V[-V_RELEASE][_SUFFIX]

    +
    +
    +
    release_stage
    +
    +

    Defines the release stage of this module +variant. Allowed values are unstable, stable, deprecated, +remove and removed. If the release stage is remove or removed, +this module variant will be removed (if not already removed).

    +
    +
    dependencies
    +
    +

    Defines the module dependencies. Dependencies can +be either a hierarchical dependency, a runtime dependency or a build +dependency. Hierarchical and runtime dependencies are loaded before +a module itself. Build dependencies are only loaded during build-time +and must be prefixed with b:.

    +
    +

    Dependencies are loaded in the specified order. It is recommended to +specify the dependencies of a the (hierarchical) group first, then +additional modules required at run-time and the modules required to +build it at the end.

    +
    +
    +

    If the module is in a hierarchical group like MPI, you must specify +the modules required for this group. For modules in the group

    +
    +
    +
      +
    • +

      Compiler a compiler must be specified.

      +
    • +
    • +

      MPI a compiler and a MPI implementation must be specified.

      +
    • +
    • +

      HDF5 a compiler, a MPI implementation and a parallel HDF5 module +must be specified.

      +
    • +
    • +

      HDF5_serial a compiler and a serial HDF5 module +must be specified.

      +
    • +
    +
    +
    +
    +
    +
    +
    Example
    +
    +
    parmetis/4.0.3  stable gcc/7.3.0 openmpi/3.0.0  b:cmake/3.6.3
    +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/module-names.html b/doc/html/module-names.html new file mode 100644 index 0000000..af5c867 --- /dev/null +++ b/doc/html/module-names.html @@ -0,0 +1,122 @@ + + + + + + + +Module names + + + + + +
    +
    +

    Module names

    +
    +
    +

    A full module name is composed of

    +
    +
    +
      +
    • +

      a name,

      +
    • +
    • +

      a version number,

      +
    • +
    • +

      an optional release number and

      +
    • +
    • +

      an optional use-flag.

      +
      +
      +
       Example:
      +the module name for the GNU multi-precision C library (MPC)
      +version 1.0.3 is `mpc/1.0.3`.
      +
      +
      +
    • +
    +
    +
    +

    The optional release number reflects changes in the module build while using the same software and version. There are three typical use cases for adding respective incrementing the release number of a module:

    +
    +
    +
      +
    1. +

      Changes in the way the software is compiled - for example by changing the arguments passed to autotools/CMake,

      +
    2. +
    3. +

      In many cases software depends on other software. It might be necessary to rebuild/update a module to incorporating these changes.

      +
    4. +
    5. +

      The modulefile and/or the build-script has been changed.

      +
    6. +
    +
    +
    +

    Example: The GNU MPC library depends on the GNU Multiple Precision +Arithmetic Library (GMP) and the GNU C library for multiple-precision +floating-point computations with correct rounding (MPFR). While MPC +version 1.0.3 was still the most current release, several version of +GMP and MPFR had been released. For an up to date MPC module, we had +to rebuild it several times:

    +
    + ++++ + + + + + + + + + + + + + + + + + + + + +
    MPC modulebuild with

    mpc/1.0.3

    gmp/6.1.0 mpfr/3.1.4

    mpc/1.0.3-1

    gmp/6.1.1 mpfr/3.1.4

    mpc/1.0.3-2

    gmp/6.1.2 mpfr/3.1.5

    +
    +

    The optional use-flag must be appended and separated with an underscore. Modules without an use-flag must be compiled for the x86_64 architecture. This feature is still experimental. For the time being any string can be used. Use-flags can be selected with the module use flag=FLAG command. In case an use-flag is set a module compiled with this use-flag will be preferred over the same module compiled without a use-flag. Typical use cases for these flags are

    +
    +
    +
      +
    • +

      compiling the same module for different CPU’s.

      +
    • +
    • +

      compiling the same module with different features enabled, like with and without OpenMPI.

      +
    • +
    • +

      support for special hardware for dedicated systems like Infiniband.

      +
    • +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/overlays.html b/doc/html/overlays.html new file mode 100644 index 0000000..df4bed8 --- /dev/null +++ b/doc/html/overlays.html @@ -0,0 +1,33 @@ + + + + + + + +Overlays + + + + + +
    +
    +

    Overlays

    +
    +
    +

    TBW

    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/pbuild.html b/doc/html/pbuild.html new file mode 100644 index 0000000..1c378a2 --- /dev/null +++ b/doc/html/pbuild.html @@ -0,0 +1,91 @@ + + + + + + + +Build-System + + + + + +
    +
    +

    Build-System

    +
    +

    Unresolved directive in pbuild.adoc - include::man3/add_to_group.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/set_download_url.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/set_sha256sum.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/add_patch.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/compile_in_sourcetree.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/prep.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/use_autotools.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/use_cmake.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/add_configure_args.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/configure.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/compile.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/install.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/install_docfile.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/supported_compilers.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/supported_os.adoc[]

    +
    +
    +
    +

    Unresolved directive in pbuild.adoc - include::man3/use_flag.adoc[]

    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/releases.html b/doc/html/releases.html new file mode 100644 index 0000000..e340f1c --- /dev/null +++ b/doc/html/releases.html @@ -0,0 +1,45 @@ + + + + + + + +Releases + + + + + +
    +
    +

    Releases

    +
    +
    +

    The life-time of a module has three phases:

    +
    +
    +
    unstable
    +

    A module is unstable during development and testing. As long as a module is unstable, it can be changed.

    +
    +
    +
    stable
    +

    After testing a module is marked as stable. Changes to the module are not allowed any more.

    +
    +
    +
    deprecated
    +

    A module marked as deprecated should not be used any more. Deprecated modules can be removed after a certain time in this phase.

    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/site-specific-notes.html b/doc/html/site-specific-notes.html new file mode 100644 index 0000000..8f7032b --- /dev/null +++ b/doc/html/site-specific-notes.html @@ -0,0 +1,157 @@ + + + + + + + +Site specific setup + + + + + +
    +
    +

    Site specific setup

    +
    +
    +

    In this section we document site specific aspects of the Pmodules Environment installation.

    +
    +
    +

    Pmodules @PSI

    +
    +

    Installation overview

    +
    +

    The Pmodules Environment must be accessed via the path /opt/psi. This +is either a symbolic link to or a bind mount of a dedicated +directory on AFS.

    +
    +
    +

    The minimum required operating system is RHEL6 or clone. Other Linux +distributions with glibc 2.12 or newer should work too. It might be +necessary to install some libraries used by certain modules. In general +the modules are build with as few dependencies to system libraries as +possible.

    +
    +
    +

    At PSI several Pmodules Environments are available covering +miscellaneous use cases like desktop, dedicated HPC systems and +operating systems like Linux and macOS. The main reason to provide +different environments for the same operating systems is, to be able to +support different Pmodules configurations and different sets of groups +inside the environments. The following environments are available:

    +
    +
    +
    +
    psi.x86_64_slp6
    +
    +

    Pmodules environment for desktop systems.

    +
    +
    psi.merlin
    +
    +

    Pmodules environment for the HPC system Merlin. For the +time being this is identical with the environment for desktop systems.

    +
    +
    psi.ra
    +
    +

    Pmodules environment for the HPC system Merlin. This +environment provides all modules of the desktop environment plus the +groups EM and MX.

    +
    +
    psi.pmod6
    +
    +

    Pmodules environment for the development system +pmod6.psi.ch

    +
    +
    psi.i386_el6
    +
    +

    Pmodules environment for 32bit CPU. This is for legacy +applications and modules only!

    +
    +
    psi.amd64_darwin_130
    +
    +

    Pmodules environment for macOS >= 10.12.

    +
    +
    +
    +
    +
    +

    Internal organisation with AFS volumes

    +
    +

    At a first glance the internal organisation with several AFS volumes for +modules, groups and environments looks confusing, complicate and +overdone. But it is flexible and has some advantages on AFS like +reasonable volume sizes respective number of files per volume.

    +
    +
    +
    Module-volumes
    +
    +

    It is strongly recommended to create and use a dedicated AFS volume per +module. In the normal case one volume is sufficient for all versions of +a module. In some special cases like Intel Compiler, Matlab etc. it is +strongly recommended to create and use one AFS volumes per version.

    +
    +
    +
    +
    Group-volumes
    +
    +

    Groups are containers for modules. Most groups are shared with multiple +environments. Groups are stored in dedicated AFS volumes, one volume per +group. In group-volumes module-volumes are mounted. It is strongly +recommended not to install modules in group-volumes but to create +volumes per module. For a group providing modules for a dedicated system +it can be acceptable to store special volumes directly into the +group-volume.

    +
    +
    +
    +
    Environment-volumes
    +
    +

    All environments are stored in a dedicated AFS volume. This volumes are +mounted in the directory /afs/psi.ch/sys. The name of the mount point +is the same as the environment names listed above. The volumes used to +provide an environment should be used to mount group volumes.

    +
    +
    +
    Example 1. GCC modules for Linux
    +
    +
    +

    All GCC versions are installed in the directory +/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc. This is a mount point +for the module-volume m.e6.P.gcc.

    +
    +
    +

    /afs/psi.ch/sys/psi.x86_64_slp6/Programming is a mount-point for the +group-volume m.e6.Programming

    +
    +
    +

    /afs/psi.ch/sys/psi.x86_64_slp6 is a mount-point for the +environment-volume sys.psi.x86_64_sl6.

    +
    +
    +
    +
    +
    +
    +

    Adding a new group, module or version

    +
    +

    A consequence of the organisation into AFS volumes is, that a new volume +must be created for each new module, group and environment. For the time +being this must be done by an AFS administrator.

    +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/use_flag.html b/doc/html/use_flag.html new file mode 100644 index 0000000..9d9e65e --- /dev/null +++ b/doc/html/use_flag.html @@ -0,0 +1,92 @@ + + + + + + + + +pbuild::use_flag + + + + + +
    +
    +
    +
    +
    +
    pbuild::use_flag FLAG
    +
    +
    +
    +
    +
    +

    Description

    +
    +
    +

    Test whether we are building with FLAG.

    +
    +
    +
    +
    +

    Example

    +
    +
    +

    Excerpt from OpenBLAS build-script

    +
    +
    +
    +
    pbuild::configure() {
    +        case ${COMPILER} in
    +        gcc )
    +                CC='gcc'
    +                ;;
    +        intel )
    +                CC='icc'
    +                ;;
    +        clang-macos )
    +                CC='gcc'
    +                ;;
    +        * )
    +                die 3 "Oops: unknown compiler: ${COMPILER}"
    +                ;;
    +        esac
    +        cat <<EOF > "${SRC_DIR}/make.inc"
    +SHELL = /bin/sh
    +PLAT =
    +DRVOPTS  = \$(NOOPT)
    +ARCHFLAGS= -ru
    +EOF
    +        echo "USE_SIMPLE_THREADED_LEVEL3 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX = 1" >> "${SRC_DIR}/Makefile.rule"
    +        echo "NO_AVX2 = 1" >> "${SRC_DIR}/Makefile.rule"
    +        if pbuild::use_flag "omp"; then
    +                echo "USE_THREAD = 1" >> "${SRC_DIR}/Makefile.rule"
    +        else
    +                echo "USE_THREAD = 0" >> "${SRC_DIR}/Makefile.rule"
    +        fi
    +}
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/html/writing-and-maintaining-variant-files.html b/doc/html/writing-and-maintaining-variant-files.html new file mode 100644 index 0000000..f81c7d4 --- /dev/null +++ b/doc/html/writing-and-maintaining-variant-files.html @@ -0,0 +1,154 @@ + + + + + + + +Writing and maintaining variant files + + + + + +
    +
    +

    Writing and maintaining variant files

    +
    +
    +

    The purpose of the variants files is to define the release of a module, the build- and run-time dependencies for each module version.

    +
    +
    +

    Locations

    +
    +

    variants files are searched in the several directories and various names, the first file found will be used:

    +
    +
    +
      +
    1. +

      $P/$V_MAJOR.$V_MINOR.$V_PATCHLVL/variants.$SYSTEM

      +
    2. +
    3. +

      $P/$V_MAJOR.$V_MINOR.$V_PATCHLVL/variants

      +
    4. +
    5. +

      $P/$V_MAJOR.$V_MINOR/variants.$SYSTEM

      +
    6. +
    7. +

      $P/$V_MAJOR.$V_MINOR/variants

      +
    8. +
    9. +

      $P/$V_MAJOR/variants.$SYSTEM

      +
    10. +
    11. +

      $P/$V_MAJOR/variants

      +
    12. +
    13. +

      $P/files/variants.$SYSTEM

      +
    14. +
    15. +

      $P/files/variants

      +
    16. +
    +
    +
    +

    The reason for supporting several location is to keep the files short +and easy to read. Which scheme should be used depends on the software. For +software on the top-level of the hierarchy (like Gnuplot or GCC), +$P/files/variants or $P/$V_MAJOR/variants is a good choice. For +software with lot of combinations like HDF5, +$P/$V_MAJOR.$V_MINOR/variants or +$P/$V_MAJOR.$V_MINOR.$V_PATCHLVL/variants is recommended.

    +
    +
    +

    System specific variants files are supported for two reasons. On different +operating systems like Linux and macOS the required dependencies might differ. +We have the same problem, if we want to build modules on a HPC system like Euler (ETHZ) or Edison (NERSC). The value of system defaults to the string returned by uname -s and can be overwritten with the argument --system.

    +
    +
    +
    +

    Format

    +
    +

    The variants files can contain any number of lines. A line is either +* a variant specification consisting of the module name and version, the release and all dependencies +* an empty line (white space is allowed) +* or a comment line. Comment lines can start with any string not matching the module name.

    +
    +
    +

    Variant specifications

    +
    +

    The form of a variant specification is

    +
    +
    +
    +
    $P/$V[-$V_RELEASE][_USEFLAG] unstable|stable|deprecated [group dependency...] [run-time dependency...] [build dependency...]
    +
    +
    +
    +
    Example
    +
    +
    parmetis/4.0.3  stable gcc/7.3.0 openmpi/3.0.0  b:cmake/3.6.3
    +
    +
    +
    +
    Module name and version
    +

    The line must begin with the full module name. This includes name, version as well as the optional release and use-flag. White-space at the beginning of the line is not allowed.

    +
    +
    +
    Release
    +

    The release is either unstable, stable or deprecated. The meaning of the releases is explained in the next section.

    +
    +
    +
    Dependencies
    +

    Dependencies are loaded in the specified order. It is recommended to specify the dependencies of a the (hierarchical) group first, then additional modules required at run-time and the modules required to build it at the end.

    +
    +
    +
    Hierarchical dependencies
    +

    If the module is in a hierarchical group like MPI, you must specify the modules required for this group. For modules in the group

    +
    +
    +
      +
    • +

      Compiler a compiler must be specified

      +
    • +
    • +

      MPI a compiler and a MPI implementation must be specified

      +
    • +
    • +

      HDF5 a compiler, a MPI implementation and a HDF5 module must be specified

      +
    • +
    • +

      …​

      +
    • +
    +
    +
    +
    +
    +

    Note: The order of these dependencies is relevant since the modules are loaded in the given order. Example: before a MPI module is available a compiler must be loaded. So a compiler module must be listed first!

    +
    +
    +
    +
    +
    Run-time dependencies
    +

    are automatically loaded before the module is loaded with the module load command. Run-time dependencies should be specified even if they are not required to build the module.

    +
    +
    +
    Build dependencies
    +

    are loaded before the actual build starts. Build dependencies are only required tp build the module. They are not automatically loaded together with the module. Build dependencies must be prefixed with b:.

    +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/doc/src/Building_Pmodules.adoc b/doc/src/Building_Pmodules.adoc new file mode 100644 index 0000000..4e5b646 --- /dev/null +++ b/doc/src/Building_Pmodules.adoc @@ -0,0 +1,298 @@ += *BUILDING PMODULES* + +== Introduction + +In the simplest case adding a Pmodule can be done by adding a modulefile to a certain directory. Below is an example of a "do nothing" modulefile in the group `Sandbox`. + +.Example: `/opt/psi/Sandbox/modulefiles/null/1.0.0` +[source,sh] +---- +#%Pmodule + +module-whatis "does absolutely nothing" +module-maintainer "Achim Gsell " +module-license "MIT" + +module-help " +This is a do nothing module. +" +---- + +In addition to the modulefile a corresponding configuration file - defining for example the release stage - should be installed in the same directory as the modulefile. See next section for a detailed documentation of configuration files. + +.Example: configuration file `/opt/psi/Sandbox/modulefiles/null/.release-1.0.0` for the `null/1.0.0` module +[source,sh] +---- +stable +---- + +Modulefiles are written in the Tool Command Language (Tcl). See section <> for a detailed documentation. In Pmodules version 1.1.16 and newer modulefiles written in Lua are also supported but with some limitations. + +The above example doesn't provide any software. In the following example we show a simple 'HelloWorld' module with a 'Hello, world!' program. + +.Example: modulefile `/opt/psi/Sandbox/modulefiles/HelloWorld/1.0.0`: +[source,sh] +---- +#%Pmodule + +module-whatis "'Hello, world!' module" +module-maintainer "Achim Gsell " +module-license "MIT" +module-url "http://pmodules.gitpages.psi.ch" + +module-help " +The module provides a 'Hello, world!' program. +" +---- + +.Example: configuration file `/opt/psi/Sandbox/modulefiles/HelloWorld/.release-1.0.0` for the `HelloWorld/1.0.0` module +[source,sh] +---- +unstable +---- + +.Example: `/opt/psi/Sandbox/HelloWorld/1.0.0/bin/hello`: +[source,sh] +---- +#!/usr/bin/env python3 + +print("Hello, world!") +---- + +In principal, it is possible to install modules 'by hand' by installing the software, module- and configuration files at the right place. For reproducibility, documentation and re-usability it is highly recommended to write build-recipes for each module or - at least - a README and host everything on a PSI Gitlab server. + +Overall the main cases for building modules are: + +* Building a module from source. This is the most common case. Examples: git, + gnuplot, openmpi, hdf5, ... + + In this case it is highly recommended to code each step - usually download, configure, compile and install - in a script, write a modulefile and a configuration file. +* Building a module with a binary package. Examples: Intel compiler, Matlab, + ANSYS, Mathematica, ... + + In this case best practice is to install the package by hand and write a "dummy" build script, a modulefile and a configuration file. If it is possible and simple to script the installation, code this in the build script. If you cannot easily script the installation, document each step in a README file. + +[NOTE] +==== +In any case: keep everything in a Git repository on either https://gitlab.psi.ch[gitlab.psi.ch] or https://git.psi.ch[git.psi.ch]. +The Git repository for the groups `Tool`, `Programming`, `Compiler`, `HDF5`, `HDF_serial` and `System` is https://gitlab.psi.ch/Pmodules/buildblocks[Pmodules/buildblock]. Other groups can be hosted anywhere. But to keep everything together a project in https://gitlab.psi.ch/Pmodules/[Pmodules] might be a good choice. +==== + +Many modules for the Pmodules environment have to be build from +source. The building plan of a module is coded in a so called +*_build-block_*. A build-block consists at least of a build-script with instruction how to download, compile and install a dedicated piece of +software, a modulefile and a configuration file. + +To avoid problems with dependencies to system libraries or installed software it is best practice to build modules on dedicated systems. At PSI: + +* For modules which should be able to run on all RHEL7 and newer systems, use the system pmod7.psi.ch. If you need access to the system please contact achim.gsell@psi.ch. + +* Merlin6 specific modules - like `openmpi`, `mpich` and modules depending on them - must be compiled on a Merlin6 login node. + +* Modules specific for a beamline should be compiled on a Ra login node with RHEL8 or a dedicated RHEL8 beamline system. + +[NOTE] +==== +If you build a module on RHEL7, it might not run on RHEL8 due to newer versions of system libraries. In must cases this can be solved by installing these system libraries in the module itself and setting the `RPATH`. The recommended path in this case is `$PREFIX/lib/system` whereby `$PREFIX` is the installation prefix of the software. +==== + +In the next section we describe how to write build recipes. + +== Predefined variables + +Since we use BASH for our build-scripts and Tcl for modulefiles, we use BASH/Tcl syntax for variables in this documentation. So, if `VARIABLE` is the name of a variable, `$VARIABLE` the value of it. + +*In modulefiles and build-scripts the following variables are predefined:* + +`P`:: the name of the module +`V`:: the module version. The version number consists of a major- and a minor version number, a patch-level and a release number. All numbers but the major version number are optional. Major-, minor number and patch-level are separated by dots, the release number by a minus. Example: `1.0.3-2` +`V_MAJOR`:: the major version number. Example: `1` +`V_MINOR`:: the minor version number. Example: `0` +`V_PATCHLVL`:: the patch-level. Example: `3` +`V_RELEASE`:: the release number. Example: `2` +`V_PKG`:: version number without release. +`GROUP`:: group the module is in. +`PREFIX`:: installation prefix of the module. +`PMODULES_ROOT`:: root of Pmodules installation. At PSI this is `/opt/psi`. + +*In build-scripts the following variables are predefined too:* + +`TEMP_DIR`:: directory for temporary files. +`SRC_DIR`:: directory of unpacked sources, set to `$PMODULES_TMPDIR/$P-$V/src` +`BUILD_DIR`:: build directory, set to `$PMODULES_TMPDIR/$P-$V/build` +`BUILDBLOCK_DIR`:: Directory where the build-script is in. +`BUILD_SCRIPT`:: Name of the build script. +`SYSTEM`,`OS`:: Can be set with the `--system` option. The value defaults to the string returned by `uname -s`. The use of `OS` is obsolete. + +*In modulefiles the following variables are predefined too:* + +`name`:: Same as `P` (obsolete, for historical reasons). +`version`:: Same as `V` (obsolete, for historical reasons). +`group`:: The group the module is member of. + +[id="building-modules", reftext="Building Pmodules"] +== Building a Pmodule + +To simplify the building of modules, Pmodules has a simple build system. The build system of Pmodules is far less powerful than the build system of Spack or NixOS, but fulfills its purpose for many modules. + +Perform the following steps for a new Pmodule: + +1. Create a directory with the name of the module. +2. Write the configuration file. See section <>. +3. Write the modulefile. See section <>. +4. Code all required steps to install a software in a script. If it is not possible to script everything, code as much as possible and document additional steps in a README file. See section <>. + +The first - and sometimes also to most challenging - step in building a Pmodule from source is to learn how to download, configure, compile and install a software package and dependencies the package has. The next steps are writing a configuration file, a modulefile and a script to download, configure, compile and install it. + +In general the following steps needs to be performed: + +prepare:: Download, unpack, apply patches (optional). Downloading the software might not be scriptable due to password protection or other measurements. + +configure:: (only for software distributed as source code) This step heavily depends on the software itself. In many cases autotools or CMake is used, in some cases you have to deal with Makefiles or other tools. + +build:: (only for software distributed as source code) compile/build everything + +install:: Install everything in the target directory. In case of a binary package this might not be scriptable. + +[id="writing-build-configuration-files", reftext="Writing build configuration files"] +== Writing build configuration files +include::Building_Pmodules/build-config-files/config_yaml.adoc[leveloffset=+2] + +--- + +[id="writing-build-scripts", reftext="Writing build scripts"] +== Writing build scripts + +Pmodules has it's own 'interpreter' to run build-scripts written in Bash. The name of the interpreter is `modbuild`. Thus the first line (the so called 'shebang') of a build-script must be +[source,sh] +---- +#!/usr/bin/env modbuild +---- +As already mentioned the four steps 'prepare', 'configure', 'build' and 'install' has to be performed to build a Pmodule. These steps maps to the functions: + +prepare:: + `pbuild::pre_prep()` + + `pbuild::prep()` + + `pbuild::post_prep()` +configure:: + `pbuild::pre_configure()` + + `pbuild::configure()` + + `pbuild::post_configure()` +compile:: + `pbuild::pre_compile()` + + `pbuild::compile()` + + `pbuild::post_compile()` +install:: + `pbuild::pre_install()` + + `pbuild::install()` + + `pbuild::post_install()` + +In many cases you don't have to implement the the functions `pbuild::prep()`, `pbuild::configure()`, `pbuild::compile()` and `pbuild::install()` or at least not all of them. The build-system provides default implementations for these functions. In the simplest case, the build script consists only of the shebang line (only for Pmodules >= 1.1). In this case all further information for building the module is in the configuration file. For software that uses autotools or CMake for configuration and creation of Makefiles, the standard functions can practically always be used. The functions `pbuild::pre_STEP` and `pbuild::post_STEP` can be used to hook into each step before and after the default function has been called. For example `pbuild::pre_configure()` can be used to set arguments for autotools or CMake as in the build-script for Gnuplot: + +.Example: build script for Gnuplot +[source,sh] +---- +#!/usr/bin/env modbuild + +pbuild::pre_configure() { + pbuild::add_configure_args '--with-latex=no' + pbuild::add_configure_args '--with-qt=no' +} +---- + +=== Overloading the default implementations + +If the build-system of the software package isn't autotools or CMake you have to overload the default implementation of `pbuild::configure`. +[source,sh] +---- +pbuild::configure(){ + # add code to configure the software package +} +---- +In case where no configuration is required, overload the default function with +[source,sh] +---- +pbuild::configure(){ + : # do nothing +} +---- +You can do the same with the other default implementation. + +=== Modules from binary packages + +If you have a binary package like Matlab, Mathematica, ANSYS, it might not be possible to script the installation. In this case you should use a dummy build-script like below and document the installation in a `README.md`: +[source,sh] +---- +#!/usr/bin/env modbuild + +pbuild::prep() { :; } +pbuild::configure() { :; } +pbuild::compile() { :; } +pbuild::install() { :; } +---- +If the installation can be scripted, code this in the function `pbuild::install`. +[source,sh] +---- +#!/usr/bin/env modbuild + +pbuild::prep() { :; } +pbuild::configure() { :; } +pbuild::compile() { :; } +pbuild::install() { + # add code to call the installer here +} +---- + +=== Calling the build-script +To call the build-script, cd into the directory of the script and run +[source,sh] +---- +./build VERSION_TO_BE_BUILD +---- + +.Example with output +[source,sh] +---- +pmod7:~/HelloWorld$ ./build 1.0.0 +Using YAML configuration file - /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml +HelloWorld/1.0.0: building ... +HelloWorld/1.0.0: +HelloWorld/1.0.0: start building ... +HelloWorld/1.0.0: preparing sources ... +HelloWorld/1.0.0: configuring ... +HelloWorld/1.0.0: compiling ... +HelloWorld/1.0.0: installing ... +HelloWorld/1.0.0: running post-installation for Linux ... +HelloWorld/1.0.0: Installing documentation to /opt/psi/Sandbox/HelloWorld/1.0.0/share/doc/HelloWorld +HelloWorld/1.0.0: adding modulefile to overlay 'base' ... +HelloWorld/1.0.0: Cleaning up '/var/tmp/gsell/HelloWorld-1.0.0/build'... +HelloWorld/1.0.0: Cleaning up '/var/tmp/gsell/HelloWorld-1.0.0/src'... +HelloWorld/1.0.0: Done ... +* * * * * + +pmod7:~/HelloWorld$ +---- + +You can run +[source,sh] +---- +./build --help +---- +to get a list of all option with a description. The most common option are + +`-f`:: to force a rebuild +`--verbose`:: to get a full debug trace. + +=== Functions to compare versions +include::Building_Pmodules/functions/cmp_versions.adoc[leveloffset=+3] + +=== Build functions +include::Building_Pmodules/functions/prep.adoc[leveloffset=+3] +--- +include::Building_Pmodules/functions/configure.adoc[leveloffset=+3] +--- +include::Building_Pmodules/functions/compile.adoc[leveloffset=+3] +--- +include::Building_Pmodules/functions/install.adoc[leveloffset=+3] + +== Runtime configuration files +include::Building_Pmodules/runtime-config-files/module_config.adoc[leveloffset=+1] + diff --git a/doc/src/Building_Pmodules/build-config-files/config_yaml.adoc b/doc/src/Building_Pmodules/build-config-files/config_yaml.adoc new file mode 100644 index 0000000..aad240d --- /dev/null +++ b/doc/src/Building_Pmodules/build-config-files/config_yaml.adoc @@ -0,0 +1,334 @@ += YAML configuration files in Pmodules 1.1 and newer + +[NOTE] +===================================================================== +Pmodules 1.1 and newer are supporting configuration files in YAML +format. For backward compatibility the build-systems supports both +types of configuration files with the YAML configuration file as +default. +===================================================================== + +The old format of the variants file is simple but very limited and +almost impossible to extend for new features. To overcome the +limitations a new format using YAML for variants files has been +introduced. For the time being both format are supported. But it is +highly recommended to use the YAML format for new modules and to +migrate existing variants files in the old format to the new. + +== Path to configuration file + +The path to the configuration file is + +`*_build-recipe-dir_*/files/config.yaml` + +== Format + +[source,yaml,subs="verbatim,quotes"] +---- +format: 1 +*_module-name-1_*: + defaults: # optional + *_config-block_* + shasums: # optional + *_filename-1_*: *_sha256sum-1_* + ... + versions: + *_version-keys-1_*: + config: # optional + *_config-block_* + variants: # optional + - *_config-block-1_* + - ... + ... +*_module-name-2_*: + ... +---- + +[cols="1,1,5"] +|=== +| Field-Name | Type | Description + +| `format` +| unsigned int +| Format version of the YAML configuration file. For now it must be `1` + +| `*_module-name-N_*` +| config-block +| Configuration for the Pmodule `*_module-name-N_*`. Example: `openmpi` + +| `defaults` +| config-block +| Default configuration. This block is optional. + +| `shasums` +| MAP of string +| SHA256 hash sums of source files. Keys are filenames, the value the + + corresponding SHA256 hash sum. This block is optional. A warning is + printed if a hash-sum is missing for a required file. + +| `versions` +| MAP of configurations for different version keys +| A version key is a semicolon separated string of version + numbers. Version numbers can be specified with shell brace + expansion. Example: + + `5.4.{0,1,2,3,4,5,8,9};5.2.{0,4,6,7,8};5.0.0;4.6.3` + +| `config` +| config-block +| Optional, version specific configuration block. Configurations + specified here are overriding the defaults. + +| `variants` +| map of config-block +| Variants can be used to compile the some software with different +| options. Example: `openmpi`` with and without Slurm support are +| variants of the same software. + +|=== + +== Configuration blocks + +[NOTE] +===================================================================== +In configuration blocks everything is optional! +===================================================================== + +.`config-block` +[source,yaml,subs="verbatim,quotes"] +---- +build_requires: [*_build-req-1_*, ...] +compile_in_sourcetree: *_bool_* +configure_with: auto|autotools|cmake +default_variant: *_variant_* +docfiles: [*_file-1_*, ...] +group: *_group_* +group_deps: + compilers: + *_cpmpiler-1_*: [*_version-1_*, ...] + mpi: + *_mpi-implemation-1_*: [*_version-1_*, ...] + hdf5: + hdf5: [*_version-1_*, ...] + hdf5_serial: + hdf5[__serial]: [*_version-1_*, ...] +overlay: *_overlay_* +relstage: *_release-stage_* +runtime_deps: [*_rt-dep-1_*, ...] +suffix: *_suffix_* +systems: [*_system-1_*, ...] +urls: + - url: *_link_* + name: *_filename_* + - ... +variant: [*_variant-1_*, ...] +---- + +[cols="1,1,5"] +|=== +| Field-Name | Type | Description + +| `build_requires` +| array of string +| Modules required to build this module + +| `compile_in_sourcetree` +| boolean +| Compile in source tree or in a dedicate build directory. + +| `configure_with` +| string +| Choose software configuration system. Allowed values are: + + `auto`: use autotools if available + + `autotools`: use autotools + + `cmake`: use cmake + +| `default_variant` +| string +| (opt) Specifies the default variant to build if no variant is specified + +| `docfiles` +| array of string +| Array with documentation files to be installed in `share/doc/` + +| `group` +| string +| Group of the module + +| `group_deps` +| group-deps-object +| Group/hierarchical dependencies like compiler, MPI, HDF5 modules + +| `overlay` +| string +| Overlay of the module + +| `relstage` +| string +| Release stage of the module. Allowed values are: + +`unstable`: the module is still under development + +`stable`: the module is ready to be used + +`deprecated`: the module is deprecated + +`remove`: the module is deprecated and marked to be removed + +`removed`: the module has been removed + +| `runtime_deps` +| sequence of strings +| Module to be loaded at runtime + +| `suffix` +| string +| This string will be added to the version of the module + +| `systems` +| sequence of strings +| A 'system' is either a hostname or OS name like `rhel8`. For + + hostnames shell glob pattern matching like `merlin-*` can be used. + +| `urls` +| sequence of links and optional file-names +| Software which must be downloaded to build a specific module. + + `url`: Download link + + `name`: optional output filename. The filename defaults the last + component of the `url`. + + Default URLs can be defined by using the variables `P`, `V`, + `V_PKG`, `V_MAJOR`, `V_MINOR` and `V_PATCHLVL`. Example: + + https://sourceforge.net/projects/gnuplot/files/$P/$V/$P-${V_PKG}.tar.gz + +| `variant` +| sequence of strings +| Sequence of synonyms for a variant. + +|=== + +== Examples + +.*Example: Gnuplot* +---- +format: 1 +gnuplot: + defaults: <1> + group: Tools <2> + overlay: base <3> + relstage: stable <4> + systems: [rhel8, rhel7, rhel6] <5> + docfiles: [Copyright, NEWS, README] <6> + urls: <7> + - url: https://sourceforge.net/projects/gnuplot/files/$P/$V/$P-${V_PKG}.tar.gz + shasums: <8> + gnuplot-5.4.10.tar.gz: 975d8c1cc2c41c7cedc4e323aff035d977feb9a97f0296dd2a8a66d197a5b27c + gnuplot-5.4.9.tar.gz: a328a021f53dc05459be6066020e9a71e8eab6255d3381e22696120d465c6a97 + gnuplot-5.4.8.tar.gz: 931279c7caad1aff7d46cb4766f1ff41c26d9be9daf0bcf0c79deeee3d91f5cf + gnuplot-5.4.5.tar.gz: 66f679115dd30559e110498fc94d926949d4d370b4999a042e724b8e910ee478 + gnuplot-5.4.4.tar.gz: 372300b7867f5b3538b25fc5d0ac7734af6e3fe0d202b6db926e4369913f0902 + gnuplot-5.4.3.tar.gz: 51f89bbab90f96d3543f95235368d188eb1e26eda296912256abcd3535bd4d84 + gnuplot-5.4.2.tar.gz: e57c75e1318133951d32a83bcdc4aff17fed28722c4e71f2305cfc2ae1cae7ba + gnuplot-5.4.1.tar.gz: 6b690485567eaeb938c26936e5e0681cf70c856d273cc2c45fabf64d8bc6590e + gnuplot-5.4.0.tar.gz: eb4082f03a399fd1e9e2b380cf7a4f785e77023d8dcc7e17570c1b5570a49c47 + gnuplot-5.2.8.tar.gz: 60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37 + gnuplot-5.2.7.tar.gz: 97fe503ff3b2e356fe2ae32203fc7fd2cf9cef1f46b60fe46dc501a228b9f4ed + gnuplot-5.2.6.tar.gz: 35dd8f013139e31b3028fac280ee12d4b1346d9bb5c501586d1b5a04ae7a94ee + gnuplot-5.2.4.tar.gz: 1515f000bd373aaa53b16183f274189d4f5e0ae47d22f434857933d16a4770cb + gnuplot-5.0.0.tar.gz: 417d4bc5bc914a60409bb75cf18dd14f48b07f53c6ad3c4a4d3cd9a8d7370faf + gnuplot-4.6.3.tar.gz: df5ffafa25fb32b3ecc0206a520f6bca8680e6dcc961efd30df34c0a1b7ea7f5 + versions: + 5.4.{0,1,2,3,4,5,8,9};5.2.{0,4,6,7,8};5.0.0;4.6.3: <9> + 5.4.10: <10> + config: + relstage: unstable +---- +<1> Configuration is for `gnuplot` +<2> will be installed in the group `Tools` +<3> will be installed in the base overlay (`/opt/psi`) +<4> the default release stage is `stable` +<5> the module is available on these systems +<6> install these files to `$PREFIX/share/doc/gnuplot` +<7> download via this link +<8> SHA256 hash sums for all available versions +<9> no specific configuration required for these versions +<10> release stage of version `5.4.10` is still `unstable`, override +default release stage. +--- + +.*Example: HDF5* +---- +--- +# yamllint disable rule:line-length <1> +format: 1 +hdf5: <2> + defaults: + group: MPI <3> + overlay: base <4> + relstage: stable <5> + systems: [rhel7, rhel8, rhel9] <6> + urls: <7> + - url: https://support.hdfgroup.org/ftp/HDF5/releases/$P-${V_MAJOR}.${V_MINOR}/$P-${V_PKG}/src/$P-${V_PKG}.tar.bz2 + shasums: <8> + hdf5-1.8.10-patch1.tar.bz2: 292afb3615ad9e68f4d5d18ebb11e4a73f2aece39f2da3875a457ff1e109fc41 + hdf5-1.8.12.tar.bz2: 10a369a4fc207bb09245f57c758e587420e06dfc0e445e337a58b0848b75a949 + ... + hdf5-1.13.1.tar.bz2: e16973ec893e2d5aa9c8dc73e196db9b99a605578e7317b421c713936f8bf57d + + versions: + 1.8.12: + config: + relstage: deprecated <9> + variants: + - + group_deps: + compiler: {gcc: [4.7.4, 4.8.3, 4.8.4, 4.9.2]} + mpi: {openmpi: [1.6.5, 1.8.2, 1.8.4]} + - + group_deps: + compiler: {gcc: [4.8.2]} + mpi: {openmpi: [1.6.5]} + ... + - + group_deps: + compiler: {gcc: [5.1.0], intel: [15.2, 15.3]} + mpi: {openmpi: [1.8.4]} + ... + 1.10.8_slurm: + variants: <10> + - + group_deps: + compiler: {gcc: [10.4.0]} + mpi: {openmpi: [4.1.4_slurm]} + - + relstage: unstable + group_deps: + compiler: {gcc: [9.5.0, 10.4.0, 11.4.0, 12.3.0, 13.1.0]} + mpi: {openmpi: [4.1.5_slurm]} + ... + 1.12.0: + variants: + - + group_deps: + compiler: {gcc: [7.5.0, 8.4.0, 9.3.0, 10.2.0]} + mpi: {openmpi: [4.0.5]} + - + relstage: unstable + group_deps: + compiler: {pgi: [21.5]} + mpi: {pgi-mpi: [21.5]} + + 1.13.1: + variants: + - + suffix: _slurm <11> + variant: [_slurm] + relstage: unstable + group_deps: + compiler: {gcc: [11.2.0]} + mpi: {openmpi: [4.1.3_slurm]} +---- +<1> disable rule to check line length in yamllint. Default is 80. +<2> this configuration is for HDF5 +<3> default group is MPI. +<4> default overlay is `base` +<5> default release stage is `stable` +<6> this build-block can be used on RHEL7, RHEL8 and RHEL9 +<7> download via this link +<8> SHA256 hash sums for all available versions +<9> all variants of version 1.8.12 are `deprecated` +<10> hdf5/1.10.8_slurm has two variants. The first variant compiled with GCC 10.4.0 and openmpi/4.1.4_slurm. The second variant is unstable and compiled with with GCC 9.5.0, 10.4.0, 11.4.0, 12.3.0, 13.1.0 and openmpi/4.1.5_slurm. +<11> TBW diff --git a/doc/src/Building_Pmodules/build-config-files/variants.adoc b/doc/src/Building_Pmodules/build-config-files/variants.adoc new file mode 100644 index 0000000..5c97a34 --- /dev/null +++ b/doc/src/Building_Pmodules/build-config-files/variants.adoc @@ -0,0 +1,87 @@ += "legacy" configuration files in Pmodules 1.0 + +[NOTE] +===================================================================== +These type of configuration file is deprecated in version 1.1 and +newer. Starting with version 1.2 the use of YAML configuration files +documented in the next section is recommended. +===================================================================== + +In the Pmodules 1.0 configuration files the following properties are +defined per version: + +* module name and version +* release stage +* dependencies + +Each definition must be on a single line. + +== Configuration filenames and search order + +Configuration files are searched in the following order: + +1. `*_build-recipe-dir_*/files/variants.*_system_*` +2. `*_build-recipe-dir_*/files/variants.*_OS_*` +3. `*_build-recipe-dir_*/files/variants` + +Whereby + +`*_system_*`:: If the build script is called with the option +`-system=*_sytem_*`, this configuration file is used. + +`*_OS_*`:: Is the operating system/kernel name returned by `uname +-s`. On Linux this is `Linux` on macOS this is `Darwin`. + +== Format + +A line in a configuration file is either + +* a comment line starting with `#` +* a empty line or a with white-space only +* a definition of a variant + +== Variant specifications + +The form of a variant specification is + +`*_module-name_*` `*_release_stage_*` `*_dependencies_*` + +Whereby: + +`*_module-name_*`:: Is the name of the module including the version, an +optional release number and an optional suffix. The general form is ++ +`*_P_*/*_V_*[-*_V_RELEASE_*][*__SUFFIX_*]` + +`*_release_stage_*`:: Defines the release stage of this module +variant. Allowed values are `unstable`, `stable`, `deprecated`, +`remove` and `removed`. If the release stage is `remove` or `removed`, +this module variant will be removed (if not already removed). + +`*_dependencies_*`:: Defines the module dependencies. Dependencies can + be either a hierarchical dependency, a runtime dependency or a build + dependency. Hierarchical and runtime dependencies are loaded before + a module itself. Build dependencies are only loaded during build-time + and must be prefixed with `b:`. ++ +Dependencies are loaded in the specified order. It is recommended to +specify the dependencies of a the (hierarchical) group first, then +additional modules required at run-time and the modules required to +build it at the end. ++ +If the module is in a hierarchical group like `MPI`, you must specify +the modules required for this group. For modules in the group ++ +* `Compiler` a compiler must be specified. +* `MPI` a compiler and a MPI implementation must be specified. +* `HDF5` a compiler, a MPI implementation and a parallel HDF5 module + must be specified. +* `HDF5_serial` a compiler and a serial HDF5 module + must be specified. + +.*Example* +---- +parmetis/4.0.3 stable gcc/7.3.0 openmpi/3.0.0 b:cmake/3.6.3 +---- + +--- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/add_configure_args.adoc b/doc/src/Building_Pmodules/functions/add_configure_args.adoc new file mode 100644 index 0000000..9b65bf7 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/add_configure_args.adoc @@ -0,0 +1,32 @@ +[id="pb_add_configure_args", reftext="`pbuild::add_configure_args`"] += Set configuration options: `pbuild::add_configure_args` + +== Synopsis +[source,sh] +---- +pbuild::add_configure_args arg... +---- + +== Description + +Add arguments/options to the call of `configure` or `cmake`. + +== Example + +autotools: +[source,sh] +---- +pbuild::pre_configure(){ + pbuild::add_configure_args "--disable-shared" + pbuild::add_configure_args "CFLAGS=-fPIC" +} +---- + +CMake: +[source,sh] +---- +pbuild::pre_configure(){ + pbuild::add_configure_args "-DMETIS_PATH=${SRC_DIR}/metis" + pbuild::add_configure_args "-DGKLIB_PATH=${SRC_DIR}/metis/GKlib" +} +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/add_patch.adoc b/doc/src/Building_Pmodules/functions/add_patch.adoc new file mode 100644 index 0000000..b2710b5 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/add_patch.adoc @@ -0,0 +1,23 @@ +[id="pb_add_patch", reftext="`pbuild::add_patch`"] += Adding patches to be applied: `pbuild::add_patch` + +== Synopsis +[source,sh] +---- +pbuild::add_patch patch_fname [strip_num_dirs] +---- + +== Description +Apply a patch to the unpacked sources. The argument `patch_fname` must be a relative file-name to the build-block directory. The argument `strip_num_dirs` is optional and defaults to `1`. Please read the `patch(1)` manual page for more details. The patches are applied inside the source directory with the command: +[source,sh] +---- +patch --strip=strip_num_dirs < "${BUILDBLOCK_DIR}/patch_fname" +---- + +== Example +[source,sh] +---- +pbuild::pre_prep(){ + pbuild::add_patch 'files/Makefile.pncf.sed.patch' +} +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/add_to_group.adoc b/doc/src/Building_Pmodules/functions/add_to_group.adoc new file mode 100644 index 0000000..70f7f34 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/add_to_group.adoc @@ -0,0 +1,51 @@ +[id="pb_add_to_group", reftext="`pbuild::add_to_group`"] += Define the group of a module: `pbuild::add_to_group` + +[NOTE] +==== +This function is deprecated in Pmodules 1.1 and newer! + +The group should be defined in the YAML configuration file. +==== + +== Synopsis +[source,sh] +---- +pbuild::add_to_group GROUP +---- + +== Description + +Define the group the module will be installed in. Sometimes it is not obvious in which group a module should go. If in doubt, `Tools` might be the best. + +A (incomplete) list of available groups: + +`Tools`:: Group for tools like Gnuplot, Git, vim, Emacs, openssl. This group is visible by default. + +`Programming`:: Group for compilers, scripting languages and tools used for programming, like GCC, Python, CMake, autotools, Matlab. This group is visible by default. + +`Compiler`:: Hierarchical group for modules compiled with a certain compiler module. Examples: open-mpi, MPICH, serial HDF5. + +`HDF5_serial`:: Hierarchical group for modules compiled with a certain compiler and serial HDF5 module. Examples: netCDF, H5hut. + +`MPI`:: Hierarchical group for modules compiled with a certain compiler and MPI module. Examples: parallel Boost, parallel HDF5, ParMETIS, Gromacs. + +`HDF5`:: Hierarchical group for modules compiled with a certain compiler, MPI and parallel HDF5 module. Examples: netCDF, H5hut, Trilinos. + +`System`:: Group for system tools. This group is _not_ visible by default. Examples: filebench, fsstress, nmap, patchelf. + +`Libraries`:: Group for libraries required to compile other modules but not providing (useful) tools. This group is _not_ visible by default. Examples: GMP, MPC, MPFR + +`MX`:: Group for special tools used at the MX beam-line. This group is visible only on dedicated systems. + +`EM`:: Group for Ra specific software. This group is only visible and available on Ra. + +== Example + +.Define the group for the Gnuplot module: +==== +[source,sh] +---- +pbuild::add_to_group 'Tools' +---- +==== \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/cmp_versions.adoc b/doc/src/Building_Pmodules/functions/cmp_versions.adoc new file mode 100644 index 0000000..e401e51 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/cmp_versions.adoc @@ -0,0 +1,45 @@ +[id="pb_cmp_versions", reftext="`pbuild::version_compare`"] += Compare two versions: `pbuild::version_compare` + +== Synopsis +[source,sh] +---- +pbuild::version_compare VERSION1 VERSION2 +pbuild::version_lt VERSION1 VERSION2 +pbuild::version_le VERSION1 VERSION2 +pbuild::version_gt VERSION1 VERSION2 +pbuild::version_ge VERSION1 VERSION2 +pbuild::version_eq VERSION1 VERSION2 +---- + +== Description + +The function splits the version strings at the dots an compares each component. If a component is a number the comparison is numerical otherwise lexical. + +`pbuild::version_compare VERSION1 VERSION2` returns + + `0` if the versions are equal + + `1` if `VERSION1` is higher then `VERSION2` + + `2` if `VERSION1` is lower then `VERSION2` + +`pbuild::version_lt VERSION1 VERSION2` returns + +`0` if `VERSION1` is lower then `VERSION2` otherwise a values greater than zero. + +`pbuild::version_le VERSION1 VERSION2` returns + +`0` if `VERSION1` is lower then or equal to `VERSION2` otherwise a values greater than zero. + +`pbuild::version_gt VERSION1 VERSION2` returns + +`0` if `VERSION1` is higher then `VERSION2` otherwise a values greater than zero. + +`pbuild::version_ge VERSION1 VERSION2` returns + +`0` if `VERSION1` is higher then or equal to `VERSION2` otherwise a values greater than zero. + +`pbuild::version_eq VERSION1 VERSION2` returns + +`0` if `VERSION1` is equal to `VERSION2` otherwise a values greater than zero. + +== Example + +[source,sh] +---- +pbuild::version_lt '1.1.0' '1.2.2' # result is 0 +pbuild::version_ge '9.1.2' '10.0.0' # result is greater zero +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/compile.adoc b/doc/src/Building_Pmodules/functions/compile.adoc new file mode 100644 index 0000000..0484293 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/compile.adoc @@ -0,0 +1,37 @@ +[id="pb_compile", reftext="`pbuild::compile`"] += Compile software: `pbuild::compile` + +== Synopsis +[source,sh] +---- +pbuild::pre_compile +pbuild::compile +pbuild::post_compile +---- + +== Description + +Compile the software. + +Before these functions are called, the build-system changes to the +build directory (`${BUILD_DIR}`). + +In the most uses cases the default function `pbuild::compile` provided by +the build-system can be used and nothing must be implemented in the +build-script. The pre- and post-hooks might be useful in cases where + +* to run other make targets than `all` +* multiple packages must be compiled into one module +* to compile a dependency required by the main package. + +If the default function cannot be used, the `pbuild::compile` +function must be implemented in the build-script. + +== Example +Excerpt from perl build-script +[source,sh] +---- +pbuild::post_compile() { + make test +} +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/configure.adoc b/doc/src/Building_Pmodules/functions/configure.adoc new file mode 100644 index 0000000..30cf4f0 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/configure.adoc @@ -0,0 +1,125 @@ +[id="pb_configure", reftext="`pbuild::configure`"] += Configure software: `pbuild::configure` + +== Synopsis +[source,sh] +---- +pbuild::pre_configure +pbuild::configure +pbuild::post_configure +---- + +== Description + +Configure the software for compilation. + +Before these functions are called, the build-system changes to the +build directory (`${BUILD_DIR}`). + +In the most uses cases the default function `pbuild::configure` provided by +the build-system can be used and nothing must be implemented in the +build-script. + +The default function first searches whether the software can be +configured with autotools. If yes, configuration with autotools will +be performed. Otherwise the existence of a CMake script will be +checked. If found, configuration will be done via CMake. If scripts +for both configuration tools exist, the to be used tool can be +selected with link:use_autotools[`pbuild::use_autotools`] or +link:use_cmake[`pbuild::use_cmake`]. Arguments to `configure` or +`cmake` can be set with +link:add_configure_args[`pbuild::add_configure_args`]. + +A common use case for the pre-configure hooks is to define arguments +passed to autotools or CMake by the default function. + +If the default function cannot be used, the `pbuild::configure` +function must be implemented in the build-script. + +== Examples +Excerpt from the parallel HDF5 build-script +[source,sh] +---- +pbuild::pre_configure() { + pbuild::add_configure_args "CC=${MPICC}" + pbuild::add_configure_args "CXX=${MPICXX}" + + pbuild::add_configure_args "--enable-shared" + pbuild::add_configure_args "--enable-parallel" + pbuild::add_configure_args "--enable-cxx" + pbuild::add_configure_args "--enable-unsupported" + #pbuild::add_configure_args "--enable-threadsafe" + pbuild::add_configure_args "--with-pic" + + local enable_fortran='yes' + + case "${COMPILER}" in + clang-macos ) + enable_fortran='no' + # we do not have Fortran in Xcode + ;; + pgi ) + # PGI uses GCC's include files, some object files and + # the STL implementation! + # The PGI C pre-processor is broken and doesn't work + # for HDF5. We use the pre-processor of the underlying + # GCC... + # This is a bit hackish! + # + # The following eval sets GCCDIR! Which is something + # like: + # /opt/psi/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 + # + eval $(pgcc -show 2>/dev/null | \ + awk '/^GCCDIR[[:space:]]*=/{gsub(/[[:space:]]/,""); print $0}') + pbuild::add_configure_args "CPP=${GCCDIR%%/..*}/cpp" + pbuild::add_configure_args "CFLAGS=-fPIC" + pbuild::add_configure_args "CXXFLAGS=-fPIC" + pbuild::add_configure_args "FCFLAGS=-fPIC" + ;; + esac + + if [[ "${enable_fortran}" ===== 'yes' ]]; then + pbuild::add_configure_args "F77=${MPIF77}" + pbuild::add_configure_args "F90=${MPIF90}" + pbuild::add_configure_args "FC=${MPIFC}" + pbuild::add_configure_args "FORTRAN=${MPIFORTRAN}" + pbuild::add_configure_args "--enable-fortran" + fi + +---- + +Simplified excerpt from the OpenBLAS build-script +[source,sh] +---- +pbuild::configure() { + case ${COMPILER} in + gcc ) + CC='gcc' + ;; + intel ) + CC='icc' + ;; + clang-macos ) + CC='gcc' + ;; + * ) + die 3 "Oops: unknown compiler: ${COMPILER}" + ;; + esac + cat < "${SRC_DIR}/make.inc" +SHELL = /bin/sh +PLAT = +DRVOPTS = \$(NOOPT) +ARCHFLAGS= -ru +EOF + echo "USE_SIMPLE_THREADED_LEVEL3 = 1" >> "${SRC_DIR}/Makefile.rule" + echo "NO_AVX = 1" >> "${SRC_DIR}/Makefile.rule" + echo "NO_AVX2 = 1" >> "${SRC_DIR}/Makefile.rule" + if pbuild::use_flag "omp"; then + echo "USE_THREAD = 1" >> "${SRC_DIR}/Makefile.rule" + else + echo "USE_THREAD = 0" >> "${SRC_DIR}/Makefile.rule" + fi +} +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/install.adoc b/doc/src/Building_Pmodules/functions/install.adoc new file mode 100644 index 0000000..982f39d --- /dev/null +++ b/doc/src/Building_Pmodules/functions/install.adoc @@ -0,0 +1,30 @@ +[id="pb_install", reftext="`pbuild::install`"] += Install software: `pbuild::install` + +== Synopsis +[source,sh] +---- +pbuild::pre_install +pbuild::install +pbuild::post_install +---- + +== Description + +Compile the software. + +Before these functions are called, the build-system changes to the +build directory (`${BUILD_DIR}`). + +In the many uses cases the default function `pbuild::install` provided by +the build-system can be used and nothing must be implemented in the +build-script. A typical use case for the post-install hook is to install required libraries from other modules or the system to reduce or eliminate run-time dependencies + +If the default function cannot be used, the `pbuild::install` +function must be implemented in the build-script. + +== Example +[source,sh] +---- +TBW +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/prep.adoc b/doc/src/Building_Pmodules/functions/prep.adoc new file mode 100644 index 0000000..8c248ae --- /dev/null +++ b/doc/src/Building_Pmodules/functions/prep.adoc @@ -0,0 +1,43 @@ +[id="pb_prep", reftext="`pbuild::prep`"] += Download and unpack: `pbuild::prep` + +== Synopsis +[source,sh] +---- +pbuild::pre_prep +pbuild::prep +pbuild::post_prep +---- + +== Description + +Functions to prepare the sources. This includes + +* downloading required files a verifying the checksums +* unpacking +* applying patches + +Before the prep-functions are called, the build-system changes to the source +directory (`${SRC_DIR}`). + +In the most uses cases the default function `pbuild::prep` provided by +the build-system can be used and nothing must be implemented in the +build-script. In some rare cases pre- or post-hooks are required to +make the default function feasible. One use case with autotools for a post-hook is to create the `configure` scripts, if only `configure.ac` is shipped with the software. + +The default hooks provided by the build system are only stubs and do +nothing. + +If the default function cannot be used, it must be implemented in the build-script. + +== Example + +The source distribution of the IOAPI library contains object files! These files must be removed after unpacking: + +[source,sh] +---- +pbuild::post_prep() { + find "${SRC_DIR}" -name "*.mod" -exec rm {} \; + find "${SRC_DIR}" -name "*.o" -exec rm {} \; +} +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/set_download_url.adoc b/doc/src/Building_Pmodules/functions/set_download_url.adoc new file mode 100644 index 0000000..6f93c31 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/set_download_url.adoc @@ -0,0 +1,38 @@ +[id="pb_set_download_url", reftext="`pbuild::set_download_url`"] += Set download URL: `pbuild::set_download_url` + +[NOTE] +==== +This function is deprecated in Pmodules 1.1 and newer! + +The download URL's should be set in the YAML configuration file. +==== + +== Synopsis +[source,sh] +---- +pbuild::set_download_url URL [fname] +---- + +== Description + +Tell the build system where to download the required (source-)files. If `fname` is passed, it will be used as the output file-name of the download. + +In some cases software must be downloaded from a Git repository on Github, Bitbucket or Gitlab. + +To download a certain tag/version from Github, Bitbucket or Gitlab use: +---- +https://github.com/OWNER/PROJECT/archive/${V_PKG}/$P-${V_PKG}.tar.gz +https://bitbucket.org/OWNER/PROJECT/get/${V_PKG}.tar.gz#/$P-%{V_PKG}.tar.gz +https://gitlab.com/OWNER/PROJECT/-/archive/${V_PKG}/$P-${V_PKG}.tar.gz +---- + +== Examples + +Excerpt from Trilinos build-script: +[source,sh] +---- +pbuild::set_download_url \ + "https://github.com/$P/$P/tarball/$P-release-${V//./-}" \ + "$P-$V.tar.gz" +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/supported_os.adoc b/doc/src/Building_Pmodules/functions/supported_os.adoc new file mode 100644 index 0000000..e41736c --- /dev/null +++ b/doc/src/Building_Pmodules/functions/supported_os.adoc @@ -0,0 +1,11 @@ +[id="pb_supported_systems", reftext="`pbuild::supported_systems`"] += Set which OS are supported: `pbuild::supported_systems` (Pmodules 1.0) +== Synopsis +[source,sh] +---- +pbuild::supported_system STRING... +---- + +== Description + +Some modules can be build only for dedicated operating systems. This is particularly the case for operating system specific tools like `patchelf`. \ No newline at end of file diff --git a/doc/src/Building_Pmodules/functions/use_autotools.adoc b/doc/src/Building_Pmodules/functions/use_autotools.adoc new file mode 100644 index 0000000..866f178 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/use_autotools.adoc @@ -0,0 +1,10 @@ +[id="pb_use_autotools", reftext="`pbuild::use_autotools`"] += Forece use of autotools: `pbuild::use_autotools` (Pmodules 1.0) +== Synopsis +[source,sh] +---- +pbuild::use_autotools +---- + +== Description +Force the use of autotools. diff --git a/doc/src/Building_Pmodules/functions/use_cmake.adoc b/doc/src/Building_Pmodules/functions/use_cmake.adoc new file mode 100644 index 0000000..faad0c9 --- /dev/null +++ b/doc/src/Building_Pmodules/functions/use_cmake.adoc @@ -0,0 +1,10 @@ +[id="pb_use_cmake", reftext="`pbuild::use_cmake`"] += Force use of CMake: `pbuild::use_cmake` +== Synopsis +[source,sh] +---- +pbuild::use_cmake +---- + +== Description +Force the use of CMake. diff --git a/doc/src/Building_Pmodules/run_script_with_opt_verbose.adoc b/doc/src/Building_Pmodules/run_script_with_opt_verbose.adoc new file mode 100644 index 0000000..1fcb08d --- /dev/null +++ b/doc/src/Building_Pmodules/run_script_with_opt_verbose.adoc @@ -0,0 +1,933 @@ +.Example of a verbose output, click to expand +[%collapsible] +---- +pmod7:~/HelloWorld$ ./build 1.0.0 --verbose +/opt/psi/Tools/Pmodules/1.1.17/bin/modbuild ./build 1.0.0 --verbose +opt_verbose='yes' +set -x +++ echo shift +shift ++ shift +++ echo '(( $# > 0 ))' +(( $# > 0 )) ++ (( 0 > 0 )) +++ echo '(( ${#versions[@]} > 0))' +(( ${#versions[@]} > 0)) ++ (( 1 > 0 )) +++ echo 'opt_system="${opt_system:-$(std::get_os_release)}"' +opt_system="${opt_system:-$(std::get_os_release)}" +++ std::get_os_release +++ local -A func_map +++ func_map['Linux']=std.get_os_release_linux +++ func_map['Darwin']=std.get_os_release_macos ++++ uname -s +++ std.get_os_release_linux +++ local ID= +++ local VERSION_ID= ++++ which lsb_release +++ [[ -n /usr/bin/lsb_release ]] ++++ lsb_release -is +++ ID=Springdale ++++ lsb_release -rs +++ VERSION_ID=7.9 +++ case "${ID,,}" in +++ echo rhel7 ++ opt_system=rhel7 +++ echo '[[ ${opt_yaml,,} != '\''yes'\'' ]]' +[[ ${opt_yaml,,} != 'yes' ]] ++ [[ yes != \y\e\s ]] +++ echo 'yaml_config_file="${opt_config_file:-${BUILDBLOCK_DIR}/files/config.yaml}"' +yaml_config_file="${opt_config_file:-${BUILDBLOCK_DIR}/files/config.yaml}" ++ yaml_config_file=/afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml +++ echo '[[ -r "${yaml_config_file}" ]]' +[[ -r "${yaml_config_file}" ]] ++ [[ -r /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml ]] +++ echo 'std::info "Using YAML configuration file - ${yaml_config_file}"' +std::info "Using YAML configuration file - ${yaml_config_file}" ++ std::info 'Using YAML configuration file - /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml' ++ std::log 2 'Using YAML configuration file - /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml' ++ local -ri fd=2 ++ local -r 'fmt=Using YAML configuration file - /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml' ++ shift 2 ++ printf -- 'Using YAML configuration file - /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml' +Using YAML configuration file - /afs/psi.ch/user/g/gsell/HelloWorld/files/config.yaml+ printf -- '\n' + +++ echo '[[ "${opt_debug,,}" == '\''no'\'' ]]' +[[ "${opt_debug,,}" == 'no' ]] ++ [[ no == \n\o ]] +++ echo 'pbuild.jobs "${opt_jobs}"' +pbuild.jobs "${opt_jobs}" ++ pbuild.jobs 0 ++ (( 0 == 0 )) +++ _get_num_cores +++ case "${OS}" in +++ /usr/bin/grep -c '^processor' /proc/cpuinfo ++ JOBS=4 ++ (( JOBS > 10 )) ++ : +++ echo 'pbuild.force_rebuild "${opt_force_rebuild}"' +pbuild.force_rebuild "${opt_force_rebuild}" ++ pbuild.force_rebuild no ++ force_rebuild=no +++ echo 'pbuild.build_target "${opt_build_target}"' +pbuild.build_target "${opt_build_target}" ++ pbuild.build_target all ++ build_target=all +++ echo 'pbuild.dry_run "${opt_dry_run}"' +pbuild.dry_run "${opt_dry_run}" ++ pbuild.dry_run no ++ dry_run=no +++ echo 'pbuild.enable_cleanup_build "${opt_enable_cleanup_build}"' +pbuild.enable_cleanup_build "${opt_enable_cleanup_build}" ++ pbuild.enable_cleanup_build yes ++ enable_cleanup_build=yes +++ echo 'pbuild.enable_cleanup_src "${opt_enable_cleanup_src}"' +pbuild.enable_cleanup_src "${opt_enable_cleanup_src}" ++ pbuild.enable_cleanup_src yes ++ enable_cleanup_src=yes +++ echo 'pbuild.update_modulefiles "${opt_update_modulefiles}"' +pbuild.update_modulefiles "${opt_update_modulefiles}" ++ pbuild.update_modulefiles no ++ opt_update_modulefiles=no +++ echo 'pbuild.system "${opt_system}"' +pbuild.system "${opt_system}" ++ pbuild.system rhel7 ++ system=rhel7 +++ echo 'pbuild.verbose "${opt_verbose}"' +pbuild.verbose "${opt_verbose}" ++ pbuild.verbose yes ++ verbose=yes +++ echo pm::read_config +pm::read_config ++ pm::read_config ++ config_files=() ++ local -a config_files ++ _get_config_files config_files ++ local -n fnames=config_files ++ [[ -v PMODULES_OVERLAYS_DEF ]] ++ [[ -r /afs/psi.ch/user/g/gsell/.Pmodules/Pmodules.yaml ]] ++ fnames+=("${HOME}/.Pmodules/Pmodules.yaml") ++ test -r /opt/psi/config/Pmodules.yaml ++ fnames+=("${PMODULES_HOME%%/Tools*}/config/Pmodules.yaml") +++ std::parse_yaml /opt/psi/config/Pmodules.yaml cfg_ +++ local -r fname=/opt/psi/config/Pmodules.yaml +++ local -r prefix=cfg_ ++++ echo @ ++++ tr @ '\034' +++ local 's=[[:space:]]*' 'w=[a-zA-Z0-9_]*' $'fs=\034' +++ sed -ne 's|^\([[:space:]]*\)\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*"\(.*\)"[[:space:]]*$|\1\2\3|p' -e 's|^\([[:space:]]*\)\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(.*\)[[:space:]]*$|\1\2\3|p' /opt/psi/config/Pmodules.yaml +++ awk $'-F\034' '{ + indent = length($1)/2; + vname[indent] = $2; + for (i in vname) { + if (i > indent) {delete vname[i]} + } + if (length($3) > 0) { + vn=""; + for (i=0; i /dev/null)) +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq '.|keys().[]' ++ debug 'top-level keys: defaults' versions ++ : ++ for key in "${keys[@]}" ++ [[ -v valid_yaml_keys[defaults] ]] ++ used_yaml_keys[${key}]=1 ++ for key in "${keys[@]}" ++ [[ -v valid_yaml_keys[versions] ]] ++ used_yaml_keys[${key}]=1 ++ [[ -v used_keys[versions] ]] ++ [[ -v used_keys[defaults] ]] +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq .defaults ++ yaml_input='group: Sandbox +relstage: stable' ++ get_config 'group: Sandbox +relstage: stable' default_config Yaml_default_config ++ local -- 'yaml_input=group: Sandbox +relstage: stable' ++ local -n cfg=default_config ++ local -n dfl=Yaml_default_config ++ local -- key ++ local -- value ++ for key in "${!dfl[@]}" ++ cfg[${key}]=Tools ++ for key in "${!dfl[@]}" ++ cfg[${key}]=build ++ for key in "${!dfl[@]}" ++ cfg[${key}]=auto ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]=base ++ for key in "${!dfl[@]}" ++ cfg[${key}]=unstable ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]=no ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ [[ -z group: Sandbox +relstage: stable ]] ++ keys=() ++ local -a keys ++ keys=($(${yq} -e ".|keys().[]" <<< "${yaml_input}" 2> /dev/null)) +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq -e '.|keys().[]' ++ debug 'config keys: group' relstage ++ : ++ local -- type ++ for key in "${keys[@]}" ++ [[ -v dfl[group] ]] ++ case ${key} in ++ get_value 'group: Sandbox +relstage: stable' value group '!!str' ++ local -- 'yaml_input=group: Sandbox +relstage: stable' ++ local -n val=value ++ local -- key=group ++ local -- 'expected_type=!!str' ++ local -- type= +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq '.group | type' ++ type='!!str' ++ [[ !!str != \!\!\s\t\r ]] +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq -e .group ++ val=Sandbox ++ cfg[${key,,}]=Sandbox ++ for key in "${keys[@]}" ++ [[ -v dfl[relstage] ]] ++ case ${key} in ++ get_value 'group: Sandbox +relstage: stable' value relstage '!!str' ++ local -- 'yaml_input=group: Sandbox +relstage: stable' ++ local -n val=value ++ local -- key=relstage ++ local -- 'expected_type=!!str' ++ local -- type= +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq '.relstage | type' ++ type='!!str' ++ [[ !!str != \!\!\s\t\r ]] +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq -e .relstage ++ val=stable ++ case ${value,,} in ++ cfg[${key,,}]=stable ++ [[ -v used_keys[shasums] ]] ++ get_matching_version_keys version_keys 1.0.0 ++ : ' + return list of version keys in refvar version_keys matching version specified in 1.0.0. + ' ++ local -n refvar=version_keys ++ local version=1.0.0 ++ keys=() ++ local -a keys ++ keys=($(${yq} -e '.versions|keys().[]' 2> /dev/null)) +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq -e '.versions|keys().[]' ++ refvar=() ++ for key in "${keys[@]}" ++ l=() ++ for k in ${key//;/ } ++ list=() ++ local list ++ eval 'list=(1.0.0)' +++ list=(1.0.0) ++ [[ 1.0.0 =~ 1.0.0 ]] ++ refvar+=("${key}") ++ break ++ (( 1 == 0 )) ++ return 0 ++ for version_key in "${version_keys[@]}" +++ get_yaml_vk_config 1.0.0 +++ : ' + Get configuration for version key 1.0.0. + + Please note: this can be the empty string. + ' +++ local -- key=1.0.0 ++++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq '.versions."1.0.0"' +++ result= +++ echo '' ++ local yaml_vk_config= ++ used_keys=() ++ check_yaml_keys Yaml_valid_vk_keys used_keys ++ local -n valid_yaml_keys=Yaml_valid_vk_keys ++ local -n used_yaml_keys=used_keys ++ used_yaml_keys=() ++ local -- key= ++ keys=() ++ local -a keys ++ keys=($(${yq} '.|keys().[]' 2> /dev/null)) +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq '.|keys().[]' ++ debug 'top-level keys: ' ++ : ++ vk_config=() ++ local -A vk_config ++ yaml_input= ++ [[ -v used_keys[config] ]] ++ get_config '' vk_config default_config ++ local -- yaml_input= ++ local -n cfg=vk_config ++ local -n dfl=default_config ++ local -- key ++ local -- value ++ for key in "${!dfl[@]}" ++ cfg[${key}]=Sandbox ++ for key in "${!dfl[@]}" ++ cfg[${key}]=build ++ for key in "${!dfl[@]}" ++ cfg[${key}]=auto ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]=base ++ for key in "${!dfl[@]}" ++ cfg[${key}]=stable ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]=no ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ for key in "${!dfl[@]}" ++ cfg[${key}]= ++ [[ -z '' ]] ++ return 0 +++ get_variants +++ local yaml ++++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq .variants +++ yaml=null +++ echo null ++ local -- yaml_variants=null +++ get_num_variants ++++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq '.|length' +++ local -i n=0 +++ echo 0 ++ local -i num_variants=0 ++ versions=() ++ local versions ++ expand_version_key versions 1.0.0 1.0.0 ++ local -n ev_result=versions ++ local -- key=1.0.0 ++ local -- version=1.0.0 ++ ev_result=() ++ for k in ${key//;/ } ++ local l ++ list=() ++ local list ++ eval 'list=(1.0.0)' +++ list=(1.0.0) ++ for l in "${list[@]}" ++ [[ 1.0.0 =~ 1.0.0 ]] ++ ev_result+=("${l}") ++ local v= ++ for v in "${versions[@]}" ++ debug 'version: 1.0.0' ++ : ++ (( num_variants == 0 )) ++ build_modules_variant HelloWorld 1.0.0 vk_config ++ local -- module_name=HelloWorld ++ local -- module_version=1.0.0 ++ local -n module_config=vk_config ++ P=HelloWorld ++ parse_version 1.0.0 ++ local v=1.0.0 ++ V=1.0.0 ++ : ++ local tmp= ++ [[ 1.0.0 =~ _ ]] ++ V_PKG=1.0.0 ++ [[ 1.0.0 == *-* ]] ++ case "${V_PKG}" in ++ V_MAJOR=1 ++ tmp=0.0 ++ V_MINOR=0 ++ V_PATCHLVL=0 ++ VERSIONS=() ++ [[ -n '' ]] ++ [[ -n 0 ]] ++ VERSIONS+=(${V_MAJOR}.${V_MINOR}.${V_PATCHLVL}) ++ [[ -n 0 ]] ++ VERSIONS+=(${V_MAJOR}.${V_MINOR}) ++ VERSIONS+=(${V_MAJOR}) ++ local build_variant= ++ [[ :: != *::* ]] ++ check_system ++ [[ -z '' ]] ++ return 0 ++ debug 'build variant HelloWorld/1.0.0' ++ : ++ local ol_name=base ++ [[ -v OverlayInfo[base:inst_root] ]] ++ declare ol_inst_root=/opt/psi ++ declare ol_mod_root=/opt/psi ++ module_version+= ++ pbuild.compile_in_sourcetree no ++ [[ no == \Y\e\s ]] ++ pbuild.configure_with auto ++ configure_with=auto ++ pbuild.add_to_group Sandbox ++ GROUP=Sandbox ++ set_urls '' ++ local -- yaml= ++ local -i l=0 +++ /afs/psi.ch/sys/psi.x86_64_el7/Tools/Pmodules/1.1.17/libexec/yq -Ne e '.|length' ++ l=0 ++ local -i i=0 ++ local -- fname= ++ local -- url_yaml= ++ (( i=0 )) ++ (( i> + +Pmodules 1.1 and newer configuration file <> + + +[NOTE] +===================================================================== +The runtime configuration files are evaluated only for modules inside +the Pmodules hierarchy. If you use `modbuild` these files are created +automatically. Otherwise you have to create them by hand. +===================================================================== + +[id="release-file",reftext="`.release-*_version_*`"] +== Pmodules 1.0: `.release-*_version_*` + +In `.release-*_version_*` the release stage of a module is +defined. The file must be in the same directory as the modulefile. The +content is a single line defining the release stage. Allowed text is + +* `unstable` +* `stable` +* `deprecated` + +If the file doesn't exist and the module is inside the Pmodule +hierarchy `unstable`. All modules outside the Pmodules hierarchy are +considered as `stable`. + +[NOTE] +===================================================================== +This configuration file is deprecated in version 1.1 and newer. Please +see next section. +===================================================================== + +[id="config-file",reftext="`.config-*_version_*`"] +== Pmodules 1.1 and newer: `.config-*_version_*` +In `.config-*_version_*` the following properties of a module can be +configured: + +* the release stage +* the systems on which a module is available +* the systems on which a module is unavailable + +The format of the file is YAML. + +`relstage`:: The release stage of the module. Allowed values are +`unstable`, `stable` and `deprecated`. + +`systems`:: Sequence of systems on which the module is available. Systems +can be hostnames with shell style glob pattern or OS names like +(`rhel7`, `rhel8`). + +`blocklist`:: Sequence of systems on which the module is no +available. Systems can be hostnames with shell style glob patterns or +OS names. + +Example: +---- +relstage: unstable +systems: [merlin-*, ra-*] +blocklist: [] +---- \ No newline at end of file diff --git a/doc/src/Building_Pmodules/writing-build-scripts-for-binary-packages.adoc b/doc/src/Building_Pmodules/writing-build-scripts-for-binary-packages.adoc new file mode 100644 index 0000000..cb5fd24 --- /dev/null +++ b/doc/src/Building_Pmodules/writing-build-scripts-for-binary-packages.adoc @@ -0,0 +1,6 @@ +== Build-blocks for modules build from binary packages + +It is strongly recommended to write build-blocks for modules build from binary packages the same way as for modules build from source. Document each step in a `README.md`. If possible, try to script the installation. + +For more details and to get an idea please have a look at the +link:https://gitlab.psi.ch/Pmodules/buildblocks/tree/master/System/mxm[`mxm` module] in the `System` group as example. diff --git a/doc/src/Building_Pmodules/writing-build-scripts.adoc b/doc/src/Building_Pmodules/writing-build-scripts.adoc new file mode 100644 index 0000000..517f50a --- /dev/null +++ b/doc/src/Building_Pmodules/writing-build-scripts.adoc @@ -0,0 +1,129 @@ +== Writing build-scripts + +=== Introduction + +Building a module consists of the following steps + +_setup_:: Setting up the environment includes + +* name the group of the module. +* specify the download location(s). +* specify required patches. +* set arguments for the configuration step - either autotools or CMake. +* define additional files to install, like license, copyright etc. + +_prepare_:: Download, unpack the sources and apply patches. +_configure_:: Run autotools or CMake script or whatever is required to setup. +_compile_:: Compile everything. +_install_:: Install software and setup module environment. + +Except for the setup, the implementation of the steps is in many cases +almost identical. The _prep_ step requires locations from where to +download files. In some cases patches have to be applied. The +_configure_ step usually requires some additional arguments: what +features should be enabled, paths to required software etc. In most +cases the _compile_ and _install_ steps are the same - just calling +`make` and `make install`. + +The Pmodules build-system provides functions to set up the build +environment and default functions for all build-steps. It is +possible to hook into each build-step before and after the default functions +are called. In cases where hooks are not sufficient to get the default function doing their job, the build-script must define functions for the corresponding step overwriting the default function. + +=== Before you begin + +The most challenging part in building a module is to compile the software in the right way. As soon as you know this, it is pretty easy to build a module. + +What you should have in mind when writing a build-script + +* a "standard" module for Linux should run on RHEL6 and 7 and other modern Linux distribution. +* which feature are required? +* which dependencies do we have to system libraries? +* which dependencies do we have to other modules? Maybe we have to build these dependencies first. +* be aware of the problems with (shared) libraries +** if you copy them, another version from another module might be used! +** more than one version might be used: library X is using version `libfoo.so.1.0` and library Y use using `libfoo.so.1.42`. +** do not mix shared and static versions of the same library +** .. + +Recommendations + +* reduce dependencies be using (and building) static libraries +* build static libraries with `-fPIC`! +* if static libraries are not available or not usable, think about copying/installing these shared libraries in the module + +=== Executing the build-script + +Build-scripts are BASH scripts executed by `modbuild` - which is itself a bash script. The following shebang must be used for build-scripts: +---- +#!/usr/bin/env modbuild +---- + +The build-script must be called with the version number of the module you want to build. + +.Calling build-script to build gnuplot 5.2.4 +====== +---- +./build 5.2.4 +---- +====== + +In cases where several variants are available for the same version but with different compilers and/or MPI implementations, the compiler etc. must be specified on the command line. + +.Calling build-script for HDF5 1.10.3 with certain GCC and MPI implementation/version: +====== +---- +./build 1.10.3 --with=gcc/7.3.0 --with=openmpit/3.1.2 +---- +====== + +=== The master build-function + +The build-system provides a _master_ build function, which is +called after the build-script has been sourced. It executes the steps +_prepare_, _configure_, _compile_ and _install_ in sequential +order. The build-system provides default functions for each step: + +* `pbuild::prep` for preparing +* `pbuild::configure` for configuring +* `pbuild::compile` for compiling +* `pbuild::install` for installing + +In many cases the default step-functions can be used. Sometime it is required to hook into a step before/after the default step-function is/has been called. Pre- and post-processing can be implemented with hooks. In more complicated cases the step-functions must be implemented in the build-script. + +Each build-step consist of the following sub-steps: + +* an OS/system specific _pre_ hook +* a generic _pre_ hook +* the main step-function +* an OS/system specific _post_ hook +* a generic _post_ hook + +.ParMETIS pre- and post-install hooks +====== +[source=sh] +---- +pbuild::pre_install() { + mkdir -p "${PREFIX}/include/metis" + mkdir -p "${PREFIX}/lib" +} + +pbuild::post_install() { + case ${V_MAJOR} in + 3 ) + cd "${SRC_DIR}" + cp *.h $PREFIX/include + cp METISLib/*.h $PREFIX/include/metis + cp lib*.a $PREFIX/lib + ;; + 4 ) + LIBMETIS_A=$(find . -name libmetis.a) + METIS_H=$(find "${SRC_DIR}" -name metis.h) + + install -m 0644 $METIS_H $PREFIX/include + install -m 0644 $LIBMETIS_A $PREFIX/lib + ;; + esac +} +---- +====== + diff --git a/doc/src/Introduction.adoc b/doc/src/Introduction.adoc new file mode 100644 index 0000000..041bb0a --- /dev/null +++ b/doc/src/Introduction.adoc @@ -0,0 +1,18 @@ += *INTRODUCTION* + +Pmodules is the environment modules system at PSI. Since it uses AFS as storage backend it is an easy and convinient solution for software distribution. + +It is available for all PSI supported Linux systems including + +* login.psi.ch (llc.psi.ch) +* Merlin6 +* Ra + +A list of available modules and changes is avail https://pmodules.gitpages.psi.ch/Pmodules_tools/[*here*]. + +[NOTE] +===================================================================== +Some parts of this documentation has been copied from the documentation +of http://modules.sourceforge.net/[Environment Modules] and +https://www.tacc.utexas.edu/research-development/tacc-projects/lmod[Lmod]. +===================================================================== \ No newline at end of file diff --git a/doc/src/Nutshell.adoc b/doc/src/Nutshell.adoc new file mode 100644 index 0000000..7b3ad4a --- /dev/null +++ b/doc/src/Nutshell.adoc @@ -0,0 +1,444 @@ += *PMODULES IN A NUTSHELL* + +Before reading this section you should be familiar with an environment module system - either http://modules.sourceforge.net/[Environment Modules] or https://www.tacc.utexas.edu/research-development/tacc-projects/lmod[Lmod]. + +Pmodules organizes modules in groups like `Tools`, `Programming`, `Libraries`, `System` etc. for a clear arrangement. Groups of modules can easily be added to the available modules. Read section <> for more details about module groups. + +One issue with Environment Modules is the flat naming scheme. Pmodules and Lmod solves the issue by organizing the modules hierarchically. Providing modules for a toolkit like parallel HDF5 ends up in dozen of modules. One user wants to use GCC 4.8.4 and OpenMPI 1.6.5 another Intel C 15 and MPICH 3.1.4, a third user requires GCC 4.9.2 with MPICH 3.1.4. After a couple of month, some users want new versions. In a flat naming scheme you see all installed versions, even if you just want to see what is available for particular compiler. The solution to this problem is a hierarchical organization of the modules. In section <> we describe how to load and search for modules in a module hierarchy. + +Neither Lmod nor Environment Modules provides something like a life cycle management. A module is either available or not. There is no way to inform the users, whether a module is still unstable or already deprecated. Pmodules solves this problem by introducing releases like `unstable`, `stable` and `deprecated`. In section <> we explain what this means to the user. + +--- + +[id="nutshell-motivation",reftext="Motivation"] +== Motivation + +Environment module systems provide a solution for the dynamic +modification of a user's environment by loading special files named +'modulefiles'. + +Each modulefile contains the information needed to configure the shell +for an application or library. The environment can be modified on a +per-module basis using the `module` command which interprets +modulefiles. Typically modulefiles instruct the `module` command to +alter or set shell environment variables such as `PATH`, `MANPATH` +etc. modulefiles may be shared by many users on a system and users may +have their own collection to supplement or replace the shared +modulefiles. + +Environment module systems are widely used on HPC systems to provide +multiple compilers and multiple versions of the same library or API +implementations to the users. The +http://modules.sourceforge.net/[Environment Modules] system is the +most widely used implementation. Another - more recent - +implementation is +https://www.tacc.utexas.edu/research-development/tacc-projects/lmod[Lmod]. Lmod +addresses some weaknesses of the Environment Modules, but solves only +some of them. + +One issue with the Environment Modules is the flat naming scheme. The +Lmod system and Pmodules solves the problem by organizing the modules +hierarchically. What is the problem with a flat naming scheme? Provide +different versions of the same library, like openmpi 1.6.5/1.8.4, +compiled with different (versions) of compilers, like gcc +4.7.4/4.8.4/4.9.2 and Intel 14.0.2/15.2, the number of modules is +growing quite fast. Providing dozens of libraries will end up in +hundreds of modules - not very clear to the users. + +Neither Environment Modules nor Lmod have build-in support for phasing +out modules or marking modules as unstable. Pmodules solves this +problem by introducing 'releases' like stable, unstable and +deprecated. A user will be warned while loading a non-stable module. + +With Environment Modules and Lmod everything must be coded in the +modulefile - even things which are obvious. If a `bin` directory +exists, why not adding this directory to the `PATH` variable +automatically? The same can be done for `MANPATH`, `LD_LIBRARY_PATH` +and other environment variables. + +Usually modules are installed on a network file-systems. In some cases +it is convenient or even required to install modules locally. Pmodules +provides a tool to install all or a sub-set of the modules from any +location to another location. + +Pmodules has its own (simple) build environment. For a new module you +have to write a build script and a modulefile. Updating an existing +modules is very simple. In most cases it's downloading the new version +and calling the build script. Anyway, nobody forces you to use this +build environment, but in most cases it is very handy. + +[id="nutshell-module-groups",reftext="Module groups"] +== Module groups +Pmodules organizes modules in groups. By default only the groups +`Tools` and `Programming` are visible. To get a list of 'used' and +'unused' groups, run the command `module use`: +---- +$ module use +Used groups: + Tools + Programming + +Unused groups: + Libraries + System +... +---- + +To make the modules in a given group available, run the command + +---- +$ module use GROUP +---- + +Example:: + +---- +$ module use System +$ module avail +--------------------------------------------- System --------------------------------------------- + +fsstress/1.0.0 nmap/6.46 + +--------------------------------------------- Tools --------------------------------------------- + +Eclipse/4.4.2 Firefox/31.0 Opera/23.0 Thunderbird/31.0 emacs/24.4 +global/6.3.1 gnuplot/4.6.3 + +------------------------------------------ Programming ------------------------------------------ + +Python/3.4.0 Python/3.4.3 autoconf/2.69 automake/1.14 cmake/2.8.12.2 gcc/4.7.4 +gcc/4.8.3 gcc/4.8.4 gcc/4.9.2 libtool/2.4.2 m4/1.4.17 +---- + +To make groups unavailable, run the command + +---- +$ module unuse GROUP +---- + +Example:: +Make modules in the groups `System` and `Programming` unavailable: + +---- +$ module unuse System Programming +$ module avail +--------------------------------------------- Tools --------------------------------------------- + +Eclipse/4.4.2 Firefox/31.0 Opera/23.0 Thunderbird/31.0 dialog/1.2.1(u) +emacs/24.4 emacs/24.5(u) git/2.3.3(u) global/6.3.1 gnuplot/4.6.3 gnuplot/5.0.0(u) +---- + +--- + +[id="nutshell-module-hierarchies",reftext="Module hierarchies"] +== Module hierarchies +Unstructured, flat naming schemes are confusing. Why? Lets assume we have to +provide modules for the compilers `gcc-4.8.4`, `gcc-4.9.2`, `intel-15.2`, +the MPI implementations `openmpi-1.6.5`, `openmpi-1.8.4`, `mpich-3.1.4` +and parallel versions of `hdf5-1.8.10` and `hdf5-1.8.14` compiled with +all compiler/MPI combinations. So, we have to provide 30(!) modules: + +* 3 compiler modules +* 9 MPI modules +* 18 hdf5 modules + +Even with a reasonable naming convention this is quite confusing. In a flat naming scheme a listing of available modules might look like: + +---- +$ module avail +gcc-4.8.4 +gcc-4.9.2 +hdf5-1.8.10-mpi-3.1.4-gcc-4.8.4 +hdf5-1.8.10-mpi-3.1.4-gcc-4.9.2 +hdf5-1.8.10-mpi-3.1.4-intel-15.2 +hdf5-1.8.10-openmpi-1.6.5-gcc-4.8.4 +hdf5-1.8.10-openmpi-1.6.5-gcc-4.9.2 +hdf5-1.8.10-openmpi-1.6.5-intel-15.2 +hdf5-1.8.10-openmpi-1.8.4-gcc-4.8.4 +hdf5-1.8.10-openmpi-1.8.4-gcc-4.9.2 +hdf5-1.8.10-openmpi-1.8.4-intel-15.2 +hdf5-1.8.14-mpi-3.1.4-gcc-4.8.4 +hdf5-1.8.14-mpi-3.1.4-gcc-4.9.2 +hdf5-1.8.14-mpi-3.1.4-intel-15.2 +hdf5-1.8.14-openmpi-1.6.5-gcc-4.8.4 +hdf5-1.8.14-openmpi-1.6.5-intel-15.2 +hdf5-1.8.14-openmpi-1.8.4-gcc-4.8.4 +hdf5-1.8.14-openmpi-1.8.4-gcc-4.9.2 +hdf5-1.8.14-openmpi-1.8.4-intel-15.2 +intel-15.3 +mpi-3.1.4-gcc-4.8.4 +mpi-3.1.4-gcc-4.9.2 +mpi-3.1.4-intel-15.2 +openmpi-1.6.5-gcc-4.8.4 +openmpi-1.6.5-gcc-4.9.2 +openmpi-1.6.5-intel-15.2 +openmpi-1.8.4-gcc-4.8.4 +openmpi-1.8.4-gcc-4.9.2 +openmpi-1.8.4-intel-15.2 +---- + +Got it? One combination is missing. But which one? + +Actually we have to provide more compilers than the three mentioned above: while writing this documentation the number is already seven(!): five GCC versions and two Intel C versions. + +Another issue with a flat naming scheme is, that all modules are listed independent of already loaded modules. But listing a module providing `hdf5 1.8.14` compiled with `Intel 15.2` and `mpich 3.1.4` makes not much sense if modules for `gcc 4.9.2` and `openmpi 1.8.4` are already loaded. A solution to these issues is a to structure the modules hierarchically. + +---- + ... _________________________________________|________________________________________... + / | \ + gcc gcc intel + 4.8.4 4.9.2 15.2 + _____________|_____________ _____________|_____________ _____________|_____________ + / | \ / | \ / | \ + openmpi openmpi mpich openmpi openmpi mpich openmpi openmpi mpich + 1.6.5 1.8.4 3.1.4 1.6.5 1.8.4 3.1.4 1.6.5 1.8.4 3.1.4 + __|__ __|__ __|__ __|__ __|__ __|__ __|__ __|__ __|__ + / \ / \ / \ / \ / \ / \ / \ / \ / \ + hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 hdf5 + 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 1.8.10 1.8.14 +---- + +[NOTE] +In a hierarchical structured module environment the command `module +avail` does '''not''' reveal all modules. Modules like `openmpi` and +`hdf5` are not listed as long as the dependencies are not loaded. + + Example:: + Before you can load a hdf5 module, you must first + * load a particular compiler module, + * than a particular MPI module + * and then the desired hdf5 module. + +---- +$ module list +No Modulefiles Currently Loaded. +$ module avail + ------------------------------------------ Programming ------------------------------------------ + +autoconf/2.69 automake/1.14 binutils/2.25(u) cmake/2.8.12.2 cmake/3.1.3 +gcc/4.7.4 gcc/4.8.3 gcc/4.8.4 gcc/4.9.2 gcc/5.1.0(u) intel/14.0.3 +intel/15.2(u) libtool/2.4.2 m4/1.4.17 psi-python27/2.1.0(u) +psi-python34/2.1.0(u) Python/3.4.3 Tcl/8.6.3(u) Tcl/8.6.4(u) Tk/8.6.4(u) +---- + +After loading the module `gcc/4.9.2` we see the available MPI implementations compiled with this compiler: + +---- +$ module load gcc/4.9.2 +$ module avail +------------------------------------------ Programming ------------------------------------------ + +autoconf/2.69 automake/1.14 binutils/2.25(u) cmake/2.8.12.2 cmake/3.1.3 +gcc/4.7.4 gcc/4.8.3 gcc/4.8.4 gcc/4.9.2 gcc/5.1.0(u) intel/14.0.3 +intel/15.2(u) libtool/2.4.2 m4/1.4.17 psi-python27/2.1.0(u) +psi-python34/2.1.0(u) Python/3.4.3 Tcl/8.6.3(u) Tcl/8.6.4(u) Tk/8.6.4(u) + +--------------------------------------- Compiler/gcc/4.9.2 --------------------------------------- + +boost/1.55.0 boost/1.57.0 gsl/1.15 hdf5_serial/1.8.12 hdf5_serial/1.8.13 +hdf5_serial/1.8.14 mpich/3.1.4(u) OpenBLAS/0.2.9 OpenBLAS_OMP/0.2.9 +openmpi/1.6.5 openmpi/1.8.2 openmpi/1.8.4 root/5.34.19 root/5.34.26 SuperLU/4.3 +UMFPACK/5.6.2 vtk/5.10.1 +---- + +Next step is loading a MPI module: + +---- +$ module load openmpi/1.8.4 +$ module avail +------------------------------------------ Programming ------------------------------------------ + +autoconf/2.69 automake/1.14 binutils/2.25(u) cmake/2.8.12.2 cmake/3.1.3 +gcc/4.7.4 gcc/4.8.3 gcc/4.8.4 gcc/4.9.2 gcc/5.1.0(u) intel/14.0.3 +intel/15.2(u) libtool/2.4.2 m4/1.4.17 psi-python27/2.1.0(u) +psi-python34/2.1.0(u) Python/3.4.3 Tcl/8.6.3(u) Tcl/8.6.4(u) Tk/8.6.4(u) + +--------------------------------------- Compiler/gcc/4.9.2 --------------------------------------- + +boost/1.55.0 boost/1.57.0 gsl/1.15 hdf5_serial/1.8.12 hdf5_serial/1.8.13 +hdf5_serial/1.8.14 mpich/3.1.4(u) OpenBLAS/0.2.9 OpenBLAS_OMP/0.2.9 +openmpi/1.6.5 openmpi/1.8.2 openmpi/1.8.4 root/5.34.19 root/5.34.26 SuperLU/4.3 +UMFPACK/5.6.2 vtk/5.10.1 + +---------------------------------- MPI/gcc/4.9.2/openmpi/1.8.4 ---------------------------------- + +BoxLib/2014-02-28 hdf5/1.8.12 hdf5/1.8.13 hdf5/1.8.14 ippl/1.1.4 +parmetis/3.2.0 SuperLU_DIST/3.3 trilinos/11.10.2 trilinos/11.12.1 +trilinos/11.14.1 +---- + +Now you can load the HDF5 module: + +---- +$ module load hdf5/1.8.14 +---- + +Instead of + +---- +$ module load gcc/4.9.2 +$ module load openmpi/1.8.4 +$ module load hdf5/1.8.14 +---- +you can also execute +---- +$ module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14 +---- +[NOTE] +Modules marked with `(u)` are unstable. +--- + +[id="nutshell-searching",reftext="Searching the module hierarchy"] +== Searching the module hierarchy + +Now you may ask: How do I know which hdf5 (or Trilinos, boost...) modules are really available? To get an answer to this question you can run the `module search` command. + +Example:: +To get a list of all installed hdf5 modules run +---- +$ module search hdf5 --all-releases +Module Release Group Requires +------------------------------------------------------------ +hdf5/1.8.12 unstable MPI gcc/4.7.4 mpich/3.1.4 +hdf5/1.8.12 stable MPI gcc/4.7.4 openmpi/1.6.5 +hdf5/1.8.12 stable MPI gcc/4.7.4 openmpi/1.8.2 +hdf5/1.8.12 stable MPI gcc/4.7.4 openmpi/1.8.4 +hdf5/1.8.12 stable MPI gcc/4.8.3 openmpi/1.6.5 +hdf5/1.8.12 stable MPI gcc/4.8.3 openmpi/1.8.2 +hdf5/1.8.12 stable MPI gcc/4.8.3 openmpi/1.8.4 +hdf5/1.8.12 unstable MPI gcc/4.8.4 mpich/3.1.4 +hdf5/1.8.12 stable MPI gcc/4.8.4 openmpi/1.6.5 +hdf5/1.8.12 stable MPI gcc/4.8.4 openmpi/1.8.2 +hdf5/1.8.12 stable MPI gcc/4.8.4 openmpi/1.8.4 +hdf5/1.8.12 unstable MPI gcc/4.9.2 mpich/3.1.4 +hdf5/1.8.12 stable MPI gcc/4.9.2 openmpi/1.6.5 +hdf5/1.8.12 stable MPI gcc/4.9.2 openmpi/1.8.2 +hdf5/1.8.12 stable MPI gcc/4.9.2 openmpi/1.8.4 +hdf5/1.8.12 unstable MPI gcc/5.1.0 mpich/3.1.4 +hdf5/1.8.12 unstable MPI gcc/5.1.0 openmpi/1.6.5 +hdf5/1.8.12 unstable MPI gcc/5.1.0 openmpi/1.8.4 +hdf5/1.8.12 unstable MPI intel/15.2 mpich/3.1.4 +hdf5/1.8.12 unstable MPI intel/15.2 openmpi/1.6.5 +hdf5/1.8.12 unstable MPI intel/15.2 openmpi/1.8.4 +hdf5/1.8.13 stable MPI gcc/4.7.4 openmpi/1.6.5 +hdf5/1.8.13 stable MPI gcc/4.7.4 openmpi/1.8.2 +hdf5/1.8.13 stable MPI gcc/4.7.4 openmpi/1.8.4 +hdf5/1.8.13 stable MPI gcc/4.8.3 openmpi/1.6.5 +hdf5/1.8.13 stable MPI gcc/4.8.3 openmpi/1.8.2 +hdf5/1.8.13 stable MPI gcc/4.8.3 openmpi/1.8.4 +hdf5/1.8.13 stable MPI gcc/4.8.4 openmpi/1.6.5 +hdf5/1.8.13 stable MPI gcc/4.8.4 openmpi/1.8.2 +hdf5/1.8.13 stable MPI gcc/4.8.4 openmpi/1.8.4 +hdf5/1.8.13 stable MPI gcc/4.9.2 openmpi/1.6.5 +hdf5/1.8.13 stable MPI gcc/4.9.2 openmpi/1.8.2 +hdf5/1.8.13 stable MPI gcc/4.9.2 openmpi/1.8.4 +hdf5/1.8.14 unstable MPI gcc/4.7.4 mpich/3.1.4 +hdf5/1.8.14 stable MPI gcc/4.7.4 openmpi/1.6.5 +hdf5/1.8.14 stable MPI gcc/4.7.4 openmpi/1.8.2 +hdf5/1.8.14 stable MPI gcc/4.7.4 openmpi/1.8.4 +hdf5/1.8.14 stable MPI gcc/4.8.3 openmpi/1.6.5 +hdf5/1.8.14 stable MPI gcc/4.8.3 openmpi/1.8.2 +hdf5/1.8.14 stable MPI gcc/4.8.3 openmpi/1.8.4 +hdf5/1.8.14 unstable MPI gcc/4.8.4 mpich/3.1.4 +hdf5/1.8.14 stable MPI gcc/4.8.4 openmpi/1.6.5 +hdf5/1.8.14 stable MPI gcc/4.8.4 openmpi/1.8.2 +hdf5/1.8.14 stable MPI gcc/4.8.4 openmpi/1.8.4 +hdf5/1.8.14 unstable MPI gcc/4.9.2 mpich/3.1.4 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.6.5 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.8.2 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.8.4 +hdf5/1.8.14 unstable MPI gcc/5.1.0 mpich/3.1.4 +hdf5/1.8.14 unstable MPI gcc/5.1.0 openmpi/1.6.5 +hdf5/1.8.14 unstable MPI gcc/5.1.0 openmpi/1.8.4 +hdf5/1.8.14 unstable MPI intel/15.2 mpich/3.1.4 +hdf5/1.8.14 unstable MPI intel/15.2 openmpi/1.6.5 +hdf5/1.8.14 unstable MPI intel/15.2 openmpi/1.8.4 +hdf5_serial/1.8.12 stable Compiler gcc/4.7.4 +hdf5_serial/1.8.12 stable Compiler gcc/4.8.3 +hdf5_serial/1.8.12 stable Compiler gcc/4.8.4 +hdf5_serial/1.8.12 stable Compiler gcc/4.9.2 +hdf5_serial/1.8.12 unstable Compiler intel/15.2 +hdf5_serial/1.8.14 stable Compiler gcc/4.7.4 +hdf5_serial/1.8.14 stable Compiler gcc/4.8.3 +hdf5_serial/1.8.14 stable Compiler gcc/4.8.4 +hdf5_serial/1.8.14 stable Compiler gcc/4.9.2 +hdf5_serial/1.8.14 unstable Compiler intel/15.2 +---- +Example:: +To get a list of all installed hdf5 modules compiled with GCC 4.9.2, run +---- +$ module search hdf5 --with=gcc/4.9.2 --all-releases +Module Release Group Requires +------------------------------------------------------------ +hdf5/1.8.12 unstable MPI gcc/4.9.2 mpich/3.1.4 +hdf5/1.8.12 stable MPI gcc/4.9.2 openmpi/1.6.5 +hdf5/1.8.12 stable MPI gcc/4.9.2 openmpi/1.8.2 +hdf5/1.8.12 stable MPI gcc/4.9.2 openmpi/1.8.4 +hdf5/1.8.13 stable MPI gcc/4.9.2 openmpi/1.6.5 +hdf5/1.8.13 stable MPI gcc/4.9.2 openmpi/1.8.2 +hdf5/1.8.13 stable MPI gcc/4.9.2 openmpi/1.8.4 +hdf5/1.8.14 unstable MPI gcc/4.9.2 mpich/3.1.4 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.6.5 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.8.2 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.8.4 +hdf5_serial/1.8.12 stable Compiler gcc/4.9.2 +hdf5_serial/1.8.13 stable Compiler gcc/4.9.2 +hdf5_serial/1.8.14 stable Compiler gcc/4.9.2 +---- +Example:: +To get a list of all installed modules providing (parallel) HDF5 1.8.14, execute +---- +$ module search hdf5/1.8.14 --with=gcc/4.9.2 --all-releases +Module Release Group Requires +------------------------------------------------------------ +hdf5/1.8.14 unstable MPI gcc/4.9.2 mpich/3.1.4 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.6.5 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.8.2 +hdf5/1.8.14 stable MPI gcc/4.9.2 openmpi/1.8.4 +---- + +[NOTE] +Without the option `--all-releases`, only modules of "used" releases are listed. + + +--- + +[id="nutshell-module-lifecycle",reftext="Module lifecycle"] +== Module lifecycle +Pmodules supports a simple lifecycle management. This solves the +problem of introducing new modules, which are still in development or +considered to be unstable and it supports phasing out old and +deprecated modules. The lifecycle of a module is `unstable` -> +`stable` -> `deprecated`. By default only stable modules are +visible. If you want to use unstable or deprecated modules, you have +to run + +---- +$ module use unstable +---- + +or + +---- +$ module use deprecated +---- + +first. + +All modules start as `unstable`. This implies something like "use on +your on risk". Unstable modules may be changed without warning or even +be removed. If you load an unstable module, a warning will be printed. + +A `stable` module is, well, stable. It will not be changed during the +remaining life time and the provided software is considered to be +stable. + +A `deprecated` module should not be used any more. Deprecated modules +might be removed without further warning. While loading a deprecated +module, a warning will be printed. Kind module developers might add an +end of life message with more detailed information. + +[id="nutshell-overlays",reftext="Overlays"] +== Overlays + +TBW \ No newline at end of file diff --git a/doc/src/The_module_command.adoc b/doc/src/The_module_command.adoc new file mode 100644 index 0000000..a55a192 --- /dev/null +++ b/doc/src/The_module_command.adoc @@ -0,0 +1,36 @@ += THE `module` COMMAND + +*Table of Content* + +The module-command: <> + +List available modules: <> + +Clear list of loaded modules: <> + +Display information about chances in environment when loaded: <> + +Print sub-command or module-specific help: <> + +Add or remove modules from shell’s initialization file: <> + +Search for keywords in 'whatis': <> + +List loaded modules: <> + +Load and unload modules: <> + +Purge all loaded modules: <> + +Refresh loaded modules: <> + +Search installed modules: <> + +Replace a loaded module by another: <> + +Manipulate module path, used releases, groups and overlays: <> + +Search for keywords in 'whatis': <> + + +include::The_module_command/module.adoc[leveloffset=+1] + +== Sub-commands + +include::The_module_command/module-avail.adoc[leveloffset=+2] +include::The_module_command/module-clear.adoc[leveloffset=+2] +include::The_module_command/module-display.adoc[leveloffset=+2] +include::The_module_command/module-help.adoc[leveloffset=+2] +include::The_module_command/module-initcmds.adoc[leveloffset=+2] +include::The_module_command/module-list.adoc[leveloffset=+2] +include::The_module_command/module-load.adoc[leveloffset=+2] +include::The_module_command/module-purge.adoc[leveloffset=+2] +include::The_module_command/module-refresh.adoc[leveloffset=+2] +include::The_module_command/module-search.adoc[leveloffset=+2] +include::The_module_command/module-swap.adoc[leveloffset=+2] +include::The_module_command/module-use.adoc[leveloffset=+2] +include::The_module_command/module-whatis.adoc[leveloffset=+2] diff --git a/doc/src/The_module_command/module-avail.adoc b/doc/src/The_module_command/module-avail.adoc new file mode 100644 index 0000000..e555a28 --- /dev/null +++ b/doc/src/The_module_command/module-avail.adoc @@ -0,0 +1,61 @@ +[id="module-avail",reftext="`module avail`"] += List available/loadable modules +:sectnums!: +== NAME + +`module avail` - list loadable modules + +== SYNOPSIS + +`module avail [OPTIONS] [string...]` + +== DESCRIPTION + +List all available module in the current `MODULEPATH`. If an argument is given, then each directory in the `MODULEPATH` is searched for modules whose pathname match the argument. + +This command does *not* display all installed modules on the system. Only loadable modules are listed. To get a list of all installed modules use the command link:module%20search[`module search`]. + +The list of available modules may change either by loading other modules, e.g. a compiler, or by using/accepting unstable or deprecated modules. For the later read the description of link:module%20use[`module use`]. + +With the switches you can change the output format. The default output format is 'human' (readable). For the time being terse and long output are identical. + +== OPTIONS + +`-a`:: List loadable modules in all release-stages. Unstable modules are marked with `(u)`, + deprecated modules with `(d)`. + +`-t | --terse`:: Terse output. + +`-h | --human`:: Human readable output. This is the default. + +`-l | --long`:: Long output. + +== EXAMPLES + +----- +$ module avail git +----------------------------------------- Tools ----------------------------------------- + +ygit/2.3.3 git/2.8.1 git/2.21.0 git/2.22.0 git/2.30.0 git/2.33.1 + +$ module avail -a gcc +-------------------------------------- Programming -------------------------------------- + +gcc/4.7.4 gcc/4.8.2 gcc/4.8.3 gcc/4.8.4 gcc/4.8.5 gcc/4.9.2 +gcc/4.9.3 gcc/4.9.4 gcc/5.1.0(d) gcc/5.2.0(d) gcc/5.3.0 gcc/5.4.0 +gcc/5.5.0 gcc/6.1.0 gcc/6.2.0 gcc/6.3.0 gcc/6.4.0 gcc/6.5.0 +gcc/7.1.0 gcc/7.2.0 gcc/7.3.0 gcc/7.4.0 gcc/7.5.0 gcc/8.1.0 +gcc/8.2.0 gcc/8.3.0 gcc/8.4.0 gcc/8.5.0 gcc/9.1.0 gcc/9.2.0 +gcc/9.3.0 gcc/9.5.0 gcc/10.1.0 gcc/10.2.0 gcc/10.3.0 gcc/11.2.0 +gcc/11.3.0 gcc/12.1.0 +----- + +=== SEE ALSO + +<>, +<>, +<>, +<>, +<> + +:sectnums: \ No newline at end of file diff --git a/doc/src/The_module_command/module-clear.adoc b/doc/src/The_module_command/module-clear.adoc new file mode 100644 index 0000000..ed059f9 --- /dev/null +++ b/doc/src/The_module_command/module-clear.adoc @@ -0,0 +1,50 @@ +[id="module-clear",reftext="`module clear`"] +:secnums: += Clear list of loaded modules +:secnums!: +== NAME + +`module clear` - clear list of loaded modules. + +== SYNOPSIS + +`module clear` + +== DESCRIPTION + +Force the Pmodules package to believe that no modules are currently loaded. The sub-command clear does not unload the loaded modules! In other words: changes made to the shell's environment by loaded modules are not reverted. + +== EXAMPLES + +After loading the module for `gcc/4.9.2` the following environment variables are set: + +----- +$ env | grep ^GCC +GCC_HOME=/opt/psi/Programming/gcc/4.9.2 +GCC_DIR=/opt/psi/Programming/gcc/4.9.2 +GCC_PREFIX=/opt/psi/Programming/gcc/4.9.2 +GCC_VERSION=4.9.2 +GCC_INCLUDE_DIR=/opt/psi/Programming/gcc/4.9.2/include +GCC_LIBRARY_DIR=/opt/psi/Programming/gcc/4.9.2/lib +----- + +After clearing the list of loaded modules the environment variables set by the GCC module are still set + +----- +$ module clear +$ module list +No Modulefiles Currently Loaded. +$ env | grep ^GCC +GCC_HOME=/opt/psi/Programming/gcc/4.9.2 +GCC_DIR=/opt/psi/Programming/gcc/4.9.2 +GCC_PREFIX=/opt/psi/Programming/gcc/4.9.2 +GCC_VERSION=4.9.2 +GCC_INCLUDE_DIR=/opt/psi/Programming/gcc/4.9.2/include +GCC_LIBRARY_DIR=/opt/psi/Programming/gcc/4.9.2/lib +----- + +== SEE ALSO + +<>, <> + +:secnums: diff --git a/doc/src/The_module_command/module-display.adoc b/doc/src/The_module_command/module-display.adoc new file mode 100644 index 0000000..7630a6e --- /dev/null +++ b/doc/src/The_module_command/module-display.adoc @@ -0,0 +1,60 @@ +[id="module-display",reftext="`module display`"] +:sectnums: += Display information about a module +:sectnums!: +== NAME + +`module display\|show` - display information about chances in environment + +== SYNOPSIS + +`module display modulefile...` + +`module show modulefile...` + +== DESCRIPTION + +Display information about modulefile(s). The display sub-command will list the full path of the modulefile(s) and all of the environment changes the modulefile(s) will make if loaded. (It will not display any environment changes found within conditional statements.) + +== EXAMPLES + +Display chances the module `gcc/5.4.0` will make to the environment if loaded: +```sh +$ module display gcc/5.4.0 +------------------------------------------------------------------- +/opt/psi/Programming/modulefiles/gcc/5.4.0: + +module-whatis GNU Compiler Collection +conflict gcc +setenv GCC_VERSION 5.4.0 +setenv GCC_PREFIX /opt/psi/Programming/gcc/5.4.0 +setenv GCC_DIR /opt/psi/Programming/gcc/5.4.0 +setenv GCC_HOME /opt/psi/Programming/gcc/5.4.0 +prepend-path PATH /opt/psi/Programming/gcc/5.4.0/bin +prepend-path MANPATH /opt/psi/Programming/gcc/5.4.0/share/man +prepend-path C_INCLUDE_PATH /opt/psi/Programming/gcc/5.4.0/include +prepend-path CPLUS_INCLUDE_PATH /opt/psi/Programming/gcc/5.4.0/include +setenv GCC_INCLUDE_DIR /opt/psi/Programming/gcc/5.4.0/include +prepend-path LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib +prepend-path LD_LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib +setenv GCC_LIBRARY_DIR /opt/psi/Programming/gcc/5.4.0/lib +prepend-path LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib64 +prepend-path LD_LIBRARY_PATH /opt/psi/Programming/gcc/5.4.0/lib64 +setenv GCC_LIBRARY_DIR /opt/psi/Programming/gcc/5.4.0/lib64 +append-path PMODULES_LOADED_PROGRAMMING gcc/5.4.0 +remove-path PMODULES_LOADED_PROGRAMMING --APPMARKER-- +setenv COMPILER gcc +setenv COMPILER_VERSION 5.4.0 +setenv CC /opt/psi/Programming/gcc/5.4.0/bin/gcc +setenv CXX /opt/psi/Programming/gcc/5.4.0/bin/g++ +setenv F77 /opt/psi/Programming/gcc/5.4.0/bin/gfortran +setenv F90 /opt/psi/Programming/gcc/5.4.0/bin/gfortran +setenv FC /opt/psi/Programming/gcc/5.4.0/bin/gfortran +setenv FORTRAN /opt/psi/Programming/gcc/5.4.0/bin/gfortran +------------------------------------------------------------------- +``` + +== SEE ALSO + +<> + +:sectnums: \ No newline at end of file diff --git a/doc/src/The_module_command/module-help.adoc b/doc/src/The_module_command/module-help.adoc new file mode 100644 index 0000000..41dad1d --- /dev/null +++ b/doc/src/The_module_command/module-help.adoc @@ -0,0 +1,53 @@ +[id="module-help",reftext="`module help`"] += Print sub-command or module-specific help +== NAME + +`module help` - print sub-command or module-specific help + +== SYNOPSIS + +`module help [module|sub-command...]` + +== DESCRIPTION + +Print help for specific modules, sub-commands or the module command itself. + +== EXAMPLES + +Get help for the module git/2.3.3: +```sh +$ module help git/2.3.3 + +----------- Module Specific Help for 'git/2.3.3' ------------------ + +distributed version control system +Version: 2.3.3 +Homepage: http://git-scm.com/ +License: GNU GPL v2 +Maintainer: Achim Gsell + +Git is a free and open source distributed version control system +designed to handle everything from small to very large projects +with speed and efficiency. + +Git is easy to learn and has a tiny footprint with lightning fast +performance. It outclasses SCM tools like Subversion, CVS, Perforce, +and ClearCase with features like cheap local branching, convenient +staging areas, and multiple workflows. +``` +Print help for the sub-command load: +```sh +$ module help load + +USAGE: + module add modulefile... + module load modulefile... + Load modulefile(s) into the shell environment. Loading a + 'group-head' will extend the MODULEPATH. E.g.: loading a + compiler makes additional modules like openmpi and libraries + compiled with this compiler available. +``` + +== SEE ALSO + +<> diff --git a/doc/src/The_module_command/module-initcmds.adoc b/doc/src/The_module_command/module-initcmds.adoc new file mode 100644 index 0000000..95ef074 --- /dev/null +++ b/doc/src/The_module_command/module-initcmds.adoc @@ -0,0 +1,53 @@ +[id="module-initcmds",reftext="`module initcmds`"] += Manipulate shell’s initialization file + +== NAME + +`module initadd|initprepend|initrm|initswitch|initrm|initlist|initclear` - add or remove modules from shell’s initialization file + +== SYNOPSIS + +`module initadd module...` + +`module initprepend module...` + +`module initrm module...` + +`module initswitch module1 module2` + +`module initlist` + +`module initclear` + +== DESCRIPTION + +Add modulefile(s) to, list modulefile(s) in or remove modulefile(s) from the shell's initialization file in the user's home directory. The startup files checked (in order) are: + +**csh**:: +`.modules`, `.cshrc(.ext)`, `.csh_variables`, and `.login(.ext)` + +**tcsh**:: +`.modules`, `.tcshrc`, `.cshrc(.ext)`, `.csh_variables`, and `.login(.ext)` + +**bash**:: +`.modules`, `.bash_profile`, `.bash_login`, `.profile(.ext)`, and `.bashrc(.ext)` + +**zsh**:: +`.modules`, `.zcshrc(.ext)`, `.zshenv(.ext)`, and `.zlogin(.ext)` + +`module initadd module...`:: +If a module load line is found in any of these files, the modulefile(s) is(are) appended to any existing list of modulefiles. The module load line must be located in at least one of the files listed above for any of the init sub-commands to work properly. If the module load line is found in multiple shell initialization files, all of the lines are changed. + +`module initprepend module...`:: +Does the same as initadd but prepends the given modules to the beginning of the list. + +`module initrm module...`:: +Remove modulefile(s) from the shell's initialization files. + +`module initswitch module1 module2`:: +Switch `module1` with `module2` in the shell's initialization files. + +`module initlist`:: +List all of the module(s) loaded from the shell's initialization file. + +`module initclear`:: +Clear all of the module(s) from the shell's initialization files. + +== SEE ALSO + +<>, <>, <> diff --git a/doc/src/The_module_command/module-keyword.adoc b/doc/src/The_module_command/module-keyword.adoc new file mode 100644 index 0000000..d393093 --- /dev/null +++ b/doc/src/The_module_command/module-keyword.adoc @@ -0,0 +1,29 @@ +[id="module-keyword",reftext="`module keyword|apropos`"] += Show/search 'whatis' information +== NAME + +`module keyword|apropos` - search for keywords in 'whatis' + +== SYN[]OPSIS + +`module apropos string...` + +`module keyword string...` + +== Description + +Search through the 'whatis' informations of all modulefiles for the specified string. All whatis informations matching the string will be displayed. + +== EXAMPLES + +```sh +$ module keyword editor +----------- /opt/psi/Tools/modulefiles ------------- + emacs/24.3: extensible, customizable text editor—and more + emacs/24.4: extensible, customizable text editor—and more + emacs/24.5: extensible, customizable text editor—and more + emacs/25.1: extensible, customizable text editor—and more +----------- /opt/psi/Programming/modulefiles ------------- +``` +== SEE ALSO + +<>, <> diff --git a/doc/src/The_module_command/module-list.adoc b/doc/src/The_module_command/module-list.adoc new file mode 100644 index 0000000..db66659 --- /dev/null +++ b/doc/src/The_module_command/module-list.adoc @@ -0,0 +1,54 @@ +[id="module-list",reftext="`module list`"] += List loaded modules +== NAME + +`module list` - list loaded modules + +== SYNOPSIS + +`module list [OPTIONS]` + +== DESCRIPTION + +List loaded modules. + +== OPTIONS + +`-t | --terse`:: +Terse output. + +`-h | --human`:: +Human readable output. This is the default. + +`-l | --long`:: +Long output. + +== EXAMPLES + +Assuming the modules `gcc/4.8.3`, `openmpi/1.8.2` and `hdf5/1.8.12`. List with default (human readable) output: +```sh +$ module list +Currently Loaded Modulefiles: + 1) gcc/4.8.3 2) openmpi/1.8.2 3) hdf5/1.8.12 +``` +List in terse output: +```sh +$ module list -t +Currently Loaded Modulefiles: +gcc/4.8.3 +openmpi/1.8.2 +hdf5/1.8.12 +``` +Long listing: +```sh +$ module list -l +- Package -----------------------------+- Versions -+- Last mod. ------ +Currently Loaded Modulefiles: +gcc/4.8.3 2014/12/05 17:39:24 +openmpi/1.8.2 2014/11/25 8:15:40 +hdf5/1.8.12 2014/11/25 8:15:40 +``` + +== SEE ALSO + +<>, <> diff --git a/doc/src/The_module_command/module-load.adoc b/doc/src/The_module_command/module-load.adoc new file mode 100644 index 0000000..6aaab0e --- /dev/null +++ b/doc/src/The_module_command/module-load.adoc @@ -0,0 +1,115 @@ +[id="module-load",reftext="`module load|unload`"] += Load and unloading a module +== NAME + +`module add|load` - load modules + +`module rm|unload` - unload modules + +== SYNOPSIS + +`module add [OPTIONS] modulefile...` + +`module load [OPTIONS] modulefile...` + +`module rm modulefile...` + +`module unload modulefile...` + +== DESCRIPTION + +Load modulefile(s) into shell environment. Loading a group-head will extend the `MODULEPATH`. E.g.: loading a compiler makes additional modules like openmpi and other libraries/packages compiled with this compiler available. + +If you try to load a module which is not available in the current `MODULEPATH` but installed in the module hierarchy, a message will be printed showing prerequisite modules. + +If you load a deprecated or unstable module, a warning will be printed. + +You can change the verbosity of the load sub-command by setting the environment variable `PMODULES_VERBOSITY` to silent, warn or verbose. + +silent:: Print error messages only. +warn:: Print a warning message, when loading a deprecated or unstable module. +verbose:: Print warning messages and print prerequisite modules if the module to load is not available, but installed in hierarchy. + + +== OPTIONS / FLAGS + +`-f | --force`:: Force active dependency resolution. This will result in modules found on a prereq command inside a module file being load automatically. Unloading module files using this switch will result in all required modules which have been loaded automatically using the -f switch being unload. This switch is experimental at the moment. + +`-v | --verbose`:: Set verbosity level to verbose. + +`-w | --warn`:: Set verbosity level to warn. + +`-s | --silent`:: Set verbosity level to silent. + +== EXAMPLES (add|load) + +Loading the modules `gcc/4.9.2`, `openmpi/1.8.4` and `hdf5/1.8.14`: + +----- +$ module load gcc/4.9.2 +$ module load openmpi/1.8.4 +$ module load hdf5/1.8.14 +$ module list +Currently Loaded Modulefiles: + 1) gcc/4.9.2 2) openmpi/1.8.4 3) hdf5/1.8.14 +----- + +or + +----- +$ module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14 +----- + +If you try to load `hdf5/1.8.14` without the prerequisite modules, some "hints" will be printed, if the default verbosity level is set: + +----- +$ module purge +$ module load hdf5/1.8.14 +The module 'hdf5/1.8.14' cannot be loaded! +Try with one of the following command(s): + +module load gcc/4.7.4 openmpi/1.6.5 hdf5/1.8.14 +module load gcc/4.7.4 openmpi/1.8.2 hdf5/1.8.14 +module load gcc/4.7.4 openmpi/1.8.4 hdf5/1.8.14 +module load gcc/4.8.3 openmpi/1.6.5 hdf5/1.8.14 +module use deprecated; module load gcc/4.8.3 openmpi/1.8.2 hdf5/1.8.14 +module use deprecated; module load gcc/4.8.3 openmpi/1.8.4 hdf5/1.8.14 +module load gcc/4.8.4 openmpi/1.6.5 hdf5/1.8.14 +module use deprecated; module load gcc/4.8.4 openmpi/1.8.2 hdf5/1.8.14 +module use deprecated; module load gcc/4.8.4 openmpi/1.8.4 hdf5/1.8.14 +module use deprecated; module load gcc/4.8.4 openmpi/1.8.8 hdf5/1.8.14 +module use deprecated; module load gcc/4.9.2 openmpi/1.6.5 hdf5/1.8.14 +module use deprecated; module load gcc/4.9.2 openmpi/1.8.2 hdf5/1.8.14 +module use deprecated; module load gcc/4.9.2 openmpi/1.8.4 hdf5/1.8.14 +----- + +Use verbosity level `warn` to suppress the hints: + +----- +$ module load hdf5/1.8.14 --warn +module load: module unavailable -- hdf5/1.8.14 +----- + +Loading an unstable module: + +----- +$ module use unstable +$ module load cmake/3.1.3 +Warning: the unstable module 'cmake/3.1.3' has been loaded. +----- + +To supress the warning, use the `--silent` option. + +== EXAMPLES (rm|unload) + +----- +$ module list +Currently Loaded Modulefiles: + 1) gcc/4.9.2 2) openmpi/1.8.4 3) hdf5/1.8.14 +$ module rm openmpi/1.8.4 +$ module list +Currently Loaded Modulefiles: + 1) gcc/4.9.2 +----- + +The module `hdf5/1.8.14` is unloaded as a dependency of `openmpi/1.8.4`. + +== SEE ALSO + +<>, <>, <>, <>, <> diff --git a/doc/src/The_module_command/module-purge.adoc b/doc/src/The_module_command/module-purge.adoc new file mode 100644 index 0000000..4444cb5 --- /dev/null +++ b/doc/src/The_module_command/module-purge.adoc @@ -0,0 +1,32 @@ +[id="module-purge",reftext="`module purge`"] += Purge all loaded modules +== NAME + +`module purge` - purge all loaded modules + +== SYNOPSIS + +`module purge` + +== DESCRIPTION + +Unload all loaded module and reset everything to original state. + +== EXAMPLES + +List loaded modules: +----- +$ module list +Currently Loaded Modulefiles: + 1) gcc/4.8.3 2) openmpi/1.8.2 3) gnuplot/4.6.3 +----- +Now we purge everything and list the loaded modules again: +----- +$ module purge +$ module list +No Modulefiles Currently Loaded. +----- + +== SEE ALSO + +<>, <>, <> diff --git a/doc/src/The_module_command/module-refresh.adoc b/doc/src/The_module_command/module-refresh.adoc new file mode 100644 index 0000000..e946b01 --- /dev/null +++ b/doc/src/The_module_command/module-refresh.adoc @@ -0,0 +1,17 @@ +[id="module-refresh",reftext="`module refresh`"] += Refresh loaded modules +== NAME + +`module refresh` - refresh loaded modules + +== SYNOPSIS + +`module refresh` + +== DESCRIPTION + +Force a refresh of all non-persistent components of currently loaded modules. This should be used on derived shells where aliases need to be reinitialized but the environment variables have already been set by the currently loaded modules. + +== SEE ALSO + +<> diff --git a/doc/src/The_module_command/module-search.adoc b/doc/src/The_module_command/module-search.adoc new file mode 100644 index 0000000..753bc4b --- /dev/null +++ b/doc/src/The_module_command/module-search.adoc @@ -0,0 +1,71 @@ +[id="module-search",reftext="`module search`"] += Search modules +== NAME + +`module search` - search installed modules + +== SYNOPSIS + +`module search [switches] string...` + +== DESCRIPTION + +List all modules in the current `MODULEPATH` and the module hierarchy. If an argument is given, search for modules whose name match the argument. +Options + +== OPTIONS + +`--no-header`:: Suppress output of a header. + +`--release=RELEASE`:: Search for modules within this release. You can specify this switch multiple times. Without this switch, the used releases will be searched. + +`-a|--all-releases`:: +Search within all releases. + +`--with=STRING`:: +Search for modules compiled with modules matching string. The command. See example below. + +`--src=dir`:: +Search module hierarchy in dir. +Eine Textbeschreibung der Funktionsweise des Befehls oder der Funktion. (Üblicherweise jedoch nicht der Benutzung, siehe unten.) + +== EXAMPLES + +Get list of all installed GCC: +```shell +$ module search --all-releases gcc +Module Release Group Requires +------------------------------------------------------------ +gcc/4.7.4 stable Programming +gcc/4.8.2 stable Programming +gcc/4.8.3 stable Programming +gcc/4.8.4 stable Programming +gcc/4.8.5 stable Programming +gcc/4.9.2 stable Programming +gcc/4.9.3 stable Programming +gcc/4.9.4 stable Programming +gcc/5.1.0 deprecated Programming +gcc/5.2.0 deprecated Programming +gcc/5.3.0 stable Programming +gcc/5.4.0 stable Programming +gcc/6.1.0 stable Programming +gcc/6.2.0 stable Programming +gcc/6.3.0 stable Programming +gcc/6.4.0 stable Programming +gcc/7.1.0 stable Programming +gcc/7.2.0 stable Programming +``` + +Get list of all open-mpi versions compiled with GCC 5.4.0: +```shell +$ module search --all-releases openmpi --with=gcc/5.4.0 +Module Release Group Requires +------------------------------------------------------------ +openmpi/1.10.2 stable Compiler gcc/5.4.0 +openmpi/1.10.4 stable Compiler gcc/5.4.0 +openmpi/2.0.1 stable Compiler gcc/5.4.0 +``` + +== SEE ALSO + +<> diff --git a/doc/src/The_module_command/module-swap.adoc b/doc/src/The_module_command/module-swap.adoc new file mode 100644 index 0000000..bf32024 --- /dev/null +++ b/doc/src/The_module_command/module-swap.adoc @@ -0,0 +1,46 @@ +[id="module-swap",reftext="`module swap`"] += Swapping modules +== NAME + +`module swap|switch` - replace a loaded module by another + +== SYNOPSIS + +`module swap [modulefile1] modulefile2` + +`module switch [modulefile1] modulefile2` + +== DESCRIPTION + +Switch loaded `modulefile1` with `modulefile2`. If `modulefile1` is not specified, then it is assumed to be the currently loaded module with the same root name as `modulefile2`. + +== OPTIONS / FLAGS + +None + +== EXAMPLES + +----- +$ module load gcc/4.8.4 +$ module swap gcc/4.9.2 +$ module list +Currently Loaded Modulefiles: + 1) gcc/4.9.2 +----- + +== BUGS + +You can only swap between different version. The following commands are working (assuming that `gcc/4.8.2` is loaded): +----- +$ module swap gcc/4.9.2 +$ module swap gcc/4.9.2 gcc/5.4.0 +----- +The following command does *not* working as expected: +----- +$ module swap gcc/4.8.2 intel/15.0 +----- + +This command does not work with the Tcl implementation (environment variable `PMOUDLE_PURETCL` set). + +== SEE ALSO + +<>, <>, <> diff --git a/doc/src/The_module_command/module-use.adoc b/doc/src/The_module_command/module-use.adoc new file mode 100644 index 0000000..e729e4b --- /dev/null +++ b/doc/src/The_module_command/module-use.adoc @@ -0,0 +1,114 @@ +[id="module-use",reftext="`module use`"] += Manipulate module path, used releases, groups or overlays +== NAME + +`module use|unuse` - manipulate module path, used releases or groups + +== SYNOPSIS + +`module use [OPTIONS] [string...]` + +`module unuse string...` + +== DESCRIPTION + +If called *without* arguments, print a summary about used groups, releases and additional directories in `MODULEPATH`. + +If string is a *directory*, append, prepend or remove this directory to/from `MODULEPATH`. + +If string is a *group name*, append, prepend or remove the corresponding directory to/from `MODULEPATH`. + +If string is a *releases name*, make all modules with this release available/unavailable. Known releases are; + +*stable*:: Modules released as stable are considered to be production ready. The files of a stable module will never change. + +*unstable*:: These modules are still unstable. They may not be ready for production use. The files of unstable modules may change to fix bugs or add functionality. Use at your own risk. + +*deprecated*:: Deprecated modules should not be used any more and may be removed without further notice. + +If string matches `flag=[-_a-zA-Z0-9]*` the RHS will be interpreted as use-flag. + +== OPTIONS / FLAGS + +`-a | --append`:: append directory or group to `MODULEPATH`. + +`-p | --prepend`:: prepend directory or group to `MODULEPATH`. + +== EXAMPLES + +*List used/unused groups, releases and additional directories in `MODULEPATH`:* +----- +$ module use +Used groups: + Tools + Programming + Compiler + +Unused groups: + Legacy + Libraries + System + +Used releases: + stable + unstable + +Unused releases: + deprecated + +Used flags: + omp + +Additonal directories in MODULEPATH: + none +----- +*Adding the 'System' group* +----- +$ module use System +$ module avail +-------------------------------------------- System: -------------------------------------------- + +filebench/1.4.9.1 fsstress/1.0.0 nmap/6.46 patchelf/0.8.1 + +-------------------------------------------- Tools: -------------------------------------------- + +ANSYS/18.2 emacs/24.4 git/2.3.3 global/6.3.1 gnuplot/4.6.3 gnuplot/5.0.0 +... + +----------------------------------------- Programming: ----------------------------------------- + +autoconf/2.69 automake/1.14 automake/1.15 binutils/2.25 cmake/2.8.12.2 cmake/3.1.3 +cmake/3.6.3 gcc/4.7.4 gcc/4.8.3 gcc/4.8.4 gcc/4.9.2 gcc/4.8.5 +... +----- +*Adding a directory to `MODULEPATH`* +----- +$ module use /afs/psi.ch/project/amas/modulefiles +$ module avail +----------------------------------- /afs/psi.ch/project/amas: ----------------------------------- + +H5hut_parallel-toolchain/2.0 H5hut_serial-toolchain/2.0 OPAL/1.6 OPAL/1.6.0rc5 +opal-toolschain/1.6 opal-toolschain/2.0 + +-------------------------------------------- Tools: -------------------------------------------- + +ANSYS/18.2 emacs/24.4 git/2.3.3 global/6.3.1 gnuplot/4.6.3 gnuplot/5.0.0 +... +----------------------------------------- Programming: ----------------------------------------- + +autoconf/2.69 automake/1.14 automake/1.15 binutils/2.25 cmake/2.8.12.2 cmake/3.1.3 +cmake/3.6.3 gcc/4.7.4 gcc/4.8.3 gcc/4.8.4 gcc/4.9.2 gcc/4.8.5 +... +----- + +----- +$ module unuse /afs/psi.ch/project/amas/modulefiles +$ module unuse System +$ module unuse unstable +----- + +== SEE ALSO + +<>, <>, <> + + diff --git a/doc/src/The_module_command/module-whatis.adoc b/doc/src/The_module_command/module-whatis.adoc new file mode 100644 index 0000000..76f0f89 --- /dev/null +++ b/doc/src/The_module_command/module-whatis.adoc @@ -0,0 +1,41 @@ +[id="module-whatis",reftext="`module whatis|keyword`"] += Show/search 'what is' information +== NAME + +`module whatis` - print one-line information about module +`module keyword|apropos` - search for keywords in 'whatis' + +== SYNOPSIS + +`module whatis [module...]` + +`module apropos string...` + +`module keyword string...` + +== DESCRIPTION + +`whatis`:: +Display the information set up by the `module-whatis` commands inside +the specified modulefile(s). If no modulefile is specified, all whatis +lines will be shown. + +`keyword|apropos`:: +Search through the 'whatis' informations of all modulefiles for the +specified string. All whatis informations matching the string will be +displayed. + +== EXAMPLES +Get whatis for all available Git modules + +```sh +$ module whatis git +----------- /opt/psi/Tools/modulefiles ------------- + git/2.3.3: distributed version control system + git/2.5.2: distributed version control system + git/2.8.1: distributed version control system + git/2.11.1: distributed version control system +----------- /opt/psi/Programming/modulefiles ------------- +``` + +== SEE ALSO + +<> diff --git a/doc/src/The_module_command/module.adoc b/doc/src/The_module_command/module.adoc new file mode 100644 index 0000000..8a1be2c --- /dev/null +++ b/doc/src/The_module_command/module.adoc @@ -0,0 +1,60 @@ +[id="module-cmd",reftext="`module`"] += `module` - using Pmodules + +:sectnums!: +== NAME + +`module` - command line interface to the Pmodules package + +== SYNOPSIS +`module [ switches ] [ sub-command ] [ sub-command-args ]` + +== DESCRIPTION +Environment Modules provide a convenient way to dynamically change the +users' environment through modulefiles. This includes easily adding or +removing directories to the `PATH` environment variable. +A modulefile contains the necessary information to allow a user to run +a particular application or provide access to a particular +library. All of this can be done dynamically without logging out and +back in. Modulefiles for applications modify the user’s shell +environment to make access easy. Modulefiles for Library packages +provide environment variables that specify where the library and +header files can be found. +Packages can be loaded and unloaded cleanly through the `module` command. + +Available sub-commands are: + +List available modules: <> + +Clear list of loaded modules: <> + +Display information about chances in environment when loaded: <> + +Print sub-command or module-specific help: <> + +Add or remove modules from shell’s initialization file: <> + +Search for keywords in 'whatis': <> + +List loaded modules: <> + +Load and unload modules: <> + +Purge all loaded modules: <> + +Refresh loaded modules: <> + +Search installed modules: <> + +Replace a loaded module by another: <> + +Manipulate module path, used releases, groups and overlays: <> + +Search for keywords in 'whatis': <> + +[NOTE] +===================================================================== +For the time being Pmodules supports bash, tcsh and zsh only. +===================================================================== + +:sectnums: \ No newline at end of file diff --git a/doc/src/Tutorials.adoc b/doc/src/Tutorials.adoc new file mode 100644 index 0000000..1781455 --- /dev/null +++ b/doc/src/Tutorials.adoc @@ -0,0 +1,206 @@ += *TUTORIALS* + +== Step-by-step guide to build a 'Hello, world!' module + +[NOTE] +==== +This is for Pmodules 2.0 or newer! +==== + +[NOTE] +==== +For linting YAML files use the tool https://yamllint.readthedocs.io/en/stable/[`yamlint`] or an on-line linter like https://jsonformatter.org/yaml-validator[yaml-validator]. +==== + +1. Download a stub for a new build-block ++ +[source,shell] +---- +wget --output-document=stub.tgz https://github.com/Pmodules/buildblock_stub/archive/refs/tags/1.0.0.tar.gz +---- +1. Unpack the stub into the directory `hello_world` ++ +[source,shell] +---- +mkdir hello_world && cd $_ +tar --strip-components 1 -xvf ../stub.tgz +chmod 0755 build +---- +1. Edit `files/config.yaml` ++ +[source,yaml] +---- +--- +format: 1 +hello_world: # <1> + defaults: # <2> + group: Tools # <3> + relstage: stable # <4> + compile_in_sourcetree: true # <5> + urls: # <6> + - url: https://github.com/Pmodules/$P/archive/refs/tags/$V.tar.gz + name: $P-$V.tar.gz + + shasums: # <7> + hello_world-1.0.0.tar.gz: bc1cfd90ac55e9f3babab0a426ed4b3c7edf15266363ab1b595d234797fbce7b + + versions: + 1.0.0: + config: # <8> + relstage: unstable # <9> +---- ++ +<1> The name of the module. +<2> Default configuration for all version. This can be overwritten in the 'versions' section. +<3> The group the module will be installed in. +<4> If not otherwise specified in the version specific configuration, the release stage is set to `stable`. +<5> Usually the software is compiled in a dedicated build directory. Here we have to compile in the source tree. +<6> Download URL and filename. `$P` will be substituted by the module name and `$V` by the version. +<7> SHA256 hash sums for each source file. Hash sums are optional but recommended. Therefor you can start without the hash sum and add it later. If the hash sum is missing, you get a warning. If the hash sum is wrong, the build process aborts. +<8> Configuration for version 1.0.0. +<9> Overwrite the default release stage. + +1. Edit the build script ++ +[source,shell] +---- +#!/usr/bin/env modbuild + +pbuild::configure() { # <1> + : +} + +pbuild::install() { # <2> + mkdir -p "${PREFIX}/bin" + install --mode=0755 "${SRC_DIR}/hello" "${PREFIX}/bin" +} +---- +<1> Don't use the default `pbuild::configure()`` function! + There is nothing to configure. :) +<2> The Makefile doesn't have an 'install' target. Therefore we have to code it ourself. +1. Build the module ++ +[source,shell] +---- +./build 1.0.0 +---- ++ +1. Release module as 'stable' ++ +Remove the line `relstage: unstable` in the `config` section of version 1.0.0: ++ +[source,yaml] +---- +--- +format: 1 +hello_world: + defaults: + group: Tools + relstage: stable + compile_in_sourcetree: true + urls: + - url: https://github.com/Pmodules/$P/archive/refs/tags/$V.tar.gz + name: $P-$V.tar.gz + + shasums: + hello_world-1.0.0.tar.gz: bc1cfd90ac55e9f3babab0a426ed4b3c7edf15266363ab1b595d234797fbce7b + + versions: + 1.0.0: # <1> +---- +<1> Since the `config` section is empty after removing the line `relstage: unstable` the entire section can be removed. + +[NOTE] +==== +To change the release stage the build-script must be called again: `./build 1.0.0` +==== + +== Add new version, build with autotools + +In version 2.0.0 the author added autotools files. Let's add this version to our build-block. + +1. Edit `files/config.yaml` ++ +[source,yaml] +---- +--- +format: 1 +hello_world: + defaults: + group: Tools + relstage: stable + urls: + - url: https://github.com/Pmodules/$P/archive/refs/tags/$V.tar.gz + name: $P-$V.tar.gz + + shasums: + hello_world-1.0.0.tar.gz: bc1cfd90ac55e9f3babab0a426ed4b3c7edf15266363ab1b595d234797fbce7b + hello_world-2.0.0.tar.gz: cd4ef1a7581fd4306f9b045b4bb9d722e1a978be3f93c709e0e8436347e38cf4 + + versions: + 1.0.0: + config: # <1> + compile_in_sourcetree: true + build_functions: + prep: [pbuild::prep] + compile: [pbuild::compile] + install: [install-1] + 2.0.0: # <2> + config: + relstage: unstable +---- +<1> Various changes are necessary in the config section: +* With autotools the software can be compiled outside the sources. This is recommended and the default for autotools and CMake. +* The build function must now be defined: +** In version 1.x the default configure step must be skipped. +** The default installation function cannot be used for version 1.x. +<2> Configuration for version 2.0.0. ++ +2. Edit `./build` ++ +[source,shell] +---- +#!/usr/bin/env modbuild + +pbuild::pre_configure(){ + ./autogen.sh +} + +# we need this function major version 1! +install-1() { + mkdir -p "${PREFIX}/bin" + install --mode=0755 "${SRC_DIR}/hello" "${PREFIX}/bin" +} +---- + +== Deprecate old version, make current version stable + +1. Edit `files/config.yaml` ++ +[source,yaml] +---- +--- +format: 1 +hello_world: + defaults: + group: Tools + relstage: stable + urls: + - url: https://github.com/Pmodules/$P/archive/refs/tags/$V.tar.gz + name: $P-$V.tar.gz + + shasums: + hello_world-1.0.0.tar.gz: bc1cfd90ac55e9f3babab0a426ed4b3c7edf15266363ab1b595d234797fbce7b + hello_world-2.0.0.tar.gz: cd4ef1a7581fd4306f9b045b4bb9d722e1a978be3f93c709e0e8436347e38cf4 + + versions: + 1.0.0: + config: # <1> + compile_in_sourcetree: true + relstage: deprecated + build_functions: + prep: [pbuild::prep] + compile: [pbuild::compile] + install: [install-1] + 2.0.0: # <2> +---- diff --git a/doc/src/asciidoctor-chunker.css b/doc/src/asciidoctor-chunker.css new file mode 100644 index 0000000..90c810a --- /dev/null +++ b/doc/src/asciidoctor-chunker.css @@ -0,0 +1,42 @@ +.nav { + margin: 0; + max-width: 150px; + min-width: 90px; + justify-content: center; + align-content: center; + font-size: 40px; + color: #ccc; + text-align: center; + text-decoration: none; + text-rendering: auto; + -webkit-transition: all 350ms ease; + -moz-transition: all 350ms ease; + -o-transition: all 350ms ease; + transition: all 350ms ease +} + +.nav:hover { + text-decoration: none; + color: #444 +} + +.nav-next { + float: right; + display: block; +} + +.nav-prev { + float: left; + display: block; +} + +#toc li { + padding: 0.07rem; +} + +li.current { + border-radius: 0.5rem; + background-color: rgb(100, 100, 100); + /* rgb(226, 231, 235); */ + /* rgb(255, 247, 229); */ +} diff --git a/doc/src/docinfo.html b/doc/src/docinfo.html new file mode 100644 index 0000000..aa81de7 --- /dev/null +++ b/doc/src/docinfo.html @@ -0,0 +1,40 @@ + + + + + + + + + + + diff --git a/doc/src/index.adoc b/doc/src/index.adoc new file mode 100644 index 0000000..1934d0e --- /dev/null +++ b/doc/src/index.adoc @@ -0,0 +1,28 @@ += Pmodules - an improved environment modules system +ifdef::backend-docbook5,backend-html5[] +:docinfo: shared +:toc: left +:numbered: +:toclevels: 2 +:description: Pmodules +:keywords: Pmodules, Environment Modules, Lmod +:adoc: adoc +endif::[] + +:TOC: + +include::Introduction.adoc[leveloffset=+1] + +include::Nutshell.adoc[leveloffset=+1] + +include::The_module_command.adoc[leveloffset=+1] + +include::modulefiles.adoc[leveloffset=+1] + +:sectnumlevels: 4 +include::Building_Pmodules.adoc[leveloffset=+1] + +:sectnumlevels: 2 +include::Tutorials.adoc[leveloffset=+1] + +include::links.adoc[leveloffset=+1] diff --git a/doc/src/links.adoc b/doc/src/links.adoc new file mode 100644 index 0000000..e7d1db9 --- /dev/null +++ b/doc/src/links.adoc @@ -0,0 +1,15 @@ += *LINKS* + +== Other implementation of environment module systems +* Home page of http://modules.sourceforge.net/index.html[Environment Modules] +* Home page of https://www.tacc.utexas.edu/research-development/tacc-projects/lmod[Lmod] + +== Articles +* http://www.admin-magazine.com/HPC/Articles/Environment-Modules[Environment Modules – A Great Tool for Clusters]; Jeff Layton; http://www.admin-magazine.com/[Admin magazin] +* http://www.admin-magazine.com/HPC/Articles/Lmod-Alternative-Environment-Modules[Lmod – Alternative Environment Modules]; Jeff Layton; http://www.admin-magazine.com/[Admin magazin] + +--- + +== Talks +* http://iweb.dl.sourceforge.net/project/lmod/lmod_build_install_talk.pdf[Lmod: A New Environment Modules System for HPC]; Robert !McLay; Texas Advanced Computing Center +* link:files/Pmodules.pdf[Pmodules: The PSI central SW distribution framework]; Achim Gsell; Paul Scherrer Institute diff --git a/doc/src/modulefiles.adoc b/doc/src/modulefiles.adoc new file mode 100644 index 0000000..b9b13bb --- /dev/null +++ b/doc/src/modulefiles.adoc @@ -0,0 +1,302 @@ +[id="sec-modulefiles",reftext="`modulefiles`"] += `modulefiles` + +== NAME + +`modulefile` - files containing Tcl code for the Modules package + +== DESCRIPTION + +modulefiles are written in the Tool Command Language, `Tcl(n)` and are +interpreted by the `modulecmd` program via the `module(1)` user +interface. modulefiles can be loaded, unloaded, or switched on-the-fly +while the user is working; and can be used to implement site policies +regarding the access and use of applications. + +A modulefile begins with the shebang, '`#%Pmodule`' or +'`#%Module`'. The shebang '`#%Pmodule`' should be used in modulefiles +using the Pmodules extension. A version number may be placed after +this string. The version number is useful as the modulefile format may +change. If a version number doesn't exist, then modulecmd will assume +the modulefile is compatible with the latest version. The current +modulefile version is 1.0. Files without the magic cookie will not be +interpreted by `modulecmd`. + +Each modulefile contains the changes to a user's environment needed to +access an application. Tcl is a simple programming language which +permits modulefiles to be arbitrarily complex, depending upon the +application's and the modulefile writer's needs. + +A typical modulefiles is a simple bit of code that set or add entries +to the `PATH`, `MANPATH`, or other environment variables. Tcl has +conditional statements that are evaluated when the modulefile is +loaded. This is very effective for managing path or environment +changes due to different OS releases or architectures. The user +environment information is encapsulated into a single modulefile kept +in a central location. The same modulefile is used by every user on +any machine. So, from the user's perspective, starting an application +is exactly the same irrespective of the machine or platform they are +on. + +modulefiles also hide the notion of different types of shells. From +the user's perspective, changing the environment for one shell looks +exactly the same as changing the environment for another shell. This +is useful for new or novice users and eliminates the need for +statements such as "if you're using the C Shell do this ..., otherwise +if you're using the Bourne shell do this ...". Announcing and +accessing new software is uniform and independent of the user's +shell. From the modulefile writer's perspective, this means one set of +information will take care of every type of shell. + +=== Module specific commands + +The Pmodules Package uses commands which are extensions to the "standard" Tool Command Language `Tcl(n)` package. + +[NOTE] +===================================================================== +The following commands are Pmodules extensions: + +* `module-addgroup` +* `module-url` +* `module-license` +* `module-maintainer` +===================================================================== + +Unless otherwise specified, the Module commands return the empty string. Some commands behave differently when a modulefile is loaded or unloaded. The command descriptions assume the modulefile is being loaded. + +`break`:: +This is not a Modules-specific command, it's actually part of Tcl, which has been overloaded similar to the continue and exit commands to have the effect of causing the module not to be listed as loaded and not affect other modules being loaded concurrently. All non-environment commands within the module will be performed up to this point and processing will continue on to the next module on the command line. The break command will only have this effect if not used within a Tcl loop though. ++ +An example: Suppose that a full selection of modulefiles are needed for various different architectures, but some of the modulefiles are not needed and the user should be alerted. Having the unnecessary modulefile be a link to the following `notavail` modulefile will perform the task as required. ++ +----- +#%Module1.0 +## notavail modulefile +## +proc ModulesHelp { } { + puts stderr "This module does nothing but alert the user" + puts stderr "that the [module-info name] module is not available" +} + +module-whatis "Notifies user that module is not available." +set curMod [module-info name] +if { [ module-info mode load ] } { + puts stderr "Note: '$curMod' is not available for [uname sysname]." +} +break +----- + +`chdir directory`:: +Set the current working directory to directory. + +`continue`:: +This is not a modules specific command but another overloaded Tcl command and is similar to the break or exit commands except the module will be listed as loaded as well as performing any environment or Tcl commands up to this point and then continuing on to the next module on the command line. The continue command will only have this effect if not used within a Tcl loop though. + +`exit [N]`:: +This is not a modules specific command but another overloaded Tcl command and is similar to the break or continue commands. However, this command will cause the immediate cessation of this module and any additional ones on the command line. This module and the subsequent modules will not be listed as loaded. No environment commands will be performed in the current module. + +`setenv variable value`:: +Set environment variable to value. The `setenv` command will also change the process' environment. A reference using Tcl's `env` associative array will reference changes made with the `setenv` command. Changes made using Tcl's `env` associative array will NOT change the user's environment variable like the `setenv` command. An environment change made this way will only affect the module parsing process. The `setenv` command is also useful for changing the environment prior to the `exec` or `system` command. When a modulefile is unloaded, `setenv` becomes `unsetenv`. If the environment variable had been defined it will be overwritten while loading the modulefile. A subsequent unload will unset the environment variable - the previous value cannot be restored! (Unless you handle it explicitly ... see below.) + +`unsetenv variable [value]`:: + Unsets environment variable. However, if there is an optional value, then when unloading a module, it will set variable to value. The `unsetenv` command changes the process' environment like `setenv`. + +`append-path|prepend-path [-d C|--delim C|--delim=C] variable value`:: +Append or prepend value to environment variable. The variable is a colon, or delimiter, separated list such as `PATH=directory:directory:directory`. The default delimiter is a colon ':', but an arbitrary one can be given by the `--delim` option. For example a space can be used instead (which will need to be handled in the Tcl specially by enclosing it in " " or { }). A space, however, can not be specified by the `--delim=C` form. ++ +If the variable is not set, it is created. When a modulefile is unloaded, `append-path` and `prepend-path` become `remove-path`. + +`remove-path [-d C|--delim C|--delim=C] variable value`:: +Remove value from the colon, or delimiter, separated list in variable. See `prepend-path` or `append-path` for further explanation of using an arbitrary delimiter. Every string between colons, or delimiters, in variable is compared to value. If the two match, value is removed from variable. + +`prereq|conflict modulefile...`:: +`prereq` and `conflict` control whether or not the modulefile will be loaded. The `prereq` command lists modulefiles which must have been previously loaded before the current modulefile will be loaded. Similarly, the conflict command lists modulefiles which conflict with the current modulefile. If a list contains more than one modulefile, then each member of the list acts as a Boolean OR operation. Multiple `prereq` and `conflict` commands may be used to create a Boolean AND operation. If one of the requirements have not been satisfied, an error is reported and the current modulefile makes no changes to the user's environment. + +If an argument for `prereq` is a directory and any modulefile from the directory has been loaded, then the prerequisite is met. For example, specifying X11 as a `prereq` means that any version of X11, X11/R4 or X11/R5, must be loaded before proceeding. + +If an argument for `conflict` is a directory and any other modulefile from that directory has been loaded, then a conflict will occur. For example, specifying X11 as a conflict will stop X11/R4 and X11/R5 from being loaded at the same time. + +`is-loaded modulefile...`:: +The `is-loaded` command returns a true value if any of the listed modulefiles has been loaded. If a list contains more than one modulefile, then each member acts as a boolean OR operation. If an argument for `is-loaded` is a directory and any modulefile from the directory has been loaded `is-loaded` would return a true value. + +`module [sub-command] [sub-command-args]`:: +Contains the same sub-commands as described in the `module(1)` man page in the Module Sub-Commands section. This command permits a modulefile to load or unload other modulefiles. No checks are made to ensure that the modulefile does not try to load itself. Often it is useful to have a single modulefile that performs a number of module load commands. For example, if every user on the system requires a basic set of applications loaded, then a core modulefile would contain the necessary +module load commands. + +`module-info mode [modetype]`:: +Returns the current modulecmd's mode as a string if no modetype is given. ++ +Returns 1 if modulecmd's mode is `modetype`. `modetype` can be: `load`, `unload`, `remove`, `switch`, `display`, `help`, `test` or `whatis`. + +`module-info name`:: +Return the name of the modulefile. This is not the full pathname for modulefile. See the Modules Variables section for information on the full pathname. + +`module-info specified`:: +Return the name of the modulefile specified on the command line. + +`module-info shell [shellname]`:: +Return the current shell under which modulecmd.tcl was invoked if no shellname is given. The current shell is the first parameter of modulecmd.tcl, which is normally hidden by the module alias. ++ +If a shellname is given, returns 1 if modulecmd.tcl's current shell is shellname, returns 0 elsewhere. shellname can be: sh, bash, ksh, zsh, csh, tcsh, fish, tcl, perl, python, ruby, lisp, cmake, r. + +`module-info shelltype [shelltypename]`:: +Return the family of the shell under which modulefile was invoked if no shelltypename is given. As of module-info shell this depends on the first parameter of modulecmd.tcl. The output reflects a shell type determining the shell syntax of the commands produced by modulecmd.tcl. ++ +If a shelltypename is given, returns 1 if modulecmd.tcl's current shell type is shelltypename, returns 0 elsewhere. shelltypename can be: sh, csh, fish, tcl, perl, python, ruby, lisp, cmake, r. + +`module-info alias name`:: +Returns the full modulefile name to which the modulefile alias name is assigned + +`module-info version modulefile`:: +Returns the physical module name and version of the passed symbolic version modulefile. The parameter modulefile might either be a full qualified modulefile with name and version, another symbolic modulefile name or a modulefile alias. + +`module-info symbols modulefile`:: +Returns a list of all symbolic versions assigned to the passed modulefile. The parameter modulefile might either be a full qualified modulefile with name and version, another symbolic modulefile name or a modulefile alias. + +`module-version modulefile version-name...`:: +Assigns the symbolic version-name to the modulefile. This command should be placed in one of the modulecmd.tcl rc files in order to provide shorthand invocations of frequently used modulefile names. ++ +The special version-name default specifies the default version to be used for module commands, if no specific version is given. This replaces the definitions made in the `.version` file in former modulecmd releases. ++ +The parameter `modulefile` may be either +* a fully or partially qualified modulefile with name / version. If name is '.' then the current directory name is assumed to be the module name. (Use this for deep modulefile directories.) +* a symbolic modulefile name +* another modulefile alias + +`module-alias name modulefile`:: +Assigns the modulefile to the alias name. This command should be placed in one of the modulecmd rc files in order to provide shorthand invocations of frequently used modulefile names. ++ +The parameter modulefile may be either ++ +* a fully qualified modulefile with name and version +* a symbolic modulefile name +* another modulefile alias + +`module-whatis string`:: +Defines a string which is displayed in case of the invocation of the `module whatis` command. There may be more than one `module-whatis` line in a modulefile. This command takes no actions in case of `load`, `display`, etc. invocations of modulecmd. ++ +The string parameter has to be enclosed in double-quotes if there's more than one word specified. Words are defined to be separated by white-space characters (space, tab, cr). + +`module-url url`:: +Sets an URL which is displayed in case of the invocation of the `module help` command. The URL should point to the home-page of the software loaded by the module if any. + +`module-license string`:: +Defines a string which is displayed in case of the invocation of the `module help` command. The string should either be the name of a well known license (like GPL V2) or a filename with the license text installed in the module. + +`module-maintainer email`:: +Defines a string which is displayed in case of the invocation of the `module help` command. The +string should be the email address of the module maintainer. + +`module-addgroup group`:: +Add the hierarchical group `group` to `MODULEPATH`. + +`set-alias alias-name alias-string`:: +Sets an alias or function with the name `alias-name` in the user's environment to the string `alias-string`. For some shells, aliases are not possible and the command has no effect. When a modulefile is unloaded, `set-alias` becomes `unset-alias`. + +`unset-alias alias-name`:: +Unsets an alias with the name `alias-name` in the user's environment. + +`system string`:: +Pass string to the Tcl built-in command exec(n). For the exec(n) call modulecmd redirects stdout to stderr since stdout would be parsed by the evaluating shell. The exit status of the executed command is returned. + +`uname field`:: +Provide lookup of system information. Most field information are retrieved from the tcl_platform array (see `tclvars(n)` man page). `Uname` will return the string "unknown" if information is unavailable for the field. ++ +`uname` will invoke `uname(1)` command in order to get the operating system version and `domainname(1)` to figure out the name of the domain. ++ +field values are: +* `sysname`: the operating system name +* `nodename`: the hostname +* `domain`: the name of the domain +* `release`: the operating system release +* `version`: the operating system version +* `machine`: a standard name that identifies the system's hardware + +`x-resource [resource-string|filename]`:: +Merge resources into the X11 resource database. The resources are used to control look and behavior of X11 applications. The command will attempt to read resources from filename. If the argument isn't a valid file name, then string will be interpreted as a resource. Either filename or `resource-string` is then passed down to be `xrdb(1)` command. ++ +modulefiles that use this command, should in most cases contain one or more x-resource lines, each defining one X11 resource. The `DISPLAY` environment variable should be properly set and the X11 server should be accessible. If x-resource can't manipulate the X11 resource database, the modulefile will exit with an error message. ++ +Examples: +----- +x-resource /u2/staff/leif/.xres/Ileaf +----- +The content of the Ileaf file is merged into the X11 resource database. +----- +x-resource [glob ~/.xres/ileaf] +----- +The Tcl glob function is used to have the modulefile read different resource files for different users. +----- +x-resource {Ileaf.popup.saveUnder: True} +----- +Merge the Ileaf resource into the X11 resource database. + +=== Modules Variables + +The `ModulesCurrentModulefile` variable contains the full pathname of the modulefile being interpreted. + +=== Locating Modulefiles + +Every directory in `MODULEPATH` is searched to find the modulefile. A directory in `MODULEPATH` can have an arbitrary number of sub-directories. If the user names a modulefile to be loaded which is actually a directory, the directory is opened and a search begins for an actual modulefile. First, modulecmd looks for a file with the name `.modulerc` in the directory. If this file exists, its contents will be evaluated as if it was a modulefile to be loaded. You may place `module-version` and `module-alias` commands inside this file. + +Additionally, before seeking for `.modulerc` files in the module directory, the global `modulerc` file is sourced, too. If a named version default now exists for the modulefile to be loaded, the assigned modulefile now will be sourced. Otherwise the file `.version` is looked up in the directory. + +If the `.version` file exists, it is opened and interpreted as Tcl code and takes precedence over a `.modulerc` file in the same directory. If the Tcl variable `ModulesVersion` is set by the `.version` file, modulecmd will use the name as if it specifies a modulefile in the directory. This will become the default modulefile in this case. + +If `ModulesVersion` is a directory, the search begins anew down that directory. If the name does not match any files located in the current directory, the search continues through the remaining directories in `MODULEPATH`. + +Every `.version` and `.modulerc` file found is Tcl interpreted. The difference is that `.version` only applies to the current directory, and the `.modulerc` applies to the current directory and all subdirectories. Changes made in these files will affect the subsequently interpreted modulefile. + +If no default version may be figured out, then the highest numerically sorted modulefile or module alias under the directory will be used. The dictionary comparison method of the `lsort(n)` Tcl command is used to achieve this sort. If highest numerically sorted element is an alias, search continues on its modulefile target. + +For example, it is possible for a user to have a directory named X11 which simply contains a `.version` file specifying which version of X11 is to be loaded. Such a file would look like: + +----- +#%Module1.0 +## +## The desired version of X11 +## +set ModulesVersion "R4" +----- +The equivalent .modulerc would look like: +----- +#%Module1.0 +## +## The desired version of X11 +## +module-version "./R4" default +----- +If user names a modulefile that cannot be found in the first modulepath directory, modulefile will be searched in next modulepath directory and so on until a matching modulefile is found. If search goes through a module alias or a symbolic version, this alias or symbol is resolved by first looking at the modulefiles in the modulepath where this alias or symbol is defined. If not found, resolution looks at the other modulepaths in their definition order. + +When locating modulefiles, if a `.modulerc`, a `.version`, a directory or a modulefile cannot be read during the search it is simply ignored with no error message produced. Visibility of modulefiles can thus be adapted to the rights the user has been granted. Exception is made when trying to directly access a directory or a modulefile. In this case, the access issue is returned as an error message. + +A modulefile whose name or element in its name starts with a '.' dot is considered hidden. Hidden modulefile is not displayed or taken into account except if it is explicitly named. By inheritance, a symbolic version-name assigned to a hidden modulefile is displayed or taken into account only if explicitly named. Module alias targeting a hidden modulefile appears like any other module alias. + +=== Modulefile Specific Help + +Users can request help about a specific modulefile through the `module(1)` command. The modulefile can print helpful information or start help oriented programs by defining a ModulesHelp subroutine. The subroutine will be called when the module help modulefile command is used. + +=== Modulefile Specific Test + +Users can request test of a specific modulefile through the `module(1)` command. The modulefile can perform some sanity checks on its definition or on its underlying programs by defining a ModulesTest subroutine. The subroutine will be called when the module test modulefile command is used. The subroutine should return 1 in case of success. If no or any other value is returned, test is considered failed. + +=== Modulefile Display + +The `module display` modulefile command will detail all changes that will be made to the environment. After displaying all of the environment changes modulecmd.tcl will call the `ModulesDisplay` subroutine. The `ModulesDisplay` subroutine is a good place to put additional descriptive information about the modulefile. + +== ENVIRONMENT + +`MODULEPATH`:: +Path of directories containing modulefiles. + +== SEE ALSO + +`module(1)`, `Tcl(n)`, `TclX(n)`, `xrdb(1)`, `exec(n)`, `uname(1)`, `domainname(1)`, `tclvars(n)`, `lsort(n)` + +== NOTES + +Tcl was developed by John Ousterhout at the University of California at Berkeley. + +TclX was developed by Karl Lehenbauer and Mark Diekhans. + +Modules is covered by the GNU General Public License, version 2 and the GNU Lesser General Public License, version 2.1. Copyright © 1996-1999 John L. Furlani & Peter W. Osel, © 1998-2017 R.K.Owen, © 2002-2004 Mark Lakata, © 2004-2017 Kent Mein, © 2016-2017 Xavier Delaruelle. All rights reserved. Trademarks used are the property of their respective owners. \ No newline at end of file diff --git a/doc/src/overlays.adoc b/doc/src/overlays.adoc new file mode 100644 index 0000000..cfc5923 --- /dev/null +++ b/doc/src/overlays.adoc @@ -0,0 +1,3 @@ +== Overlays + +TBW \ No newline at end of file diff --git a/doc/src/stylesheets/asciidoctor.css b/doc/src/stylesheets/asciidoctor.css new file mode 100644 index 0000000..80b8077 --- /dev/null +++ b/doc/src/stylesheets/asciidoctor.css @@ -0,0 +1,776 @@ +/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ +/* ========================================================================== HTML5 display definitions ========================================================================== */ +/** Correct `block` display not defined in IE 8/9. */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } + +/** Correct `inline-block` display not defined in IE 8/9. */ +audio, canvas, video { display: inline-block; } + +/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ +audio:not([controls]) { display: none; height: 0; } + +/** Address `[hidden]` styling not present in IE 8/9. Hide the `template` element in IE, Safari, and Firefox < 22. */ +[hidden], template { display: none; } + +script { display: none !important; } + +/* ========================================================================== Base ========================================================================== */ +/** 1. Set default font family to sans-serif. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */ +html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } + +/** Remove default margin. */ +body { margin: 0; } + +/* ========================================================================== Links ========================================================================== */ +/** Remove the gray background color from active links in IE 10. */ +a { background: transparent; } + +/** Address `outline` inconsistency between Chrome and other browsers. */ +a:focus { outline: thin dotted; } + +/** Improve readability when focused and also mouse hovered in all browsers. */ +a:active, a:hover { outline: 0; } + +/* ========================================================================== Typography ========================================================================== */ +/** Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari 5, and Chrome. */ +h1 { font-size: 2em; margin: 0.67em 0; } + +/** Address styling not present in IE 8/9, Safari 5, and Chrome. */ +abbr[title] { border-bottom: 1px dotted; } + +/** Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ +b, strong { font-weight: bold; } + +/** Address styling not present in Safari 5 and Chrome. */ +dfn { font-style: italic; } + +/** Address differences between Firefox and other browsers. */ +hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } + +/** Address styling not present in IE 8/9. */ +mark { background: #ff0; color: #000; } + +/** Correct font family set oddly in Safari 5 and Chrome. */ +code, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; } + +/** Improve readability of pre-formatted text in all browsers. */ +pre { white-space: pre-wrap; } + +/** Set consistent quote types. */ +q { quotes: "\201C" "\201D" "\2018" "\2019"; } + +/** Address inconsistent and variable font size in all browsers. */ +small { font-size: 80%; } + +/** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } + +sup { top: -0.5em; } + +sub { bottom: -0.25em; } + +/* ========================================================================== Embedded content ========================================================================== */ +/** Remove border when inside `a` element in IE 8/9. */ +img { border: 0; } + +/** Correct overflow displayed oddly in IE 9. */ +svg:not(:root) { overflow: hidden; } + +/* ========================================================================== Figures ========================================================================== */ +/** Address margin not present in IE 8/9 and Safari 5. */ +figure { margin: 0; } + +/* ========================================================================== Forms ========================================================================== */ +/** Define consistent border, margin, and padding. */ +fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } + +/** 1. Correct `color` not being inherited in IE 8/9. 2. Remove padding so people aren't caught out if they zero out fieldsets. */ +legend { border: 0; /* 1 */ padding: 0; /* 2 */ } + +/** 1. Correct font family not being inherited in all browsers. 2. Correct font size not being inherited in all browsers. 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ +button, input, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 2 */ margin: 0; /* 3 */ } + +/** Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ +button, input { line-height: normal; } + +/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. Correct `select` style inheritance in Firefox 4+ and Opera. */ +button, select { text-transform: none; } + +/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. */ +button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } + +/** Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { cursor: default; } + +/** 1. Address box sizing set to `content-box` in IE 8/9. 2. Remove excess padding in IE 8/9. */ +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } + +/** 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome (include `-moz` to future-proof). */ +input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } + +/** Remove inner padding and search cancel button in Safari 5 and Chrome on OS X. */ +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/** Remove inner padding and border in Firefox 4+. */ +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/** 1. Remove default vertical scrollbar in IE 8/9. 2. Improve readability and alignment in all browsers. */ +textarea { overflow: auto; /* 1 */ vertical-align: top; /* 2 */ } + +/* ========================================================================== Tables ========================================================================== */ +/** Remove most spacing between table cells. */ +table { border-collapse: collapse; border-spacing: 0; } + +meta.foundation-mq-small { font-family: "only screen and (min-width: 768px)"; width: 768px; } + +meta.foundation-mq-medium { font-family: "only screen and (min-width:1280px)"; width: 1280px; } + +meta.foundation-mq-large { font-family: "only screen and (min-width:1440px)"; width: 1440px; } + +*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } + +html, body { font-size: 100%; } + +body { background: white; color: rgba(0, 0, 0, 0.8); padding: 0; margin: 0; font-family: "Noto Serif", "DejaVu Serif", serif; font-weight: normal; font-style: normal; line-height: 1; position: relative; cursor: auto; } + +a:hover { cursor: pointer; } + +img, object, embed { max-width: 100%; height: auto; } + +object, embed { height: 100%; } + +img { -ms-interpolation-mode: bicubic; } + +#map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object { max-width: none !important; } + +.left { float: left !important; } + +.right { float: right !important; } + +.text-left { text-align: left !important; } + +.text-right { text-align: right !important; } + +.text-center { text-align: center !important; } + +.text-justify { text-align: justify !important; } + +.hide { display: none; } + +.antialiased { -webkit-font-smoothing: antialiased; } + +img { display: inline-block; vertical-align: middle; } + +textarea { height: auto; min-height: 50px; } + +select { width: 100%; } + +p.lead { font-size: 1.21875em; line-height: 1.6; } + +.subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { line-height: 1.45; color: #7a2518; font-weight: normal; margin-top: 0; margin-bottom: 0.25em; } + +/* Typography resets */ +div, dl, dt, dd, ul, ol, li, h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; direction: ltr; } + +/* Default Link Styles */ +a { color: #2156a5; text-decoration: underline; line-height: inherit; } +a:hover, a:focus { color: #1d4b8f; } +a img { border: none; } + +/* Default paragraph styles */ +p { font-family: inherit; font-weight: normal; font-size: 1em; line-height: 1.6; margin-bottom: 1.25em; text-rendering: optimizeLegibility; } +p aside { font-size: 0.875em; line-height: 1.35; font-style: italic; } + +/* Default header styles */ +h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { font-family: "Open Sans", "DejaVu Sans", sans-serif; font-weight: 300; font-style: normal; color: #ba3925; text-rendering: optimizeLegibility; margin-top: 1em; margin-bottom: 0.5em; line-height: 1.0125em; } +h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small { font-size: 60%; color: #e99b8f; line-height: 0; } + +h1 { font-size: 2.125em; } + +h2 { font-size: 1.6875em; } + +h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.375em; } + +h4 { font-size: 1.125em; } + +h5 { font-size: 1.125em; } + +h6 { font-size: 1em; } + +hr { border: solid #dddddf; border-width: 1px 0 0; clear: both; margin: 1.25em 0 1.1875em; height: 0; } + +/* Helpful Typography Defaults */ +em, i { font-style: italic; line-height: inherit; } + +strong, b { font-weight: bold; line-height: inherit; } + +small { font-size: 60%; line-height: inherit; } + +code { font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-weight: normal; color: rgba(0, 0, 0, 0.9); } + +/* Lists */ +ul, ol, dl { font-size: 1em; line-height: 1.6; margin-bottom: 1.25em; list-style-position: outside; font-family: inherit; } + +ul, ol { margin-left: 1.5em; } +ul.no-bullet, ol.no-bullet { margin-left: 1.5em; } + +/* Unordered Lists */ +ul li ul, ul li ol { margin-left: 1.25em; margin-bottom: 0; font-size: 1em; /* Override nested font-size change */ } +ul.square li ul, ul.circle li ul, ul.disc li ul { list-style: inherit; } +ul.square { list-style-type: square; } +ul.circle { list-style-type: circle; } +ul.disc { list-style-type: disc; } +ul.no-bullet { list-style: none; } + +/* Ordered Lists */ +ol li ul, ol li ol { margin-left: 1.25em; margin-bottom: 0; } + +/* Definition Lists */ +dl dt { margin-bottom: 0.3125em; font-weight: bold; } +dl dd { margin-bottom: 1.25em; } + +/* Abbreviations */ +abbr, acronym { text-transform: uppercase; font-size: 90%; color: rgba(0, 0, 0, 0.8); border-bottom: 1px dotted #dddddd; cursor: help; } + +abbr { text-transform: none; } + +/* Blockquotes */ +blockquote { margin: 0 0 1.25em; padding: 0.5625em 1.25em 0 1.1875em; border-left: 1px solid #dddddd; } +blockquote cite { display: block; font-size: 0.9375em; color: rgba(0, 0, 0, 0.6); } +blockquote cite:before { content: "\2014 \0020"; } +blockquote cite a, blockquote cite a:visited { color: rgba(0, 0, 0, 0.6); } + +blockquote, blockquote p { line-height: 1.6; color: rgba(0, 0, 0, 0.85); } + +/* Microformats */ +.vcard { display: inline-block; margin: 0 0 1.25em 0; border: 1px solid #dddddd; padding: 0.625em 0.75em; } +.vcard li { margin: 0; display: block; } +.vcard .fn { font-weight: bold; font-size: 0.9375em; } + +.vevent .summary { font-weight: bold; } +.vevent abbr { cursor: auto; text-decoration: none; font-weight: bold; border: none; padding: 0 0.0625em; } + +@media only screen and (min-width: 768px) { h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.2; } + h1 { font-size: 2.75em; } + h2 { font-size: 2.3125em; } + h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.6875em; } + h4 { font-size: 1.4375em; } } +/* Tables */ +table { background: white; margin-bottom: 1.25em; border: solid 1px #dedede; } +table thead, table tfoot { background: #f7f8f7; font-weight: bold; } +table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: rgba(0, 0, 0, 0.8); text-align: left; } +table tr th, table tr td { padding: 0.5625em 0.625em; font-size: inherit; color: rgba(0, 0, 0, 0.8); } +table tr.even, table tr.alt, table tr:nth-of-type(even) { background: #f8f8f7; } +table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { display: table-cell; line-height: 1.6; } + +body { tab-size: 4; word-wrap: anywhere; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; } + +table { word-wrap: normal; } + +h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.2; word-spacing: -0.05em; } +h1 strong, h2 strong, h3 strong, #toctitle strong, .sidebarblock > .content > .title strong, h4 strong, h5 strong, h6 strong { font-weight: 400; } + +object, svg { display: inline-block; vertical-align: middle; } + +.center { margin-left: auto; margin-right: auto; } + +.stretch { width: 100%; } + +.clearfix:before, .clearfix:after, .float-group:before, .float-group:after { content: " "; display: table; } +.clearfix:after, .float-group:after { clear: both; } + +:not(pre).nobreak { word-wrap: normal; } +:not(pre).nowrap { white-space: nowrap; } +:not(pre).pre-wrap { white-space: pre-wrap; } + +:not(pre):not([class^=L]) > code { font-size: 0.9375em; font-style: normal !important; letter-spacing: 0; padding: 0.1em 0.5ex; word-spacing: -0.15em; background-color: #f7f7f8; -webkit-border-radius: 4px; border-radius: 4px; line-height: 1.45; text-rendering: optimizeSpeed; } + +pre { color: rgba(0, 0, 0, 0.9); font-family: "Droid Sans Mono", "DejaVu Sans Mono", "Monospace", monospace; line-height: 1.45; text-rendering: optimizeSpeed; } +pre code, pre pre { color: inherit; font-size: inherit; line-height: inherit; } +pre > code { display: block; } + +pre.nowrap, pre.nowrap pre { white-space: pre; word-wrap: normal; } + +em em { font-style: normal; } + +strong strong { font-weight: normal; } + +.keyseq { color: rgba(51, 51, 51, 0.8); } + +kbd { font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; display: inline-block; color: rgba(0, 0, 0, 0.8); font-size: 0.65em; line-height: 1.45; background-color: #f7f7f7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; margin: 0 0.15em; padding: 0.2em 0.5em; vertical-align: middle; position: relative; top: -0.1em; white-space: nowrap; } + +.keyseq kbd:first-child { margin-left: 0; } + +.keyseq kbd:last-child { margin-right: 0; } + +.menuseq, .menuref { color: #000; } + +.menuseq b:not(.caret), .menuref { font-weight: inherit; } + +.menuseq { word-spacing: -0.02em; } +.menuseq b.caret { font-size: 1.25em; line-height: 0.8; } +.menuseq i.caret { font-weight: bold; text-align: center; width: 0.45em; } + +b.button:before, b.button:after { position: relative; top: -1px; font-weight: normal; } + +b.button:before { content: "["; padding: 0 3px 0 2px; } + +b.button:after { content: "]"; padding: 0 2px 0 3px; } + +p a > code:hover { color: rgba(0, 0, 0, 0.9); } + +#header, #content, #footnotes, #footer { width: 100%; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 62.5em; *zoom: 1; position: relative; padding-left: 0.9375em; padding-right: 0.9375em; } +#header:before, #header:after, #content:before, #content:after, #footnotes:before, #footnotes:after, #footer:before, #footer:after { content: " "; display: table; } +#header:after, #content:after, #footnotes:after, #footer:after { clear: both; } + +#content { margin-top: 1.25em; } + +#content:before { content: none; } + +#header > h1:first-child { color: rgba(0, 0, 0, 0.85); margin-top: 2.25rem; margin-bottom: 0; } +#header > h1:first-child + #toc { margin-top: 8px; border-top: 1px solid #dddddf; } +#header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border-bottom: 1px solid #dddddf; padding-bottom: 8px; } +#header .details { border-bottom: 1px solid #dddddf; line-height: 1.45; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 0.25em; color: rgba(0, 0, 0, 0.6); display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; } +#header .details span:first-child { margin-left: -0.125em; } +#header .details span.email a { color: rgba(0, 0, 0, 0.85); } +#header .details br { display: none; } +#header .details br + span:before { content: "\00a0\2013\00a0"; } +#header .details br + span.author:before { content: "\00a0\22c5\00a0"; color: rgba(0, 0, 0, 0.85); } +#header .details br + span#revremark:before { content: "\00a0|\00a0"; } +#header #revnumber { text-transform: capitalize; } +#header #revnumber:after { content: "\00a0"; } + +#content > h1:first-child:not([class]) { color: rgba(0, 0, 0, 0.85); border-bottom: 1px solid #dddddf; padding-bottom: 8px; margin-top: 0; padding-top: 1rem; margin-bottom: 1.25rem; } + +#toc { border-bottom: 1px solid #e7e7e9; padding-bottom: 0.5em; } +#toc > ul { margin-left: 0.125em; } +#toc ul.sectlevel0 > li > a { font-style: italic; } +#toc ul.sectlevel0 ul.sectlevel1 { margin: 0.5em 0; } +#toc ul { font-family: "Open Sans", "DejaVu Sans", sans-serif; list-style-type: none; } +#toc li { line-height: 1.3334; margin-top: 0.3334em; } +#toc a { text-decoration: none; } +#toc a:active { text-decoration: underline; } + +#toctitle { color: #7a2518; font-size: 1.2em; } + +@media only screen and (min-width: 768px) { #toctitle { font-size: 1.375em; } + body.toc2 { padding-left: 15em; padding-right: 0; } + #toc.toc2 { margin-top: 0 !important; background: #f8f8f7; position: fixed; width: 15em; left: 0; top: 0; border-right: 1px solid #e7e7e9; border-top-width: 0 !important; border-bottom-width: 0 !important; z-index: 1000; padding: 1.25em 1em; height: 100%; overflow: auto; } + #toc.toc2 #toctitle { margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2em; } + #toc.toc2 > ul { font-size: 0.9em; margin-bottom: 0; } + #toc.toc2 ul ul { margin-left: 0; padding-left: 1em; } + #toc.toc2 ul.sectlevel0 ul.sectlevel1 { padding-left: 0; margin-top: 0.5em; margin-bottom: 0.5em; } + body.toc2.toc-right { padding-left: 0; padding-right: 15em; } + body.toc2.toc-right #toc.toc2 { border-right-width: 0; border-left: 1px solid #e7e7e9; left: auto; right: 0; } } +@media only screen and (min-width: 1280px) { body.toc2 { padding-left: 20em; padding-right: 0; } + #toc.toc2 { width: 20em; } + #toc.toc2 #toctitle { font-size: 1.375em; } + #toc.toc2 > ul { font-size: 0.95em; } + #toc.toc2 ul ul { padding-left: 1.25em; } + body.toc2.toc-right { padding-left: 0; padding-right: 20em; } } +#content #toc { border-style: solid; border-width: 1px; border-color: #e0e0dc; margin-bottom: 1.25em; padding: 1.25em; background: #f8f8f7; -webkit-border-radius: 4px; border-radius: 4px; } +#content #toc > :first-child { margin-top: 0; } +#content #toc > :last-child { margin-bottom: 0; } + +#footer { max-width: none; background: rgba(0, 0, 0, 0.8); padding: 1.25em; } + +#footer-text { color: rgba(255, 255, 255, 0.8); line-height: 1.44; } + +#content { margin-bottom: 0.625em; } + +.sect1 { padding-bottom: 0.625em; } + +@media only screen and (min-width: 768px) { #content { margin-bottom: 1.25em; } + .sect1 { padding-bottom: 1.25em; } } +.sect1:last-child { padding-bottom: 0; } + +.sect1 + .sect1 { border-top: 1px solid #e7e7e9; } + +#content h1 > a.anchor, h2 > a.anchor, h3 > a.anchor, #toctitle > a.anchor, .sidebarblock > .content > .title > a.anchor, h4 > a.anchor, h5 > a.anchor, h6 > a.anchor { position: absolute; z-index: 1001; width: 1.5ex; margin-left: -1.5ex; display: block; text-decoration: none !important; visibility: hidden; text-align: center; font-weight: normal; } +#content h1 > a.anchor:before, h2 > a.anchor:before, h3 > a.anchor:before, #toctitle > a.anchor:before, .sidebarblock > .content > .title > a.anchor:before, h4 > a.anchor:before, h5 > a.anchor:before, h6 > a.anchor:before { content: "\00A7"; font-size: 0.85em; display: block; padding-top: 0.1em; } +#content h1:hover > a.anchor, #content h1 > a.anchor:hover, h2:hover > a.anchor, h2 > a.anchor:hover, h3:hover > a.anchor, #toctitle:hover > a.anchor, .sidebarblock > .content > .title:hover > a.anchor, h3 > a.anchor:hover, #toctitle > a.anchor:hover, .sidebarblock > .content > .title > a.anchor:hover, h4:hover > a.anchor, h4 > a.anchor:hover, h5:hover > a.anchor, h5 > a.anchor:hover, h6:hover > a.anchor, h6 > a.anchor:hover { visibility: visible; } +#content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link { color: #ba3925; text-decoration: none; } +#content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover { color: #a53221; } + +details, .audioblock, .imageblock, .literalblock, .listingblock, .stemblock, .videoblock { margin-bottom: 1.25em; } + +details > summary:first-of-type { cursor: pointer; display: list-item; outline: none; margin-bottom: 0.75em; } + +.admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-rendering: optimizeLegibility; text-align: left; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 1rem; font-style: italic; } + +table.tableblock.fit-content > caption.title { white-space: nowrap; width: 0; } + +.paragraph.lead > p, #preamble > .sectionbody > [class="paragraph"]:first-of-type p { font-size: 1.21875em; line-height: 1.6; color: rgba(0, 0, 0, 0.85); } + +table.tableblock #preamble > .sectionbody > [class="paragraph"]:first-of-type p { font-size: inherit; } + +.admonitionblock > table { border-collapse: separate; border: 0; background: none; width: 100%; } +.admonitionblock > table td.icon { text-align: center; width: 80px; } +.admonitionblock > table td.icon img { max-width: none; } +.admonitionblock > table td.icon .title { font-weight: bold; font-family: "Open Sans", "DejaVu Sans", sans-serif; text-transform: uppercase; } +.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddf; color: rgba(0, 0, 0, 0.6); word-wrap: anywhere; } +.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } + +.exampleblock > .content { border-style: solid; border-width: 1px; border-color: #e6e6e6; margin-bottom: 1.25em; padding: 1.25em; background: white; -webkit-border-radius: 4px; border-radius: 4px; } +.exampleblock > .content > :first-child { margin-top: 0; } +.exampleblock > .content > :last-child { margin-bottom: 0; } + +.sidebarblock { border-style: solid; border-width: 1px; border-color: #dbdbd6; margin-bottom: 1.25em; padding: 1.25em; background: #f3f3f2; -webkit-border-radius: 4px; border-radius: 4px; } +.sidebarblock > :first-child { margin-top: 0; } +.sidebarblock > :last-child { margin-bottom: 0; } +.sidebarblock > .content > .title { color: #7a2518; margin-top: 0; text-align: center; } + +.exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child, .exampleblock > .content .qlist > ol > li:last-child > :last-child, .sidebarblock > .content > :last-child > :last-child, .sidebarblock > .content .olist > ol > li:last-child > :last-child, .sidebarblock > .content .ulist > ul > li:last-child > :last-child, .sidebarblock > .content .qlist > ol > li:last-child > :last-child { margin-bottom: 0; } + +.literalblock pre, .listingblock > .content > pre { -webkit-border-radius: 4px; border-radius: 4px; overflow-x: auto; padding: 1em; font-size: 0.8125em; } +@media only screen and (min-width: 768px) { .literalblock pre, .listingblock > .content > pre { font-size: 0.90625em; } } +@media only screen and (min-width: 1280px) { .literalblock pre, .listingblock > .content > pre { font-size: 1em; } } + +.literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class="highlight"], .listingblock > .content > pre[class^="highlight "] { background: #f7f7f8; } + +.literalblock.output pre { color: #f7f7f8; background-color: rgba(0, 0, 0, 0.9); } + +.listingblock > .content { position: relative; } + +.listingblock code[data-lang]:before { display: none; content: attr(data-lang); position: absolute; font-size: 0.75em; top: 0.425rem; right: 0.5rem; line-height: 1; text-transform: uppercase; color: inherit; opacity: 0.5; } + +.listingblock:hover code[data-lang]:before { display: block; } + +.listingblock.terminal pre .command:before { content: attr(data-prompt); padding-right: 0.5em; color: inherit; opacity: 0.5; } + +.listingblock.terminal pre .command:not([data-prompt]):before { content: "$"; } + +.listingblock pre.highlightjs { padding: 0; } +.listingblock pre.highlightjs > code { padding: 1em; -webkit-border-radius: 4px; border-radius: 4px; } + +.listingblock pre.prettyprint { border-width: 0; } + +.prettyprint { background: #f7f7f8; } + +pre.prettyprint .linenums { line-height: 1.45; margin-left: 2em; } + +pre.prettyprint li { background: none; list-style-type: inherit; padding-left: 0; } + +pre.prettyprint li code[data-lang]:before { opacity: 1; } + +pre.prettyprint li:not(:first-child) code[data-lang]:before { display: none; } + +table.linenotable { border-collapse: separate; border: 0; margin-bottom: 0; background: none; } +table.linenotable td[class] { color: inherit; vertical-align: top; padding: 0; line-height: inherit; white-space: normal; } +table.linenotable td.code { padding-left: 0.75em; } +table.linenotable td.linenos { border-right: 1px solid currentColor; opacity: 0.35; padding-right: 0.5em; } + +pre.pygments .lineno { border-right: 1px solid currentColor; opacity: 0.35; display: inline-block; margin-right: 0.75em; } +pre.pygments .lineno:before { content: ""; margin-right: -0.125em; } + +.quoteblock { margin: 0 1em 1.25em 1.5em; display: table; } +.quoteblock:not(.excerpt) > .title { margin-left: -1.5em; margin-bottom: 0.75em; } +.quoteblock blockquote, .quoteblock p { color: rgba(0, 0, 0, 0.85); font-size: 1.15rem; line-height: 1.75; word-spacing: 0.1em; letter-spacing: 0; font-style: italic; text-align: justify; } +.quoteblock blockquote { margin: 0; padding: 0; border: 0; } +.quoteblock blockquote:before { content: "\201c"; float: left; font-size: 2.75em; font-weight: bold; line-height: 0.6em; margin-left: -0.6em; color: #7a2518; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } +.quoteblock blockquote > .paragraph:last-child p { margin-bottom: 0; } +.quoteblock .attribution { margin-top: 0.75em; margin-right: 0.5ex; text-align: right; } + +.verseblock { margin: 0 1em 1.25em 1em; } +.verseblock pre { font-family: "Open Sans", "DejaVu Sans", sans; font-size: 1.15rem; color: rgba(0, 0, 0, 0.85); font-weight: 300; text-rendering: optimizeLegibility; } +.verseblock pre strong { font-weight: 400; } +.verseblock .attribution { margin-top: 1.25rem; margin-left: 0.5ex; } + +.quoteblock .attribution, .verseblock .attribution { font-size: 0.9375em; line-height: 1.45; font-style: italic; } +.quoteblock .attribution br, .verseblock .attribution br { display: none; } +.quoteblock .attribution cite, .verseblock .attribution cite { display: block; letter-spacing: -0.025em; color: rgba(0, 0, 0, 0.6); } + +.quoteblock.abstract blockquote:before, .quoteblock.excerpt blockquote:before, .quoteblock .quoteblock blockquote:before { display: none; } +.quoteblock.abstract blockquote, .quoteblock.abstract p, .quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p { line-height: 1.6; word-spacing: 0; } +.quoteblock.abstract { margin: 0 1em 1.25em 1em; display: block; } +.quoteblock.abstract > .title { margin: 0 0 0.375em 0; font-size: 1.15em; text-align: center; } +.quoteblock.excerpt > blockquote, .quoteblock .quoteblock { padding: 0 0 0.25em 1em; border-left: 0.25em solid #dddddf; } +.quoteblock.excerpt, .quoteblock .quoteblock { margin-left: 0; } +.quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p { color: inherit; font-size: 1.0625rem; } +.quoteblock.excerpt .attribution, .quoteblock .quoteblock .attribution { color: inherit; text-align: left; margin-right: 0; } + +p.tableblock:last-child { margin-bottom: 0; } + +td.tableblock > .content { margin-bottom: 1.25em; word-wrap: anywhere; } +td.tableblock > .content > :last-child { margin-bottom: -1.25em; } + +table.tableblock, th.tableblock, td.tableblock { border: 0 solid #dedede; } + +table.grid-all > * > tr > * { border-width: 1px; } + +table.grid-cols > * > tr > * { border-width: 0 1px; } + +table.grid-rows > * > tr > * { border-width: 1px 0; } + +table.frame-all { border-width: 1px; } + +table.frame-ends { border-width: 1px 0; } + +table.frame-sides { border-width: 0 1px; } + +table.frame-none > colgroup + * > :first-child > *, table.frame-sides > colgroup + * > :first-child > * { border-top-width: 0; } + +table.frame-none > :last-child > :last-child > *, table.frame-sides > :last-child > :last-child > * { border-bottom-width: 0; } + +table.frame-none > * > tr > :first-child, table.frame-ends > * > tr > :first-child { border-left-width: 0; } + +table.frame-none > * > tr > :last-child, table.frame-ends > * > tr > :last-child { border-right-width: 0; } + +table.stripes-all tr, table.stripes-odd tr:nth-of-type(odd), table.stripes-even tr:nth-of-type(even), table.stripes-hover tr:hover { background: #f8f8f7; } + +th.halign-left, td.halign-left { text-align: left; } + +th.halign-right, td.halign-right { text-align: right; } + +th.halign-center, td.halign-center { text-align: center; } + +th.valign-top, td.valign-top { vertical-align: top; } + +th.valign-bottom, td.valign-bottom { vertical-align: bottom; } + +th.valign-middle, td.valign-middle { vertical-align: middle; } + +table thead th, table tfoot th { font-weight: bold; } + +tbody tr th { display: table-cell; line-height: 1.6; background: #f7f8f7; } + +tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p { color: rgba(0, 0, 0, 0.8); font-weight: bold; } + +p.tableblock > code:only-child { background: none; padding: 0; } + +p.tableblock { font-size: 1em; } + +ol { margin-left: 1.75em; } + +ul li ol { margin-left: 1.5em; } + +dl dd { margin-left: 1.125em; } + +dl dd:last-child, dl dd:last-child > :last-child { margin-bottom: 0; } + +ol > li p, ul > li p, ul dd, ol dd, .olist .olist, .ulist .ulist, .ulist .olist, .olist .ulist { margin-bottom: 0.625em; } + +ul.checklist, ul.none, ol.none, ul.no-bullet, ol.no-bullet, ol.unnumbered, ul.unstyled, ol.unstyled { list-style-type: none; } + +ul.no-bullet, ol.no-bullet, ol.unnumbered { margin-left: 0.625em; } + +ul.unstyled, ol.unstyled { margin-left: 0; } + +ul.checklist { margin-left: 0.625em; } + +ul.checklist li > p:first-child > .fa-square-o:first-child, ul.checklist li > p:first-child > .fa-check-square-o:first-child { width: 1.25em; font-size: 0.8em; position: relative; bottom: 0.125em; } + +ul.checklist li > p:first-child > input[type="checkbox"]:first-child { margin-right: 0.25em; } + +ul.inline { display: -ms-flexbox; display: -webkit-box; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; list-style: none; margin: 0 0 0.625em -1.25em; } + +ul.inline > li { margin-left: 1.25em; } + +.unstyled dl dt { font-weight: normal; font-style: normal; } + +ol.arabic { list-style-type: decimal; } + +ol.decimal { list-style-type: decimal-leading-zero; } + +ol.loweralpha { list-style-type: lower-alpha; } + +ol.upperalpha { list-style-type: upper-alpha; } + +ol.lowerroman { list-style-type: lower-roman; } + +ol.upperroman { list-style-type: upper-roman; } + +ol.lowergreek { list-style-type: lower-greek; } + +.hdlist > table, .colist > table { border: 0; background: none; } +.hdlist > table > tbody > tr, .colist > table > tbody > tr { background: none; } + +td.hdlist1, td.hdlist2 { vertical-align: top; padding: 0 0.625em; } + +td.hdlist1 { font-weight: bold; padding-bottom: 1.25em; } + +td.hdlist2 { word-wrap: anywhere; } + +.literalblock + .colist, .listingblock + .colist { margin-top: -0.5em; } + +.colist td:not([class]):first-child { padding: 0.4em 0.75em 0 0.75em; line-height: 1; vertical-align: top; } +.colist td:not([class]):first-child img { max-width: none; } +.colist td:not([class]):last-child { padding: 0.25em 0; } + +.thumb, .th { line-height: 0; display: inline-block; border: solid 4px white; -webkit-box-shadow: 0 0 0 1px #dddddd; box-shadow: 0 0 0 1px #dddddd; } + +.imageblock.left { margin: 0.25em 0.625em 1.25em 0; } +.imageblock.right { margin: 0.25em 0 1.25em 0.625em; } +.imageblock > .title { margin-bottom: 0; } +.imageblock.thumb, .imageblock.th { border-width: 6px; } +.imageblock.thumb > .title, .imageblock.th > .title { padding: 0 0.125em; } + +.image.left, .image.right { margin-top: 0.25em; margin-bottom: 0.25em; display: inline-block; line-height: 0; } +.image.left { margin-right: 0.625em; } +.image.right { margin-left: 0.625em; } + +a.image { text-decoration: none; display: inline-block; } +a.image object { pointer-events: none; } + +sup.footnote, sup.footnoteref { font-size: 0.875em; position: static; vertical-align: super; } +sup.footnote a, sup.footnoteref a { text-decoration: none; } +sup.footnote a:active, sup.footnoteref a:active { text-decoration: underline; } + +#footnotes { padding-top: 0.75em; padding-bottom: 0.75em; margin-bottom: 0.625em; } +#footnotes hr { width: 20%; min-width: 6.25em; margin: -0.25em 0 0.75em 0; border-width: 1px 0 0 0; } +#footnotes .footnote { padding: 0 0.375em 0 0.225em; line-height: 1.3334; font-size: 0.875em; margin-left: 1.2em; margin-bottom: 0.2em; } +#footnotes .footnote a:first-of-type { font-weight: bold; text-decoration: none; margin-left: -1.05em; } +#footnotes .footnote:last-of-type { margin-bottom: 0; } +#content #footnotes { margin-top: -0.625em; margin-bottom: 0; padding: 0.75em 0; } + +.gist .file-data > table { border: 0; background: #fff; width: 100%; margin-bottom: 0; } +.gist .file-data > table td.line-data { width: 99%; } + +div.unbreakable { page-break-inside: avoid; } + +.big { font-size: larger; } + +.small { font-size: smaller; } + +.underline { text-decoration: underline; } + +.overline { text-decoration: overline; } + +.line-through { text-decoration: line-through; } + +.aqua { color: #00bfbf; } + +.aqua-background { background-color: #00fafa; } + +.black { color: black; } + +.black-background { background-color: black; } + +.blue { color: #0000bf; } + +.blue-background { background-color: #0000fa; } + +.fuchsia { color: #bf00bf; } + +.fuchsia-background { background-color: #fa00fa; } + +.gray { color: #606060; } + +.gray-background { background-color: #7d7d7d; } + +.green { color: #006000; } + +.green-background { background-color: #007d00; } + +.lime { color: #00bf00; } + +.lime-background { background-color: #00fa00; } + +.maroon { color: #600000; } + +.maroon-background { background-color: #7d0000; } + +.navy { color: #000060; } + +.navy-background { background-color: #00007d; } + +.olive { color: #606000; } + +.olive-background { background-color: #7d7d00; } + +.purple { color: #600060; } + +.purple-background { background-color: #7d007d; } + +.red { color: #bf0000; } + +.red-background { background-color: #fa0000; } + +.silver { color: #909090; } + +.silver-background { background-color: #bcbcbc; } + +.teal { color: #006060; } + +.teal-background { background-color: #007d7d; } + +.white { color: #bfbfbf; } + +.white-background { background-color: #fafafa; } + +.yellow { color: #bfbf00; } + +.yellow-background { background-color: #fafa00; } + +span.icon > .fa { cursor: default; } +a span.icon > .fa { cursor: inherit; } + +.admonitionblock td.icon [class^="fa icon-"] { font-size: 2.5em; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); cursor: default; } +.admonitionblock td.icon .icon-note:before { content: "\f05a"; color: #19407c; } +.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 0.8); color: #111; } +.admonitionblock td.icon .icon-warning:before { content: "\f071"; color: #bf6900; } +.admonitionblock td.icon .icon-caution:before { content: "\f06d"; color: #bf3400; } +.admonitionblock td.icon .icon-important:before { content: "\f06a"; color: #bf0000; } + +.conum[data-value] { display: inline-block; color: #fff !important; background-color: rgba(0, 0, 0, 0.8); -webkit-border-radius: 50%; border-radius: 50%; text-align: center; font-size: 0.75em; width: 1.67em; height: 1.67em; line-height: 1.67em; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-style: normal; font-weight: bold; } +.conum[data-value] * { color: #fff !important; } +.conum[data-value] + b { display: none; } +.conum[data-value]:after { content: attr(data-value); } +pre .conum[data-value] { position: relative; top: -0.125em; } + +b.conum * { color: inherit !important; } + +.conum:not([data-value]):empty { display: none; } + +dt, th.tableblock, td.content, div.footnote { text-rendering: optimizeLegibility; } + +h1, h2, p, td.content, span.alt { letter-spacing: -0.01em; } + +p strong, td.content strong, div.footnote strong { letter-spacing: -0.005em; } + +p, blockquote, dt, td.content, span.alt { font-size: 1.0625rem; } + +p { margin-bottom: 1.25rem; } + +.sidebarblock p, .sidebarblock dt, .sidebarblock td.content, p.tableblock { font-size: 1em; } + +.exampleblock > .content { background-color: #fffef7; border-color: #e0e0dc; -webkit-box-shadow: 0 1px 4px #e0e0dc; box-shadow: 0 1px 4px #e0e0dc; } + +.print-only { display: none !important; } + +@page { margin: 1.25cm 0.75cm; } + +@media print { * { -webkit-box-shadow: none !important; box-shadow: none !important; text-shadow: none !important; } + html { font-size: 80%; } + a { color: inherit !important; text-decoration: underline !important; } + a.bare, a[href^="#"], a[href^="mailto:"] { text-decoration: none !important; } + a[href^="http:"]:not(.bare):after, a[href^="https:"]:not(.bare):after { content: "(" attr(href) ")"; display: inline-block; font-size: 0.875em; padding-left: 0.25em; } + abbr[title]:after { content: " (" attr(title) ")"; } + pre, blockquote, tr, img, object, svg { page-break-inside: avoid; } + thead { display: table-header-group; } + svg { max-width: 100%; } + p, blockquote, dt, td.content { font-size: 1em; orphans: 3; widows: 3; } + h2, h3, #toctitle, .sidebarblock > .content > .title, #toctitle, .sidebarblock > .content > .title { page-break-after: avoid; } + #header, #content, #footnotes, #footer { max-width: none; } + #toc, .sidebarblock, .exampleblock > .content { background: none !important; } + #toc { border-bottom: 1px solid #dddddf !important; padding-bottom: 0 !important; } + body.book #header { text-align: center; } + body.book #header > h1:first-child { border: 0 !important; margin: 2.5em 0 1em 0; } + body.book #header .details { border: 0 !important; display: block; padding: 0 !important; } + body.book #header .details span:first-child { margin-left: 0 !important; } + body.book #header .details br { display: block; } + body.book #header .details br + span:before { content: none !important; } + body.book #toc { border: 0 !important; text-align: left !important; padding: 0 !important; margin: 0 !important; } + body.book #toc, body.book #preamble, body.book h1.sect0, body.book .sect1 > h2 { page-break-before: always; } + .listingblock code[data-lang]:before { display: block; } + #footer { padding: 0 0.9375em; } + .hide-on-print { display: none !important; } + .print-only { display: block !important; } + .hide-for-print { display: none !important; } + .show-for-print { display: inherit !important; } } +@media print, amzn-kf8 { #header > h1:first-child { margin-top: 1.25rem; } + .sect1 { padding: 0 !important; } + .sect1 + .sect1 { border: 0; } + #footer { background: none; } + #footer-text { color: rgba(0, 0, 0, 0.6); font-size: 0.9em; } } +@media amzn-kf8 { #header, #content, #footnotes, #footer { padding: 0; } } diff --git a/doc/src/stylesheets/readthedocs-new.css b/doc/src/stylesheets/readthedocs-new.css new file mode 100644 index 0000000..7c8e2f0 --- /dev/null +++ b/doc/src/stylesheets/readthedocs-new.css @@ -0,0 +1 @@ +/*! normalize.css v2.1.2 | MIT License | git.io/normalize */@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100;200;300;400;500;600;700;800;900&display=swap");@import url(https://fonts.googleapis.com/css?family=Lato:400,700,700italic,400italic);@import url("https://fonts.googleapis.com/css2?family=Inconsolata:wght@200;300;400;500;600;700;800;900&display=swap");article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}script{display:none !important}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:0.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace, serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}meta.foundation-mq-small{font-family:"only screen and (min-width: 768px)";width:768px}meta.foundation-mq-medium{font-family:"only screen and (min-width:1280px)";width:1280px}meta.foundation-mq-large{font-family:"only screen and (min-width:1440px)";width:1440px}*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}html,body{font-size:100%}body{background:#fff;color:#222;padding:0;margin:0;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:auto}a:hover{cursor:pointer}img,object,embed{max-width:100%;height:auto}object,embed{height:100%}img{-ms-interpolation-mode:bicubic}#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none !important}.left{float:left !important}.right{float:right !important}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}.text-justify{text-align:justify !important}.hide{display:none}.antialiased{-webkit-font-smoothing:antialiased}img{display:inline-block;vertical-align:middle}textarea{height:auto;min-height:50px}select{width:100%}p.lead{font-size:1.21875em;line-height:1.6}.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.4;color:#6c818f;font-weight:300;margin-top:0.2em;margin-bottom:0.5em}div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}a{color:#2980b9;text-decoration:none;line-height:inherit}a:hover,a:focus{color:#3091d1}a img{border:none}p{font-family:inherit;font-weight:normal;font-size:1em;line-height:1.5;margin-bottom:1.25em;text-rendering:optimizeLegibility}p aside{font-size:0.875em;line-height:1.35;font-style:italic}h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Roboto Slab",sans-serif;font-weight:bold;font-style:normal;color:#465158;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:0.5em;line-height:1.2125em}h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#909ea7;line-height:0}h1{font-size:2.125em}h2{font-size:1.6875em}h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}h4{font-size:1.125em}h5{font-size:1.125em}h6{font-size:1em}hr{border:solid #ddd;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}em,i{font-style:italic;line-height:inherit}strong,b{font-weight:bold;line-height:inherit}small{font-size:60%;line-height:inherit}code{font-family:"Inconsolata","Consolas","Deja Vu Sans Mono","Bitstream Vera Sans Mono",monospace;font-weight:normal;color:#2980b9}ul,ol,dl{font-size:1em;line-height:1.5;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}ul,ol{margin-left:0}ul.no-bullet,ol.no-bullet{margin-left:0}ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}ul.square{list-style-type:square}ul.circle{list-style-type:circle}ul.disc{list-style-type:disc}ul.no-bullet{list-style:none}ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}dl dt{margin-bottom:0.3em;font-weight:bold}dl dd{margin-bottom:0.75em}abbr,acronym{text-transform:uppercase;font-size:90%;color:#000;border-bottom:1px dotted #ddd;cursor:help}abbr{text-transform:none}blockquote{margin:0 0 1.25em;padding:0.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}blockquote cite{display:block;font-size:0.8125em;color:#748590}blockquote cite:before{content:"\2014 \0020"}blockquote cite a,blockquote cite a:visited{color:#748590}blockquote,blockquote p{line-height:1.5;color:#909ea7}.vcard{display:inline-block;margin:0 0 1.25em 0;border:1px solid #ddd;padding:0.625em 0.75em}.vcard li{margin:0;display:block}.vcard .fn{font-weight:bold;font-size:0.9375em}.vevent .summary{font-weight:bold}.vevent abbr{cursor:auto;text-decoration:none;font-weight:bold;border:none;padding:0 0.0625em}@media only screen and (min-width: 768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.4}h1{font-size:2.75em}h2{font-size:2.3125em}h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 0 #ddd}table thead,table tfoot{background:none;font-weight:bold}table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:1px 8px 1px 5px;font-size:1em;color:#222;text-align:left}table tr th,table tr td{padding:1px 8px 1px 5px;font-size:1em;color:#222}table tr.even,table tr.alt,table tr:nth-of-type(even){background:none}table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.5}body{tab-size:4;word-wrap:anywhere;font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}table{word-wrap:normal}h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.4}object,svg{display:inline-block;vertical-align:middle}.center{margin-left:auto;margin-right:auto}.stretch{width:100%}.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}.clearfix:after,.float-group:after{clear:both}:not(pre).nobreak{word-wrap:normal}:not(pre).nowrap{white-space:nowrap}:not(pre).pre-wrap{white-space:pre-wrap}:not(pre):not([class^=L])>code{font-size:0.95em;font-style:normal !important;letter-spacing:0;padding:0;background-color:#f2f2f2;-webkit-border-radius:6px;border-radius:6px;line-height:inherit}pre{color:inherit;font-family:"Consolas","Deja Vu Sans Mono","Bitstream Vera Sans Mono",monospace;line-height:1.2}pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}pre>code{display:block}pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}em em{font-style:normal}strong strong{font-weight:normal}.keyseq{color:#333}kbd{font-family:"Inconsolata","Consolas","Deja Vu Sans Mono","Bitstream Vera Sans Mono",monospace;display:inline-block;color:#000;font-size:0.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 0.1em #fff inset;box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 0.1em #fff inset;margin:0 0.15em;padding:0.2em 0.5em;vertical-align:middle;position:relative;top:-0.1em;white-space:nowrap}.keyseq kbd:first-child{margin-left:0}.keyseq kbd:last-child{margin-right:0}.menuseq,.menuref{color:#000}.menuseq b:not(.caret),.menuref{font-weight:inherit}.menuseq{word-spacing:-0.02em}.menuseq b.caret{font-size:1.25em;line-height:0.8}.menuseq i.caret{font-weight:bold;text-align:center;width:0.45em}b.button:before,b.button:after{position:relative;top:-1px;font-weight:normal}b.button:before{content:"[";padding:0 3px 0 2px}b.button:after{content:"]";padding:0 2px 0 3px}#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:0.9375em;padding-right:0.9375em}#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table}#header:after,#content:after,#footnotes:after,#footer:after{clear:both}#content{margin-top:1.25em}#content:before{content:none}#header>h1:first-child{color:#111;margin-top:2.25rem;margin-bottom:0}#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddd}#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddd;padding-bottom:8px}#header .details{border-bottom:1px solid #ddd;line-height:1.45;padding-top:0.25em;padding-bottom:0.25em;padding-left:0.25em;color:#748590;display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}#header .details span:first-child{margin-left:-0.125em}#header .details span.email a{color:#909ea7}#header .details br{display:none}#header .details br+span:before{content:"\00a0\2013\00a0"}#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:#909ea7}#header .details br+span#revremark:before{content:"\00a0|\00a0"}#header #revnumber{text-transform:capitalize}#header #revnumber:after{content:"\00a0"}#content>h1:first-child:not([class]){color:#111;border-bottom:1px solid #ddd;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}#toc{border-bottom:1px solid #ddd;padding-bottom:0.5em}#toc>ul{margin-left:0.125em}#toc ul.sectlevel0>li>a{font-style:italic}#toc ul.sectlevel0 ul.sectlevel1{margin:0.5em 0}#toc ul{font-family:"Roboto Slab",sans-serif;list-style-type:none}#toc li{line-height:1.3334;margin-top:0.3334em}#toc a{text-decoration:none}#toc a:active{text-decoration:underline}#toctitle{color:#6c818f;font-size:1.2em}@media only screen and (min-width: 768px){#toctitle{font-size:1.375em}body.toc2{padding-left:15em;padding-right:0}#toc.toc2{margin-top:0 !important;background:#f2f2f2;position:fixed;width:15em;left:0;top:0;border-right:1px solid #ddd;border-top-width:0 !important;border-bottom-width:0 !important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}#toc.toc2 #toctitle{margin-top:0;margin-bottom:0.8rem;font-size:1.2em}#toc.toc2>ul{font-size:0.9em;margin-bottom:0}#toc.toc2 ul ul{margin-left:0;padding-left:1em}#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:0.5em;margin-bottom:0.5em}body.toc2.toc-right{padding-left:0;padding-right:15em}body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #ddd;left:auto;right:0}}@media only screen and (min-width: 1280px){body.toc2{padding-left:20em;padding-right:0}#toc.toc2{width:20em}#toc.toc2 #toctitle{font-size:1.375em}#toc.toc2>ul{font-size:0.95em}#toc.toc2 ul ul{padding-left:1.25em}body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#d9d9d9;margin-bottom:1.25em;padding:1.25em;background:#f2f2f2;-webkit-border-radius:6px;border-radius:6px}#content #toc>:first-child{margin-top:0}#content #toc>:last-child{margin-bottom:0}#footer{max-width:none;background:#000;padding:1.25em}#footer-text{color:#fff;line-height:1.35}#content{margin-bottom:0.625em}.sect1{padding-bottom:0.625em}@media only screen and (min-width: 768px){#content{margin-bottom:1.25em}.sect1{padding-bottom:1.25em}}.sect1:last-child{padding-bottom:0}.sect1+.sect1{border-top:1px solid #ddd}details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:0.75em}.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left}table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:#111}table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}.admonitionblock>table td.icon{text-align:center;width:80px}.admonitionblock>table td.icon img{max-width:none}.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Roboto Slab",sans-serif;text-transform:uppercase}.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddd;color:#748590;word-wrap:anywhere}.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:6px;border-radius:6px}.exampleblock>.content>:first-child{margin-top:0}.exampleblock>.content>:last-child{margin-bottom:0}.sidebarblock{border-style:solid;border-width:1px;border-color:#d4d4d4;margin-bottom:1.25em;padding:1.25em;background:#ededed;-webkit-border-radius:6px;border-radius:6px}.sidebarblock>:first-child{margin-top:0}.sidebarblock>:last-child{margin-bottom:0}.sidebarblock>.content>.title{color:#6c818f;margin-top:0}.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}.literalblock pre,.listingblock>.content>pre{border:1px solid #ccc;-webkit-border-radius:6px;border-radius:6px;overflow-x:auto;padding:0.5em;font-size:0.8125em}@media only screen and (min-width: 768px){.literalblock pre,.listingblock>.content>pre{font-size:0.90625em}}@media only screen and (min-width: 1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#eee}.literalblock.output pre{color:#eee;background-color:inherit}.listingblock>.content{position:relative}.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:0.75em;top:0.425rem;right:0.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:0.5}.listingblock:hover code[data-lang]:before{display:block}.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:0.5em;color:inherit;opacity:0.5}.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}.listingblock pre.highlightjs{padding:0}.listingblock pre.highlightjs>code{padding:0.5em;-webkit-border-radius:6px;border-radius:6px}.prettyprint{background:#eee}pre.prettyprint .linenums{line-height:1.2;margin-left:2em}pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}pre.prettyprint li code[data-lang]:before{opacity:1}pre.prettyprint li:not(:first-child) code[data-lang]:before{display:none}table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}table.linenotable td.code{padding-left:0.75em}table.linenotable td.linenos{border-right:1px solid currentColor;opacity:0.35;padding-right:0.5em}pre.pygments .lineno{border-right:1px solid currentColor;opacity:0.35;display:inline-block;margin-right:0.75em}pre.pygments .lineno:before{content:"";margin-right:-0.125em}.quoteblock{margin:0 1em 1.25em 1.5em;display:table}.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:0.75em}.quoteblock blockquote,.quoteblock p{color:#909ea7;font-size:1.15rem;line-height:1.75;word-spacing:0.1em;letter-spacing:0;font-style:italic;text-align:justify}.quoteblock blockquote{margin:0;padding:0;border:0}.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:0.6em;margin-left:-0.6em;color:#6c818f;text-shadow:0 1px 2px rgba(0,0,0,0.1)}.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}.quoteblock .attribution{margin-top:0.75em;margin-right:0.5ex;text-align:right}.verseblock{margin:0 1em 1.25em 1em}.verseblock pre{font-family:"Open Sans", "DejaVu Sans", sans;font-size:1.15rem;color:#909ea7;font-weight:300;text-rendering:optimizeLegibility}.verseblock pre strong{font-weight:400}.verseblock .attribution{margin-top:1.25rem;margin-left:0.5ex}.quoteblock .attribution,.verseblock .attribution{font-size:0.8125em;line-height:1.45;font-style:italic}.quoteblock .attribution br,.verseblock .attribution br{display:none}.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-0.025em;color:#748590}.quoteblock.abstract blockquote:before,.quoteblock.excerpt blockquote:before,.quoteblock .quoteblock blockquote:before{display:none}.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}.quoteblock.abstract{margin:0 1em 1.25em 1em;display:block}.quoteblock.abstract>.title{margin:0 0 0.375em 0;font-size:1.15em;text-align:center}.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 0.25em 1em;border-left:0.25em solid #ddd}.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}p.tableblock:last-child{margin-bottom:0}td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}td.tableblock>.content>:last-child{margin-bottom:-1.25em}table.tableblock,th.tableblock,td.tableblock{border:0 solid #ddd}table.grid-all>*>tr>*{border-width:0}table.grid-cols>*>tr>*{border-width:0 0}table.grid-rows>*>tr>*{border-width:0 0}table.frame-all{border-width:0}table.frame-ends{border-width:0 0}table.frame-sides{border-width:0 0}table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:none}th.halign-left,td.halign-left{text-align:left}th.halign-right,td.halign-right{text-align:right}th.halign-center,td.halign-center{text-align:center}th.valign-top,td.valign-top{vertical-align:top}th.valign-bottom,td.valign-bottom{vertical-align:bottom}th.valign-middle,td.valign-middle{vertical-align:middle}table thead th,table tfoot th{font-weight:bold}tbody tr th{display:table-cell;line-height:1.5;background:none}tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:#222;font-weight:bold}p.tableblock{font-size:1em}ol{margin-left:0.25em}ul li ol{margin-left:0}dl dd{margin-left:1.125em}dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:0.625em}ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:0.625em}ul.unstyled,ol.unstyled{margin-left:0}ul.checklist{margin-left:0.625em}ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:0.8em;position:relative;bottom:0.125em}ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:0.25em}ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 0.625em -1.25em}ul.inline>li{margin-left:1.25em}.unstyled dl dt{font-weight:normal;font-style:normal}ol.arabic{list-style-type:decimal}ol.decimal{list-style-type:decimal-leading-zero}ol.loweralpha{list-style-type:lower-alpha}ol.upperalpha{list-style-type:upper-alpha}ol.lowerroman{list-style-type:lower-roman}ol.upperroman{list-style-type:upper-roman}ol.lowergreek{list-style-type:lower-greek}.hdlist>table,.colist>table{border:0;background:none}.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}td.hdlist1,td.hdlist2{vertical-align:top;padding:0 0.625em}td.hdlist1{font-weight:bold;padding-bottom:1.25em}td.hdlist2{word-wrap:anywhere}.literalblock+.colist,.listingblock+.colist{margin-top:-0.5em}.colist td:not([class]):first-child{padding:0.4em 0.75em 0 0.75em;line-height:1;vertical-align:top}.colist td:not([class]):first-child img{max-width:none}.colist td:not([class]):last-child{padding:0.25em 0}.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}.imageblock.left{margin:0.25em 0.625em 1.25em 0}.imageblock.right{margin:0.25em 0 1.25em 0.625em}.imageblock>.title{margin-bottom:0}.imageblock.thumb,.imageblock.th{border-width:6px}.imageblock.thumb>.title,.imageblock.th>.title{padding:0 0.125em}.image.left,.image.right{margin-top:0.25em;margin-bottom:0.25em;display:inline-block;line-height:0}.image.left{margin-right:0.625em}.image.right{margin-left:0.625em}a.image{text-decoration:none;display:inline-block}a.image object{pointer-events:none}sup.footnote,sup.footnoteref{font-size:0.875em;position:static;vertical-align:super}sup.footnote a,sup.footnoteref a{text-decoration:none}sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}#footnotes{padding-top:0.75em;padding-bottom:0.75em;margin-bottom:0.625em}#footnotes hr{width:20%;min-width:6.25em;margin:-0.25em 0 0.75em 0;border-width:1px 0 0 0}#footnotes .footnote{padding:0 0.375em 0 0.225em;line-height:1.3334;font-size:0.875em;margin-left:1.2em;margin-bottom:0.2em}#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}#footnotes .footnote:last-of-type{margin-bottom:0}#content #footnotes{margin-top:-0.625em;margin-bottom:0;padding:0.75em 0}.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}.gist .file-data>table td.line-data{width:99%}div.unbreakable{page-break-inside:avoid}.big{font-size:larger}.small{font-size:smaller}.underline{text-decoration:underline}.overline{text-decoration:overline}.line-through{text-decoration:line-through}.aqua{color:#00bfbf}.aqua-background{background-color:#00fafa}.black{color:#000}.black-background{background-color:#000}.blue{color:#0000bf}.blue-background{background-color:#0000fa}.fuchsia{color:#bf00bf}.fuchsia-background{background-color:#fa00fa}.gray{color:#606060}.gray-background{background-color:#7d7d7d}.green{color:#006000}.green-background{background-color:#007d00}.lime{color:#00bf00}.lime-background{background-color:#00fa00}.maroon{color:#600000}.maroon-background{background-color:#7d0000}.navy{color:#000060}.navy-background{background-color:#00007d}.olive{color:#606000}.olive-background{background-color:#7d7d00}.purple{color:#600060}.purple-background{background-color:#7d007d}.red{color:#bf0000}.red-background{background-color:#fa0000}.silver{color:#909090}.silver-background{background-color:#bcbcbc}.teal{color:#006060}.teal-background{background-color:#007d7d}.white{color:#bfbfbf}.white-background{background-color:#fafafa}.yellow{color:#bfbf00}.yellow-background{background-color:#fafa00}span.icon>.fa{cursor:default}a span.icon>.fa{cursor:inherit}.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,0.5);cursor:default}.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#1f608b}.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,0.8);color:#111}.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}.conum[data-value]{display:inline-block;color:#fff !important;background-color:#000;-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:0.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans", "DejaVu Sans", sans-serif;font-style:normal;font-weight:bold}.conum[data-value] *{color:#fff !important}.conum[data-value]+b{display:none}.conum[data-value]:after{content:attr(data-value)}pre .conum[data-value]{position:relative;top:-0.125em}b.conum *{color:inherit !important}.conum:not([data-value]):empty{display:none}h4{color:#6c818f}.literalblock>.content>pre,.listingblock>.content>pre{-webkit-border-radius:6px;border-radius:6px;margin-left:2em;margin-right:2em}.admonitionblock{margin-left:2em;margin-right:2em}.admonitionblock>table{border:1px solid #609060;border-top-width:1.5em;background-color:#e9ffe9;border-collapse:separate;-webkit-border-radius:0;border-radius:0}.admonitionblock>table td.icon{padding-top:.5em;padding-bottom:.5em}.admonitionblock>table td.content{padding:.5em 1em;color:#000;font-size:.9em;border-left:none}.sidebarblock{background-color:#e8ecef;border-color:#ccc}.sidebarblock>.content>.title{color:#2980b9}table.tableblock.grid-all{border-collapse:collapse;-webkit-border-radius:0;border-radius:0}table.tableblock.grid-all th.tableblock,table.tableblock.grid-all td.tableblock{border-bottom:1px solid #aaa}#footer{background-color:#465158;padding:2em}#footer-text{color:#eee;font-size:0.8em;text-align:center}#toc.toc2{font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif;padding:0;background:#343131}#toc.toc2 #toctitle{padding:1.6em 1em;text-align:center;font-family:"Roboto Slab",sans-serif;color:#fff;background:#2980b9}#toc.toc2 #toctitle::before{vertical-align:middle;content:"\f02d";content:"\f1b2";padding-right:0.3em;margin-left:-1em;font-family:'FontAwesome';font-size:200%}#toc.toc2 a{display:block;color:#d9d9d9;padding:0.25em 1em}#toc.toc2 a:hover,#toc.toc2 a:focus{background:#696262}#toc.toc2 ul{font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif}#toc.toc2 ul.sectlevel1 a{font-weight:bold;color:#55a5d9}#toc.toc2 ul.sectlevel1 a:hover,#toc.toc2 ul.sectlevel1 a:focus{color:#d9d9d9}#toc.toc2 ul.sectlevel2,#toc.toc2 ul.sectlevel3,#toc.toc2 ul.sectlevel4,#toc.toc2 ul.sectlevel5,#toc.toc2 ul.sectlevel6{padding:0}#toc.toc2 ul.sectlevel2 a,#toc.toc2 ul.sectlevel3 a,#toc.toc2 ul.sectlevel4 a,#toc.toc2 ul.sectlevel5 a,#toc.toc2 ul.sectlevel6 a{font-weight:normal;color:#d9d9d9}#toc.toc2 ul.sectlevel2.sectlevel2 a,#toc.toc2 ul.sectlevel3.sectlevel2 a,#toc.toc2 ul.sectlevel4.sectlevel2 a,#toc.toc2 ul.sectlevel5.sectlevel2 a,#toc.toc2 ul.sectlevel6.sectlevel2 a{padding-left:2em}#toc.toc2 ul.sectlevel2.sectlevel3 a,#toc.toc2 ul.sectlevel3.sectlevel3 a,#toc.toc2 ul.sectlevel4.sectlevel3 a,#toc.toc2 ul.sectlevel5.sectlevel3 a,#toc.toc2 ul.sectlevel6.sectlevel3 a{padding-left:3em}#toc.toc2 ul.sectlevel2.sectlevel4 a,#toc.toc2 ul.sectlevel3.sectlevel4 a,#toc.toc2 ul.sectlevel4.sectlevel4 a,#toc.toc2 ul.sectlevel5.sectlevel4 a,#toc.toc2 ul.sectlevel6.sectlevel4 a{padding-left:4em}#toc.toc2 ul.sectlevel2.sectlevel5 a,#toc.toc2 ul.sectlevel3.sectlevel5 a,#toc.toc2 ul.sectlevel4.sectlevel5 a,#toc.toc2 ul.sectlevel5.sectlevel5 a,#toc.toc2 ul.sectlevel6.sectlevel5 a{padding-left:5em}#toc.toc2 ul.sectlevel2.sectlevel6 a,#toc.toc2 ul.sectlevel3.sectlevel6 a,#toc.toc2 ul.sectlevel4.sectlevel6 a,#toc.toc2 ul.sectlevel5.sectlevel6 a,#toc.toc2 ul.sectlevel6.sectlevel6 a{padding-left:6em}:not(pre):not([class^="L"])>code{font-size:0.95em;font-style:normal !important;letter-spacing:0;padding:0px 4px;background-color:#f6f6f6;-webkit-border-radius:4px;border-radius:4px;line-height:inherit;border:solid #ddd7d7 1px;color:#e74c3c}.admonitionblock{margin:0}.admonitionblock.note>table{background-color:#e7f2fa}.admonitionblock.note>table td.icon{background-color:#3e97d7;width:100%;text-align:left;padding-left:2em}.admonitionblock.note>table td.icon i.icon-note::before{color:white}.admonitionblock.note>table td.icon i.icon-note::after{color:white;content:"Note";padding-left:1em;font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif;font-size:0.9em;font-weight:bold}.admonitionblock.tip>table{background-color:#e9ffe9}.admonitionblock.tip>table td.icon{background-color:#00b600;width:100%;text-align:left;padding-left:2em}.admonitionblock.tip>table td.icon i.icon-tip::before{color:white}.admonitionblock.tip>table td.icon i.icon-tip::after{color:white;content:"Tip";padding-left:1em;font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif;font-size:0.9em;font-weight:bold}.admonitionblock.caution>table{background-color:#ffe3ca}.admonitionblock.caution>table td.icon{background-color:#fd7700;width:100%;text-align:left;padding-left:2em}.admonitionblock.caution>table td.icon i.icon-caution::before{color:white}.admonitionblock.caution>table td.icon i.icon-caution::after{color:white;content:"Caution";padding-left:1em;font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif;font-size:0.9em;font-weight:bold}.admonitionblock.important>table{background-color:#ffd6ca}.admonitionblock.important>table td.icon{background-color:#fd3900;width:100%;text-align:left;padding-left:2em}.admonitionblock.important>table td.icon i.icon-important::before{color:white}.admonitionblock.important>table td.icon i.icon-important::after{color:white;content:"Important";padding-left:1em;font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif;font-size:0.9em;font-weight:bold}.admonitionblock.warning>table{background-color:#ffedcc}.admonitionblock.warning>table td.icon{background-color:orange;width:100%;text-align:left;padding-left:2em}.admonitionblock.warning>table td.icon i.icon-warning::before{color:white}.admonitionblock.warning>table td.icon i.icon-warning::after{color:white;content:"Warning";padding-left:1em;font-family:"Lato","Roboto","Arial","Helvetica Neue",sans-serif;font-size:0.9em;font-weight:bold}.admonitionblock>table{border:none}.admonitionblock>table td{display:inline-block;width:100%;font-size:8px}.tableblock code{border:none}.literalblock>.content>pre,.listingblock>.content>pre{margin:0}.literalblock pre,.listingblock>.content>pre{background:#f8f8f8}@media only screen and (min-width: 768px){#toc.toc2{padding:0;background:#343131}#toc.toc2 #toctitle::before{margin-left:-0.5em}}.ulist:not(.checklist) ul,.ulist:not(.checklist) ol{margin-left:1.5em}.ulist:not(.checklist) ul li>p,.ulist:not(.checklist) ol li>p{padding-left:0.5em}.ulist:not(.checklist) ul>li::marker,.ulist:not(.checklist) ol>li::marker{content:"\f111";font-family:"FontAwesome";font-size:0.7em;color:#2980b9}.olist ol{margin-left:2em}i.conum[data-value]{background-color:#2980b9}#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#465158;text-decoration:none}#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#3b444a}#content h1>a.link:hover:after,h2>a.link:hover:after,h3>a.link:hover:after,#toctitle>a.link:hover:after,.sidebarblock>.content>.title>a.link:hover:after,h4>a.link:hover:after,h5>a.link:hover:after,h6>a.link:hover:after{content:"\f0c1";font-family:'FontAwesome';font-size:0.65em;display:inline-block;color:#3091d1;margin-left:0.5em} diff --git a/doc/src/stylesheets/readthedocs.css b/doc/src/stylesheets/readthedocs.css new file mode 100644 index 0000000..ea94d04 --- /dev/null +++ b/doc/src/stylesheets/readthedocs.css @@ -0,0 +1,739 @@ +/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ +/* ========================================================================== HTML5 display definitions ========================================================================== */ +/** Correct `block` display not defined in IE 8/9. */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } + +/** Correct `inline-block` display not defined in IE 8/9. */ +audio, canvas, video { display: inline-block; } + +/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ +audio:not([controls]) { display: none; height: 0; } + +/** Address `[hidden]` styling not present in IE 8/9. Hide the `template` element in IE, Safari, and Firefox < 22. */ +[hidden], template { display: none; } + +script { display: none !important; } + +/* ========================================================================== Base ========================================================================== */ +/** 1. Set default font family to sans-serif. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */ +html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } + +/** Remove default margin. */ +body { margin: 0; } + +/* ========================================================================== Links ========================================================================== */ +/** Remove the gray background color from active links in IE 10. */ +a { background: transparent; } + +/** Address `outline` inconsistency between Chrome and other browsers. */ +a:focus { outline: thin dotted; } + +/** Improve readability when focused and also mouse hovered in all browsers. */ +a:active, a:hover { outline: 0; } + +/* ========================================================================== Typography ========================================================================== */ +/** Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari 5, and Chrome. */ +h1 { font-size: 2em; margin: 0.67em 0; } + +/** Address styling not present in IE 8/9, Safari 5, and Chrome. */ +abbr[title] { border-bottom: 1px dotted; } + +/** Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ +b, strong { font-weight: bold; } + +/** Address styling not present in Safari 5 and Chrome. */ +dfn { font-style: italic; } + +/** Address differences between Firefox and other browsers. */ +hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } + +/** Address styling not present in IE 8/9. */ +mark { background: #ff0; color: #000; } + +/** Correct font family set oddly in Safari 5 and Chrome. */ +code, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; } + +/** Improve readability of pre-formatted text in all browsers. */ +pre { white-space: pre-wrap; } + +/** Set consistent quote types. */ +q { quotes: "\201C" "\201D" "\2018" "\2019"; } + +/** Address inconsistent and variable font size in all browsers. */ +small { font-size: 80%; } + +/** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } + +sup { top: -0.5em; } + +sub { bottom: -0.25em; } + +/* ========================================================================== Embedded content ========================================================================== */ +/** Remove border when inside `a` element in IE 8/9. */ +img { border: 0; } + +/** Correct overflow displayed oddly in IE 9. */ +svg:not(:root) { overflow: hidden; } + +/* ========================================================================== Figures ========================================================================== */ +/** Address margin not present in IE 8/9 and Safari 5. */ +figure { margin: 0; } + +/* ========================================================================== Forms ========================================================================== */ +/** Define consistent border, margin, and padding. */ +fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } + +/** 1. Correct `color` not being inherited in IE 8/9. 2. Remove padding so people aren't caught out if they zero out fieldsets. */ +legend { border: 0; /* 1 */ padding: 0; /* 2 */ } + +/** 1. Correct font family not being inherited in all browsers. 2. Correct font size not being inherited in all browsers. 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ +button, input, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 2 */ margin: 0; /* 3 */ } + +/** Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ +button, input { line-height: normal; } + +/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. Correct `select` style inheritance in Firefox 4+ and Opera. */ +button, select { text-transform: none; } + +/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. */ +button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } + +/** Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { cursor: default; } + +/** 1. Address box sizing set to `content-box` in IE 8/9. 2. Remove excess padding in IE 8/9. */ +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } + +/** 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome (include `-moz` to future-proof). */ +input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } + +/** Remove inner padding and search cancel button in Safari 5 and Chrome on OS X. */ +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/** Remove inner padding and border in Firefox 4+. */ +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/** 1. Remove default vertical scrollbar in IE 8/9. 2. Improve readability and alignment in all browsers. */ +textarea { overflow: auto; /* 1 */ vertical-align: top; /* 2 */ } + +/* ========================================================================== Tables ========================================================================== */ +/** Remove most spacing between table cells. */ +table { border-collapse: collapse; border-spacing: 0; } + +meta.foundation-mq-small { font-family: "only screen and (min-width: 768px)"; width: 768px; } + +meta.foundation-mq-medium { font-family: "only screen and (min-width:1280px)"; width: 1280px; } + +meta.foundation-mq-large { font-family: "only screen and (min-width:1440px)"; width: 1440px; } + +*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } + +html, body { font-size: 100%; } + +body { background: white; color: #222222; padding: 0; margin: 0; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; line-height: 1; position: relative; cursor: auto; } + +a:hover { cursor: pointer; } + +img, object, embed { max-width: 100%; height: auto; } + +object, embed { height: 100%; } + +img { -ms-interpolation-mode: bicubic; } + +#map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object { max-width: none !important; } + +.left { float: left !important; } + +.right { float: right !important; } + +.text-left { text-align: left !important; } + +.text-right { text-align: right !important; } + +.text-center { text-align: center !important; } + +.text-justify { text-align: justify !important; } + +.hide { display: none; } + +.antialiased { -webkit-font-smoothing: antialiased; } + +img { display: inline-block; vertical-align: middle; } + +textarea { height: auto; min-height: 50px; } + +select { width: 100%; } + +p.lead { font-size: 1.21875em; line-height: 1.6; } + +.subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { line-height: 1.4; color: #6c818f; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } + +/* Typography resets */ +div, dl, dt, dd, ul, ol, li, h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; direction: ltr; } + +/* Default Link Styles */ +a { color: #444444; text-decoration: underline; line-height: inherit; } +a:hover, a:focus { color: #111111; } +a img { border: none; } + +/* Default paragraph styles */ +p { font-family: inherit; font-weight: normal; font-size: 1em; line-height: 1.5; margin-bottom: 1.25em; text-rendering: optimizeLegibility; } +p aside { font-size: 0.875em; line-height: 1.35; font-style: italic; } + +/* Default header styles */ +h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { font-family: ff-meta-web-pro-1, ff-meta-web-pro-2, Arial, "Helvetica Neue", sans-serif; font-weight: bold; font-style: normal; color: #465158; text-rendering: optimizeLegibility; margin-top: 1em; margin-bottom: 0.5em; line-height: 1.2125em; } +h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small { font-size: 60%; color: #909ea7; line-height: 0; } + +h1 { font-size: 2.125em; } + +h2 { font-size: 1.6875em; } + +h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.375em; } + +h4 { font-size: 1.125em; } + +h5 { font-size: 1.125em; } + +h6 { font-size: 1em; } + +hr { border: solid #dddddd; border-width: 1px 0 0; clear: both; margin: 1.25em 0 1.1875em; height: 0; } + +/* Helpful Typography Defaults */ +em, i { font-style: italic; line-height: inherit; } + +strong, b { font-weight: bold; line-height: inherit; } + +small { font-size: 60%; line-height: inherit; } + +code { font-family: "Consolas", "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", monospace; font-weight: normal; color: #444444; } + +/* Lists */ +ul, ol, dl { font-size: 1em; line-height: 1.5; margin-bottom: 1.25em; list-style-position: outside; font-family: inherit; } + +ul, ol { margin-left: 0; } +ul.no-bullet, ol.no-bullet { margin-left: 0; } + +/* Unordered Lists */ +ul li ul, ul li ol { margin-left: 1.25em; margin-bottom: 0; font-size: 1em; /* Override nested font-size change */ } +ul.square li ul, ul.circle li ul, ul.disc li ul { list-style: inherit; } +ul.square { list-style-type: square; } +ul.circle { list-style-type: circle; } +ul.disc { list-style-type: disc; } +ul.no-bullet { list-style: none; } + +/* Ordered Lists */ +ol li ul, ol li ol { margin-left: 1.25em; margin-bottom: 0; } + +/* Definition Lists */ +dl dt { margin-bottom: 0.3em; font-weight: bold; } +dl dd { margin-bottom: 0.75em; } + +/* Abbreviations */ +abbr, acronym { text-transform: uppercase; font-size: 90%; color: black; border-bottom: 1px dotted #dddddd; cursor: help; } + +abbr { text-transform: none; } + +/* Blockquotes */ +blockquote { margin: 0 0 1.25em; padding: 0.5625em 1.25em 0 1.1875em; border-left: 1px solid #dddddd; } +blockquote cite { display: block; font-size: 0.8125em; color: #748590; } +blockquote cite:before { content: "\2014 \0020"; } +blockquote cite a, blockquote cite a:visited { color: #748590; } + +blockquote, blockquote p { line-height: 1.5; color: #909ea7; } + +/* Microformats */ +.vcard { display: inline-block; margin: 0 0 1.25em 0; border: 1px solid #dddddd; padding: 0.625em 0.75em; } +.vcard li { margin: 0; display: block; } +.vcard .fn { font-weight: bold; font-size: 0.9375em; } + +.vevent .summary { font-weight: bold; } +.vevent abbr { cursor: auto; text-decoration: none; font-weight: bold; border: none; padding: 0 0.0625em; } + +@media only screen and (min-width: 768px) { h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.4; } + h1 { font-size: 2.75em; } + h2 { font-size: 2.3125em; } + h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.6875em; } + h4 { font-size: 1.4375em; } } +/* Tables */ +table { background: white; margin-bottom: 1.25em; border: solid 0 #dddddd; } +table thead, table tfoot { background: none; font-weight: bold; } +table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { padding: 1px 8px 1px 5px; font-size: 1em; color: #222222; text-align: left; } +table tr th, table tr td { padding: 1px 8px 1px 5px; font-size: 1em; color: #222222; } +table tr.even, table tr.alt, table tr:nth-of-type(even) { background: none; } +table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { display: table-cell; line-height: 1.5; } + +body { tab-size: 4; word-wrap: anywhere; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; } + +table { word-wrap: normal; } + +h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.4; } + +object, svg { display: inline-block; vertical-align: middle; } + +.center { margin-left: auto; margin-right: auto; } + +.stretch { width: 100%; } + +.clearfix:before, .clearfix:after, .float-group:before, .float-group:after { content: " "; display: table; } +.clearfix:after, .float-group:after { clear: both; } + +:not(pre).nobreak { word-wrap: normal; } +:not(pre).nowrap { white-space: nowrap; } +:not(pre).pre-wrap { white-space: pre-wrap; } + +:not(pre):not([class^=L]) > code { font-size: 0.95em; font-style: normal !important; letter-spacing: 0; padding: 0; background-color: #f2f2f2; -webkit-border-radius: 6px; border-radius: 6px; line-height: inherit; } + +pre { color: inherit; font-family: "Consolas", "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", monospace; line-height: 1.2; } +pre code, pre pre { color: inherit; font-size: inherit; line-height: inherit; } +pre > code { display: block; } + +pre.nowrap, pre.nowrap pre { white-space: pre; word-wrap: normal; } + +em em { font-style: normal; } + +strong strong { font-weight: normal; } + +.keyseq { color: #333333; } + +kbd { font-family: "Consolas", "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", monospace; display: inline-block; color: black; font-size: 0.65em; line-height: 1.45; background-color: #f7f7f7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; margin: 0 0.15em; padding: 0.2em 0.5em; vertical-align: middle; position: relative; top: -0.1em; white-space: nowrap; } + +.keyseq kbd:first-child { margin-left: 0; } + +.keyseq kbd:last-child { margin-right: 0; } + +.menuseq, .menuref { color: #000; } + +.menuseq b:not(.caret), .menuref { font-weight: inherit; } + +.menuseq { word-spacing: -0.02em; } +.menuseq b.caret { font-size: 1.25em; line-height: 0.8; } +.menuseq i.caret { font-weight: bold; text-align: center; width: 0.45em; } + +b.button:before, b.button:after { position: relative; top: -1px; font-weight: normal; } + +b.button:before { content: "["; padding: 0 3px 0 2px; } + +b.button:after { content: "]"; padding: 0 2px 0 3px; } + +p a > code:hover { color: #373737; } + +#header, #content, #footnotes, #footer { width: 100%; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 62.5em; *zoom: 1; position: relative; padding-left: 0.9375em; padding-right: 0.9375em; } +#header:before, #header:after, #content:before, #content:after, #footnotes:before, #footnotes:after, #footer:before, #footer:after { content: " "; display: table; } +#header:after, #content:after, #footnotes:after, #footer:after { clear: both; } + +#content { margin-top: 1.25em; } + +#content:before { content: none; } + +#header > h1:first-child { color: #111111; margin-top: 2.25rem; margin-bottom: 0; } +#header > h1:first-child + #toc { margin-top: 8px; border-top: 1px solid #dddddd; } +#header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border-bottom: 1px solid #dddddd; padding-bottom: 8px; } +#header .details { border-bottom: 1px solid #dddddd; line-height: 1.45; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 0.25em; color: #748590; display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; } +#header .details span:first-child { margin-left: -0.125em; } +#header .details span.email a { color: #909ea7; } +#header .details br { display: none; } +#header .details br + span:before { content: "\00a0\2013\00a0"; } +#header .details br + span.author:before { content: "\00a0\22c5\00a0"; color: #909ea7; } +#header .details br + span#revremark:before { content: "\00a0|\00a0"; } +#header #revnumber { text-transform: capitalize; } +#header #revnumber:after { content: "\00a0"; } + +#content > h1:first-child:not([class]) { color: #111111; border-bottom: 1px solid #dddddd; padding-bottom: 8px; margin-top: 0; padding-top: 1rem; margin-bottom: 1.25rem; } + +#toc { border-bottom: 1px solid #dddddd; padding-bottom: 0.5em; } +#toc > ul { margin-left: 0.125em; } +#toc ul.sectlevel0 > li > a { font-style: italic; } +#toc ul.sectlevel0 ul.sectlevel1 { margin: 0.5em 0; } +#toc ul { font-family: ff-meta-web-pro-1, ff-meta-web-pro-2, Arial, "Helvetica Neue", sans-serif; list-style-type: none; } +#toc li { line-height: 1.3334; margin-top: 0.3334em; } +#toc a { text-decoration: none; } +#toc a:active { text-decoration: underline; } + +#toctitle { color: #6c818f; font-size: 1.2em; } + +@media only screen and (min-width: 768px) { #toctitle { font-size: 1.375em; } + body.toc2 { padding-left: 15em; padding-right: 0; } + #toc.toc2 { margin-top: 0 !important; background: #f2f2f2; position: fixed; width: 15em; left: 0; top: 0; border-right: 1px solid #dddddd; border-top-width: 0 !important; border-bottom-width: 0 !important; z-index: 1000; padding: 1.25em 1em; height: 100%; overflow: auto; } + #toc.toc2 #toctitle { margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2em; } + #toc.toc2 > ul { font-size: 0.9em; margin-bottom: 0; } + #toc.toc2 ul ul { margin-left: 0; padding-left: 1em; } + #toc.toc2 ul.sectlevel0 ul.sectlevel1 { padding-left: 0; margin-top: 0.5em; margin-bottom: 0.5em; } + body.toc2.toc-right { padding-left: 0; padding-right: 15em; } + body.toc2.toc-right #toc.toc2 { border-right-width: 0; border-left: 1px solid #dddddd; left: auto; right: 0; } } +@media only screen and (min-width: 1280px) { body.toc2 { padding-left: 20em; padding-right: 0; } + #toc.toc2 { width: 20em; } + #toc.toc2 #toctitle { font-size: 1.375em; } + #toc.toc2 > ul { font-size: 0.95em; } + #toc.toc2 ul ul { padding-left: 1.25em; } + body.toc2.toc-right { padding-left: 0; padding-right: 20em; } } +#content #toc { border-style: solid; border-width: 1px; border-color: #d9d9d9; margin-bottom: 1.25em; padding: 1.25em; background: #f2f2f2; -webkit-border-radius: 6px; border-radius: 6px; } +#content #toc > :first-child { margin-top: 0; } +#content #toc > :last-child { margin-bottom: 0; } + +#footer { max-width: none; background: black; padding: 1.25em; } + +#footer-text { color: white; line-height: 1.35; } + +#content { margin-bottom: 0.625em; } + +.sect1 { padding-bottom: 0.625em; } + +@media only screen and (min-width: 768px) { #content { margin-bottom: 1.25em; } + .sect1 { padding-bottom: 1.25em; } } +.sect1:last-child { padding-bottom: 0; } + +.sect1 + .sect1 { border-top: 1px solid #dddddd; } + +#content h1 > a.anchor, h2 > a.anchor, h3 > a.anchor, #toctitle > a.anchor, .sidebarblock > .content > .title > a.anchor, h4 > a.anchor, h5 > a.anchor, h6 > a.anchor { position: absolute; z-index: 1001; width: 1.5ex; margin-left: -1.5ex; display: block; text-decoration: none !important; visibility: hidden; text-align: center; font-weight: normal; } +#content h1 > a.anchor:before, h2 > a.anchor:before, h3 > a.anchor:before, #toctitle > a.anchor:before, .sidebarblock > .content > .title > a.anchor:before, h4 > a.anchor:before, h5 > a.anchor:before, h6 > a.anchor:before { content: "\00A7"; font-size: 0.85em; display: block; padding-top: 0.1em; } +#content h1:hover > a.anchor, #content h1 > a.anchor:hover, h2:hover > a.anchor, h2 > a.anchor:hover, h3:hover > a.anchor, #toctitle:hover > a.anchor, .sidebarblock > .content > .title:hover > a.anchor, h3 > a.anchor:hover, #toctitle > a.anchor:hover, .sidebarblock > .content > .title > a.anchor:hover, h4:hover > a.anchor, h4 > a.anchor:hover, h5:hover > a.anchor, h5 > a.anchor:hover, h6:hover > a.anchor, h6 > a.anchor:hover { visibility: visible; } +#content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link { color: #465158; text-decoration: none; } +#content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover { color: #3b444a; } + +details, .audioblock, .imageblock, .literalblock, .listingblock, .stemblock, .videoblock { margin-bottom: 1.25em; } + +details > summary:first-of-type { cursor: pointer; display: list-item; outline: none; margin-bottom: 0.75em; } + +.admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-rendering: optimizeLegibility; text-align: left; } + +table.tableblock.fit-content > caption.title { white-space: nowrap; width: 0; } + +.paragraph.lead > p, #preamble > .sectionbody > [class="paragraph"]:first-of-type p { font-size: 1.21875em; line-height: 1.6; color: #111111; } + +table.tableblock #preamble > .sectionbody > [class="paragraph"]:first-of-type p { font-size: inherit; } + +.admonitionblock > table { border-collapse: separate; border: 0; background: none; width: 100%; } +.admonitionblock > table td.icon { text-align: center; width: 80px; } +.admonitionblock > table td.icon img { max-width: none; } +.admonitionblock > table td.icon .title { font-weight: bold; font-family: ff-meta-web-pro-1, ff-meta-web-pro-2, Arial, "Helvetica Neue", sans-serif; text-transform: uppercase; } +.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #748590; word-wrap: anywhere; } +.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } + +.exampleblock > .content { border-style: solid; border-width: 1px; border-color: #e6e6e6; margin-bottom: 1.25em; padding: 1.25em; background: white; -webkit-border-radius: 6px; border-radius: 6px; } +.exampleblock > .content > :first-child { margin-top: 0; } +.exampleblock > .content > :last-child { margin-bottom: 0; } + +.sidebarblock { border-style: solid; border-width: 1px; border-color: #d4d4d4; margin-bottom: 1.25em; padding: 1.25em; background: #ededed; -webkit-border-radius: 6px; border-radius: 6px; } +.sidebarblock > :first-child { margin-top: 0; } +.sidebarblock > :last-child { margin-bottom: 0; } +.sidebarblock > .content > .title { color: #6c818f; margin-top: 0; } + +.exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child, .exampleblock > .content .qlist > ol > li:last-child > :last-child, .sidebarblock > .content > :last-child > :last-child, .sidebarblock > .content .olist > ol > li:last-child > :last-child, .sidebarblock > .content .ulist > ul > li:last-child > :last-child, .sidebarblock > .content .qlist > ol > li:last-child > :last-child { margin-bottom: 0; } + +.literalblock pre, .listingblock > .content > pre { border: 1px solid #cccccc; -webkit-border-radius: 6px; border-radius: 6px; overflow-x: auto; padding: 0.5em; font-size: 0.8125em; } +@media only screen and (min-width: 768px) { .literalblock pre, .listingblock > .content > pre { font-size: 0.90625em; } } +@media only screen and (min-width: 1280px) { .literalblock pre, .listingblock > .content > pre { font-size: 1em; } } + +.literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class="highlight"], .listingblock > .content > pre[class^="highlight "] { background: #eeeeee; } + +.literalblock.output pre { color: #eeeeee; background-color: inherit; } + +.listingblock > .content { position: relative; } + +.listingblock code[data-lang]:before { display: none; content: attr(data-lang); position: absolute; font-size: 0.75em; top: 0.425rem; right: 0.5rem; line-height: 1; text-transform: uppercase; color: inherit; opacity: 0.5; } + +.listingblock:hover code[data-lang]:before { display: block; } + +.listingblock.terminal pre .command:before { content: attr(data-prompt); padding-right: 0.5em; color: inherit; opacity: 0.5; } + +.listingblock.terminal pre .command:not([data-prompt]):before { content: "$"; } + +.listingblock pre.highlightjs { padding: 0; } +.listingblock pre.highlightjs > code { padding: 0.5em; -webkit-border-radius: 6px; border-radius: 6px; } + +.prettyprint { background: #eeeeee; } + +pre.prettyprint .linenums { line-height: 1.2; margin-left: 2em; } + +pre.prettyprint li { background: none; list-style-type: inherit; padding-left: 0; } + +pre.prettyprint li code[data-lang]:before { opacity: 1; } + +pre.prettyprint li:not(:first-child) code[data-lang]:before { display: none; } + +table.linenotable { border-collapse: separate; border: 0; margin-bottom: 0; background: none; } +table.linenotable td[class] { color: inherit; vertical-align: top; padding: 0; line-height: inherit; white-space: normal; } +table.linenotable td.code { padding-left: 0.75em; } +table.linenotable td.linenos { border-right: 1px solid currentColor; opacity: 0.35; padding-right: 0.5em; } + +pre.pygments .lineno { border-right: 1px solid currentColor; opacity: 0.35; display: inline-block; margin-right: 0.75em; } +pre.pygments .lineno:before { content: ""; margin-right: -0.125em; } + +.quoteblock { margin: 0 1em 1.25em 1.5em; display: table; } +.quoteblock:not(.excerpt) > .title { margin-left: -1.5em; margin-bottom: 0.75em; } +.quoteblock blockquote, .quoteblock p { color: #909ea7; font-size: 1.15rem; line-height: 1.75; word-spacing: 0.1em; letter-spacing: 0; font-style: italic; text-align: justify; } +.quoteblock blockquote { margin: 0; padding: 0; border: 0; } +.quoteblock blockquote:before { content: "\201c"; float: left; font-size: 2.75em; font-weight: bold; line-height: 0.6em; margin-left: -0.6em; color: #6c818f; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } +.quoteblock blockquote > .paragraph:last-child p { margin-bottom: 0; } +.quoteblock .attribution { margin-top: 0.75em; margin-right: 0.5ex; text-align: right; } + +.verseblock { margin: 0 1em 1.25em 1em; } +.verseblock pre { font-family: "Open Sans", "DejaVu Sans", sans; font-size: 1.15rem; color: #909ea7; font-weight: 300; text-rendering: optimizeLegibility; } +.verseblock pre strong { font-weight: 400; } +.verseblock .attribution { margin-top: 1.25rem; margin-left: 0.5ex; } + +.quoteblock .attribution, .verseblock .attribution { font-size: 0.8125em; line-height: 1.45; font-style: italic; } +.quoteblock .attribution br, .verseblock .attribution br { display: none; } +.quoteblock .attribution cite, .verseblock .attribution cite { display: block; letter-spacing: -0.025em; color: #748590; } + +.quoteblock.abstract blockquote:before, .quoteblock.excerpt blockquote:before, .quoteblock .quoteblock blockquote:before { display: none; } +.quoteblock.abstract blockquote, .quoteblock.abstract p, .quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p { line-height: 1.6; word-spacing: 0; } +.quoteblock.abstract { margin: 0 1em 1.25em 1em; display: block; } +.quoteblock.abstract > .title { margin: 0 0 0.375em 0; font-size: 1.15em; text-align: center; } +.quoteblock.excerpt > blockquote, .quoteblock .quoteblock { padding: 0 0 0.25em 1em; border-left: 0.25em solid #dddddd; } +.quoteblock.excerpt, .quoteblock .quoteblock { margin-left: 0; } +.quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p { color: inherit; font-size: 1.0625rem; } +.quoteblock.excerpt .attribution, .quoteblock .quoteblock .attribution { color: inherit; text-align: left; margin-right: 0; } + +p.tableblock:last-child { margin-bottom: 0; } + +td.tableblock > .content { margin-bottom: 1.25em; word-wrap: anywhere; } +td.tableblock > .content > :last-child { margin-bottom: -1.25em; } + +table.tableblock, th.tableblock, td.tableblock { border: 0 solid #dddddd; } + +table.grid-all > * > tr > * { border-width: 0; } + +table.grid-cols > * > tr > * { border-width: 0 0; } + +table.grid-rows > * > tr > * { border-width: 0 0; } + +table.frame-all { border-width: 0; } + +table.frame-ends { border-width: 0 0; } + +table.frame-sides { border-width: 0 0; } + +table.frame-none > colgroup + * > :first-child > *, table.frame-sides > colgroup + * > :first-child > * { border-top-width: 0; } + +table.frame-none > :last-child > :last-child > *, table.frame-sides > :last-child > :last-child > * { border-bottom-width: 0; } + +table.frame-none > * > tr > :first-child, table.frame-ends > * > tr > :first-child { border-left-width: 0; } + +table.frame-none > * > tr > :last-child, table.frame-ends > * > tr > :last-child { border-right-width: 0; } + +table.stripes-all tr, table.stripes-odd tr:nth-of-type(odd), table.stripes-even tr:nth-of-type(even), table.stripes-hover tr:hover { background: none; } + +th.halign-left, td.halign-left { text-align: left; } + +th.halign-right, td.halign-right { text-align: right; } + +th.halign-center, td.halign-center { text-align: center; } + +th.valign-top, td.valign-top { vertical-align: top; } + +th.valign-bottom, td.valign-bottom { vertical-align: bottom; } + +th.valign-middle, td.valign-middle { vertical-align: middle; } + +table thead th, table tfoot th { font-weight: bold; } + +tbody tr th { display: table-cell; line-height: 1.5; background: none; } + +tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p { color: #222222; font-weight: bold; } + +p.tableblock > code:only-child { background: none; padding: 0; } + +p.tableblock { font-size: 1em; } + +ol { margin-left: 0.25em; } + +ul li ol { margin-left: 0; } + +dl dd { margin-left: 1.125em; } + +dl dd:last-child, dl dd:last-child > :last-child { margin-bottom: 0; } + +ol > li p, ul > li p, ul dd, ol dd, .olist .olist, .ulist .ulist, .ulist .olist, .olist .ulist { margin-bottom: 0.625em; } + +ul.checklist, ul.none, ol.none, ul.no-bullet, ol.no-bullet, ol.unnumbered, ul.unstyled, ol.unstyled { list-style-type: none; } + +ul.no-bullet, ol.no-bullet, ol.unnumbered { margin-left: 0.625em; } + +ul.unstyled, ol.unstyled { margin-left: 0; } + +ul.checklist { margin-left: 0.625em; } + +ul.checklist li > p:first-child > .fa-square-o:first-child, ul.checklist li > p:first-child > .fa-check-square-o:first-child { width: 1.25em; font-size: 0.8em; position: relative; bottom: 0.125em; } + +ul.checklist li > p:first-child > input[type="checkbox"]:first-child { margin-right: 0.25em; } + +ul.inline { display: -ms-flexbox; display: -webkit-box; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; list-style: none; margin: 0 0 0.625em -1.25em; } + +ul.inline > li { margin-left: 1.25em; } + +.unstyled dl dt { font-weight: normal; font-style: normal; } + +ol.arabic { list-style-type: decimal; } + +ol.decimal { list-style-type: decimal-leading-zero; } + +ol.loweralpha { list-style-type: lower-alpha; } + +ol.upperalpha { list-style-type: upper-alpha; } + +ol.lowerroman { list-style-type: lower-roman; } + +ol.upperroman { list-style-type: upper-roman; } + +ol.lowergreek { list-style-type: lower-greek; } + +.hdlist > table, .colist > table { border: 0; background: none; } +.hdlist > table > tbody > tr, .colist > table > tbody > tr { background: none; } + +td.hdlist1, td.hdlist2 { vertical-align: top; padding: 0 0.625em; } + +td.hdlist1 { font-weight: bold; padding-bottom: 1.25em; } + +td.hdlist2 { word-wrap: anywhere; } + +.literalblock + .colist, .listingblock + .colist { margin-top: -0.5em; } + +.colist td:not([class]):first-child { padding: 0.4em 0.75em 0 0.75em; line-height: 1; vertical-align: top; } +.colist td:not([class]):first-child img { max-width: none; } +.colist td:not([class]):last-child { padding: 0.25em 0; } + +.thumb, .th { line-height: 0; display: inline-block; border: solid 4px white; -webkit-box-shadow: 0 0 0 1px #dddddd; box-shadow: 0 0 0 1px #dddddd; } + +.imageblock.left { margin: 0.25em 0.625em 1.25em 0; } +.imageblock.right { margin: 0.25em 0 1.25em 0.625em; } +.imageblock > .title { margin-bottom: 0; } +.imageblock.thumb, .imageblock.th { border-width: 6px; } +.imageblock.thumb > .title, .imageblock.th > .title { padding: 0 0.125em; } + +.image.left, .image.right { margin-top: 0.25em; margin-bottom: 0.25em; display: inline-block; line-height: 0; } +.image.left { margin-right: 0.625em; } +.image.right { margin-left: 0.625em; } + +a.image { text-decoration: none; display: inline-block; } +a.image object { pointer-events: none; } + +sup.footnote, sup.footnoteref { font-size: 0.875em; position: static; vertical-align: super; } +sup.footnote a, sup.footnoteref a { text-decoration: none; } +sup.footnote a:active, sup.footnoteref a:active { text-decoration: underline; } + +#footnotes { padding-top: 0.75em; padding-bottom: 0.75em; margin-bottom: 0.625em; } +#footnotes hr { width: 20%; min-width: 6.25em; margin: -0.25em 0 0.75em 0; border-width: 1px 0 0 0; } +#footnotes .footnote { padding: 0 0.375em 0 0.225em; line-height: 1.3334; font-size: 0.875em; margin-left: 1.2em; margin-bottom: 0.2em; } +#footnotes .footnote a:first-of-type { font-weight: bold; text-decoration: none; margin-left: -1.05em; } +#footnotes .footnote:last-of-type { margin-bottom: 0; } +#content #footnotes { margin-top: -0.625em; margin-bottom: 0; padding: 0.75em 0; } + +.gist .file-data > table { border: 0; background: #fff; width: 100%; margin-bottom: 0; } +.gist .file-data > table td.line-data { width: 99%; } + +div.unbreakable { page-break-inside: avoid; } + +.big { font-size: larger; } + +.small { font-size: smaller; } + +.underline { text-decoration: underline; } + +.overline { text-decoration: overline; } + +.line-through { text-decoration: line-through; } + +.aqua { color: #00bfbf; } + +.aqua-background { background-color: #00fafa; } + +.black { color: black; } + +.black-background { background-color: black; } + +.blue { color: #0000bf; } + +.blue-background { background-color: #0000fa; } + +.fuchsia { color: #bf00bf; } + +.fuchsia-background { background-color: #fa00fa; } + +.gray { color: #606060; } + +.gray-background { background-color: #7d7d7d; } + +.green { color: #006000; } + +.green-background { background-color: #007d00; } + +.lime { color: #00bf00; } + +.lime-background { background-color: #00fa00; } + +.maroon { color: #600000; } + +.maroon-background { background-color: #7d0000; } + +.navy { color: #000060; } + +.navy-background { background-color: #00007d; } + +.olive { color: #606000; } + +.olive-background { background-color: #7d7d00; } + +.purple { color: #600060; } + +.purple-background { background-color: #7d007d; } + +.red { color: #bf0000; } + +.red-background { background-color: #fa0000; } + +.silver { color: #909090; } + +.silver-background { background-color: #bcbcbc; } + +.teal { color: #006060; } + +.teal-background { background-color: #007d7d; } + +.white { color: #bfbfbf; } + +.white-background { background-color: #fafafa; } + +.yellow { color: #bfbf00; } + +.yellow-background { background-color: #fafa00; } + +span.icon > .fa { cursor: default; } +a span.icon > .fa { cursor: inherit; } + +.admonitionblock td.icon [class^="fa icon-"] { font-size: 2.5em; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); cursor: default; } +.admonitionblock td.icon .icon-note:before { content: "\f05a"; color: #333333; } +.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 0.8); color: #111; } +.admonitionblock td.icon .icon-warning:before { content: "\f071"; color: #bf6900; } +.admonitionblock td.icon .icon-caution:before { content: "\f06d"; color: #bf3400; } +.admonitionblock td.icon .icon-important:before { content: "\f06a"; color: #bf0000; } + +.conum[data-value] { display: inline-block; color: #fff !important; background-color: black; -webkit-border-radius: 50%; border-radius: 50%; text-align: center; font-size: 0.75em; width: 1.67em; height: 1.67em; line-height: 1.67em; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-style: normal; font-weight: bold; } +.conum[data-value] * { color: #fff !important; } +.conum[data-value] + b { display: none; } +.conum[data-value]:after { content: attr(data-value); } +pre .conum[data-value] { position: relative; top: -0.125em; } + +b.conum * { color: inherit !important; } + +.conum:not([data-value]):empty { display: none; } + +h4 { color: #6c818f; } + +.literalblock > .content > pre, .listingblock > .content > pre { -webkit-border-radius: 6px; border-radius: 6px; margin-left: 2em; margin-right: 2em; } + +.admonitionblock { margin-left: 2em; margin-right: 2em; } +.admonitionblock > table { border: 1px solid #609060; border-top-width: 1.5em; background-color: #e9ffe9; border-collapse: separate; -webkit-border-radius: 0; border-radius: 0; } +.admonitionblock > table td.icon { padding-top: .5em; padding-bottom: .5em; } +.admonitionblock > table td.content { padding: .5em 1em; color: black; font-size: .9em; border-left: none; } + +.sidebarblock { background-color: #e8ecef; border-color: #ccc; } +.sidebarblock > .content > .title { color: #444444; } + +table.tableblock.grid-all { border-collapse: collapse; -webkit-border-radius: 0; border-radius: 0; } +table.tableblock.grid-all th.tableblock, table.tableblock.grid-all td.tableblock { border-bottom: 1px solid #aaa; } + +#footer { background-color: #465158; padding: 2em; } + +#footer-text { color: #eee; font-size: 0.8em; text-align: center; } diff --git a/doc/src/stylesheets/readthedocs.css-2024.02.02 b/doc/src/stylesheets/readthedocs.css-2024.02.02 new file mode 100644 index 0000000..ea94d04 --- /dev/null +++ b/doc/src/stylesheets/readthedocs.css-2024.02.02 @@ -0,0 +1,739 @@ +/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ +/* ========================================================================== HTML5 display definitions ========================================================================== */ +/** Correct `block` display not defined in IE 8/9. */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } + +/** Correct `inline-block` display not defined in IE 8/9. */ +audio, canvas, video { display: inline-block; } + +/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ +audio:not([controls]) { display: none; height: 0; } + +/** Address `[hidden]` styling not present in IE 8/9. Hide the `template` element in IE, Safari, and Firefox < 22. */ +[hidden], template { display: none; } + +script { display: none !important; } + +/* ========================================================================== Base ========================================================================== */ +/** 1. Set default font family to sans-serif. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */ +html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } + +/** Remove default margin. */ +body { margin: 0; } + +/* ========================================================================== Links ========================================================================== */ +/** Remove the gray background color from active links in IE 10. */ +a { background: transparent; } + +/** Address `outline` inconsistency between Chrome and other browsers. */ +a:focus { outline: thin dotted; } + +/** Improve readability when focused and also mouse hovered in all browsers. */ +a:active, a:hover { outline: 0; } + +/* ========================================================================== Typography ========================================================================== */ +/** Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari 5, and Chrome. */ +h1 { font-size: 2em; margin: 0.67em 0; } + +/** Address styling not present in IE 8/9, Safari 5, and Chrome. */ +abbr[title] { border-bottom: 1px dotted; } + +/** Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ +b, strong { font-weight: bold; } + +/** Address styling not present in Safari 5 and Chrome. */ +dfn { font-style: italic; } + +/** Address differences between Firefox and other browsers. */ +hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } + +/** Address styling not present in IE 8/9. */ +mark { background: #ff0; color: #000; } + +/** Correct font family set oddly in Safari 5 and Chrome. */ +code, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; } + +/** Improve readability of pre-formatted text in all browsers. */ +pre { white-space: pre-wrap; } + +/** Set consistent quote types. */ +q { quotes: "\201C" "\201D" "\2018" "\2019"; } + +/** Address inconsistent and variable font size in all browsers. */ +small { font-size: 80%; } + +/** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } + +sup { top: -0.5em; } + +sub { bottom: -0.25em; } + +/* ========================================================================== Embedded content ========================================================================== */ +/** Remove border when inside `a` element in IE 8/9. */ +img { border: 0; } + +/** Correct overflow displayed oddly in IE 9. */ +svg:not(:root) { overflow: hidden; } + +/* ========================================================================== Figures ========================================================================== */ +/** Address margin not present in IE 8/9 and Safari 5. */ +figure { margin: 0; } + +/* ========================================================================== Forms ========================================================================== */ +/** Define consistent border, margin, and padding. */ +fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } + +/** 1. Correct `color` not being inherited in IE 8/9. 2. Remove padding so people aren't caught out if they zero out fieldsets. */ +legend { border: 0; /* 1 */ padding: 0; /* 2 */ } + +/** 1. Correct font family not being inherited in all browsers. 2. Correct font size not being inherited in all browsers. 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ +button, input, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 2 */ margin: 0; /* 3 */ } + +/** Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ +button, input { line-height: normal; } + +/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. Correct `select` style inheritance in Firefox 4+ and Opera. */ +button, select { text-transform: none; } + +/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. */ +button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } + +/** Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { cursor: default; } + +/** 1. Address box sizing set to `content-box` in IE 8/9. 2. Remove excess padding in IE 8/9. */ +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } + +/** 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome (include `-moz` to future-proof). */ +input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } + +/** Remove inner padding and search cancel button in Safari 5 and Chrome on OS X. */ +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/** Remove inner padding and border in Firefox 4+. */ +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/** 1. Remove default vertical scrollbar in IE 8/9. 2. Improve readability and alignment in all browsers. */ +textarea { overflow: auto; /* 1 */ vertical-align: top; /* 2 */ } + +/* ========================================================================== Tables ========================================================================== */ +/** Remove most spacing between table cells. */ +table { border-collapse: collapse; border-spacing: 0; } + +meta.foundation-mq-small { font-family: "only screen and (min-width: 768px)"; width: 768px; } + +meta.foundation-mq-medium { font-family: "only screen and (min-width:1280px)"; width: 1280px; } + +meta.foundation-mq-large { font-family: "only screen and (min-width:1440px)"; width: 1440px; } + +*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } + +html, body { font-size: 100%; } + +body { background: white; color: #222222; padding: 0; margin: 0; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; line-height: 1; position: relative; cursor: auto; } + +a:hover { cursor: pointer; } + +img, object, embed { max-width: 100%; height: auto; } + +object, embed { height: 100%; } + +img { -ms-interpolation-mode: bicubic; } + +#map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object { max-width: none !important; } + +.left { float: left !important; } + +.right { float: right !important; } + +.text-left { text-align: left !important; } + +.text-right { text-align: right !important; } + +.text-center { text-align: center !important; } + +.text-justify { text-align: justify !important; } + +.hide { display: none; } + +.antialiased { -webkit-font-smoothing: antialiased; } + +img { display: inline-block; vertical-align: middle; } + +textarea { height: auto; min-height: 50px; } + +select { width: 100%; } + +p.lead { font-size: 1.21875em; line-height: 1.6; } + +.subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { line-height: 1.4; color: #6c818f; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } + +/* Typography resets */ +div, dl, dt, dd, ul, ol, li, h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; direction: ltr; } + +/* Default Link Styles */ +a { color: #444444; text-decoration: underline; line-height: inherit; } +a:hover, a:focus { color: #111111; } +a img { border: none; } + +/* Default paragraph styles */ +p { font-family: inherit; font-weight: normal; font-size: 1em; line-height: 1.5; margin-bottom: 1.25em; text-rendering: optimizeLegibility; } +p aside { font-size: 0.875em; line-height: 1.35; font-style: italic; } + +/* Default header styles */ +h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { font-family: ff-meta-web-pro-1, ff-meta-web-pro-2, Arial, "Helvetica Neue", sans-serif; font-weight: bold; font-style: normal; color: #465158; text-rendering: optimizeLegibility; margin-top: 1em; margin-bottom: 0.5em; line-height: 1.2125em; } +h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small { font-size: 60%; color: #909ea7; line-height: 0; } + +h1 { font-size: 2.125em; } + +h2 { font-size: 1.6875em; } + +h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.375em; } + +h4 { font-size: 1.125em; } + +h5 { font-size: 1.125em; } + +h6 { font-size: 1em; } + +hr { border: solid #dddddd; border-width: 1px 0 0; clear: both; margin: 1.25em 0 1.1875em; height: 0; } + +/* Helpful Typography Defaults */ +em, i { font-style: italic; line-height: inherit; } + +strong, b { font-weight: bold; line-height: inherit; } + +small { font-size: 60%; line-height: inherit; } + +code { font-family: "Consolas", "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", monospace; font-weight: normal; color: #444444; } + +/* Lists */ +ul, ol, dl { font-size: 1em; line-height: 1.5; margin-bottom: 1.25em; list-style-position: outside; font-family: inherit; } + +ul, ol { margin-left: 0; } +ul.no-bullet, ol.no-bullet { margin-left: 0; } + +/* Unordered Lists */ +ul li ul, ul li ol { margin-left: 1.25em; margin-bottom: 0; font-size: 1em; /* Override nested font-size change */ } +ul.square li ul, ul.circle li ul, ul.disc li ul { list-style: inherit; } +ul.square { list-style-type: square; } +ul.circle { list-style-type: circle; } +ul.disc { list-style-type: disc; } +ul.no-bullet { list-style: none; } + +/* Ordered Lists */ +ol li ul, ol li ol { margin-left: 1.25em; margin-bottom: 0; } + +/* Definition Lists */ +dl dt { margin-bottom: 0.3em; font-weight: bold; } +dl dd { margin-bottom: 0.75em; } + +/* Abbreviations */ +abbr, acronym { text-transform: uppercase; font-size: 90%; color: black; border-bottom: 1px dotted #dddddd; cursor: help; } + +abbr { text-transform: none; } + +/* Blockquotes */ +blockquote { margin: 0 0 1.25em; padding: 0.5625em 1.25em 0 1.1875em; border-left: 1px solid #dddddd; } +blockquote cite { display: block; font-size: 0.8125em; color: #748590; } +blockquote cite:before { content: "\2014 \0020"; } +blockquote cite a, blockquote cite a:visited { color: #748590; } + +blockquote, blockquote p { line-height: 1.5; color: #909ea7; } + +/* Microformats */ +.vcard { display: inline-block; margin: 0 0 1.25em 0; border: 1px solid #dddddd; padding: 0.625em 0.75em; } +.vcard li { margin: 0; display: block; } +.vcard .fn { font-weight: bold; font-size: 0.9375em; } + +.vevent .summary { font-weight: bold; } +.vevent abbr { cursor: auto; text-decoration: none; font-weight: bold; border: none; padding: 0 0.0625em; } + +@media only screen and (min-width: 768px) { h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.4; } + h1 { font-size: 2.75em; } + h2 { font-size: 2.3125em; } + h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.6875em; } + h4 { font-size: 1.4375em; } } +/* Tables */ +table { background: white; margin-bottom: 1.25em; border: solid 0 #dddddd; } +table thead, table tfoot { background: none; font-weight: bold; } +table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { padding: 1px 8px 1px 5px; font-size: 1em; color: #222222; text-align: left; } +table tr th, table tr td { padding: 1px 8px 1px 5px; font-size: 1em; color: #222222; } +table tr.even, table tr.alt, table tr:nth-of-type(even) { background: none; } +table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { display: table-cell; line-height: 1.5; } + +body { tab-size: 4; word-wrap: anywhere; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; } + +table { word-wrap: normal; } + +h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.4; } + +object, svg { display: inline-block; vertical-align: middle; } + +.center { margin-left: auto; margin-right: auto; } + +.stretch { width: 100%; } + +.clearfix:before, .clearfix:after, .float-group:before, .float-group:after { content: " "; display: table; } +.clearfix:after, .float-group:after { clear: both; } + +:not(pre).nobreak { word-wrap: normal; } +:not(pre).nowrap { white-space: nowrap; } +:not(pre).pre-wrap { white-space: pre-wrap; } + +:not(pre):not([class^=L]) > code { font-size: 0.95em; font-style: normal !important; letter-spacing: 0; padding: 0; background-color: #f2f2f2; -webkit-border-radius: 6px; border-radius: 6px; line-height: inherit; } + +pre { color: inherit; font-family: "Consolas", "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", monospace; line-height: 1.2; } +pre code, pre pre { color: inherit; font-size: inherit; line-height: inherit; } +pre > code { display: block; } + +pre.nowrap, pre.nowrap pre { white-space: pre; word-wrap: normal; } + +em em { font-style: normal; } + +strong strong { font-weight: normal; } + +.keyseq { color: #333333; } + +kbd { font-family: "Consolas", "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", monospace; display: inline-block; color: black; font-size: 0.65em; line-height: 1.45; background-color: #f7f7f7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; margin: 0 0.15em; padding: 0.2em 0.5em; vertical-align: middle; position: relative; top: -0.1em; white-space: nowrap; } + +.keyseq kbd:first-child { margin-left: 0; } + +.keyseq kbd:last-child { margin-right: 0; } + +.menuseq, .menuref { color: #000; } + +.menuseq b:not(.caret), .menuref { font-weight: inherit; } + +.menuseq { word-spacing: -0.02em; } +.menuseq b.caret { font-size: 1.25em; line-height: 0.8; } +.menuseq i.caret { font-weight: bold; text-align: center; width: 0.45em; } + +b.button:before, b.button:after { position: relative; top: -1px; font-weight: normal; } + +b.button:before { content: "["; padding: 0 3px 0 2px; } + +b.button:after { content: "]"; padding: 0 2px 0 3px; } + +p a > code:hover { color: #373737; } + +#header, #content, #footnotes, #footer { width: 100%; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 62.5em; *zoom: 1; position: relative; padding-left: 0.9375em; padding-right: 0.9375em; } +#header:before, #header:after, #content:before, #content:after, #footnotes:before, #footnotes:after, #footer:before, #footer:after { content: " "; display: table; } +#header:after, #content:after, #footnotes:after, #footer:after { clear: both; } + +#content { margin-top: 1.25em; } + +#content:before { content: none; } + +#header > h1:first-child { color: #111111; margin-top: 2.25rem; margin-bottom: 0; } +#header > h1:first-child + #toc { margin-top: 8px; border-top: 1px solid #dddddd; } +#header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border-bottom: 1px solid #dddddd; padding-bottom: 8px; } +#header .details { border-bottom: 1px solid #dddddd; line-height: 1.45; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 0.25em; color: #748590; display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; } +#header .details span:first-child { margin-left: -0.125em; } +#header .details span.email a { color: #909ea7; } +#header .details br { display: none; } +#header .details br + span:before { content: "\00a0\2013\00a0"; } +#header .details br + span.author:before { content: "\00a0\22c5\00a0"; color: #909ea7; } +#header .details br + span#revremark:before { content: "\00a0|\00a0"; } +#header #revnumber { text-transform: capitalize; } +#header #revnumber:after { content: "\00a0"; } + +#content > h1:first-child:not([class]) { color: #111111; border-bottom: 1px solid #dddddd; padding-bottom: 8px; margin-top: 0; padding-top: 1rem; margin-bottom: 1.25rem; } + +#toc { border-bottom: 1px solid #dddddd; padding-bottom: 0.5em; } +#toc > ul { margin-left: 0.125em; } +#toc ul.sectlevel0 > li > a { font-style: italic; } +#toc ul.sectlevel0 ul.sectlevel1 { margin: 0.5em 0; } +#toc ul { font-family: ff-meta-web-pro-1, ff-meta-web-pro-2, Arial, "Helvetica Neue", sans-serif; list-style-type: none; } +#toc li { line-height: 1.3334; margin-top: 0.3334em; } +#toc a { text-decoration: none; } +#toc a:active { text-decoration: underline; } + +#toctitle { color: #6c818f; font-size: 1.2em; } + +@media only screen and (min-width: 768px) { #toctitle { font-size: 1.375em; } + body.toc2 { padding-left: 15em; padding-right: 0; } + #toc.toc2 { margin-top: 0 !important; background: #f2f2f2; position: fixed; width: 15em; left: 0; top: 0; border-right: 1px solid #dddddd; border-top-width: 0 !important; border-bottom-width: 0 !important; z-index: 1000; padding: 1.25em 1em; height: 100%; overflow: auto; } + #toc.toc2 #toctitle { margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2em; } + #toc.toc2 > ul { font-size: 0.9em; margin-bottom: 0; } + #toc.toc2 ul ul { margin-left: 0; padding-left: 1em; } + #toc.toc2 ul.sectlevel0 ul.sectlevel1 { padding-left: 0; margin-top: 0.5em; margin-bottom: 0.5em; } + body.toc2.toc-right { padding-left: 0; padding-right: 15em; } + body.toc2.toc-right #toc.toc2 { border-right-width: 0; border-left: 1px solid #dddddd; left: auto; right: 0; } } +@media only screen and (min-width: 1280px) { body.toc2 { padding-left: 20em; padding-right: 0; } + #toc.toc2 { width: 20em; } + #toc.toc2 #toctitle { font-size: 1.375em; } + #toc.toc2 > ul { font-size: 0.95em; } + #toc.toc2 ul ul { padding-left: 1.25em; } + body.toc2.toc-right { padding-left: 0; padding-right: 20em; } } +#content #toc { border-style: solid; border-width: 1px; border-color: #d9d9d9; margin-bottom: 1.25em; padding: 1.25em; background: #f2f2f2; -webkit-border-radius: 6px; border-radius: 6px; } +#content #toc > :first-child { margin-top: 0; } +#content #toc > :last-child { margin-bottom: 0; } + +#footer { max-width: none; background: black; padding: 1.25em; } + +#footer-text { color: white; line-height: 1.35; } + +#content { margin-bottom: 0.625em; } + +.sect1 { padding-bottom: 0.625em; } + +@media only screen and (min-width: 768px) { #content { margin-bottom: 1.25em; } + .sect1 { padding-bottom: 1.25em; } } +.sect1:last-child { padding-bottom: 0; } + +.sect1 + .sect1 { border-top: 1px solid #dddddd; } + +#content h1 > a.anchor, h2 > a.anchor, h3 > a.anchor, #toctitle > a.anchor, .sidebarblock > .content > .title > a.anchor, h4 > a.anchor, h5 > a.anchor, h6 > a.anchor { position: absolute; z-index: 1001; width: 1.5ex; margin-left: -1.5ex; display: block; text-decoration: none !important; visibility: hidden; text-align: center; font-weight: normal; } +#content h1 > a.anchor:before, h2 > a.anchor:before, h3 > a.anchor:before, #toctitle > a.anchor:before, .sidebarblock > .content > .title > a.anchor:before, h4 > a.anchor:before, h5 > a.anchor:before, h6 > a.anchor:before { content: "\00A7"; font-size: 0.85em; display: block; padding-top: 0.1em; } +#content h1:hover > a.anchor, #content h1 > a.anchor:hover, h2:hover > a.anchor, h2 > a.anchor:hover, h3:hover > a.anchor, #toctitle:hover > a.anchor, .sidebarblock > .content > .title:hover > a.anchor, h3 > a.anchor:hover, #toctitle > a.anchor:hover, .sidebarblock > .content > .title > a.anchor:hover, h4:hover > a.anchor, h4 > a.anchor:hover, h5:hover > a.anchor, h5 > a.anchor:hover, h6:hover > a.anchor, h6 > a.anchor:hover { visibility: visible; } +#content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link { color: #465158; text-decoration: none; } +#content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover { color: #3b444a; } + +details, .audioblock, .imageblock, .literalblock, .listingblock, .stemblock, .videoblock { margin-bottom: 1.25em; } + +details > summary:first-of-type { cursor: pointer; display: list-item; outline: none; margin-bottom: 0.75em; } + +.admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-rendering: optimizeLegibility; text-align: left; } + +table.tableblock.fit-content > caption.title { white-space: nowrap; width: 0; } + +.paragraph.lead > p, #preamble > .sectionbody > [class="paragraph"]:first-of-type p { font-size: 1.21875em; line-height: 1.6; color: #111111; } + +table.tableblock #preamble > .sectionbody > [class="paragraph"]:first-of-type p { font-size: inherit; } + +.admonitionblock > table { border-collapse: separate; border: 0; background: none; width: 100%; } +.admonitionblock > table td.icon { text-align: center; width: 80px; } +.admonitionblock > table td.icon img { max-width: none; } +.admonitionblock > table td.icon .title { font-weight: bold; font-family: ff-meta-web-pro-1, ff-meta-web-pro-2, Arial, "Helvetica Neue", sans-serif; text-transform: uppercase; } +.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #748590; word-wrap: anywhere; } +.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } + +.exampleblock > .content { border-style: solid; border-width: 1px; border-color: #e6e6e6; margin-bottom: 1.25em; padding: 1.25em; background: white; -webkit-border-radius: 6px; border-radius: 6px; } +.exampleblock > .content > :first-child { margin-top: 0; } +.exampleblock > .content > :last-child { margin-bottom: 0; } + +.sidebarblock { border-style: solid; border-width: 1px; border-color: #d4d4d4; margin-bottom: 1.25em; padding: 1.25em; background: #ededed; -webkit-border-radius: 6px; border-radius: 6px; } +.sidebarblock > :first-child { margin-top: 0; } +.sidebarblock > :last-child { margin-bottom: 0; } +.sidebarblock > .content > .title { color: #6c818f; margin-top: 0; } + +.exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child, .exampleblock > .content .qlist > ol > li:last-child > :last-child, .sidebarblock > .content > :last-child > :last-child, .sidebarblock > .content .olist > ol > li:last-child > :last-child, .sidebarblock > .content .ulist > ul > li:last-child > :last-child, .sidebarblock > .content .qlist > ol > li:last-child > :last-child { margin-bottom: 0; } + +.literalblock pre, .listingblock > .content > pre { border: 1px solid #cccccc; -webkit-border-radius: 6px; border-radius: 6px; overflow-x: auto; padding: 0.5em; font-size: 0.8125em; } +@media only screen and (min-width: 768px) { .literalblock pre, .listingblock > .content > pre { font-size: 0.90625em; } } +@media only screen and (min-width: 1280px) { .literalblock pre, .listingblock > .content > pre { font-size: 1em; } } + +.literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class="highlight"], .listingblock > .content > pre[class^="highlight "] { background: #eeeeee; } + +.literalblock.output pre { color: #eeeeee; background-color: inherit; } + +.listingblock > .content { position: relative; } + +.listingblock code[data-lang]:before { display: none; content: attr(data-lang); position: absolute; font-size: 0.75em; top: 0.425rem; right: 0.5rem; line-height: 1; text-transform: uppercase; color: inherit; opacity: 0.5; } + +.listingblock:hover code[data-lang]:before { display: block; } + +.listingblock.terminal pre .command:before { content: attr(data-prompt); padding-right: 0.5em; color: inherit; opacity: 0.5; } + +.listingblock.terminal pre .command:not([data-prompt]):before { content: "$"; } + +.listingblock pre.highlightjs { padding: 0; } +.listingblock pre.highlightjs > code { padding: 0.5em; -webkit-border-radius: 6px; border-radius: 6px; } + +.prettyprint { background: #eeeeee; } + +pre.prettyprint .linenums { line-height: 1.2; margin-left: 2em; } + +pre.prettyprint li { background: none; list-style-type: inherit; padding-left: 0; } + +pre.prettyprint li code[data-lang]:before { opacity: 1; } + +pre.prettyprint li:not(:first-child) code[data-lang]:before { display: none; } + +table.linenotable { border-collapse: separate; border: 0; margin-bottom: 0; background: none; } +table.linenotable td[class] { color: inherit; vertical-align: top; padding: 0; line-height: inherit; white-space: normal; } +table.linenotable td.code { padding-left: 0.75em; } +table.linenotable td.linenos { border-right: 1px solid currentColor; opacity: 0.35; padding-right: 0.5em; } + +pre.pygments .lineno { border-right: 1px solid currentColor; opacity: 0.35; display: inline-block; margin-right: 0.75em; } +pre.pygments .lineno:before { content: ""; margin-right: -0.125em; } + +.quoteblock { margin: 0 1em 1.25em 1.5em; display: table; } +.quoteblock:not(.excerpt) > .title { margin-left: -1.5em; margin-bottom: 0.75em; } +.quoteblock blockquote, .quoteblock p { color: #909ea7; font-size: 1.15rem; line-height: 1.75; word-spacing: 0.1em; letter-spacing: 0; font-style: italic; text-align: justify; } +.quoteblock blockquote { margin: 0; padding: 0; border: 0; } +.quoteblock blockquote:before { content: "\201c"; float: left; font-size: 2.75em; font-weight: bold; line-height: 0.6em; margin-left: -0.6em; color: #6c818f; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } +.quoteblock blockquote > .paragraph:last-child p { margin-bottom: 0; } +.quoteblock .attribution { margin-top: 0.75em; margin-right: 0.5ex; text-align: right; } + +.verseblock { margin: 0 1em 1.25em 1em; } +.verseblock pre { font-family: "Open Sans", "DejaVu Sans", sans; font-size: 1.15rem; color: #909ea7; font-weight: 300; text-rendering: optimizeLegibility; } +.verseblock pre strong { font-weight: 400; } +.verseblock .attribution { margin-top: 1.25rem; margin-left: 0.5ex; } + +.quoteblock .attribution, .verseblock .attribution { font-size: 0.8125em; line-height: 1.45; font-style: italic; } +.quoteblock .attribution br, .verseblock .attribution br { display: none; } +.quoteblock .attribution cite, .verseblock .attribution cite { display: block; letter-spacing: -0.025em; color: #748590; } + +.quoteblock.abstract blockquote:before, .quoteblock.excerpt blockquote:before, .quoteblock .quoteblock blockquote:before { display: none; } +.quoteblock.abstract blockquote, .quoteblock.abstract p, .quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p { line-height: 1.6; word-spacing: 0; } +.quoteblock.abstract { margin: 0 1em 1.25em 1em; display: block; } +.quoteblock.abstract > .title { margin: 0 0 0.375em 0; font-size: 1.15em; text-align: center; } +.quoteblock.excerpt > blockquote, .quoteblock .quoteblock { padding: 0 0 0.25em 1em; border-left: 0.25em solid #dddddd; } +.quoteblock.excerpt, .quoteblock .quoteblock { margin-left: 0; } +.quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p { color: inherit; font-size: 1.0625rem; } +.quoteblock.excerpt .attribution, .quoteblock .quoteblock .attribution { color: inherit; text-align: left; margin-right: 0; } + +p.tableblock:last-child { margin-bottom: 0; } + +td.tableblock > .content { margin-bottom: 1.25em; word-wrap: anywhere; } +td.tableblock > .content > :last-child { margin-bottom: -1.25em; } + +table.tableblock, th.tableblock, td.tableblock { border: 0 solid #dddddd; } + +table.grid-all > * > tr > * { border-width: 0; } + +table.grid-cols > * > tr > * { border-width: 0 0; } + +table.grid-rows > * > tr > * { border-width: 0 0; } + +table.frame-all { border-width: 0; } + +table.frame-ends { border-width: 0 0; } + +table.frame-sides { border-width: 0 0; } + +table.frame-none > colgroup + * > :first-child > *, table.frame-sides > colgroup + * > :first-child > * { border-top-width: 0; } + +table.frame-none > :last-child > :last-child > *, table.frame-sides > :last-child > :last-child > * { border-bottom-width: 0; } + +table.frame-none > * > tr > :first-child, table.frame-ends > * > tr > :first-child { border-left-width: 0; } + +table.frame-none > * > tr > :last-child, table.frame-ends > * > tr > :last-child { border-right-width: 0; } + +table.stripes-all tr, table.stripes-odd tr:nth-of-type(odd), table.stripes-even tr:nth-of-type(even), table.stripes-hover tr:hover { background: none; } + +th.halign-left, td.halign-left { text-align: left; } + +th.halign-right, td.halign-right { text-align: right; } + +th.halign-center, td.halign-center { text-align: center; } + +th.valign-top, td.valign-top { vertical-align: top; } + +th.valign-bottom, td.valign-bottom { vertical-align: bottom; } + +th.valign-middle, td.valign-middle { vertical-align: middle; } + +table thead th, table tfoot th { font-weight: bold; } + +tbody tr th { display: table-cell; line-height: 1.5; background: none; } + +tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p { color: #222222; font-weight: bold; } + +p.tableblock > code:only-child { background: none; padding: 0; } + +p.tableblock { font-size: 1em; } + +ol { margin-left: 0.25em; } + +ul li ol { margin-left: 0; } + +dl dd { margin-left: 1.125em; } + +dl dd:last-child, dl dd:last-child > :last-child { margin-bottom: 0; } + +ol > li p, ul > li p, ul dd, ol dd, .olist .olist, .ulist .ulist, .ulist .olist, .olist .ulist { margin-bottom: 0.625em; } + +ul.checklist, ul.none, ol.none, ul.no-bullet, ol.no-bullet, ol.unnumbered, ul.unstyled, ol.unstyled { list-style-type: none; } + +ul.no-bullet, ol.no-bullet, ol.unnumbered { margin-left: 0.625em; } + +ul.unstyled, ol.unstyled { margin-left: 0; } + +ul.checklist { margin-left: 0.625em; } + +ul.checklist li > p:first-child > .fa-square-o:first-child, ul.checklist li > p:first-child > .fa-check-square-o:first-child { width: 1.25em; font-size: 0.8em; position: relative; bottom: 0.125em; } + +ul.checklist li > p:first-child > input[type="checkbox"]:first-child { margin-right: 0.25em; } + +ul.inline { display: -ms-flexbox; display: -webkit-box; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; list-style: none; margin: 0 0 0.625em -1.25em; } + +ul.inline > li { margin-left: 1.25em; } + +.unstyled dl dt { font-weight: normal; font-style: normal; } + +ol.arabic { list-style-type: decimal; } + +ol.decimal { list-style-type: decimal-leading-zero; } + +ol.loweralpha { list-style-type: lower-alpha; } + +ol.upperalpha { list-style-type: upper-alpha; } + +ol.lowerroman { list-style-type: lower-roman; } + +ol.upperroman { list-style-type: upper-roman; } + +ol.lowergreek { list-style-type: lower-greek; } + +.hdlist > table, .colist > table { border: 0; background: none; } +.hdlist > table > tbody > tr, .colist > table > tbody > tr { background: none; } + +td.hdlist1, td.hdlist2 { vertical-align: top; padding: 0 0.625em; } + +td.hdlist1 { font-weight: bold; padding-bottom: 1.25em; } + +td.hdlist2 { word-wrap: anywhere; } + +.literalblock + .colist, .listingblock + .colist { margin-top: -0.5em; } + +.colist td:not([class]):first-child { padding: 0.4em 0.75em 0 0.75em; line-height: 1; vertical-align: top; } +.colist td:not([class]):first-child img { max-width: none; } +.colist td:not([class]):last-child { padding: 0.25em 0; } + +.thumb, .th { line-height: 0; display: inline-block; border: solid 4px white; -webkit-box-shadow: 0 0 0 1px #dddddd; box-shadow: 0 0 0 1px #dddddd; } + +.imageblock.left { margin: 0.25em 0.625em 1.25em 0; } +.imageblock.right { margin: 0.25em 0 1.25em 0.625em; } +.imageblock > .title { margin-bottom: 0; } +.imageblock.thumb, .imageblock.th { border-width: 6px; } +.imageblock.thumb > .title, .imageblock.th > .title { padding: 0 0.125em; } + +.image.left, .image.right { margin-top: 0.25em; margin-bottom: 0.25em; display: inline-block; line-height: 0; } +.image.left { margin-right: 0.625em; } +.image.right { margin-left: 0.625em; } + +a.image { text-decoration: none; display: inline-block; } +a.image object { pointer-events: none; } + +sup.footnote, sup.footnoteref { font-size: 0.875em; position: static; vertical-align: super; } +sup.footnote a, sup.footnoteref a { text-decoration: none; } +sup.footnote a:active, sup.footnoteref a:active { text-decoration: underline; } + +#footnotes { padding-top: 0.75em; padding-bottom: 0.75em; margin-bottom: 0.625em; } +#footnotes hr { width: 20%; min-width: 6.25em; margin: -0.25em 0 0.75em 0; border-width: 1px 0 0 0; } +#footnotes .footnote { padding: 0 0.375em 0 0.225em; line-height: 1.3334; font-size: 0.875em; margin-left: 1.2em; margin-bottom: 0.2em; } +#footnotes .footnote a:first-of-type { font-weight: bold; text-decoration: none; margin-left: -1.05em; } +#footnotes .footnote:last-of-type { margin-bottom: 0; } +#content #footnotes { margin-top: -0.625em; margin-bottom: 0; padding: 0.75em 0; } + +.gist .file-data > table { border: 0; background: #fff; width: 100%; margin-bottom: 0; } +.gist .file-data > table td.line-data { width: 99%; } + +div.unbreakable { page-break-inside: avoid; } + +.big { font-size: larger; } + +.small { font-size: smaller; } + +.underline { text-decoration: underline; } + +.overline { text-decoration: overline; } + +.line-through { text-decoration: line-through; } + +.aqua { color: #00bfbf; } + +.aqua-background { background-color: #00fafa; } + +.black { color: black; } + +.black-background { background-color: black; } + +.blue { color: #0000bf; } + +.blue-background { background-color: #0000fa; } + +.fuchsia { color: #bf00bf; } + +.fuchsia-background { background-color: #fa00fa; } + +.gray { color: #606060; } + +.gray-background { background-color: #7d7d7d; } + +.green { color: #006000; } + +.green-background { background-color: #007d00; } + +.lime { color: #00bf00; } + +.lime-background { background-color: #00fa00; } + +.maroon { color: #600000; } + +.maroon-background { background-color: #7d0000; } + +.navy { color: #000060; } + +.navy-background { background-color: #00007d; } + +.olive { color: #606000; } + +.olive-background { background-color: #7d7d00; } + +.purple { color: #600060; } + +.purple-background { background-color: #7d007d; } + +.red { color: #bf0000; } + +.red-background { background-color: #fa0000; } + +.silver { color: #909090; } + +.silver-background { background-color: #bcbcbc; } + +.teal { color: #006060; } + +.teal-background { background-color: #007d7d; } + +.white { color: #bfbfbf; } + +.white-background { background-color: #fafafa; } + +.yellow { color: #bfbf00; } + +.yellow-background { background-color: #fafa00; } + +span.icon > .fa { cursor: default; } +a span.icon > .fa { cursor: inherit; } + +.admonitionblock td.icon [class^="fa icon-"] { font-size: 2.5em; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); cursor: default; } +.admonitionblock td.icon .icon-note:before { content: "\f05a"; color: #333333; } +.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 0.8); color: #111; } +.admonitionblock td.icon .icon-warning:before { content: "\f071"; color: #bf6900; } +.admonitionblock td.icon .icon-caution:before { content: "\f06d"; color: #bf3400; } +.admonitionblock td.icon .icon-important:before { content: "\f06a"; color: #bf0000; } + +.conum[data-value] { display: inline-block; color: #fff !important; background-color: black; -webkit-border-radius: 50%; border-radius: 50%; text-align: center; font-size: 0.75em; width: 1.67em; height: 1.67em; line-height: 1.67em; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-style: normal; font-weight: bold; } +.conum[data-value] * { color: #fff !important; } +.conum[data-value] + b { display: none; } +.conum[data-value]:after { content: attr(data-value); } +pre .conum[data-value] { position: relative; top: -0.125em; } + +b.conum * { color: inherit !important; } + +.conum:not([data-value]):empty { display: none; } + +h4 { color: #6c818f; } + +.literalblock > .content > pre, .listingblock > .content > pre { -webkit-border-radius: 6px; border-radius: 6px; margin-left: 2em; margin-right: 2em; } + +.admonitionblock { margin-left: 2em; margin-right: 2em; } +.admonitionblock > table { border: 1px solid #609060; border-top-width: 1.5em; background-color: #e9ffe9; border-collapse: separate; -webkit-border-radius: 0; border-radius: 0; } +.admonitionblock > table td.icon { padding-top: .5em; padding-bottom: .5em; } +.admonitionblock > table td.content { padding: .5em 1em; color: black; font-size: .9em; border-left: none; } + +.sidebarblock { background-color: #e8ecef; border-color: #ccc; } +.sidebarblock > .content > .title { color: #444444; } + +table.tableblock.grid-all { border-collapse: collapse; -webkit-border-radius: 0; border-radius: 0; } +table.tableblock.grid-all th.tableblock, table.tableblock.grid-all td.tableblock { border-bottom: 1px solid #aaa; } + +#footer { background-color: #465158; padding: 2em; } + +#footer-text { color: #eee; font-size: 0.8em; text-align: center; } diff --git a/modbuild/build b/modbuild/build index 6bb7c21..61d1c6d 100755 --- a/modbuild/build +++ b/modbuild/build @@ -1,5 +1,12 @@ #!/usr/bin/env modbuild +declare -- in_git_repo='no' +if [[ -e '../.git' ]]; then + pbuild::prep() { :; } + in_git_repo='yes' + SRC_DIR="${BUILDBLOCK_DIR}/.." +fi + pbuild::configure() { : } @@ -8,10 +15,19 @@ pbuild::compile() { } pbuild::install() { + local -- src_dir='' + if [[ "${in_git_repo}" == 'yes' ]]; then + src_dir="${BUILDBLOCK_DIR}/../src" + else + src_dir='./src' + fi mkdir -p "${PREFIX}/bin" mkdir -p "${PREFIX}/lib" - install --mode=0755 src/modbuild "${PREFIX}/bin" - install --mode=0755 src/lib* "${PREFIX}/lib" + install --mode=0755 "${src_dir}"/modbuild.in "${PREFIX}/bin/modbuild" + sed -i -e \ + "s:@PREFIX@:${PREFIX}:g;s:@VERSION@:${V}:g;" \ + "${PREFIX}/bin/modbuild" + install --mode=0755 "${src_dir}"/lib* "${PREFIX}/lib" } # Local Variables: diff --git a/modbuild/build-patchelf b/modbuild/build-patchelf index 09fab04..22e6c83 100755 --- a/modbuild/build-patchelf +++ b/modbuild/build-patchelf @@ -1,5 +1,7 @@ #!/usr/bin/env modbuild +export LC_ALL=C + pbuild::pre_configure(){ ./bootstrap.sh } diff --git a/modbuild/files/config.yaml b/modbuild/files/config.yaml index bf2b85c..8e64810 100644 --- a/modbuild/files/config.yaml +++ b/modbuild/files/config.yaml @@ -11,7 +11,7 @@ modbuild: - url: https://github.com/Pmodules/$P/archive/refs/tags/$P-${V_PKG}.tar.gz shasums: versions: - 2.1.1: + 2.1.3: config: relstage: unstable docfiles: [LICENSE.txt] @@ -28,6 +28,8 @@ modbuild: bash: type: sub_package defaults: + shasums: + bash-5.3.tar.gz: 0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba versions: 5.3.9: config: @@ -46,6 +48,7 @@ bash: - --bindir=${PREFIX}/libexec yq: type: sub_package + shasums: versions: 4.53.2: variants: @@ -58,6 +61,8 @@ yq: sevenz: type: sub_package defaults: + shasums: + 7zip-26.01.tar.gz: f4212b508641b3584f7089ab67bc0aba028c631f049b4dd603ff07853e72e749 versions: 26.01: config: diff --git a/modbuild/modulefile b/modbuild/modulefile index 887b3a2..6bdd922 100644 --- a/modbuild/modulefile +++ b/modbuild/modulefile @@ -8,3 +8,6 @@ module-maintainer "Achim Gsell " module-help " Pmodules build-system " + +puts stdout {unset -f modbuild} + diff --git a/src/libpbuild.bash b/src/libpbuild.bash index de1ea27..205d1df 100644 --- a/src/libpbuild.bash +++ b/src/libpbuild.bash @@ -22,10 +22,8 @@ declare -ax CONFIGURE_ARGS=() declare -a PATCH_FILES=() declare -a PATCH_STRIPS=() declare -- PATCH_STRIP_DEFAULT='1' -declare -- configure_with='auto' declare -- SRC_DIR='' declare -- BUILD_DIR='' -declare -- is_subpkg='no' declare -i group_depth=0 @@ -49,122 +47,12 @@ readonly -f _error_handler trap "_error_handler" ERR -#.............................................................................. -# -# write number of cores to stdout -# -_get_num_cores() { - case "${KernelName}" in - Linux ) - ${grep} -c ^processor /proc/cpuinfo - ;; - Darwin ) - ${sysctl} -n hw.ncpu - ;; - * ) - std::die 1 "OS ${KernelName} is not supported\n" - ;; - esac -} -readonly -f _get_num_cores - -#.............................................................................. -# global variables which can be set/overwritten by command line args -# and their corresponding functions -# -declare force_rebuild='no' -pbuild.force_rebuild() { - force_rebuild="$1" -} -readonly -f pbuild.force_rebuild - -declare dry_run='' -pbuild.dry_run() { - dry_run="$1" -} -readonly -f pbuild.dry_run - -declare enable_cleanup_build='' -pbuild.enable_cleanup_build() { - enable_cleanup_build="$1" -} -readonly -f pbuild.enable_cleanup_build - -declare enable_cleanup_src='' -pbuild.enable_cleanup_src() { - enable_cleanup_src="$1" -} -readonly -f pbuild.enable_cleanup_src - -declare build_target='' -pbuild.build_target() { - build_target="$1" -} -readonly -f pbuild.build_target - -declare opt_update_modulefiles='' -pbuild.update_modulefiles() { - opt_update_modulefiles="$1" -} -readonly -f pbuild.update_modulefiles - -pbuild.set_prefix(){ - PREFIX="$1" - is_subpkg='yes' -} - -# number of parallel make jobs -declare -i JOBS=0 -pbuild.jobs() { - if (( $1 == 0 )); then - JOBS=$(_get_num_cores) - (( JOBS > 10 )) && JOBS=10 || : - else - JOBS="$1" - fi -} -readonly -f pbuild.jobs - -declare system='' -pbuild.system() { - system="$1" -} -readonly -f pbuild.system - #****************************************************************************** # # function in the "namespace" (with prefix) 'pbuild::' can be used in # build-scripts # -############################################################################### -# -# general functions -# - -#.............................................................................. -# -# Install module in given group. -# -# Note: -# This function is deprecated with YAML module configuration files. -# -# Arguments: -# $1: group -# -pbuild::add_to_group() { - std::die 42 "%s " \ - "${FUNCNAME[0]}: This function has been removed in Pmodules/1.1.22." \ - "The group must be configured in the YAML configuration file!" -} -readonly -f pbuild::add_to_group - -declare -gx GROUP='' -pbuild.add_to_group(){ - GROUP="$1" -} -readonly -f pbuild.add_to_group - #.............................................................................. # # Test whether a module with the given name is available. If yes, return @@ -189,12 +77,12 @@ pbuild::module_is_avail() { if [[ "${name}" == "$1" || "${name}" == "${1}.lua" ]]; then # return relase in second argument if defined if (( $# > 1 )); then - local -n _result="$2" - _result="${release}" + local -n _relstage="$2" + _relstage="${release}" fi return 0 fi - done < <(${modulecmd} bash avail -a -m "$1" 2>&1 1>/dev/null) + done < <(modulecmd bash avail -a -m "$1" 2>&1 1>/dev/null) return 1 else local -- xtrace_is_on='' @@ -203,7 +91,6 @@ pbuild::module_is_avail() { #set +x fi local output=$(modulecmd bash avail --all --output=tag --terse "$1" 2>&1) - echo "$output" 1>&2 [[ "${xtrace_is_on}" ]] && set -x while read -r name release; do if [[ "${name}" == "$1" || "${name}" == "${1}.lua" ]]; then @@ -241,82 +128,13 @@ readonly -f pbuild::use_flag # # functions to prepare the sources -#.............................................................................. -# -# Set the download URL and name of downloaded file. -# -# Arguments: -# $1 download URL -# $2 optional file-name (of) -pbuild::set_download_url() { - std::die 42 "%s " \ - "${FUNCNAME[0]}: This function has been removed in Pmodules/1.1.22." \ - "The URL must be configured in the YAML configuration file!" -} -readonly -f pbuild::set_download_url - -pbuild.set_urls(){ - local -n src="$1" - local -i _i=${#SOURCE_URLS[@]} - SOURCE_URLS[_i]="${src['url']}" - SOURCE_NAMES[_i]="${src['name']}" - SOURCE_STRIP_DIRS[_i]="${src['strip_dirs']}" - SOURCE_UNPACKER[_i]="${src['unpacker']}" - SOURCE_UNPACK_DIRS[_i]="${src['unpack_dir']}" - SOURCE_PATCH_FILES[_i]="${src['patch_file']}" - SOURCE_PATCH_STRIPS[_i]="${src['patch_strip']}" -} - -#.............................................................................. -# -# Set hash sum for file. -# -# Arguments: -# $1 filen-name:hash-sum -# -# :FIXME: -# Maybe we should use a dictionary in the future. -# -pbuild::set_sha256sum() { - std::die 42 "%s " \ - "${FUNCNAME[0]}: This function has been removed in Pmodules/1.1.22." \ - "The SHA256 hash must be configured in the YAML configuration file!" -} -readonly -f pbuild::set_sha256sum - -#.............................................................................. -# -pbuild.add_patch_files(){ - local -- arg='' - for arg in "$@"; do - [[ -z "${arg}" ]] && continue - if [[ ${arg} == *:* ]]; then - PATCH_FILES+=( "${arg%%:*}" ) - PATCH_STRIPS+=( "${arg##*:}" ) - else - PATCH_FILES+=( "${arg}" ) - PATCH_STRIPS+=( "${PATCH_STRIP_DEFAULT}" ) - fi - done -} -readonly -f pbuild.add_patch_files - -#.............................................................................. -# -pbuild::set_default_patch_strip() { - std::die 42 "%s " \ - "${FUNCNAME[0]}: This function has been removed in Pmodules/1.1.22." \ - "The patch strip must be configured in the YAML configuration file!" -} -readonly -f pbuild::set_default_patch_strip - #.............................................................................. # pbuild::unpack(){ local -- fname="$1" local -- dir="$2" local -r strip="${3:-1}" - local -- unpacker="${4:-${tar}}" + local -- unpacker="${4:-tar}" fname=$(envsubst <<<"${fname}") if [[ -z "${dir}" ]]; then @@ -419,7 +237,7 @@ pbuild::prep() { local -r unpacker="${SOURCE_UNPACKER[idx]}" if ! pbuild::unpack "${fname}" "${dir}" "${strip}" "${unpacker}"; then - ${rm} -f "${fname}" + rm -f "${fname}" std::die 4 \ "%s " \ "${module_name}/${module_version}:" \ @@ -431,10 +249,10 @@ pbuild::prep() { local -r src_dir="$1" local -ri idx="$2" local -r fname="${SOURCE_NAMES[idx]}" - if [[ -v SHASUMS[${fname}] ]]; then + if [[ -v ModuleConfig[shasum:${fname}] ]]; then local -- hash_sum='' hash_sum=$(sha256sum "${src_dir}/${fname}" | awk '{print $1}') - test "${hash_sum}" == "${SHASUMS[${fname}]}" || \ + test "${hash_sum}" == "${ModuleConfig[shasum:${fname}]}" || \ std::die 42 \ "%s " \ "${module_name}/${module_version}:" \ @@ -480,13 +298,11 @@ pbuild::prep() { local -- src_dir='' local -i ec=0 - SOURCE_URLS[i]="$(envsubst <<<"${SOURCE_URLS[i]}")" # if file name is not specified, use last component of URL as file name # check whether file exist # try to download if not and URL is specified [[ -z "${SOURCE_NAMES[i]}" ]] && SOURCE_NAMES[i]="${SOURCE_URLS[i]##*/}" if [[ -n "${SOURCE_NAMES[i]}" ]]; then - SOURCE_NAMES[i]="$(envsubst <<<"${SOURCE_NAMES[i]}")" if ! search_source_file src_dir "${SOURCE_NAMES[i]}"; then if [[ -n "${SOURCE_URLS[i]}" ]]; then src_dir="${PMODULES_DISTFILESDIR}" @@ -499,7 +315,6 @@ pbuild::prep() { unpack "${src_dir}" "$i" fi if [[ -n "${SOURCE_PATCH_FILES[i]}" ]]; then - SOURCE_PATCH_FILES[i]="$(envsubst <<<"${SOURCE_PATCH_FILES[i]}")" search_source_file src_dir "${SOURCE_PATCH_FILES[i]}" || \ std::die 42 \ "%s " \ @@ -509,7 +324,7 @@ pbuild::prep() { if [[ -z "${SOURCE_UNPACK_DIRS[i]}" ]]; then target_dir="${SRC_DIR}" else - target_dir="$(envsubst <<<"${SOURCE_UNPACK_DIRS[i]}")" + target_dir="${SOURCE_UNPACK_DIRS[i]}" fi mkdir -p "${target_dir}" @@ -534,59 +349,11 @@ pbuild::prep_pip3(){ #.............................................................................. # -pbuild.set_configure_args(){ - CONFIGURE_ARGS=( "$@" ) -} -readonly -f pbuild.set_configure_args - pbuild::add_configure_args(){ CONFIGURE_ARGS+=( "$@" ) } readonly -f pbuild::add_configure_args -#.............................................................................. -# -pbuild::use_autotools() { - std::die 42 "%s " \ - "${FUNCNAME[0]}: This function has been removed in Pmodules/1.1.22." \ - "Use the 'configure_with' key in the YAML configuration file!" -} -readonly -f pbuild::use_autotools - -#.............................................................................. -# -pbuild::use_cmake() { - std::die 42 "%s " \ - "${FUNCNAME[0]}: This function has been removed in Pmodules/1.1.22." \ - "Use the 'configure_with' key in the YAML configuration file!" -} -readonly -f pbuild::use_cmake - -pbuild.configure_with(){ - configure_with="$1" -} - -#.............................................................................. -# -# Set flag to build module in source tree. -# -# Arguments: -# none -# -declare -- compile_in_sourcetree='no' - -pbuild::compile_in_sourcetree() { - std::die 42 "%s " \ - "${FUNCNAME[0]}: This function has been removed in Pmodules/1.1.22." \ - "Use the 'compile_in_sourcetree' key in the YAML configuration file!" -} -readonly -f pbuild::compile_in_sourcetree -pbuild.compile_in_sourcetree(){ - if [[ "${1,,}" == 'yes' ]]; then - compile_in_sourcetree='yes' - fi -} - #.............................................................................. # # Configure the software to be compiled. @@ -601,6 +368,7 @@ pbuild::post_configure() { : } pbuild::configure() { + local -r configure_with="${ModuleConfig['configure_with']}" case "${configure_with}" in autotools ) if [[ ! -r "${SRC_DIR}/configure" ]]; then @@ -683,17 +451,15 @@ pbuild::compile() { tmp_verbose="${VERBOSE}" restore='yes' fi - if (( opt_verbose > 0 )); then + if (( Options['verbose'] > 0 )); then declare -g V=1 declare -g VERBOSE=1 else unset V fi - (( JOBS == 0 )) && JOBS=$(_get_num_cores) - #[[ -v CC ]] || CC=cc - #[[ -v CXX ]] || CXX=c++ - #CC=$CC CXX=$CXX - make -j${JOBS} -e || \ + # number of parallel make jobs + local -i num_jobs="${Options['num_jobs']}" + make -j${num_jobs} -e || \ std::die 3 \ "%s " "${module_name}/${module_version}:" \ "compilation failed!" @@ -707,20 +473,6 @@ pbuild::compile() { # # functions to install everything -#.............................................................................. -# -# Set documentation file to be installed. -# -# Arguments: -# $@: documentation files relative to source -# -pbuild::install_docfiles() { - std::die 1 \ - "Using ${FUNCNAME[0]} is deprecated with YAML module configuration files." - MODULE_DOCFILES+=("$@") -} -readonly -f pbuild::install_docfiles - #.............................................................................. # # Default install function. @@ -756,7 +508,7 @@ pbuild::post_install_pip3(){ } pbuild::install() { - ${make} install || \ + make install || \ std::die 3 \ "%s " "${module_name}/${module_version}:" \ "compilation failed!" @@ -771,10 +523,10 @@ pbuild::install_shared_libs() { install_shared_libs_Linux() { local -a libs=() - mapfile -t libs < <(${ldd} "${binary}" | \ - ${awk} "/ => \// && /${pattern}/ {print \$3}") + mapfile -t libs < <(ldd "${binary}" | \ + awk "/ => \// && /${pattern}/ {print \$3}") if (( ${#libs[@]} > 0 )); then - ${cp} -vL "${libs[@]}" "${dstdir}" || return $? + cp -vL "${libs[@]}" "${dstdir}" || return $? fi return 0 } @@ -783,9 +535,9 @@ pbuild::install_shared_libs() { # https://stackoverflow.com/questions/33991581/install-name-tool-to-update-a-executable-to-search-for-dylib-in-mac-os-x local -a libs=() mapfile -t libs < <(${otool} -L "${binary}" | \ - ${awk} "/${pattern}/ {print \$1}") + awk "/${pattern}/ {print \$1}") if (( ${#libs[@]} > 0 )); then - ${cp} -vL "${libs[@]}" "${dstdir}" || return $? + cp -vL "${libs[@]}" "${dstdir}" || return $? fi return 0 } @@ -794,8 +546,8 @@ pbuild::install_shared_libs() { std::die 3 \ "%s " "${module_name}/${module_version}:" \ "${binary}: does not exist or is not executable!" - ${mkdir} -p "${dstdir}" - case "${KernelName}" in + mkdir -p "${dstdir}" + case "${KERNEL_NAME}" in Linux ) install_shared_libs_Linux ;; @@ -811,20 +563,23 @@ pbuild::install_shared_libs() { # declare -n ModuleConfig +declare -n Options declare -a Systems=() declare -a UseOverlays=() -pbuild.build_module_yaml(){ +pbuild::_module_yaml(){ local -- module_name="$1" local -- module_version="$2" ModuleConfig="$3" + Options="$4" + shift 4 - eval $( "${modulecmd}" bash purge ) + eval $( modulecmd bash purge ) if [[ -v __MODULES_OVERLAYS ]]; then local -a overlays=() local -- overlay='' IFS=':' read -r -a overlays <<<"${__MODULES_OVERLAYS}" for overlay in "${overlays[@]}"; do - eval $("${modulecmd}" bash unuse "${overlay}") + eval $(modulecmd bash unuse "${overlay}") done fi unset C_INCLUDE_PATH @@ -853,10 +608,53 @@ pbuild.build_module_yaml(){ if [[ -n "${ModuleConfig['use_overlays']}" ]]; then readarray -t UseOverlays <<< "${ModuleConfig['use_overlays']}" fi - shift 3 + if [[ -n "${ModuleConfig['configure_args']}" ]]; then + readarray -t CONFIGURE_ARGS <<< "${ModuleConfig['configure_args']}" + fi + if [[ -n "${ModuleConfig['patch_files']}" ]]; then + local -a items=() + readarray -t items <<< "${ModuleConfig['patch_files']}" + local -- item='' + for item in "${items[@]}"; do + [[ -z "${item}" ]] && continue + if [[ ${item} == *:* ]]; then + PATCH_FILES+=( "${item%%:*}" ) + PATCH_STRIPS+=( "${item##*:}" ) + else + PATCH_FILES+=( "${item}" ) + PATCH_STRIPS+=( "${PATCH_STRIP_DEFAULT}" ) + fi + done + fi + local -i i=0 num_sources="${ModuleConfig['num_sources']}" + for ((i=0; i&1 1>/dev/null | \ - ${grep} -v "Currently Loaded" > \ + "installing documentation to ${docdir}" + install -m 0755 -d "${docdir}" + install -m 0644 "${BUILD_SCRIPT}" "${docdir}" + modulecmd bash list -t 2>&1 1>/dev/null | \ + grep -v "Currently Loaded" > \ "${docdir}/dependencies" || : - - (( ${#MODULE_DOCFILES[@]} == 0 )) && return 0 - ${install} -m0644 \ - "${MODULE_DOCFILES[@]/#/${SRC_DIR}/}" \ + [[ -n ${module_config['docfiles']} ]] || return 0 + local -a docfiles=() + readarray -t docfiles <<<"${module_config['docfiles']}" + install -m0644 \ + "${docfiles[@]/#/${SRC_DIR}/}" \ "${docdir}" return 0 } - patch_elf64_files(){ - local -- libdir="${OverlayInfo[${ol_name}:install_root]}/lib64" - [[ -d "${libdir}" ]] || return 0 - local -a bin_objects=() - mapfile -t files < <(std::find_elf64_binaries '.') - local -- fname='' - local -- rpath='' - local -i depth=0 - for fname in "${files[@]}"; do - # don't override existing RPATH - rpath=$(patchelf --print-rpath "${fname}") - [[ -z "${rpath}" ]] || continue - (( depth=$(std::get_dir_depth "${fname}") + group_depth + 3 )) - rpath='$ORIGIN/'$(printf "../%.0s" $(${seq} 1 ${depth}))lib64 - ${patchelf} --force-rpath --set-rpath "${rpath}" "${fname}" - done - } - #.............................................................. # post-install: for Linux we need a special post-install to # solve the multilib problem with LIBRARY_PATH on 64-bit systems @@ -1174,11 +949,10 @@ _build_module() { std::info \ "%s " \ "${module_name}/${module_version}:" \ - "running post-installation for ${KernelName} ..." + "running post-installation for ${KERNEL_NAME} ..." { cd "${PREFIX}" [[ -d "lib" ]] && [[ ! -d "lib64" ]] && ln -s lib lib64 - patch_elf64_files }; return 0 } @@ -1186,227 +960,158 @@ _build_module() { #.............................................................. # post-install cd "${BUILD_DIR}" - [[ "${KernelName}" == "Linux" ]] && post_install_linux + [[ "${KERNEL_NAME}" == "Linux" ]] && post_install_linux install_doc - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "Done ..." return 0 } # bm::post_install - # - # write modulefile, configuration and dependencies - # + #...................................................................... bm::install_module_config(){ - - #...................................................................... - # Install modulefile in ${ol_modulefiles_root}/${GROUP}/modulefiles/... - # The modulefiles in the build-block can be - # versioned like - # modulefile-10.2.0 - # modulefile-10.2 - # modulefile-10 - # modulefile - # - # Arguments - # none - # - # Used gloabal variables: - # VERSIONS - # BUILDBLOCK_DIR - # modulefile_name - # - install_modulefile() { - #.............................................................. - # Select the modulefile to install. - # - # Arguments: - # $1 upvar to return the filename - # - find_modulefile() { - local -n _modulefile="$1" - local -- fname='' - for fname in "${VERSIONS[@]/#/modulefile-}" 'modulefile'; do - if [[ -r "${BUILDBLOCK_DIR}/${fname}" ]]; then - _modulefile="${BUILDBLOCK_DIR}/${fname}" - break; - fi - done - [[ -n "${_modulefile}" ]] - } - [[ "${is_subpkg}" == 'yes' ]] && return 0 - local -- src='' - if [[ -n "${ModuleConfig['modulefile']}" ]]; then - src="${ModuleConfig['modulefile']}" - elif ! find_modulefile src; then - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "skipping modulefile installation ..." - return + local -r __doc__=' + Install modulefile. + ' + [[ "${Options['is_subpkg']}" == 'yes' ]] && return 0 + + local -- src='' + if [[ -n "${ModuleConfig['modulefile']}" ]]; then + if [[ ! -e "${ModuleConfig['modulefile']}" ]]; then + std::die 3 \ + "%s " \ + "${module_name}/${module_version}:" \ + "modulefile '${ModuleConfig['modulefile']}" \ + "does not exist!" fi + src="${ModuleConfig['modulefile']}" + elif [[ -e "${BUILDBLOCK_DIR}/modulefile" ]]; then + src="${BUILDBLOCK_DIR}/modulefile" + else std::info \ "%s " \ "${module_name}/${module_version}:" \ - "adding modulefile to overlay '${ol_name}' ..." - ${mkdir} -p "${modulefile_dir}" - ${install} -m 0644 "${src}" "${modulefile_name}" - } + "skipping modulefile installation ..." + return + fi + std::info \ + "%s " \ + "${module_name}/${module_version}:" \ + "adding modulefile to overlay '${ol_name}' ..." + mkdir -p "${modulefile_dir}" + install -m 0644 "${src}" "${modulefile_name}" + } - #.............................................................. - # post-install: write file with required modules - install_runtime_dependencies() { - _write_file(){ - local -r fname="$1" - shift - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "writing run-time dependencies to ${fname} ..." - echo -n "" > "${fname}" - local -- dep='' - for dep in "$@"; do - [[ -z $dep ]] && continue - if [[ ! $dep == */* ]]; then - # no version given: derive the version - # from the currently loaded module - dep=$( "${modulecmd}" bash list -t 2>&1 1>/dev/null \ - | grep "^${dep}/" ) - fi - echo "${dep}" >> "${fname}" - done - } - ${rm} -f "${PREFIX}/${FNAME_RDEPS}" - ${rm} -f "${modulefile_dir}/.deps-${module_version}" - ${rm} -f "${PREFIX}/${FNAME_IDEPS}" - if (( ${#runtime_dependencies[@]} > 0 )); then - if [[ "${ol_name}" == 'base' ]]; then - _write_file \ - "${PREFIX}/${FNAME_RDEPS}" \ - "${runtime_dependencies[@]}" + #.............................................................. + bm::install_runtime_dependencies() { + local -r __doc__="Install runtime dependencies." + _write_file(){ + local -r fname="$1" + shift + std::info \ + "%s " \ + "${module_name}/${module_version}:" \ + "writing run-time dependencies to ${fname} ..." + echo -n "" > "${fname}" + local -- dep='' + for dep in "$@"; do + [[ -z $dep ]] && continue + if [[ ! $dep == */* ]]; then + # no version given: derive the version + # from the currently loaded module + dep=$( modulecmd bash list -t 2>&1 1>/dev/null \ + | grep "^${dep}/" ) fi + echo "${dep}" >> "${fname}" + done + } + rm -f "${PREFIX}/${FNAME_RDEPS}" + rm -f "${modulefile_dir}/.deps-${module_version}" + rm -f "${PREFIX}/${FNAME_IDEPS}" + if (( ${#runtime_dependencies[@]} > 0 )); then + if [[ "${ol_name}" == 'base' ]]; then _write_file \ - "${modulefile_dir}/.deps-${module_version}" \ + "${PREFIX}/${FNAME_RDEPS}" \ "${runtime_dependencies[@]}" fi - if (( ${#install_dependencies[@]} > 0 )); then - _write_file \ - "${PREFIX}/${FNAME_IDEPS}" \ - "${install_dependencies[@]}" - fi + _write_file \ + "${modulefile_dir}/.deps-${module_version}" \ + "${runtime_dependencies[@]}" + fi + if (( ${#install_dependencies[@]} > 0 )); then + _write_file \ + "${PREFIX}/${FNAME_IDEPS}" \ + "${install_dependencies[@]}" + fi - } + } - install_config_file() { - [[ "${is_subpkg}" == 'yes' ]] && return 0 + #.............................................................. + bm::set_relstages() { + local __doc__=' + Set/update release stages. + ' + [[ "${Options['is_subpkg']}" == 'yes' ]] && return 0 - local -r legacy_config_file="${modulefile_dir}/.release-${module_version}" - local -- status_legay_config_file='unchanged' - local -- relstage_legacy='' - if [[ -r "${legacy_config_file}" ]]; then - read -r relstage_legacy < "${legacy_config_file}" - if [[ "${relstage_legacy}" != "${module_release}" ]]; then - status_legay_config_file='changed' - fi - else - status_legay_config_file='new' - fi - ${mkdir} -p "${modulefile_dir}" - if [[ "${status_legay_config_file}" != 'unchanged' ]]; then - echo "${module_release}" > "${legacy_config_file}" - fi + # + # update .config-${module_version} + # + local -r yaml_config_file="${modulefile_dir}/.config-${module_version}" + local -- relstage='new' + if [[ -r "${yaml_config_file}" ]]; then + while read -r key value; do + local -n ref="${key:0:-1}" + ref="${value}" + done < "${yaml_config_file}" + fi + if [[ "${relstage}" != "${module_release}" ]]; then + std::info \ + "%s " \ + "${module_name}/${module_version}:" \ + "changing release stage from" \ + "'${relstage}' to '${module_release}' ..." + else + std::info \ + "%s " \ + "${module_name}/${module_version}:" \ + "setting release stage to '${module_release}' ..." + fi - local -r yaml_config_file="${modulefile_dir}/.config-${module_version}" - local -- status_yaml_config_file='unchanged' - if [[ "${opt_update_modulefiles}" == 'yes' ]]; then - status_yaml_config_file='update' - elif [[ -r "${yaml_config_file}" ]]; then - while read -r key value; do - local -n ref="${key:0:-1}" - ref="${value}" - done < "${yaml_config_file}" - if [[ "${relstage}" != "${module_release}" ]]; then - status_yaml_config_file='changed' - fi - else - status_yaml_config_file='new' - fi - if [[ "${status_yaml_config_file}" != 'unchanged' ]]; then - echo "relstage: ${module_release}" > "${yaml_config_file}" - if (( ${#Systems[@]} > 0 )); then - echo -n "systems: [${Systems[0]}" >> "${yaml_config_file}" - local -- system='' - for system in "${Systems[@]:1}"; do - echo -n ", ${system}" >> "${yaml_config_file}" - done - echo "]" >> "${yaml_config_file}" - fi - fi + echo "relstage: ${module_release}" > "${yaml_config_file}" + if (( ${#Systems[@]} > 0 )); then + echo -n "systems: [${Systems[0]}" >> "${yaml_config_file}" + local -- system='' + for system in "${Systems[@]:1}"; do + echo -n ", ${system}" >> "${yaml_config_file}" + done + echo "]" >> "${yaml_config_file}" + fi - case ${status_yaml_config_file},${status_legay_config_file} in - unchanged,unchanged | new,unchanged) - : - ;; - unchanged,changed ) - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "changing release stage from" \ - "'${relstage_legacy}' to '${module_release}' in legacy config file ..." - ;; - unchanged,new ) - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "setting release stage to '${module_release}' in legacy config file ..." - ;; - changed,unchanged | changed,changed | changed,new | new,changed ) - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "changing release stage from" \ - "'${relstage_legacy}' to '${module_release}' ..." + # + # Update .modulerc + # + local -r modulerc_file="${modulefile_dir}/.modulerc" + echo '#%Module' > "${modulerc_file}" + echo 'if {[info exists ModuleTool] && $ModuleTool == {Modules}} {' \ + >> "${modulerc_file}" + + while read config_file; do + local version="${config_file##*/}" + version="${version/.config-}" + local name="${module_name}/${version}" + local relstage=$(awk '/relstage:/ {print $2}' "${config_file}") + case ${relstage} in + unstable ) + echo " module-tag u ${name}" \ + >> "${modulerc_file}" ;; - new,new ) - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "setting release stage to '${module_release}' ..." + deprecated ) + echo " module-tag d ${name}" \ + >> "${modulerc_file}" ;; esac - } - update_modulerc() { - [[ "${is_subpkg}" == 'yes' ]] && return 0 - - local -r modulerc_file="${modulefile_dir}/.modulerc" - - echo '#%Module' > "${modulerc_file}" - echo 'if {[info exists ModuleTool] && $ModuleTool == {Modules}} {' >> "${modulerc_file}" - - while read config_file; do - local version="${config_file##*/}" - version="${version/.config-}" - local name="${module_name}/${version}" - local relstage=$(awk '/relstage:/ {print $2}' "${config_file}") - case ${relstage} in - unstable ) - echo " module-tag u ${name}" >> "${modulerc_file}" - ;; - deprecated ) - echo " module-tag d ${name}" >> "${modulerc_file}" - ;; - esac - done < <(find "${modulefile_dir}" -type f -name '.config-*') - echo '}' >> "${modulerc_file}" - } - - install_modulefile - install_runtime_dependencies - install_config_file - update_modulerc + done < <(find "${modulefile_dir}" -type f -name '.config-*') + echo '}' >> "${modulerc_file}" } + #.............................................................. bm::cleanup_modulefiles(){ # # FIXME: Can it happen, that we remove module-/config-files which @@ -1415,7 +1120,7 @@ _build_module() { # This function is only called if the option '--cleanup-modulefiles' # was specified. # - [[ "${is_subpkg}" == 'yes' ]] && return 0 + [[ "${Options['is_subpkg']}" == 'yes' ]] && return 0 local -- ol='' for ol in "${Overlays[@]}"; do [[ "${ol}" == "${ol_name}" ]] && continue @@ -1427,7 +1132,7 @@ _build_module() { std::info "%s "\ "${module_name}/${module_version}:" \ "removing modulefile from overlay '${ol}' ..." - ${rm} -f "${fname}" + rm -f "${fname}" fi fname="${dir}/.release-${module_version}" if [[ -e "${fname}" ]]; then @@ -1435,18 +1140,19 @@ _build_module() { "%s " \ "${module_name}/${module_version}:" \ "removing release file from overlay '${ol}' ..." - ${rm} -f "${fname}" + rm -f "${fname}" fi done } + #.............................................................. bm::cleanup_build() { - [[ ${enable_cleanup_build} != 'yes' ]] && return 0 + [[ ${Options['cleanup_build']} != 'yes' ]] && return 0 [[ "${BUILD_DIR}" == "${SRC_DIR}" ]] && return 0 [[ -d "${BUILD_DIR}/../.." ]] || return 0 { cd "/${BUILD_DIR}/.." || std::die 42 "Internal error" - [[ "$(${pwd})" == "/" ]] && \ + [[ "$(pwd)" == "/" ]] && \ std::die 1 \ "%s " "${module_name}/${module_version}:" \ "Oops: internal error:" \ @@ -1456,13 +1162,14 @@ _build_module() { "%s " \ "${module_name}/${module_version}:" \ "Cleaning up '${BUILD_DIR}'..." - ${rm} -rf "${BUILD_DIR##*/}" + rm -rf "${BUILD_DIR##*/}" }; return 0 } + #.............................................................. bm::cleanup_src() { - [[ ${enable_cleanup_src} != 'yes' ]] && return 0 + [[ ${Options['cleanup_src']} != 'yes' ]] && return 0 [[ -d "${BUILD_DIR}/../.." ]] || return 0 { cd "/${SRC_DIR}/.." || std::die 42 "Internal error" @@ -1475,7 +1182,7 @@ _build_module() { "%s " \ "${module_name}/${module_version}:" \ "Cleaning up '${SRC_DIR}'..." - ${rm} -rf "${SRC_DIR##*/}" + rm -rf "${SRC_DIR##*/}" }; return 0 } @@ -1488,13 +1195,12 @@ _build_module() { local -- target="$2" # prep, configure, compile or install if [[ -e "${BUILD_DIR}/.${target}" ]] && \ - [[ ${force_rebuild} == 'no' ]]; then + [[ ${Options['force_rebuild']} == 'no' ]]; then return 0 fi - debug "build functions for target ${target}: ${ModuleConfig[target_funcs:${target}]}" local -- t='' if (( ${#ModuleConfig[target_funcs:${target}]} == 0 )); then - ${touch} "${BUILD_DIR}/.${target}" + touch "${BUILD_DIR}/.${target}" return 0 fi local -A target_info=( @@ -1523,41 +1229,40 @@ _build_module() { std::die 10 "Function is not defined -- $t" fi done - ${touch} "${BUILD_DIR}/.${target}" + touch "${BUILD_DIR}/.${target}" } # build_target() - [[ ${dry_run} == yes ]] && std::die 0 "" - - ${mkdir} -p "${SRC_DIR}" - ${mkdir} -p "${BUILD_DIR}" + mkdir -p "${SRC_DIR}" + mkdir -p "${BUILD_DIR}" build_target "${SRC_DIR}" prep - [[ "${build_target}" == "prep" ]] && return 0 + [[ "${Options['build_target']}" == "prep" ]] && return 0 build_target "${BUILD_DIR}" configure - [[ "${build_target}" == "configure" ]] && return 0 + [[ "${Options['build_target']}" == "configure" ]] && return 0 build_target "${BUILD_DIR}" compile - [[ "${build_target}" == "compile" ]] && return 0 + [[ "${Options['build_target']}" == "compile" ]] && return 0 - ${mkdir} -p "${PREFIX}" + mkdir -p "${PREFIX}" build_target "${BUILD_DIR}" install } # bm::compile_and_install() + #...................................................................... bm::remove_module() { if [[ -d "${PREFIX}" ]]; then std::info \ "%s " \ "${module_name}/${module_version}:" \ "removing all files in '${PREFIX}' ..." - [[ "${dry_run}" == 'no' ]] && ${rm} -rf "${PREFIX}" + rm -rf "${PREFIX}" fi if [[ -e "${modulefile_name}" ]]; then std::info \ "%s " \ "${module_name}/${module_version}:" \ "removing modulefile '${modulefile_name}' ..." - [[ "${dry_run}" == 'no' ]] && ${rm} -vf "${modulefile_name}" + rm -vf "${modulefile_name}" fi local -- release_file="${modulefile_dir}/.release-${module_version}" if [[ -e "${release_file}" ]]; then @@ -1565,7 +1270,7 @@ _build_module() { "%s " \ "${module_name}/${module_version}:" \ "removing release file '${release_file}' ..." - [[ "${dry_run}" == 'no' ]] && ${rm} -vf "${release_file}" + rm -vf "${release_file}" fi release_file="${modulefile_dir}/.config-${module_version}" if [[ -e "${release_file}" ]]; then @@ -1573,19 +1278,21 @@ _build_module() { "%s " \ "${module_name}/${module_version}:" \ "removing release file '${release_file}' ..." - [[ "${dry_run}" == 'no' ]] && ${rm} -vf "${release_file}" + rm -vf "${release_file}" fi - ${rmdir} -p "${modulefile_dir}" 2>/dev/null || : + rmdir -p "${modulefile_dir}" 2>/dev/null || : } + #...................................................................... bm::deprecate_module(){ std::info \ "%s " \ "${module_name}/${module_version}:" \ "is deprecated, skiping!" - bm::install_module_config + bm::set_relstages } + #...................................................................... die_sub_package_name_missing(){ std::die 3 "Name of sub-package not specified in \n===\n$1\n===\n" } @@ -1593,11 +1300,15 @@ _build_module() { std::die 3 "Version of sub-package not specified in \n===\n$1\n===\n" } bm::build_sub_packages(){ - local -- yaml="$1" + [[ "${Options['skip_subpkgs']}" == 'yes' ]] && return 0 + + local -- sub_packages_yml="$1" + + [[ -n "${sub_packages_yml}" ]] || return 0 # get no of sub-packages to build local -i l=0 - yml::get_seq_length l yaml . + yml::get_seq_length l sub_packages_yml . (( l == 0 )) && return 0 std::info "\n %d sub-package(s) to build..." "$l" @@ -1611,73 +1322,68 @@ _build_module() { local -- key='' local -a keys=() - yml::get_keys keys yaml "${node}" + yml::get_keys keys sub_packages_yml "${node}" for key in "${keys[@]}"; do case ${key,,} in 'name' ) yml::get_value \ pkg_name \ - yaml \ + sub_packages_yml \ "${node}.${key}" \ - '!!str' || \ - yml::die_parsing "${yaml}" + '!!str' ;; 'version' ) yml::get_value \ pkg_version \ - yaml \ + sub_packages_yml \ "${node}.${key}" \ - '!!str' || \ - yml::die_parsing "${yaml}" + '!!str' ;; 'build_args' ) local -- value='' yml::get_seq \ value \ - yaml \ - "${node}.${key}" || \ - yml::die_parsing "${yaml}" + sub_packages_yml \ + "${node}.${key}" readarray -t pkg_build_args <<< "${value}" ;; * ) die_invalid_key \ - "${yaml}" \ + "${sub_packages_yml}" \ "in subpackage '$i'" \ "${key}" ;; esac done [[ -n "${pkg_name}" ]] || \ - die_sub_package_name_missing "${yaml}" + die_sub_package_name_missing "${sub_packages_yml}" [[ -n "${pkg_version}" ]] || \ - die_sub_package_version_missing "${yaml}" + die_sub_package_version_missing "${sub_packages_yml}" - (( opt_verbose > 0 )) && \ + (( Options['verbose'] > 0 )) && \ pkg_build_args+=( '--verbose' ) - [[ "${opt_debug}" == 'yes' ]] && \ + [[ "${Options['debug']}" == 'yes' ]] && \ pkg_build_args+=( '--debug' ) - [[ "${opt_force_rebuild}" == 'yes' ]] && \ + [[ "${Options['force_rebuild']}" == 'yes' ]] && \ pkg_build_args+=( '-f' ) pkg_build_args+=( "--parent-prefix=${PREFIX}" ) "$BUILDBLOCK_DIR/build-${pkg_name}" \ "${pkg_name}/${pkg_version}" \ - "${pkg_build_args[@]}" + "${pkg_build_args[@]}" || \ + std::die 255 "Building sub-package failed - ${pkg_name}/${pkg_version}" done - debug "Building sub-packages done" } - std::info \ "%s " \ "${module_name}/${module_version}:" \ - ${with_modules:+with ${with_modules[@]}} \ - "building ..." + ${with_modules:+with ${with_modules[@]}} bm::load_overlays bm::load_build_dependencies BUILD_ROOT="${PMODULES_TMPDIR}/${module_name}-${module_version}" SRC_DIR="${BUILD_ROOT}/src" - if [[ "${compile_in_sourcetree,,}" == 'yes' ]]; then + if [[ "${ModuleConfig['compile_in_sourcetree']}" == 'yes' ]]; then BUILD_DIR="${SRC_DIR}" else BUILD_DIR="${BUILD_ROOT}/build" @@ -1690,31 +1396,29 @@ _build_module() { local -- modulefile_dir='' local -- modulefile_name='' - # the group must have been defined - otherwise we cannot continue - [[ -n ${GROUP} ]] || \ - std::die 5 \ - "%s " "${module_name}/${module_version}:" \ - "Module group not set! Aborting ..." - - [[ "${is_subpkg}" != 'yes' ]] && bm::set_full_module_name_and_prefix - + if [[ "${Options['is_subpkg']}" != 'yes' ]]; then + bm::set_full_module_name_and_prefix + else + PREFIX="${Options['prefix']}" + fi # ok, finally we can start ... - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - ${with_modules:+build with ${with_modules[@]}} - if [[ "${module_release}" == 'remove' ]]; then bm::remove_module elif [[ "${module_release}" == 'deprecated' ]]; then bm::deprecate_module - elif [[ -d "${PREFIX}" && "${is_subpkg}" != 'yes' && "${force_rebuild}" == 'no' ]]; then + elif [[ -d "${PREFIX}" && \ + "${Options['is_subpkg']}" != 'yes' && \ + "${Options['force_rebuild']}" == 'no' ]]; then std::info \ "%s " \ "${module_name}/${module_version}:" \ "already exists, not rebuilding ..." - if [[ "${opt_update_modulefiles}" == 'yes' ]]; then + if [[ "${Options['update_modulefiles']}" == 'yes' ]]; then bm::install_module_config + bm::install_runtime_dependencies + bm::set_relstages + elif [[ "${Options['update_relstage']}" == 'yes' ]]; then + bm::set_relstages else std::info \ "%s " \ @@ -1722,7 +1426,7 @@ _build_module() { "modulefile and configuration are not updated." fi else - if [[ "${opt_clean_install,,}" == 'yes' ]]; then + if [[ "${Options['clean_install']}" == 'yes' ]]; then std::info \ "%s " \ "${module_name}/${module_version}:" \ @@ -1738,16 +1442,18 @@ _build_module() { bm::compile_and_install bm::post_install bm::install_module_config + bm::install_runtime_dependencies + bm::set_relstages bm::cleanup_build bm::cleanup_src bm::build_sub_packages "${ModuleConfig['sub_packages']}" fi - if [[ "${opt_cleanup_modulefiles}" == 'yes' ]]; then + if [[ "${Options['cleanup_modulefiles']}" == 'yes' ]]; then bm::cleanup_modulefiles fi std::info \ - "\n%s\n%s" \ + "%s\n%s" \ "${module_name}/${module_version}: done" \ "* * * * *" } diff --git a/src/libpmodules.bash b/src/libpmodules.bash index 4000cf7..579b7a3 100755 --- a/src/libpmodules.bash +++ b/src/libpmodules.bash @@ -1,11 +1,24 @@ #!/bin/bash +# Requires: yq (Go version) >= 4.0! + +set -o pipefail +set -o nounset +shopt -s extglob +shopt -s nullglob + +(( BASH_VERSINFO[0] >= 5 && BASH_VERSINFO[1] >= 3 )) || \ + { + printf "%s\n" "Bash 5.3+ required" 1>&2 + exit 255 + } + + declare -r __MODULEFILES_DIR__='modulefiles' -declare PMODULES_VERSION='2.1.0' -declare -A GroupDepths=(['none']=0) +declare -g PMODULES_DISTFILESDIR PMODULES_TMPDIR declare -a Overlays=() -declare -A OverlayInfo +declare -A OverlayInfo=() # An overlay has a type defining the way modules in this overlay # make modules in the other overlays unavailable. @@ -40,53 +53,6 @@ declare -A OverlayInfo # This type can be used to make hole groups unavailable. # # -declare -r ol_normal='n' -declare -r ol_hiding='h' -declare -r ol_replacing='r' - -compute_group_depth () { - : " - Compute depth of modulefile directory. - " - local -n result="$1" # ref.var to return result - local -r dir="$2" # absolute path of a modulefile directory - if [[ ! -d "${dir}" ]]; then - ${mkdir} -p "${dir}" || \ - std::die 1 "Cannot create directory -- ${dir}" - fi - local -- group=${dir%/*} - local -- group=${group##*/} - result=$(${find} "${dir}" -depth \( -type f -o -type l \) \ - -printf "%d" -quit 2>/dev/null) - (( result-=2 )) || : - # if a group doesn't contain a modulefile, depth is negativ - # :FIXME: better solution? - (( result < 0 )) && (( result = 0 )) || : -} - -scan_groups () { - : " - (Re-)Scan available groups in the overlays $@ and compute group depth's. - Set GroupDepths[group]. - " - local -- ol='' - local -i depth=0 - for ol in "$@"; do - [[ "${OverlayInfo[${ol}:layout]}" == 'Pmodules' ]] || continue - local -- modulefiles_root="${OverlayInfo[${ol}:modulefiles_root]}" - local -- dir='' - for dir in "${modulefiles_root}"/*/"${__MODULEFILES_DIR__}"; do - local -- group="${dir%/*}" - group="${group##*/}" - if [[ ! -v GroupDepths[${group}] ]]; then - compute_group_depth depth "${dir}" - GroupDepths[$group]=${depth} - fi - done - done - GroupDepths['none']=0 -} - declare -A DefaultPmodulesConfig=( ['defaultgroups']='Tools:Programming' ['default_groups']='Tools:Programming' @@ -94,10 +60,7 @@ declare -A DefaultPmodulesConfig=( ['default_reltages']='stable' ['tmpdir']="/var/tmp/${USER}" ['tmp_dir']="/var/tmp/${USER}" - ['distfilesdir']="${HOME}/.cache/Pmodules/distfiles" - ['distfiles_dir']="${HOME}/.cache/Pmodules/distfiles" ['download_dir']="${HOME}/.cache/Pmodules/distfiles" - ['overlays']='' ) declare -A OverlayConfigKeys=( @@ -122,128 +85,139 @@ declare -A OverlayPathConfigKeys=( ) -yml::die_parsing(){ - std::die 3 "error parsing YAML:\n----\n$1\n----" -} - -yml::die_type_error(){ - std::die 3 "%s" \ - "Value of '$1' must be of type '$2', but is '$3'!" -} - -yml::die_invalid_key(){ - std::die 3 "%s -- %s\n%s" \ - "Invalid key in configuration" \ - "$1" "$2" -} - -yml::die_read_file(){ - std::die 3 "Cannot read file '$1'. Please check with yamllint!" +rtcfg::die_invalid_key(){ + std::die 3 "Invalid key in configuration -- $1\n$2" } -yml::read_file(){ - local -n yml_content="$1" - local -- yml_fname="$2" - local -- yml_node="$3" - - yml_content=$( ${yq} -Ne e "${yml_node}|explode(.)" "${yml_fname}" 2>/dev/null ) || \ - yml::die_read_file "${yml_fname}" -} - -yml::get_keys(){ - local -n yml_keys="$1" - local -n yml_input="$2" - local -- yml_node="$3" - - local -- str='' - str="$( ${yq} -e "${yml_node}|keys|.[]" 2>/dev/null <<<"${yml_input}")" || \ - { yml_keys=(); return 0; }; - readarray -t yml_keys <<<"${str}" -} - -yml::get_type(){ - local -n yml_type="$1" - local -n yml_input="$2" - local -- yml_node="$3" - yml_type="$( ${yq} -e "${yml_node}|type" 2>/dev/null <<<"${yml_input}")" || \ - yml::die_parsing "${yml_input}" -} - -yml::get_value(){ - local -n yml_val="$1" - local -n yml_input="$2" - local -- yml_node="$3" - local -- yml_expected_type="$4" - - local -- type='' - type="$( ${yq} -e "${yml_node}|type" 2>/dev/null <<<"${yml_input}")" || \ - yml::die_parsing "${yml_input}" - [[ "${type}" == "${yml_expected_type}" ]] || \ - yml::die_type_error "${yml_node}" "${yml_expected_type:2}" "${type:2}" - yml_val=$( ${yq} -e "${yml_node}" 2>/dev/null <<<"${yml_input}" ) || \ - return 1 -} - -yml::get_seq_length(){ - - local -n yml_seq_length="$1" # [out] number of variants - local -n yml_input="$2" # [in] YAML input - local -- yml_node="$3" # [in] node - - yml_seq_length=$(${yq} -e "${yml_node}|length" 2>/dev/null <<<"${yml_input}") || \ - yml::die_parsing "${yml_input}" -} - -yml::get_seq(){ - local -n yml_val="$1" - local -n yml_input="$2" - local -- yml_node="$3" - - local -- type='' - type=$( ${yq} -e "${yml_node}|type" 2>/dev/null <<<"${yml_input}") - if [[ "${type:2}" == 'null' ]]; then - yml_val='' - return 0 - fi - [[ "${type}" == '!!seq' ]] || \ - yml::die_type_error "${yml_node}" 'seq' "${type:2}" - local -i length=0 - length=$(${yq} -e "${yml_node}|length" 2>/dev/null <<<"${yml_input}") - if (( length == 0 )); then - yml_val='' - return 0 - fi - yml_val=$( ${yq} -e "${yml_node}[]" 2>/dev/null <<<"${yml_input}" ) || \ - return 1 -} - -yml::die_invalid_ol_install_root(){ +rtcfg::die_invalid_ol_install_root(){ std::die 3 "Invalid installation root directory for overlay '$1' -- $2" } -yml::die_invalid_ol_modulefiles_root(){ + +rtcfg::die_invalid_ol_modulefiles_root(){ std::die 3 "Invalid modulefiles root directory for overlay '$1' -- $2" } -yml::die_invalid_ol_type(){ +rtcfg::die_invalid_ol_type(){ std::die 3 "Invalid type for overlay '$1' -- $2" } -yml::die_invalid_ol_layout(){ +rtcfg::die_invalid_ol_layout(){ std::die 3 "Invalid layout for overlay '$1' -- $2\nAllowed values are 'Pmodules', 'Spack' and 'flat'." } -yml::die_invalid_ol_relstage(){ +rtcfg::die_invalid_ol_relstage(){ std::die 3 "Invalid default release stage for overlay '$1' -- $2" } -yml::die_invalid_ol_key(){ - std::die 3 "%s -- %s\n%s" \ - "Invalid key in configuration" \ - "$1" "$2" +## +## rtcfg::_get_config_of_overlay - read configuration of an overlay +## +## Arguments: +## $1 - YAML formatted overlay configuration +## $2 - name of overlay +## +rtcfg::_get_config_of_overlay(){ + local -r yaml_input="$1" # YAML formatted string + local -r ol_name="$2" # name of overlay + + Overlays+=( "${ol_name}" ) + # init overlay with defaults + local -- key='' + for key in "${!OverlayConfigKeys[@]}"; do + OverlayInfo[${ol_name}:${key}]="${OverlayConfigKeys[${key}]}" + done + for key in "${!OverlayPathConfigKeys[@]}"; do + OverlayInfo[${ol_name}:${key}]="${OverlayPathConfigKeys[${key}]}" + done + # get keys in YAML input + local -- node=".\"${ol_name}\"" + local -a keys=() + yml::get_keys keys yaml_input "${node}" + local -- value='' + for key in "${keys[@]}"; do + case ${key,,} in + install_root ) + yml::get_value value yaml_input "${node}.${key}" '!!str' + OverlayInfo[${ol_name}:install_root]=$(envsubst <<< "${value}") + mkdir -p "${OverlayInfo[${ol_name}:install_root]}" 2>/dev/null + [[ -d ${OverlayInfo[${ol_name}:install_root]} ]] || \ + rtcfg::die_invalid_ol_install_root "${ol_name}" "${value}" + ;; + modulefiles_root ) + yml::get_value value yaml_input "${node}.${key}" '!!str' + OverlayInfo[${ol_name}:modulefiles_root]=$(envsubst <<< "${value}") + mkdir -p "${OverlayInfo[${ol_name}:modulefiles_root]}" 2>/dev/null + [[ -d ${OverlayInfo[${ol_name}:modulefiles_root]} ]] || \ + rtcfg::die_invalid_ol_modulefiles_root "${ol_name}" "${value}" + ;; + type ) + yml::get_value value yaml_input "${node}.${key}" '!!str' + case ${value} in + 'n' | 'h' | 'r' ) + : + ;; + * ) + rtcfg::die_invalid_ol_type "${ol_name}" "${value}" + ;; + esac + OverlayInfo[${ol_name}:type]="${value}" + ;; + layout ) + yml::get_value value yaml_input "${node}.${key}" '!!str' + case ${value} in + 'Pmodules' | 'Spack' | 'flat' ) + : + ;; + * ) + rtcfg::die_invalid_ol_layout "${ol_name}" "${value}" + ;; + esac + OverlayInfo[${ol_name}:${key,,}]="${value}" + ;; + default_relstage ) + yml::get_value value yaml_input "${node}.${key}" '!!str' + case ${value} in + 'unstable' | 'stable' | 'deprecated' ) + : + ;; + *) + rtcfg::die_invalid_ol_relstage "${ol_name}" "${value}" + ;; + esac + OverlayInfo[${ol_name}:${key}]="${value}" + ;; + conflicts | excludes | groups) + yml::get_seq value yaml_input "${node}.${key}" + local -a tmp_array=() + readarray -t tmp_array <<<${value} + local -- tmp_str='' + printf -v tmp_str "%s:" "${tmp_array[@]}" + OverlayInfo[${ol_name}:${key}]=$(envsubst <<<"${tmp_str%:}" ) + ;; + path_config ) + yml::get_value value yaml_input "${node}.${key}" '!!seq' + rtcfg::_parse_path_config value "${ol_name}" + ;; + * ) + rtcfg::die_invalid_key "${key}" "${yaml_input}" + ;; + esac + done + OverlayInfo[${ol_name}:used]='no' + if [[ -z "${OverlayInfo[${ol_name}:modulefiles_root]}" ]]; then + OverlayInfo[${ol_name}:modulefiles_root]=${OverlayInfo[${ol_name}:install_root]} + fi } -parse_path_config(){ +## +## rtcfg::_parse_path_config - parse path configuration +## +## Arguments: +## $1 - YAML text +## $2 - name of overlay +## +rtcfg::_parse_path_config(){ local -n yaml="$1" local -- ol_name="$2" @@ -266,8 +240,7 @@ parse_path_config(){ yml::get_seq \ str \ yaml \ - "${node}.${key}" || \ - yml::die_parsing "${yaml}" + "${node}.${key}" readarray -t target_cpus <<<${str} local -- system_cpu=$(uname -p) local -- cpu='' @@ -282,15 +255,15 @@ parse_path_config(){ ;; modulepath | modulepath_unstable | modulepath_stable | modulepath_deprecated) local -- str='' - yml::get_seq str yaml "${node}.${key}" '!!seq' + yml::get_seq str yaml "${node}.${key}" local -a tmp_array=() readarray -t tmp_array <<<${str} local -- modulepath='' local -- dir='' - export target_cpu='' + local -- target_cpu='' for dir in "${tmp_array[@]}"; do for target_cpu in "${target_cpus[@]}"; do - std::append_path modulepath $(${envsubst} <<< "${dir}") + std::append_path modulepath $(envsubst <<< "${dir}") done done OverlayInfo[${ol_name}:${key}]="${modulepath}" @@ -301,107 +274,20 @@ parse_path_config(){ done } -pm::read_config(){ - : " - Read Pmodules configuration files 'PMODULES_ROOT/config/Pmodules.yaml' - and '${HOME}/.Pmodules/Pmodules.yaml'. - " - get_config_of_overlay(){ - : " - Get configuration of an overlay. - " - local -r yaml_input="$1" # YAML formatted string - local -r ol_name="$2" # name of overlay - - Overlays+=( "${ol_name}" ) - # init overlay with defaults - local -- key='' - for key in "${!OverlayConfigKeys[@]}"; do - OverlayInfo[${ol_name}:${key}]="${OverlayConfigKeys[${key}]}" - done - for key in "${!OverlayPathConfigKeys[@]}"; do - OverlayInfo[${ol_name}:${key}]="${OverlayPathConfigKeys[${key}]}" - done - # get keys in YAML input - local -- node=".\"${ol_name}\"" - local -a keys=() - yml::get_keys keys yaml_input "${node}" - local -- value='' - for key in "${keys[@]}"; do - case ${key,,} in - install_root ) - yml::get_value value yaml_input "${node}.${key}" '!!str' - OverlayInfo[${ol_name}:install_root]=$(${envsubst} <<< "${value}") - mkdir -p "${OverlayInfo[${ol_name}:install_root]}" 2>/dev/null - [[ -d ${OverlayInfo[${ol_name}:install_root]} ]] || \ - yml::die_invalid_ol_install_root "${ol_name}" "${value}" - ;; - modulefiles_root ) - yml::get_value value yaml_input "${node}.${key}" '!!str' - OverlayInfo[${ol_name}:modulefiles_root]=$(${envsubst} <<< "${value}") - mkdir -p "${OverlayInfo[${ol_name}:modulefiles_root]}" 2>/dev/null - [[ -d ${OverlayInfo[${ol_name}:modulefiles_root]} ]] || \ - yml::die_invalid_ol_modulefiles_root "${ol_name}" "${value}" - ;; - type ) - yml::get_value value yaml_input "${node}.${key}" '!!str' - case ${value} in - "${ol_normal}" | "${ol_replacing}" | "${ol_hiding}" ) - : - ;; - * ) - yml::die_invalid_ol_type "${ol_name}" "${value}" - ;; - esac - OverlayInfo[${ol_name}:type]="${value}" - ;; - layout ) - yml::get_value value yaml_input "${node}.${key}" '!!str' - case ${value} in - 'Pmodules' | 'Spack' | 'flat' ) - : - ;; - * ) - yml::die_invalid_ol_layout "${ol_name}" "${value}" - ;; - esac - OverlayInfo[${ol_name}:${key,,}]="${value}" - ;; - default_relstage ) - yml::get_value value yaml_input "${node}.${key}" '!!str' - case ${value} in - 'unstable' | 'stable' | 'deprecated' ) - : - ;; - *) - yml::die_invalid_ol_relstage "${ol_name}" "${value}" - ;; - esac - OverlayInfo[${ol_name}:${key}]="${value}" - ;; - conflicts | excludes | groups) - yml::get_seq value yaml_input "${node}.${key}" '!!seq' - local -a tmp_array=() - readarray -t tmp_array <<<${value} - local -- tmp_str='' - printf -v tmp_str "%s:" "${tmp_array[@]}" - OverlayInfo[${ol_name}:${key}]=$(${envsubst} <<<"${tmp_str%:}" ) - ;; - path_config ) - yml::get_value value yaml_input "${node}.${key}" '!!seq' - parse_path_config value "${ol_name}" - ;; - * ) - yml::die_invalid_ol_key "${key}" "${yaml_input}" - ;; - - esac - done - OverlayInfo[${ol_name}:used]='no' - if [[ -z "${OverlayInfo[${ol_name}:modulefiles_root]}" ]]; then - OverlayInfo[${ol_name}:modulefiles_root]=${OverlayInfo[${ol_name}:install_root]} - fi - } +## +## rtcfg::read_config - +## +## Read modules configuration. +## +## In case of Pmodules read 'PMODULES_ROOT/config/Pmodules.yaml' +## a nd '${HOME}/.Pmodules/Pmodules.yaml'. +## +## In case of Tcl Environemnt Modules get the config from running +## module use +## +rtcfg::read_config(){ + local -- tmp_dir="${DefaultPmodulesConfig['tmp_dir']}" + local -- download_dir="${DefaultPmodulesConfig['download_dir']}" get_config(){ : " @@ -410,7 +296,7 @@ pm::read_config(){ local -r config_file="$1" # Pmodules configuration file local -- yaml_input='' - yml::read_file yaml_input "${config_file}" '.' + yml::read_file yaml_input "${config_file}" local -- key='' local -a keys=() @@ -418,38 +304,37 @@ pm::read_config(){ for key in "${keys[@]}"; do case ${key,,} in defaultgroups | default_groups ) - yml::get_value DefaultGroups yaml_input ".${key}" '!!str' + : # ignore ;; defaultreleasestages | default_reltages ) - yml::get_value DefaultReleaseStages yaml_input ".${key}" '!!str' + : # ignore ;; tmpdir | tmp_dir ) - yml::get_value TmpDir yaml_input ".${key}" '!!str' - TmpDir="$(envsubst <<<"${TmpDir}")" + yml::get_value tmp_dir yaml_input ".${key}" '!!str' + tmp_dir="$(envsubst <<<"${tmp_dir}")" ;; distfilesdir | download_dir ) - yml::get_value DistfilesDir yaml_input ".${key}" '!!str' - DistfilesDir="$(envsubst <<<"${DistfilesDir}")" + yml::get_value download_dir yaml_input ".${key}" '!!str' + download_dir="$(envsubst <<<"${download_dir}")" ;; overlays ) local -- overlay='' local -a overlays=() local -- ol_configs='' - yml::get_value ol_configs yaml_input ".${key}" + yml::get_value ol_configs yaml_input ".${key}" "!!map" yml::get_keys overlays ol_configs "." for overlay in "${overlays[@]}"; do - - get_config_of_overlay "${yaml_input}" "${overlay}" + rtcfg::_get_config_of_overlay \ + "${ol_configs}" "${overlay}" done ;; * ) - yml::die_invalid_key "${key}" "${yaml_input}" + rtcfg::die_invalid_key "${key}" "${yaml_input}" ;; esac done } - Overlays=() if [[ -v PMODULES_HOME ]]; then # system config file local -- sys_config_file="${PMODULES_HOME%%/Tools*}/config/Pmodules.yaml" @@ -463,10 +348,6 @@ pm::read_config(){ "Configuration file " \ "does not exist or is not readable" \ "$_" - DefaultGroups="${DefaultPmodulesConfig['default_groups']}" - DefaultReleaseStages="${DefaultPmodulesConfig['default_reltages']}" - TmpDir="${DefaultPmodulesConfig['tmp_dir']}" - DistfilesDir="${DefaultPmodulesConfig['download_dir']}" get_config "${sys_config_file}" @@ -475,32 +356,34 @@ pm::read_config(){ get_config "${usr_config_file}" fi else - DefaultGroups="${DefaultPmodulesConfig['default_groups']}" - DefaultReleaseStages="${DefaultPmodulesConfig['default_reltages']}" - TmpDir="${DefaultPmodulesConfig['tmp_dir']}" - DistfilesDir="${DefaultPmodulesConfig['download_dir']}" + # If Tcl Environemnt Modules are used, retrieving the overlays + # is hacky as long as we don't have a solution to query the + # overlays via the module command in a well defined format. + # For now the output of `module use` is parsed. In the PSI's + # extension the overlays and their configuration are printed + # first in YAML format. The output that follows is truncated + # using sed(1). + # for the module use command xtrace must be switched off! local -- xtrace_is_on='' if [[ "$-" == *x* ]]; then xtrace_is_on=':' set +x fi - yaml_input="$(module use)" + local -- str="$(module use)" [[ "${xtrace_is_on}" ]] && set -x - yaml_input="$(${sed} -n '/Used release stages/q;p' <<<"${yaml_input}")" - yaml_input="$(${yq} -e '.*' <<<"${yaml_input}")" - local -a overlays=( $(${yq} -e 'keys|.[]' <<<"${yaml_input}") ) - #yml::get_keys overlays yaml_input 'keys|.[]' + yaml_input="$(sed -n '/Used release stages/q;p' <<<"${str}")" + yaml_input="$(yq -e '.*' <<<"${yaml_input}")" + local -a overlays=( $(yq -e 'keys|.[]' <<<"${yaml_input}") ) for overlay in "${overlays[@]}"; do - get_config_of_overlay "${yaml_input}" "${overlay}" + rtcfg::_get_config_of_overlay "${yaml_input}" "${overlay}" done fi OverlayInfo[none:type]='n' OverlayInfo[none:layout]='flat' - PMODULES_DISTFILESDIR="${PMODULES_DISTFILESDIR:-${DistfilesDir}}" - PMODULES_TMPDIR="${PMODULES_TMPDIR:-${TmpDir}}" - export PMODULES_DISTFILESDIR PMODULES_TMPDIR + PMODULES_DISTFILESDIR="${PMODULES_DISTFILESDIR:-${download_dir}}" + PMODULES_TMPDIR="${PMODULES_TMPDIR:-${tmp_dir}}" } # Local Variables: diff --git a/src/libstd.bash b/src/libstd.bash index a73ce58..7bd1c50 100644 --- a/src/libstd.bash +++ b/src/libstd.bash @@ -1,220 +1,132 @@ -#!/bin/bash - -# -# logging/message functions -# +#!/usr/bin/env bash + +(( BASH_VERSINFO[0] >= 5 )) || \ + { + printf "%s\n" "Bash 5.0+ is required" 1>&2 + exit 255 + } + +[[ -v __LIBSTD_BASH__ ]] && return 0 + +declare -- __LIBSTD_BASH__='1' + +set -o pipefail +set -o nounset +shopt -s extglob +shopt -s nullglob +shopt -s expand_aliases + +## +## std::{log,info,error,debug} - Write a message to stderr +## +## Arguments: +## $1 - [in] printf format string +## ${@:2} - [in] Message content +## +## Returns: +## exit code of printf +## +## Usage: +## std::info "%s" "This is a message" +## std::log() { - local -ri fd=$1 - local -r fmt="$2" - shift 2 - printf -- "${fmt}" "$@" 1>&$fd - printf -- "\n" 1>&$fd + (( $# < 2 )) && \ + std::die 255 "Wrong number of arguments in call to std::log!" + local -ri fd="$1" + local -r fmt="$2" + shift 2 + printf -- "${fmt}" "$@" 1>&$fd + printf -- '\n' 1>&$fd } +readonly -f std::log std::info() { - std::log 2 "$1" "${@:2}" + std::log 2 "$1" "${@:2}" } +readonly -f std::info std::error() { - std::log 2 "$1" "${@:2}" + std::log 2 "$1" "${@:2}" } +readonly -f std::error std::debug() { - [[ -v PMODULES_DEBUG ]] || return 0 - std::log 2 "$@" + [[ -v PMODULES_DEBUG ]] || return 0 + std::log 2 "$1" "${@:2}" } - +readonly -f std::debug + +## +## std::die - Write a message to stdout/stderr and exits program +## +## Arguments: +## $1 - [in] exit code +## $2 - [in] optional printf format string +## ${@:3} [in] optional message content +## +## Usage: +## std::die 2 "%s" "Invalid option -- foo" +## std::die() { - local -ri ec=$1 - shift - if (( ${#@} > 0 )); then - local -r fmt=$1 - shift - std::log 2 "$fmt" "$@" - fi - exit $ec + local -ri ec="$1" + shift + if (( ${#@} > 0 )); then + local -r fmt="$1" + shift + std::log 2 "${fmt}" "$@" + fi + exit "$ec" } - +readonly -f std::die + +## +## std::{def_cmd,def_cmd2} - Define function for used system tools. +## +## While building a module the PATH variable can change. With these +## functions we stick a system binary to a certain path. The function +## std::def_cmd2 unsets LD_PRELOAD to prevent code injection. +## +## If a binary is not in PATH, the function terminates the program. +## +## TODO: +## For most tools LD_LIBRARY_PATH should be unset. +## Exceptions: modulecmd, make +## +## Arguments: +## $1 - [in] system tool +## +## Globals: +## PATH +## +## Usage: +## std::def_cmd2 'ls' +## std::def_cmd(){ - which "$1" 2>/dev/null || std::die 255 "'$1' not found!" -} - -std::def_cmd1(){ - local -- name="$1" + local -r name="$1" + [[ ${name} =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]] || \ + std::die 255 "Invalid function name: '${name}'" local -- bin='' - bin=$(which $1) || std::die 255 "'${name}' not found!" + bin=$(command -v "$1") || std::die 255 "'${name}' not found!" - eval "${name}(){ - LD_PRELOAD= ${bin} \"\$@\" - } - declare -g ${name}=${name} - readonly -f ${name}" + alias "${name}"="${bin}" } +readonly -f std::def_cmd std::def_cmd2(){ - local -- name="$1" + local -r name="$1" + [[ ${name} =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]] || \ + std::die 255 "Invalid function name: '${name}'" local -- bin='' - bin=$(which $1) || std::die 255 "'${name}' not found!" + bin=$(command -v "$1") || std::die 255 "'${name}' not found!" - eval "${name}(){ - LD_PRELOAD= ${bin} \"\$@\" - } - declare -g ${name}=${name} - readonly -f ${name}" + alias "${name}"="LD_PRELOAD= ${bin}" } +readonly -f std::def_cmd2 -#.............................................................................. -# -# compare two version numbers -# -# std::version_compare -# - returns 0 if the version numbers are equal -# - returns 1 if first version number is higher -# - returns 2 if second version number is higher # -# std::version_lt -# - returns 0 if second version number is higher -# std::version_le -# - returns 0 if second version number is higher or equal -# std::version_gt -# - returns 0 if first version number is higher -# std::version_ge -# - returns 0 if first version number is higher or equal -# -# otherwise a value != 0 is returned -# -# Arguments: -# $1 first version number -# $2 second version number -# -# Note: -# Original implementation found on stackoverflow: -# https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash -# -std::version_compare () { - is_uint() { - [[ $1 =~ ^[0-9]+$ ]] - } - - [[ "$1" == "$2" ]] && return 0 - local ver1 ver2 - IFS='.' read -r -a ver1 <<<"$1" - IFS='.' read -r -a ver2 <<<"$2" - - # fill empty fields in ver1 with zeros - local -i i=0 - for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do - ver1[i]=0 - done - for ((i=0; i<${#ver1[@]}; i++)); do - [[ -z ${ver2[i]} ]] && ver2[i]=0 - if is_uint "${ver1[i]}" && is_uint "${ver2[i]}"; then - ((10#${ver1[i]} > 10#${ver2[i]})) && return 1 - ((10#${ver1[i]} < 10#${ver2[i]})) && return 2 - else - [[ ${ver1[i]} > ${ver2[i]} ]] && return 1 - [[ ${ver1[i]} < ${ver2[i]} ]] && return 2 - fi - done - return 0 -} -readonly -f std::version_compare - -std::version_lt() { - local -r __doc__=" - result: - 0 if version in $1 is less than version in $2. - >=1: otherwise - " - if (( $# == 1 )); then - local -- vers1="${V_PKG}" - local -- vers2="$1" - else - local -- vers1="$1" - local -- vers2="$2" - fi - std::version_compare "${vers1}" "${vers2}" - (( $? == 2 )) -} -readonly -f std::version_lt - -std::version_le() { - local -r __doc__=" - result: - 0 if version in $1 is less than or equal version in $2. - >=1: otherwise - " - if (( $# == 1 )); then - local -- vers1="${V_PKG}" - local -- vers2="$1" - else - local -- vers1="$1" - local -- vers2="$2" - fi - std::version_compare "${vers1}" "${vers2}" - local -i exit_code=$? - (( exit_code == 0 || exit_code == 2 )) -} -readonly -f std::version_le - -std::version_gt() { - local -r __doc__=" - result: - 0 if version in $1 is greate than version in $2. - >=1: otherwise - " - if (( $# == 1 )); then - local -- vers1="${V_PKG}" - local -- vers2="$1" - else - local -- vers1="$1" - local -- vers2="$2" - fi - std::version_compare "${vers1}" "${vers2}" - (( $? == 1 )) - local -i exit_code=$? - (( exit_code == 1 )) -} -readonly -f std::version_gt - -std::version_ge() { - local -r __doc__=" - result: - 0 if version in $1 is greate than or equal version in $2. - >=1: otherwise - " - # - returns 0 if version numbers are equal - if (( $# == 1 )); then - local -- vers1="${V_PKG}" - local -- vers2="$1" - else - local -- vers1="$1" - local -- vers2="$2" - fi - std::version_compare "${vers1}" "${vers2}" - (( $? == 1 )) - local -i exit_code=$? - (( exit_code == 0 || exit_code == 1 )) -} -readonly -f std::version_gt - -std::version_eq() { - local -r __doc__=" - result: - 0 if versions are equal - >=1 otherwise - " - if (( $# == 1 )); then - local -- vers1="${V_PKG}" - local -- vers2="$1" - else - local -- vers1="$1" - local -- vers2="$2" - fi - std::version_compare "${vers1}" "${vers2}" -} -readonly -f std::version_eq - +# Since we are using aliases, we have to define some before using them in a function. +# Alias expansion happens when a function is parsed! +## std::def_cmd2 'awk' std::def_cmd2 'base64' std::def_cmd2 'bash' @@ -235,15 +147,12 @@ std::def_cmd2 'make' std::def_cmd2 'md5sum' std::def_cmd2 'mkdir' std::def_cmd2 'mktemp' -std::def_cmd1 'modulecmd' std::def_cmd2 'patch' -std::def_cmd2 'pwd' std::def_cmd2 'readlink' std::def_cmd2 'rm' std::def_cmd2 'rmdir' std::def_cmd2 'sed' std::def_cmd2 'seq' -std::def_cmd2 'sevenz' std::def_cmd2 'sort' std::def_cmd2 'stat' std::def_cmd2 'tar' @@ -251,27 +160,148 @@ std::def_cmd2 'tee' std::def_cmd2 'touch' std::def_cmd2 'tput' std::def_cmd2 'uname' -std::def_cmd2 'yamllint' std::def_cmd2 'yq' -KernelName=$(${uname} -s); declare -r KernelName -if [[ ${KernelName} == 'Darwin' ]]; then - PATH+=':/opt/local/bin' - std::def_cmd2 'otool' - std::def_cmd2 'shasum' - std::def_cmd2 'sysctl' - declare -r sha256sum="${shasum -a 256}" -else - ldd=$(std::def_cmd 'ldd'); declare -r ldd - std::def_cmd2 'patchelf' - std::def_cmd2 'sha256sum' -fi - -# -# get answer to yes/no question -# -# $1: prompt +declare -rg KERNEL_NAME="$(uname -s)" +declare -rg SYSTEM_CPU="$(uname -m)" + +case ${KERNEL_NAME} in + Linux ) + std::def_cmd2 'ldd' + std::def_cmd2 'patchelf' + std::def_cmd2 'sha256sum' + ;; + Darwin ) + PATH+=':/opt/local/bin' + std::def_cmd2 'otool' + std::def_cmd2 'shasum' + std::def_cmd2 'sysctl' + sha256sum(){ + shasum -a 256 "$@" + } + ;; + * ) + std::die 255 "Unsupported kernel - ${KERNEL_NAME}" + ;; +esac + +## +## std::is_uint() - check whether argument is an integer +## +## Arguments: +## $1 - string to test +## +## Returns: +## 0 - if string is an unsigned int +## 1 - otherwiaw +## +std::is_uint() { + [[ $1 =~ ^[0-9]+$ ]] +} +readonly -f std::is_uint + +## +## std::version_{compare,lt,le,eq,ge,gt} - Compare two version numbers. +## +## Arguments: +## $1 - [in] first version number +## $2 - [in] optional second version number, if not set V_PKG is used +## +## Returns: +## std::version_compare +## 0 if the version numbers are equal +## 1 if first version number is higher +## 2 if second version number is higher +## +## std::version_lt +## 0 if second version number is higher, otherwise 1 +## std::version_le +## 0 if second version number is higher or equal, otherwise 1 +## std::version_gt +## 0 if first version number is higher, otherwise 1 +## std::version_ge +## 0 if first version number is higher or equal, otherwise 1 +## +## Globals: +## V_PKG (used if second version number is missing) +## Note: +# Original implementation found on stackoverflow: +# https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash # +std::version_compare () { + [[ $# -eq 2 && "$1" == "$2" ]] && return 0 + + local -a ver1 ver2 + if (( $# == 2 )); then + IFS='.' read -r -a ver1 <<<"$1" + IFS='.' read -r -a ver2 <<<"$2" + elif [[ $# == 1 && -v V_PKG ]]; then + IFS='.' read -r -a ver1 <<<"$1" + IFS='.' read -r -a ver2 <<<"${V_PKG}" + else + std::die 3 "Oops: '${FUNCNAME}' called with wrong number of args!" + fi + + # fill empty fields in ver1 with zeros + local -i i=0 + for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do + ver1[i]=0 + done + for ((i=0; i<${#ver1[@]}; i++)); do + [[ -z ${ver2[i]} ]] && ver2[i]=0 + if std::is_uint "${ver1[i]}" && std::is_uint "${ver2[i]}"; then + ((10#${ver1[i]} > 10#${ver2[i]})) && return 1 + ((10#${ver1[i]} < 10#${ver2[i]})) && return 2 + else + [[ ${ver1[i]} > ${ver2[i]} ]] && return 1 + [[ ${ver1[i]} < ${ver2[i]} ]] && return 2 + fi + done + return 0 +} +readonly -f std::version_compare + +std::version_lt() { + std::version_compare "$@" + (( $? == 2 )) +} +readonly -f std::version_lt + +std::version_le() { + std::version_compare "$@" + local -i exit_code=$? + (( exit_code == 0 || exit_code == 2 )) +} +readonly -f std::version_le + +std::version_gt() { + std::version_compare "$@" + (( $? == 1 )) +} +readonly -f std::version_gt + +std::version_ge() { + std::version_compare "$@" + local -i exit_code=$? + (( exit_code == 0 || exit_code == 1 )) +} +readonly -f std::version_ge + +std::version_eq() { + std::version_compare "$@" +} +readonly -f std::version_eq + +## +## std::get_YN_answer - Get answer to yes/no question. +## +## Arguments: +## $1 - [in] prompt +## +## Returns: +## 0 - answer was yes +## 1 - otherwise +## std::get_YN_answer() { local -r prompt="$1" local -- ans @@ -283,15 +313,28 @@ std::get_YN_answer() { return 1;; esac } - -# -# return normalized abolute pathname -# $1: filename +readonly -f std::get_YN_answer + +## +## std::get_abspath() - return normalized absolute pathname +## +## Return the absolute path of a given file- or directory name. Symbolic +## links are NOT resolved! +## +## The script will be terminated, if the path doesn't exists. +## +## Arguments: +## $1 - [in] file- or directory name +## +## Outputs: +## absolute path +## std::get_abspath() { local -r fname="$1" local -- abspath='' - #[[ -r "${fname}" ]] || return 1 - if [[ -d ${fname} ]]; then + [[ -e "${fname}" ]] || \ + std::die 3 "'${FUNCNAME}' called with a non-existing file-/directory name -- $1" + if [[ -d "${fname}" ]]; then abspath=$(cd "${fname}" && pwd -L) else local -r dname=$(dirname "${fname}") @@ -299,59 +342,76 @@ std::get_abspath() { fi echo "${abspath}" } - -std::append_path () { - local -n path="$1" - shift 1 - local -ar append_dirs="$@" - - local -- dirs='' - - # ignore directories which are already in ${path} - local -- dir='' - for dir in "${append_dirs[@]}"; do - [[ "${path}" == @(|*:)${dir}@(|:*) ]] && continue - dirs+="${dir}:" +readonly -f std::get_abspath + +## +## std::{modify,append,prepend}_path - append or prepend directories to a path +## +## Arguments: +## $1 - [in/out] reference to path like variable +## $2 - [in] mode, either append or prepend +## $3... - [in] directories to append or prepend +## +## Returns: +## 0 +## +## Notes: +## :FIXME: +## What happens if first argument is the name of a non-existing variable? +## +std::modify_path() { + local -n path="$1" + local -r mode="$2" + shift 2 + local -a dirs=("$@") + + # Ignore directories that are already in ${path} + local -- new_dirs='' dir='' + for dir in "${dirs[@]}"; do + [[ ":${path}:" == *":${dir}:"* ]] && continue + new_dirs+="${dir}:" done - [[ -n "${dirs}" ]] || return 0 + [[ -n "${new_dirs}" ]] || return 0 - # assemble new path - dirs="${dirs%:}" # remove leading ':' - if [[ -z ${path} ]]; then - path="${dirs}" - else - path="${path}:${dirs}" - fi -} - -std::prepend_path () { - local -n path="$1" # [in/out] prepend dirs to this path variable - shift 1 - local -ar prepend_dirs="$@" # [in] prepend this directories - - local -- dirs='' - - # ignore directories which are already in ${path} - local -- dir='' - for dir in "${prepend_dirs[@]}"; do - [[ "${path}" == @(|*:)${dir}@(|:*) ]] && continue - dirs+="${dir}:" - done - [[ -n "${dirs}" ]] || return 0 - - # assemble new path - dirs="${dirs%:}" # remove leading ':' - if [[ -z ${path} ]]; then - path="${dirs}" + # Assemble new path, removing trailing ':' first + new_dirs="${new_dirs%:}" + if [[ -z "${path}" ]]; then + path="${new_dirs}" else - path="${dirs}:${path}" - fi + case "$mode" in + append) + path="${path}:${new_dirs}" + ;; + prepend) + path="${new_dirs}:${path}" + ;; + *) + std::die 1 "Invalid mode: $mode" + ;; + esac + fi } - +readonly -f std::modify_path + +std::append_path() { std::modify_path "$1" append "${@:2}"; } +std::prepend_path() { std::modify_path "$1" prepend "${@:2}"; } +readonly -f std::append_path +readonly -f std::prepend_path + +## +## std::remove_path - remove directories from a path +## +## Arguments: +## $1 - [in/out] reference to path like variable +## $2... - [in] directories to remove +## +## Returns: +## 0 +## std::remove_path() { - local -n path="$1" # [in/out] remove dirs from this path variable + local -n path="$1" shift 1 - local -ar remove_dirs=("$@") # [in] dirs to be removed + local -ar remove_dirs=("$@") local -a _path=() IFS=':' read -r -a _path <<<"${path}" @@ -371,113 +431,495 @@ std::remove_path() { done path="${path%:}" # remove trailing ':' } - -std.get_os_release_linux() { - #local lsb_release=$(which lsb_release) - local -- ID='' - local -- VERSION_ID='' - - if [[ -n $(which lsb_release 2>/dev/null) ]]; then - ID=$(lsb_release -is) - VERSION_ID=$(lsb_release -rs) - elif [[ -r '/etc/os-release' ]]; then - # ignore errors in this file - source /etc/os-release 2>/dev/null - else - std::die 4 "Cannot determin OS release!\n" - fi +readonly -f std::remove_path + +## +## std::get_os_release - get OS release of a linux distribution. +## std::get_os_release_linux +## std::get_os_release_macos +## +## Outputs: +## release string (e.g. rhel8) +## +## Notes: +## For the time being only RHEL and clones, Ubuntu and SUSE distributions +## are supported (and macOS). +## +std::get_os_release_linux() { + local -- ID='' + local -- VERSION_ID='' + + if command -v 'lsb_release' >/dev/null 2>&1; then + ID=$(lsb_release -is) + VERSION_ID=$(lsb_release -rs) + elif [[ -r '/etc/os-release' ]]; then + while IFS='=' read -r key value; do + value="${value//\"/}" + case "${key}" in + ID) ID="${value}" ;; + VERSION_ID) VERSION_ID="${value}" ;; + esac + done < <(grep -E '^(ID|VERSION_ID)=' /etc/os-release) + else + std::die 4 "Cannot determin OS release!" + fi case "${ID,,}" in - redhatenterpriseserver | redhatenterprise | scientific | springdale | rhel | centos | fedora ) + redhatenterpriseserver | redhatenterprise | scientific | springdale \ + | rhel | centos | fedora ) echo "rhel${VERSION_ID%%.*}" ;; ubuntu ) - echo "Ubuntu${VERSION_ID%.*}" + echo "Ubuntu${VERSION_ID%%.*}" ;; suse ) - echo "sles${VERSION_ID%.*}" + echo "sles${VERSION_ID%%.*}" ;; * ) - echo "Unknown" - exit 1 + std::die 4 "Unknown OS ID: ${ID}" ;; esac } -std.get_os_release_macos() { - VERSION_ID=$(sw_vers -productVersion) - echo "macOS${VERSION_ID%.*}" +readonly -f std::get_os_release_linux + +std::get_os_release_macos() { + local -r VERSION_ID=$(sw_vers -productVersion) + echo "macOS${VERSION_ID%%.*}" } +readonly -f std::get_os_release_macos std::get_os_release() { local -A func_map; - func_map['Linux']=std.get_os_release_linux - func_map['Darwin']=std.get_os_release_macos - ${func_map[$(uname -s)]} + func_map['Linux']=std::get_os_release_linux + func_map['Darwin']=std::get_os_release_macos + ${func_map[${KERNEL_NAME}]} } - -std::get_type() { - local -a signature=() - read -r -a signature <(typeset -p "$1") - case ${signature[1]} in - -Ai* ) - echo 'int dict' - ;; - -A* ) - echo 'dict' - ;; - -ai* ) - echo 'int array' - ;; - -a* ) - echo 'array' - ;; - -i* ) - echo 'integer' - ;; - -- ) - echo 'string' - ;; - * ) - echo 'none' - return 1 - esac +readonly -f std::get_os_release + +## +## std::get_kernel_name - get name of kernel +## +## Outputs: +## name of kernel +## +std::get_kernel_name() { + echo "${KERNEL_NAME}" } - -std::is_member_of_array(){ +readonly -f std::get_kernel_name + +## +## std::get_system_cpu - get the CPU name of the system +## +## Outputs: +## CPU name +## +std::get_system_cpu() { + echo "${SYSTEM_CPU}" +} +readonly -f std::get_system_cpu + +## +## std::array::contains - Check if given array contains given element. +## +## Arguments: +## $1 - [in] element to check +## $2... - [in] array +## +## Returns: +## 0 - if $1 is in given array +## 1 - otherwise +## +## Notes: +## Here we do a linear search. For small arrays this is ok. +## +std::array::contains(){ local -- item="$1" - local -n array="$2" + shift 1 local -- el='' - for el in "${array[@]}"; do + for el in "$@"; do [[ "${item}" == "${el}" ]] && return 0 done return 1 } +readonly -f std::array::contains + +## +## std::array::is_subset - Check if an array is a subset of another array. +## +## Arguments: +## $1 - [in] reference to array/subset +## $2... - [in] superset +## +## Returns: +## 0 - if yes +## 1 - otherwise +## +## Notes: +## Here we do a linear search. For small arrays this is ok. +## +std::array::is_subset() { + local -n _sub="$1" + shift 1 + local -A _seen=() + local -- el='' + for el in "$@"; do + _seen[${el}]=1; + done + for el in "${_sub[@]}"; do + [[ -v _seen[${el}] ]] || return 1 + done + return 0 +} +readonly -f std::array::is_subset + +## +## std::array::difference - compute difference of two arrays +## +## Return the elements which are in the first array but not in the second. +## +## Arguments: +## $1 - reference variable to return result +## $2 - first array A +## $3 - second array B +## +std::array::difference() { + local -n result="$1" + local -n arr_A="$2" + local -n arr_B="$3" + + local -A in_B=() + local -- el='' + result=() + for el in "${arr_B[@]}"; do + in_B[${el}]=1 + done + for el in "${arr_A[@]}"; do + [[ -v in_B[${el}] ]] || result+=( "${el}" ) + done +} +readonly -f std::array::difference + +## +## std::dict::copy - create copy from dictionary/associative array +## +## Arguments: +## $1 - reference variable to the copy +## $2 - reference variable to the original +## +std::dict::copy() { + local -n dst="$1" + local -n src="$2" + local -- suffix="${3:-}" + local -- key='' + for key in "${!src[@]}"; do + dst[${key}${suffix}]="${src[${key}]}" + done +} +## +## std::find_elf64_binaries - find ELF64 binaries in given directories. +## +## Arguments: +## $@ - [in] directories to search +## +## Returns: +## exit code of pipe +## +## Output: +## list of ELF64 binaries +## +## Notes: +## We read the first 5 bytes of each file with 'read -r -N 5'. This might return +## less than 5 bytes. But then the comparison to the ELF64 magic fails anyway. +## std::find_elf64_binaries(){ - ${find} "$@" -type f -not -name '*.pyc' -not -name '*.sh' -executable | \ - file -f - | \ - awk '/ELF 64-bit/ {print substr($1, 1, length($1)-1)}' + local -r elf64_magic=$'\x7fELF\x02' + find "$@" -type f -perm -u+x -not -name '*.pyc' -not -name '*.sh' | \ + while IFS= read -r f; do + read -r -N 5 magic < "$f" + [[ "${magic}" == "${elf64_magic}" ]] && echo "$f" + done } - -std::find_executables(){ - ${find} "$@" -type f -printf "%i %P\n" | \ - ${sort} -n -k1 -u | \ - ${awk} '{print $2}' | \ - ${file} -f - | \ - ${awk} '$2 ~ /ELF/ && $3 ~ /64-bit/ && $5 ~ /executable/ {print substr($1, 1, length($1)-1)}' +readonly -f std::find_elf64_binaries + +## +## std::get_num_cores - Get number of cores. +## +## Returns: +## 0 +## +## Output: +## Number of cores +## +std::get_num_cores() { + case "${KERNEL_NAME}" in + Linux ) + nproc || grep -c '^processor[[:space:]]*:' /proc/cpuinfo + ;; + Darwin ) + sysctl -n hw.ncpu + ;; + esac +} +readonly -f std::get_num_cores + +## +## std::expand_braces - Bash brace expansion +## +## Perform Bash brace expansion on given string. +## +## Note: +## - This implementation is not perfect but should be save enough +## for our use-case. +## - This function run in a subshell -> 'set -o noglob' stays local! +## +## Arguments: +## $1 - text to expand +## +## Output: +## The expanded text. +## +std::expand_braces() ( + set -o noglob + local s + s=$(sed 's|[^[:alnum:]_/.:=+@%^,{}-]|\\&|g' <<<"$1") + eval "printf '%s\n' $s" +) + +## +## yml::die_parsing +## yml::die_type_error +## yml::die_undefined(){ +## +## Exit program on error +## +yml::die_type_error(){ + std::die 3 "Type error for key '$1': must be '$2', but is -- $3" } +readonly -f yml::die_type_error -std::find_shared_objects(){ - ${find} "$@" -type f -printf "%i %P\n" | \ - ${sort} -n -k1 -u | \ - ${awk} '{print $2}' | \ - ${file} -f - | \ - ${awk} '$2 ~ /ELF/ && $3 ~ /64-bit/ && $5 ~ /shared/ && $6 ~ /object/ {print substr($1, 1, length($1)-1)}' +yml::die_undefined(){ + std::die 3 "Key not defined in YAML document - $1" } +readonly -f yml::die_undefined -std::get_dir_depth(){ - echo "$1" | ${grep} -o / | wc -l +yml::die_parsing(){ + std::die 3 "error parsing YAML:\n----\n%s\n----" "$1" +} +readonly -f yml::die_parsing + +## +## yml::read_file - read a YAML file +## +## Read a YAML formatted file. +## The program terminates on an error. +## +## Arguments: +## $1 - [out] reference to variable to return content +## $2 - [in] name of file to read +## +## Returns: +## 0 +## +yml::read_file(){ + local -n yml_text="$1" + local -- yml_fname="$2" + + yml_text=$(yq -N ".|explode(.)" "${yml_fname}") || \ + std::die 3 "Cannot read file. Please check with yamllint -- $1" +} +readonly -f yml::read_file + +## +## yml::has_key -- test whether key is defined in a given YAML document +## +## Arguments: +## $1 - [in] reference variable to a YAML document +## $2 - [in] key to test +## +## Returns: +## 0 - if defined in YAML document +## 1 - otherwise +## +yml::has_key(){ + local -n yml_text="$1" + local -- yml_key="$2" + + [[ $(KEY="${yml_key}" yq 'has(strenv(KEY))' <<<"${yml_text}") == 'true' ]] +} +readonly -f yml::has_key + +## +## yml::get_keys - return the key inside an entry +## +## Example: +## +## foo: +## bar: 42 +## x: 1 +## +## returns the keys 'bar' and 'x' as Bash array. +## +## If the entry doesn't have any keys, return an empty array. +## +## The program terminates on an error. +## +## Arguments: +## $1 - [out] reference to variable to return the keys +## $2 - [in] reference variable with YAML text +## $3 - [in] the key of the entry to be searched for keys. +## +## Returns: +## 0 +## +yml::get_keys(){ + local -n yml_keys="$1" + local -n yml_text="$2" + local -- yml_key="$3" + + local -- str + str="$(yq -N "${yml_key}" <<<"${yml_text}")" || \ + yml::die_parsing "${yml_text}" + if [[ -z "${str}" || "${str}" == 'null' || "${str}" == 'false' ]]; then + yml_keys=() + return 0 + fi + str="$(yq -N ".|keys[]" <<<"${str}")" || \ + yml::die_parsing "${yml_text}" + readarray -t yml_keys <<<"${str}" } +readonly -f yml::get_keys + +## +## yml::get_type - get type of node +## +## Arguments: +## $1 - [out] reference varibale to return type +## $2 - [in] YAML text +## $3 - [in] key of entry +## +yml::get_type(){ + local -n yml_type="$1" + local -n yml_text="$2" + local -- yml_key="$3" + yml_type="$(yq -N "${yml_key}|type" <<<"${yml_text}")" || \ + yml::die_parsing "${yml_text}" +} +readonly -f yml::get_type + +## +## yml::get_value - get node/value of entry +## +## Arguments: +## $1 - [out] reference varibale to return node +## $2 - [in] YAML text +## $3 - [in] key of entry +## $4 - [in] expected type of node +## +yml::get_value(){ + local -n yml_val="$1" + local -n yml_text="$2" + local -- yml_key="$3" + local -- yml_type="$4" + yml_val=$( yml_type="${yml_type}" yq -Ne \ + 'strenv(yml_type) as $yml_type + | '"${yml_key}"' + | (select(tag == $yml_type) + // ("Error in line: " + (.|line) + + ", path: " + (.|path | join(".")) + + " expected type: " + $yml_type + ", got: " + (.|tag)))' \ + <<<"${yml_text}" ) + if [[ "${yml_val}" != "Error in line: "* ]]; then + return 0 + elif [[ "${yml_val}" == "Error in line: 0,"* ]]; then + yml::die_undefined "${yml_key}" + elif [[ "${yml_val}" == *"got: !!null" ]]; then + # key has no node/value + yml_val='' + return 0 + else + local -- got_type='' + local -- lineno + got_type=$(awk '{print $NF}' <<<"${yml_val}") + lineno=$(awk '{print $4}' <<<"${yml_val}") + lineno="${lineno/,}" + ## (( lineno+=1)) + echo -en "Error in configuration file:\n---\n" 1>&2 + sed -n "${lineno}p" <<<"${yml_text}" 1>&2 + echo -en "---\n" 1>&2 + yml::die_type_error "${yml_key}" "${yml_type}" "${got_type}" + fi +} +readonly -f yml::get_value + +#yml::get_value(){ +# local -n yml_val="$1" +# local -n yml_text="$2" +# local -- yml_key="$3" +# local -- yml_expected_type="$4" +# +# yml_val=$( yq -N "${yml_key} | select(tag == \"${yml_expected_type}\")" \ +# <<<"${yml_text}" ) || \ +# yml::die_type_error "${yml_key}" "${yml_expected_type}" "${type}" +#} + +## +## yml::get_seq_length - get the length of a sequence +## +## Return 0 as length, if the key doesn't exists or the node is not a sequence. +## +## Arguments: +## $1 - [out]reference variable for result +## $2 - [in] YAML text +## $3 - [in] key of entry +## +yml::get_seq_length(){ + local -n yml_seq_length="$1" + local -n yml_text="$2" + local -- yml_key="$3" + + local -i _len=0 + _len=$(yq -e "${yml_key} | select(tag == \"!!seq\") | length" <<<"${yml_text}") || \ + yml::die_parsing "${yml_text}" + yml_seq_length="${_len}" +} +readonly -f yml::get_seq_length + +## +## yml::get_seq - get sequence +## +## Return the an empty string if an entry with the passed key doesn't exists. +## Terminate script if type is not a sequence. +## +## Arguments: +## $1 - [out] refernce variable to return result +## $2 - [in] YAML text +## $3 - [in] key of entry +## +yml::get_seq(){ + local -n yml_val="$1" + local -n yml_text="$2" + local -- yml_key="$3" + + local -- type='' + type=$( yq "${yml_key}|type" <<<"${yml_text}") + if [[ "${type}" == '!!null' ]]; then + yml_val='' + return 0 + fi + [[ "${type}" == '!!seq' ]] || \ + yml::die_type_error "${yml_key}" '!!seq' "${type}" + local -i length=0 + length=$(yq "${yml_key}|length" <<<"${yml_text}") + if (( length == 0 )); then + yml_val='' + return 0 + fi + yml_val=$( yq "${yml_key}[]" <<<"${yml_text}" ) || \ + yml::die_parsing "${yml_text}" +} +readonly -f yml::get_seq + # Local Variables: # mode: sh # sh-basic-offset: 8 diff --git a/src/modbuild b/src/modbuild deleted file mode 100755 index 7b8b6b1..0000000 --- a/src/modbuild +++ /dev/null @@ -1,1577 +0,0 @@ -#!/opt/psi/Tools/Pmodules/2.1.0/libexec/bash -# -# The following build specific variables are set and used in libpbuild.bash: -# ARGS -# BUILD_SCRIPT -# BUILDBLOCK_DIR -# -#............................................................................. - -declare -r VERSION='2.1.2' - -unset CDPATH # unset CDPATH, otherwise 'cd' prints the directoy! -unset IFS # use default IFS - -#set -e # exit on error -set -o pipefail -set -o nounset -shopt -s nocaseglob -shopt -s extglob -shopt -s nullglob - -# get absolute path of script -mydir=$(cd "$(/usr/bin/dirname "$0")" && pwd -P) -prefix=$(/usr/bin/dirname "${mydir}") - -PATH="${prefix}/bin:${prefix}/libexec:/bin:/usr/bin:/sbin:/usr/sbin:/opt/psi/Tools/Modules/5.6.1/bin" -source "${prefix}/lib/libstd.bash" || { - echo "Oops: cannot source library -- '$_'" 1>&2; exit 3; -} -source "${prefix}/lib/libpmodules.bash" || \ - std::die 3 "Oops: cannot source library -- '$_'" -source "${prefix}/lib/libpbuild.bash" || \ - std::die 3 "Oops: cannot source library -- '$_'" -unset mydir -unset prefix - -############################################################################## -# -usage() { - std::error " -USAGE: - $0 [options..] [build_script] version - -MANDATORY ARGUMENTS: - -version - Version of module to build. - -SELECT VARIANT TO BUILD: - ---system - Specify the system for selecting a variants. Defaults to the - OS version and release like 'rhel6'. - ---with=P/V - Select variant to compile. Use multiple '--with' arguments - to make the selected variant unique. - -BUILD-STEPS OPTIONS: - ---clean-install - Remove module if already exist before building. - ---prep - Prepare sources: unpack sources and apply patches only. - ---configure - Prepare and configure sources. - ---compile - Prepare, configure and compile everything. - ---install - Prepare, configure and compile everything. Finally run install - step. Do not cleanup build and source directory. - ---all - Run throu all steps including cleanup. - ---update-modulefiles - Only install the modulefile and set the release. - ---cleanup-modulefiles - Remove modulefiles in other overlays. - -MISCELLANEOUS OPTIONS: - --? | -h | --help - Print usage. - --V | --version ) - Print version. - --v | --verbose ) - Verbose output. - ---debug ) - Run in debug mode. - --j N | --jobs=N - Run N parallel make jobs. - --f | --force-rebuild - Force rebuild of module. - ---dry-run - Dry run. - ---disable-cleanup-build ---disable-cleanup-src ---disable-cleanup - Disable the cleanup of files in the build and/or source - directory. Default is to remove all files in the build - respective source directory at the beginning of a build - and after a successful build. - ---distdir - Directory where to store and lookup downloaded files. - ---tmpdir - Directory used for building a module. - -DOCUMENTATION: - Full documentation is available at - http://pmodules.gitpages.psi.ch -" - exit 1 -} - -############################################################################## -# -# parse options and arguments -# -# command line arguments are taken first -# then configuration file -# last default - -# save arguments, required for building dependencies -declare -ra ARGS=( "$@" ) - -# versions to be build, '.*' or none means all -declare -a versions_to_build=() -declare opt_build_target='all' -declare opt_dry_run='no' -declare opt_enable_cleanup_build='yes' -declare opt_enable_cleanup_src='yes' -declare opt_force_rebuild='no' -declare -i opt_jobs=0 -declare opt_update_modulefiles='no' -declare opt_cleanup_modulefiles='no' -declare opt_system='' -declare -i opt_verbose=0 -# array collecting all modules specified on the command line via '--with=module' -declare -a opt_with_modules=() -declare -A opt_with_dict=() -declare -- opt_config_file='' -declare -- opt_debug='no' -declare -- opt_variant='' -declare -- opt_clean_install='no' -declare -- opt_parent_prefix='' - -declare -- BUILD_SCRIPT='' -declare -- yaml_config_file='' -declare -- module_name='' -declare -- module_type='module' -declare -- echo=':' - -HostName=$(hostname -f) -declare -r HostName - -parse_args() { - # - # The first argument ($1) is the build-script, if called in the - # usual way: - # ./ [options] - # If called via: - # modbuild [options] - # the build-script MUST be passed as first argument. - # - (( $# == 0 )) && usage - while (( $# > 0 )); do - case $1 in - -j ) - opt_jobs="$2" - shift - ;; - --jobs=[0-9]* ) - opt_jobs="${1/--jobs=}" - ;; - -v | --verbose ) - trap 'echo "$BASH_COMMAND"' DEBUG - (( opt_verbose+=1 )) - echo='echo' - ;; - --debug ) - opt_debug='yes' - set -x - ;; - -f | --force-rebuild ) - opt_force_rebuild='yes' - ;; - -\? | -h | --help ) - usage - ;; - -V | --version ) - std::die 0 "\nPmodules version ${VERSION}\nCopyright GNU GPL v2\n" - ;; - --dry-run ) - opt_dry_run='yes' - ;; - --disable-cleanup ) - opt_enable_cleanup_build='no' - opt_enable_cleanup_src='no' - ;; - --disable-cleanup-build ) - opt_enable_cleanup_build='no' - ;; - --disable-cleanup-src ) - opt_enable_cleanup_src='no' - ;; - --distdir | --distdir=* ) - if [[ $1 == *=* ]]; then - PMODULES_DISTFILESDIR="${1/--distdir=}" - else - PMODULES_DISTFILESDIR="$2" - shift - fi - ;; - --exit-on-error ) - # this is for testing! - set -e - ;; - --tmpdir | --tmpdir=* ) - if [[ $1 == *=* ]]; then - PMODULES_TMPDIR="${1#--*=}" - else - PMODULES_TMPDIR="$2" - shift - fi - ;; - --system | --system=* ) - if [[ $1 == *=* ]]; then - opt_system="${1#--*=}" - else - opt_system="$2" - shift - fi - ;; - --with | --with=*/* ) - if [[ $1 == *=* ]]; then - opt_with_modules+=( "${1#--*=}" ) - opt_with_dict[${1#--*=}]=0 - else - opt_with_modules+=( "$2" ) - opt_with_dict[$2]=0 - shift - fi - ;; - --prep | --configure | --compile | --install | --all ) - opt_build_target=${1:2} - ;; - --clean-install ) - opt_force_rebuild='yes' - opt_clean_install='yes' - ;; - --update-modulefiles ) - opt_update_modulefiles='yes' - ;; - --cleanup-modulefiles ) - opt_cleanup_modulefiles='yes' - ;; - --config-file | --config-file=* ) - if [[ $1 == *=* ]]; then - opt_config_file=( "${1#--*=}" ) - else - opt_config_file=( "$2" ) - shift - fi - ;; - --variant | --variant=* ) - if [[ $1 == *=* ]]; then - opt_variant=( "${1#--*=}" ) - else - opt_variant=( "$2" ) - shift - fi - ;; - --parent-prefix | --parent-prefix=* ) - if [[ $1 == *=* ]]; then - opt_parent_prefix="${1#--*=}" - else - opt_parent_prefix="$2" - shift - fi - module_type='sub_package' - pbuild.set_prefix "${opt_parent_prefix}" - ;; - -- | '' ) - : - ;; - -* ) - std::die 1 "Invalid option -- '$1'" - ;; - * ) - local -- arg="$1" - if [[ -f "${arg}" && -x "${arg}" ]]; then - BUILD_SCRIPT="$(std::get_abspath "${arg}")" - BUILDBLOCK_DIR=$(dirname "${BUILD_SCRIPT}") - elif [[ "${arg}" == */* ]]; then - module_name="${arg%/*}" - versions_to_build+=( "${arg#*/}" ) - else - versions_to_build+=( "$1" ) - fi - ;; - esac - shift - done - - [[ -z "${BUILD_SCRIPT}" ]] && \ - std::die 1 "%s " \ - "Build script argument missing?" - - # if no version is specified on the cmd-line, build all versions - (( ${#versions_to_build[@]} > 0)) || versions_to_build+=( '.*' ) - - # set system if not set on the cmd-line - opt_system="${opt_system:-$(std::get_os_release)}" - - # set config file - yaml_config_file="${opt_config_file:-${BUILDBLOCK_DIR}/files/config.yaml}" - [[ -f "${yaml_config_file}" && -r "${yaml_config_file}" ]] || \ - std::die 2 \ - "%s -- %s" \ - "YAML config file doesn't exist or is not readable" \ - "${yaml_config_file}" - std::info "Using YAML configuration file - ${yaml_config_file}" -} - -yml::get_file_fmt(){ - : " - Get format version of configuration file. Print the version number - to stdout if it is valid. - " - local -n yml_fmt="$1" - local -n yml_content="$2" - - yml::get_value yml_fmt yml_content '.format' '!!int' || \ - std::die 3 "Error reading config file format -- ${fname}" - case "${yml_fmt}" in - 1 ) - : - ;; - * ) - std::die 3 "Unsupported YAML Pmodules config file format -- ${yml_fmt}" - ;; - esac -} - -build_modules(){ - local -- name="$1" - local -- version_pattern="$2" - shift 2 - local -a with_modules=( "$*" ) - - local -- yaml_config='' - local -i file_fmt=0 - yml::read_file yaml_config "${yaml_config_file}" '.' - yml::get_file_fmt file_fmt yaml_config - - echo "file_fmt=${file_fmt}" - local -- yaml_module_config='' - case "${file_fmt}" in - 1 ) - yml::get_value yaml_module_config yaml_config ".${name}" '!!map' || \ - std::die 3 "Configuration for '${name}' missing in config file -- ${file_name}" - build_modules_yaml_v1 \ - "${yaml_module_config}" \ - "${name}" \ - "${version_pattern}" \ - "${with_modules[@]}" - ;; - * ) - std::die 255 "Oops!" # we should never be here! - ;; - esac -} - - -parse_version() { - local -- v="$1" - V="$1" - - local -- tmp='' - SUFFIX='' - - if [[ "$v" =~ "_" ]]; then - tmp="${v#*_}" - SUFFIX+=":${tmp//_/:}:" - v="${v%%_*}" - fi - V_PKG="${v%%-*}" # version without the release number - if [[ $v == *-* ]]; then - V_RELEASE="${v#*-}" # release number - fi - case "${V_PKG}" in - *.*.* ) - V_MAJOR="${V_PKG%%.*}" - tmp="${V_PKG#*.}" - V_MINOR="${tmp%%.*}" - V_PATCHLVL="${tmp#*.}" - ;; - *.* ) - V_MAJOR="${V_PKG%.*}" - V_MINOR="${V_PKG#*.}" - ;; - * ) - V_MAJOR="${V_PKG}" - ;; - esac - - VERSIONS=() - if [[ -n ${V_RELEASE} ]]; then - VERSIONS+=( "${V_PKG}-${V_RELEASE}" ) - fi - if [[ -n ${V_PATCHLVL} ]]; then - VERSIONS+=( "${V_MAJOR}.${V_MINOR}.${V_PATCHLVL}" ) - fi - if [[ -n ${V_MINOR} ]]; then - VERSIONS+=( "${V_MAJOR}.${V_MINOR}" ) - fi - VERSIONS+=( "${V_MAJOR}" ) -} - -# these variables must be export for envsubst(1) -declare -x P='' -declare -x V='' -declare -x V_PKG='' -declare -x V_MAJOR='' # first number in version string -declare -x V_MINOR='' # second number in version string (or empty) -declare -x V_PATCHLVL='' # third number in version string (or empty) -declare -x V_RELEASE='' # module release (or empty) -declare -x PREFIX='' - -declare -A SHASUMS=() -declare -a MODULE_DOCFILES=() - -declare -A Yaml_valid_keys_for_module=( - ['defaults']=1 - ['shasums']=1 - ['type']=1 - ['versions']=1 -) - -declare -A Yaml_default_config=( - ['build_requires']='' # !!seq of strings - ['build_functions']='' # !!seq of strings - ['build_variants']='' # !!seq of strings - ['compile_in_sourcetree']='no' # !!str - ['configure_args']='' # !!seq of strings - ['configure_args+']='' # !!seq of strings - ['configure_with']='auto' # !!str - ['default_variant']='' # !!str - ['docfiles']='' # !!seq of strings - ['docfiles+']='' # !!seq of strings - ['download_dir']='' # !!str - ['group']='Tools' # !!str - ['group_deps']='' # !!map - ['kernels']='' # !!seq of strings - ['modulefile']='' # !!str - ['overlay']='base' # !!str - ['patch_files']='' # !!seq - ['patch_files+']='' # !!seq - ['relstage']='unstable' # !!str - ['runtime_deps']='' # !!seq of strings - ['script']='build' # !!str - ['sub_packages']='' # !!map - ['suffix']='' # !!str - ['systems']='' # !!seq of strings - ['target_cpus']='' # !!seq of strings - ['urls']='' # !!map - ['sources']='' # !!map; alias for urls - ['use_flags']='' # !!seq - ['use_overlays']='' # !!seq - ['variant']='' # !!str - ['target_funcs:prep']='pbuild::pre_prep pbuild::prep pbuild::post_prep' - ['target_funcs:configure']='pbuild::pre_configure pbuild::configure pbuild::post_configure' - ['target_funcs:compile']='pbuild::pre_compile pbuild::compile pbuild::post_compile' - ['target_funcs:install']='pbuild::pre_install pbuild::install pbuild::post_install' -) - -declare -A Yaml_valid_vk_keys=( - ['config']='1' # !!map - ['variants']='1' # !!map -) - -declare -A Yaml_source_keys=( - ['url']='' - ['name']='' - ['strip_dirs']=1 - ['unpacker']='tar' - ['unpack_dir']='' - ['patch_file']='' - ['patch_strip']=0 -) - -declare -A Unpackers=( - ['tar']='tar' - ['7z']='7z' - ['none']='none' -) - -declare -A KernelNames=( - ['linux']='1' - ['darwin']='1' - ['any']='1' -) - -declare -A TargetCPUs=( - ['x86_64']='x86_64' - ['arm64']='arm64' - ['aarch64']='arm64' - ['any']='1' -) - -declare -A hierarchical_groups=( - ['compiler']='compiler' - ['mpi']='compiler mpi' - ['hdf5']='compiler mpi hdf5' - ['hdf5_serial']='compiler hdf5_serial' -) - -build_modules_yaml_v1(){ - : " - - " - local -- yaml_module_config="$1" - local -- name="$2" - local -- version="$3" - shift 3 - local -a with_modules=( "$@" ) - - - die_missing_group_dep(){ - std::die 3 "%s/%s: %s" \ - "${1}" "${2}" \ - "is in group '$3', but the group dependency for this group is missing!" - } - - die_missing_key(){ - std::die 3 "Key '$3' missing in $2\n----\n$1\n----" - } - - die_illegal_group_dep(){ - std::die 3 "%s/%s: %s" \ - "${1}" "${2}" \ - "illegal group dependency '$4' for module in group '$3'!" - } - - die_invalid_group_dep(){ - std::die 3 "%s/%s: %s" \ - "${1}" "${2}" \ - "invalid group dependency '$3' for module in group '$4'!" - } - - die_invalid_variants_block(){ - std::die 3 "%s/%s: %s" \ - "${1}" "${2}" \ - "invalid type of variants block: must be '!!seq' but is '$3'!" - } - - die_invalid_value(){ - std::die 3 "Invalid value for key '$3' in $2 -- '$4'\n----\n$1\n----" - } - - die_invalid_key(){ - std::die 3 "Invalid key '$3' in $2\n----\n$1\n----" - } - - die_error_reading_keys(){ - std::die 3 "Error while reading keys from:\n----\n$1\n----" - } - - die_invalid_kernel_name(){ - std::die 3 "Invalid kernel name in configuration!" - } - - die_wrong_module_type(){ - std::die 3 "Module type is '$1' but was called as '$2'!" - } - - die_invalid_module_type(){ - std::die 3 "Invalid module type -- '$1'!" - } - - yml::get_config(){ - local -n yaml_input="$1" # [in] YAML formated string - local -- node="$2" # [in] config node - local -n cfg="$3" # [in/out] module configuration - - local -- key='' - local -- value='' - - get_build_functions(){ - local -a keys=() - yml::get_keys \ - keys \ - yaml_input \ - "${node}.build_functions" - - local -- key='' - local -- value='' - for key in "${keys[@]}"; do - case ${key} in - prep | configure | compile | install) - yml::get_seq \ - value \ - yaml_input \ - "${node}.build_functions.${key}" || \ - yml::die_parsing "${yaml_input}" - debug "${key} functions: ${value}" - cfg[target_funcs:${key}]="${value}" - ;; - * ) - die_invalid_key \ - "${yaml_input}" \ - 'build functions' \ - "${key}" - ;; - esac - done - } - - if [[ -z "${yaml_input}" ]]; then - return 0 - fi - - local -a keys=() - yml::get_keys keys yaml_input "${node}" - debug "config keys: ${keys[*]}" - for key in "${keys[@]}"; do - case ${key} in - build_functions ) - get_build_functions value - ;; - build_variants ) - yml::get_value \ - value \ - yaml_input \ - "${node}.${key}" '!!str' || \ - yml::die_parsing "${yaml_input}" - case ${value,,} in - all ) : ;; - first_match ) : ;; - * ) - die_invalid_value \ - "${yaml_input}" \ - 'config section' \ - "${key}" \ - "${value}" - ;; - esac - cfg[${key,,}]="${value}" - ;; - compile_in_sourcetree ) - yml::get_value \ - value \ - yaml_input \ - "${node}.${key}" '!!bool' || \ - yml::die_parsing "${yaml_input}" - case ${value,,} in - true ) - cfg[${key,,}]='yes' - ;; - false ) - cfg[${key,,}]='no' - ;; - * ) - die_invalid_value \ - "${yaml_input}" \ - 'config section' \ - "${key}" \ - "${value}" - ;; - esac - ;; - configure_with ) - yml::get_value \ - value \ - yaml_input \ - "${node}.${key}" '!!str' || \ - yml::die_parsing "${yaml_input}" - case ${value,,} in - auto | cmake | autotools ) - cfg[${key,,}]="${value,,}" - ;; - * ) - die_invalid_value \ - "${yaml_input}" \ - 'config section' \ - "${key}" \ - "${value}" - ;; - esac - ;; - default_variant | download_dir | group | modulefile | overlay | script | suffix ) - yml::get_value \ - value \ - yaml_input \ - "${node}.${key}" '!!str' || \ - yml::die_parsing "${yaml_input}" - cfg[${key,,}]="${value}" - ;; - group_deps ) - yml::get_value \ - value \ - yaml_input \ - "${node}.${key}" '!!map' || \ - yml::die_parsing "${yaml_input}" - cfg[${key,,}]="${value}" - ;; - use_flags ) - yml::get_seq \ - value \ - yaml_input \ - "${node}.${key}" || \ - yml::die_parsing "${yaml_input}" - local -a tmp=() - readarray -t tmp <<<"${value}" - cfg[${key,,}]=" ${tmp[*]} " - ;; - relstage ) - yml::get_value \ - value \ - yaml_input \ - "${node}.${key}" '!!str' || \ - yml::die_parsing "${yaml_input}" - case ${value,,} in - unstable | stable | deprecated ) - cfg[${key,,}]="${value,,}" - ;; - remove | removed ) - cfg[${key,,}]='remove' - ;; - * ) - die_invalid_value \ - "${yaml_input}" \ - 'config section' \ - "${key}" \ - "${value}" - ;; - esac - ;; - urls | sources | sub_packages ) - yml::get_value \ - value \ - yaml_input \ - "${node}.${key}" '!!seq' || \ - yml::die_parsing "${yaml_input}" - [[ "${key,,}" == 'sources' ]] && key='urls' - cfg[${key,,}]="${value}" - ;; - build_requires|configure_args|docfiles|patch_files|runtime_deps|systems|use_overlays|variant ) - yml::get_seq \ - value \ - yaml_input \ - "${node}.${key}" || \ - yml::die_parsing "${yaml_input}" - cfg[${key,,}]="${value}" - ;; - kernels ) - yml::get_seq \ - value \ - yaml_input \ - "${node}.${key}" || \ - yml::die_parsing "${yaml_input}" - set -o noglob - local -a items=( "${value,,}" ) - set +o noglob - local -- item='' - for item in "${items[@]}"; do - [[ -v KernelNames[${item}] ]] || \ - die_invalid_value \ - "${yaml_input}" \ - 'config section' \ - 'kernel' \ - "${item}" - done - cfg[${key,,}]="${value}" - ;; - target_cpus ) - yml::get_seq \ - value \ - yaml_input \ - "${node}.${key}" || \ - yml::die_parsing "${yaml_input}" - set -o noglob - local -a items=( "${value,,}" ) - set +o noglob - local -- item='' - for item in "${items[@]}"; do - [[ -v TargetCPUs[${item}] ]] || \ - die_invalid_value \ - "${yaml_input}" \ - 'config section' \ - 'CPU' \ - "${item}" - done - cfg[${key,,}]="${value}" - ;; - 'configure_args+' | 'docfiles+' | 'patch_files+' ) - yml::get_seq \ - value \ - yaml_input \ - "${node}.${key}" || \ - yml::die_parsing "${yaml_input}" - key="${key:0:-1}" - if [[ -z "${cfg[${key,,}]}" ]]; then - cfg[${key,,}]="${value}" - else - cfg[${key,,}]+=$'\n'"${value}" - fi - ;; - - * ) - die_invalid_key \ - "${yaml_input}" \ - 'configuration' \ - "${key}" - ;; - esac - done - } - - yml::get_matching_version_keys(){ - # - # return list of version keys matching a specific - # version pattern - # - local -n yaml_input="$1" # [in] YAML input - local -n result="$2" # [out] list of matching - # version keyss - local -- version="$3" # [in] version pattern - - local -a keys=() - yml::get_keys keys yaml_input '.versions' - result=() - for key in "${keys[@]}"; do - # loop over semicolon separated list of keys - for k in ${key//;/ }; do - # brace expansion of key - local -a list=() - list=( $(${bash} -c "echo $k") ) - local -- el='' - for el in "${list[@]}"; do - if [[ ${el} == ${version} ]]; then - result+=("${key}") - break - fi - done - done - done - (( ${#result[@]} == 0 )) && \ - std::die 3 "No configuration for version -- ${version}" - return 0 - } - - yml::chk_group_deps(){ - # - # Check the group dependencies: - # 1. are all keys valid? - # 2. all required group deps defined? - # 3. more group deps defined as required? - # - # Die if check fails. - # - local -- yaml_input="$1" # [in] value of key group_deps - local -- group="$2" # [in] compiler|mpi|hdf5|hdf5_serial - local -- name="$3" # [in] module name - local -- version="$4" # [in] module version - - # query all specified group dependencies - local -- key='' - local -a keys=() - yml::get_keys keys yaml_input '.' - for key in "${keys[@]}"; do - # is this a name of a hierarchical group? - [[ -v hierarchical_groups[${key}] ]] || \ - die_illegal_group_dep "${name}" "${version}" "${group}" "${key}" - # is this in the list of required group dependencies? - is_in_array "${key}" "${hierarchical_groups[${key}]}" || \ - die_invalid_group_dep "${name}" "${version}" "${group}" - done - # are all required group dependencies defined? - for key in ${hierarchical_groups[${group,,}]}; do - is_in_array "${key,,}" "${keys[@]}" || \ - die_missing_group_dep "${name}" "${version}" "${group}" - done - } - - yml::get_group_deps(){ - local -- yaml_input="$1" # [in] value of key group_deps - local -- group="$2" # [in] compiler|mpi|hdf5|hdf5_serial - local -n with_modules="$3" # [out] list of required modules - - local -a modules=() - local -- key - local -a keys=() - yml::get_keys keys yaml_input ".${group,,}" - for key in "${keys[@]}"; do - local -- version - local -a versions=() - local -- value='' - yml::get_seq value yaml_input ".${group,,}.${key}" || \ - yml::die_parsing "${yaml_input}" - readarray -t versions <<<"${value}" - for version in "${versions[@]}"; do - if [[ -v opt_with_dict[${key}/${version}] ]]; then - with_modules+=( "${key}/${version}" ) - fi - modules+=( "${key}/${version}" ) - done - done - if (( ${#with_modules[@]} == 0 )); then - with_modules=( "${modules[@]}" ) - fi - } - - is_in_array(){ - local -r key="$1" - shift 1 - [[ $* =~ (^|[[:space:]])"${key}"($|[[:space:]]) ]] - } - - is_subset(){ - local -n subset="$1" - shift 1 - local -- el='' - for el in "${subset[@]}"; do - is_in_array "${el}" "$@" || return 1 - done - return 0 - } - - # - # To compile a module with a certain compiler||mpi||hdf5 dependency - # the '--with' option can be used. Depending on the hierarchical - # group the modules specified with the option '--with' must be a - # subset of - # - compiler: ( compiler) - # - mpi: ( compiler mpi ) - # - hdf5: ( compiler mpi hdf5 ) - # - hdf5_serial: ( compiler hdf5_serial ) - # - - build_modules_compiler(){ - # - # build a module in hierarchical group 'Compiler' - # - local -- module_name="$1" # [in] module name - local -- module_version="$2" # [in] module version - local -n module_cfg="$3" # [in] ref to module config - - yml::chk_group_deps \ - "${module_cfg['group_deps']}" \ - 'Compiler' \ - "${module_name}" "${module_version}" - - local -a with_compiler=() - yml::get_group_deps \ - "${module_cfg['group_deps']}" \ - 'Compiler' with_compiler - debug "${with_compiler[@]}" - - local -- compiler='' - for compiler in "${with_compiler[@]}"; do - # build if opt_with_modules is empty or compiler is in this array - (( ${#opt_with_modules[@]} != 0 )) \ - && [[ "${compiler}" != "${opt_with_modules[0]}" ]] \ - && continue - pbuild.build_module_yaml \ - "${module_name}" "${module_version}" \ - "$3" \ - "${compiler}" \ - "${@:4}" - done - } - - build_modules_hdf5_serial(){ - # - # build a module in hierarchical group 'HDF5_serial' - # - local -- module_name="$1" # [in] module name - local -- module_version="$2" # [in] module version - local -n module_cfg="$3" # [in] ref to module config - - yml::chk_group_deps \ - "${module_cfg['group_deps']}" \ - 'HDF5_serial' \ - "${module_name}" "${module_version}" - - local -a with_compiler=() - yml::get_group_deps "${module_cfg['group_deps']}" 'Compiler' with_compiler - - local -a with_hdf5=() - yml::get_group_deps "${module_cfg['group_deps']}" 'HDF5_serial' with_hdf5 - - local -- compiler - local -- hdf5 - for compiler in "${with_compiler[@]}"; do - for hdf5 in "${with_hdf5[@]}"; do - # build if opt_with_modules is empty or compiler is in this array - (( ${#opt_with_modules[@]} != 0 )) \ - && ! is_subset opt_with_modules "${compiler}" "${hdf5}" \ - && continue - - debug "build $module_name/$module_version with $compiler and $hdf5" - debug " runtime deps: ${runtime_deps[*]}" - debug " build requires: ${build_requires[*]}" - pbuild.build_module_yaml \ - "${module_name}" "${module_version}" \ - "$3" \ - "${compiler}" \ - "${hdf5}" \ - "${@:4}" - done - done - } - - - build_modules_mpi(){ - # - # build a module in hierarchical group 'MPI' - # - local -- module_name="$1" # [in] module name - local -- module_version="$2" # [in] module version - local -n module_cfg="$3" # [in] ref to module config - - yml::chk_group_deps \ - "${module_cfg['group_deps']}" \ - 'MPI' \ - "${module_name}" "${module_version}" - - local -a with_compiler=() - yml::get_group_deps "${module_cfg['group_deps']}" 'Compiler' with_compiler - - local -a with_mpi=() - yml::get_group_deps "${module_cfg['group_deps']}" 'MPI' with_mpi - - local -- compiler - local -- mpi - for compiler in "${with_compiler[@]}"; do - for mpi in "${with_mpi[@]}"; do - # build if opt_with_modules is empty or compiler is in this array - (( ${#opt_with_modules[@]} != 0 )) \ - && ! is_subset opt_with_modules "${compiler}" "${mpi}" \ - && continue - - debug "build $module_name/$module_version with $compiler and $mpi" - debug " runtime deps: ${runtime_deps[*]}" - debug " build requires: ${build_requires[*]}" - pbuild.build_module_yaml \ - "${module_name}" "${module_version}" \ - "$3" \ - "${compiler}" \ - "${mpi}" \ - "${@:4}" - done - done - } - - build_modules_hdf5(){ - # - # build a module in hierarchical group 'HDF5' - # - local -- module_name="$1" # [in] module name - local -- module_version="$2" # [in] module version - local -n module_cfg="$3" # [in] ref to module config - - yml::chk_group_deps \ - "${module_cfg['group_deps']}" \ - 'HDF5' \ - "${module_name}" "${module_version}" - - local -a with_compiler=() - yml::get_group_deps "${module_cfg['group_deps']}" 'Compiler' with_compiler - - local -a with_mpi=() - yml::get_group_deps "${module_cfg['group_deps']}" 'MPI' with_mpi - - local -a with_hdf5=() - yml::get_group_deps "${module_cfg['group_deps']}" 'HDF5' with_hdf5 - - local -- compiler - local -- mpi - local -- hdf5 - for compiler in "${with_compiler[@]}"; do - for mpi in "${with_mpi[@]}"; do - for hdf5 in "${with_hdf5[@]}"; do - debug "build $module_name/$module_version with $compiler, $mpi and $hdf5" - debug " runtime deps: ${runtime_deps[*]}" - debug " build requires: ${build_requires[*]}" - - # build if opt_with_modules is empty or compiler is in this array - (( ${#opt_with_modules[@]} != 0 )) \ - && ! is_subset opt_with_modules \ - "${compiler}" "${mpi}" "${hdf5}" \ - && continue - pbuild.build_module_yaml \ - "${module_name}" "${module_version}" \ - "$3" \ - "${compiler}" \ - "${mpi}" \ - "${hdf5}" \ - "${@:4}" - done - done - done - - } - - build_modules_other(){ - # - # build a module in a non-hierarchical group - # - local -- module_name="$1" # [in] module name - local -- module_version="$2" # [in] module version - local -n module_cfg="$3" # [in] ref to module config - - pbuild.build_module_yaml \ - "${module_name}" "${module_version}" \ - "$3" \ - "${@:4}" - } - - set_urls() { - local -- yaml="$1" - local -i l=0 - yml::get_seq_length l yaml . - local -i i=0 - local -- url_yaml='' - for ((i=0; i/dev/null) || \ - die_parsing "{yaml}" - local -- value='' - while read -r key value; do - key=${key:0:-1} - case "${key}" in - url | name | patch_file ) - source[${key}]=$(${envsubst} <<<"${value}") - ;; - unpack_dir ) - source[${key}]="${value}" - ;; - strip_dirs | patch_strip ) - [[ ${value} =~ ^[0-9]+$ ]] || \ - die_invalid_value \ - "${url_yaml}" \ - 'list of URLS' \ - 'strip_dirs' \ - "${value}" - source[${key}]="${value}" - ;; - unpacker ) - [[ -v Unpackers[${value}] ]] || \ - die_invalid_value \ - "${url_yaml}" \ - 'list of URLs' \ - 'unpacker' \ - "${value}" - source[${key}]="${value}" - ;; - * ) - die_invalid_key \ - "${url_yaml}" \ - 'list of URLs' \ - "${key}" - ;; - esac - done <<<"${url_yaml}" - [[ -z "${source['url']}" && \ - -z "${source['name']}" && \ - -z "${source['patch_file']}" ]] && \ - die_missing_key \ - "${url_yaml}" \ - 'list of URLs/sources' \ - 'url or name or patch_file' - #[[ -v sources['name'] ]] && sources['name']="${sources['url']##*/}" - pbuild.set_urls source - done - } - - set_configure_args(){ - local -a args=() - [[ -z "$1" ]] && return 0 - readarray -t args <<< "$1" - pbuild.set_configure_args "${args[@]}" - } - - set_patch_files(){ - local -a args=() - readarray -t args <<< "$1" - pbuild.add_patch_files "${args[@]}" - } - - is_variant_to_build(){ - local -- name="$1" - local -- version="$2" - local -n config="$3" - - check_system(){ - [[ -z ${config['systems']} ]] && return 0 - - set -o noglob - local -a systems=( ${config['systems']} ) - set +o noglob - - local -- system - for system in "${systems[@]}"; do - [[ "${opt_system}" =~ ${system} ]] && return 0 - [[ "${HostName}" =~ ${system} ]] && return 0 - done - std::info "%s " "Skipping variant '${version}'" \ - "for the system(s): ${systems[@]}" - return 1 - } - - check_kernel(){ - [[ -z ${config['kernels']} ]] && return 0 - set -o noglob - local -a kernels=( "${config['kernels'],,}" ) - set +o noglob - local -- kernel='' - for kernel in "${kernels[@]}"; do - [[ ${kernel} == 'any' ]] && return 0 - [[ ${kernel} == ${KernelName,,} ]] & return 0 - done - std::info "%s " "Skipping variant '${version}'" \ - "for the kernel(s): ${config['kernels']}" - return 1 - } - - check_target_cpu(){ - [[ -z ${config['target_cpus']} ]] && return 0 - set -o noglob - local -a target_cpus=( "${config['target_cpus'],,}" ) - set +o noglob - local -- system_cpu=$(uname -p) - local -- cpu='' - for cpu in "${target_cpus[@]}"; do - [[ ${cpu} == 'any' ]] && return 0 - [[ ${cpu} == ${system_cpu} ]] && return 0 - done - std::info "%s" "Skipping variant '${version}' " \ - "for the CPU(s) ${config['target_cpus']}" - return 1 - - } - - check_variant(){ - # if a variant is neither passed as argument nor a default, - # is defined, therefore let's build this variant. - local -- build_variant="${opt_variant:-${config['default_variant']}}" - [[ -z "${build_variant}" ]] && return 0 - - # don't build if a variant has be specified on the command line or - # a default variant has been set in the config file, but no - # variant name is defined here - [[ -n ${build_variant} && -z ${config['variant']} ]] && return 1 - - [[ -z ${config['variant']} ]] && return 1 - set -o noglob - local -a items=( "${config['variant'],,}" ) - set +o noglob - local item='' - for item in "${items[@]}"; do - [[ "${opt_variant}" == "${item}" ]] && return 0 - done - } - - check_kernel module_config || return 1 - check_target_cpu module_config || return 1 - check_system module_config || return 1 - check_variant module_config || return 1 - return 0 - } - - build_modules_variant(){ - local -- module_name="$1" - local -- module_version="$2" - local -n module_config="$3" - - debug "build variant ${module_name}/${module_version}" - local -- ol_name="${module_config['overlay']}" - [[ -v OverlayInfo[${ol_name}:install_root] ]] || \ - std::die 2 "%s" \ - "Overlay doesn't exist - ${ol_name}" - declare ol_install_root="${OverlayInfo[${ol_name}:install_root]}" - declare ol_modulefiles_root="${OverlayInfo[${ol_name}:modulefiles_root]}" - - module_version+="${module_config['suffix']}" - - pbuild.compile_in_sourcetree "${module_config['compile_in_sourcetree']}" - pbuild.configure_with "${module_config['configure_with']}" - pbuild.add_to_group "${module_config['group']}" - - set_urls "${module_config['urls']}" - set_configure_args "${module_config['configure_args']}" - set_patch_files "${module_config['patch_files']}" - - if [[ -n "${module_config['download_dir']}" ]]; then - PMODULES_DISTFILESDIR="${module_config['download_dir']}" - fi - local -a runtime_deps=() - if [[ -n ${module_config['runtime_deps']} ]]; then - readarray -t runtime_deps <<<"${module_config['runtime_deps']}" - debug "runtime_deps=${runtime_deps[@]} length: ${#runtime_deps[@]}" - fi - - local -a build_requires=() - if [[ -n ${module_config['build_requires']} ]]; then - readarray -t build_requires <<<"${module_config['build_requires']}" - build_requires=( "${build_requires[@]/#/b:}" ) - debug "build_requires=${build_requires[@]} length: ${#build_requires[@]}" - fi - - if [[ -n ${module_config['docfiles']} ]]; then - readarray -t MODULE_DOCFILES <<<"${module_config['docfiles']}" - fi - - local -A build_functions=( - ['Compiler']=build_modules_compiler - [HDF5_serial]=build_modules_hdf5_serial - [MPI]=build_modules_mpi - [HDF5]=build_modules_hdf5 - ) - local -- func=build_modules_other - if [[ -v build_functions[${module_config['group']}] ]]; then - func=${build_functions[${module_config['group']}]} - fi - ${func} \ - "${module_name}" \ - "${module_version}" \ - module_config \ - "${runtime_deps[@]}" "${build_requires[@]}" - } - - expand_version_key(){ - local -n ev_result="$1" - local -- key="$2" - local -- version="$3" - - ev_result=() - # loop over comma separated list of keys - for k in ${key//;/ }; do - # do curly brackets expansion {} - local -- l - local -a list=() - list=( $(${bash} -c "echo $k" ) ) - for l in "${list[@]}"; do - if [[ $l =~ ${version} ]]; then - ev_result+=("${l}") - fi - done - done - } - - local -a found_keys=() - local -a version_keys=() - - yml::get_keys \ - found_keys \ - yaml_module_config \ - '.' - - local -A mod_config=() - local -- key='' - for key in "${!Yaml_default_config[@]}"; do - mod_config[${key}]="${Yaml_default_config[${key}]}" - done - for key in "${found_keys[@]}"; do - case "${key}" in - 'defaults' ) - yml::get_config \ - yaml_module_config \ - ".${key}" \ - mod_config \ - ;; - 'shasums' ) - local -- yaml_shasums='' - yaml_shasums=$(${yq} ".${key}" <<<"${yaml_module_config}" 2>/dev/null) - while read -r key value; do - [[ -z ${key} ]] && continue - SHASUMS[${key//:}]="${value}" - done <<<"${yaml_shasums}" - ;; - 'type' ) - local -- value='' - yml::get_value \ - value \ - yaml_module_config \ - ".${key}" '!!str' || \ - yml::die_parsing "${yaml_module_config}" - case "${value,,}" in - 'module' ) - [[ "${module_type}" == 'sub_package' ]] && \ - die_wrong_module_type 'module' 'sub_package' - ;; - 'sub_package' ) - [[ "${module_type}" == 'module' ]] && \ - die_wrong_module_type 'sub_package' 'module' - ;; - * ) - die_invalid_module_type "${value}" - ;; - esac - ;; - 'versions' ) - yml::get_matching_version_keys \ - yaml_module_config \ - version_keys \ - "${version}" - ;; - esac - done - (( ${#version_keys[@]} > 0 )) || \ - std::die 3 "No version(s) specified in YAML configuration file." - - # loop over all version keys in the YAML config file - local -- version_key='' - local -i num_variants=0 - for version_key in "${version_keys[@]}"; do - local -- node=".versions.\"${version_key}\"" - yml::get_keys \ - found_keys \ - yaml_module_config \ - "${node}" - for key in "${found_keys[@]}"; do - case "${key}" in - 'config' ) - yml::get_config \ - yaml_module_config \ - "${node}.config" \ - mod_config - ;; - 'variants' ) - local -- type_of_node='' - yml::get_type type_of_node yaml_module_config \ - "${node}.variants" - if [[ "${type_of_node}" == '!!null' ]]; then - num_variants=0 - elif [[ "${type_of_node}" != '!!seq' ]]; then - die_invalid_variants_block "${name}" \ - "${version}" \ - "${type_of_key}" - else - yml::get_seq_length \ - num_variants \ - yaml_module_config \ - "${node}.variants" - fi - ;; - esac - done - - # a version key in the YAML config is a semicolon separated list - # of version specifications like - # 42.0.0;41.0.{0..9};40.4.2 - # - local -a versions=() - expand_version_key versions "${version_key}" "${version}" - local -- version='' - for version in "${versions[@]}"; do - debug "version: $version" - P="${name}" - parse_version "${version}" - - if (( num_variants == 0 )); then - is_variant_to_build \ - "${name}" \ - "${version}" \ - mod_config || continue - build_modules_variant \ - "${name}" "${version}" \ - mod_config - else - local -i n=0 - for ((n=0; n&2 -} - -#............................................................................. -# main - -eval $( "${modulecmd}" bash use unstable ) -eval $( "${modulecmd}" bash use deprecated ) -eval $( "${modulecmd}" bash use Libraries ) -eval $( "${modulecmd}" bash use System ) - -parse_args "$@" - -# -# :FIXME: add comments what and why we are doing this. -# -declare -r logfile="${BUILDBLOCK_DIR}/pbuild.log" -${rm} -f "${logfile}" -if (( opt_verbose > 0 )); then - exec > >(${tee} -a "${logfile}") -else - exec > >(${cat} >> "${logfile}") -fi -exec 2> >(${tee} -a "${logfile}" >&2) - -pbuild.jobs "${opt_jobs}" -pbuild.force_rebuild "${opt_force_rebuild}" -pbuild.build_target "${opt_build_target}" -pbuild.dry_run "${opt_dry_run}" -pbuild.enable_cleanup_build "${opt_enable_cleanup_build}" -pbuild.enable_cleanup_src "${opt_enable_cleanup_src}" -pbuild.update_modulefiles "${opt_update_modulefiles}" -pbuild.system "${opt_system}" - -# -# read configuration for modbuild -# -pm::read_config - -declare -r BUILD_SCRIPT -declare -r BUILDBLOCK_DIR - -if [[ -z ${module_name} ]]; then - # the module name is defined by the directory the build script is in - IFS=/ read -r -a fname <<< "${BUILD_SCRIPT:1}" - module_name=${fname[${#fname[@]}-2]} -fi - -declare version='' -for version in "${versions_to_build[@]}"; do - build_modules "${module_name}" "${version}" "${opt_with_modules[@]}" -done - -# Local Variables: -# mode: sh -# sh-basic-offset: 8 -# tab-width: 8 -# End: diff --git a/src/modbuild.in b/src/modbuild.in new file mode 100644 index 0000000..0fadb7f --- /dev/null +++ b/src/modbuild.in @@ -0,0 +1,1688 @@ +#!@PREFIX@/libexec/bash +# +# The following build-specific variables are set here and used in libpbuild.bash: +# ARGS +# BUILD_SCRIPT +# BUILDBLOCK_DIR +# +#............................................................................. + +declare -r VERSION='@VERSION@' + +unset CDPATH # unset CDPATH, otherwise 'cd' prints the directory! +IFS=$' \t\n' # use default IFS + +#set -e # exit on error +set -o pipefail +set -o nounset +shopt -s nocaseglob +shopt -s extglob +shopt -s nullglob + +# Get absolute path of script +mydir=$(cd "$(/usr/bin/dirname "$0")" && pwd -P) +prefix=$(/usr/bin/dirname "${mydir}") + +PATH="${prefix}/bin:${prefix}/libexec:/bin:/usr/bin:/sbin:/usr/sbin" + +source "${prefix}/lib/libstd.bash" || { + echo "Oops: cannot source library -- '$_'" 1>&2; exit 3; +} + +if (( BASH_VERSINFO[0] < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] < 3) )); then + std::die 1 "Bash 5.3+ is required." +fi + +# :FIXME: this is a hack! +if [[ -d '/opt/psi/Tools/Modules/5.6.1/bin' ]]; then + PATH+=":/opt/psi/Tools/Modules/5.6.1/bin" +fi +std::def_cmd2 'modulecmd' +std::def_cmd2 'sevenz' + +source "${prefix}/lib/libpmodules.bash" || \ + std::die 3 "Oops: cannot source library -- '$_'" +source "${prefix}/lib/libpbuild.bash" || \ + std::die 3 "Oops: cannot source library -- '$_'" +unset mydir +unset prefix + +############################################################################## +# +usage() { + std::error " +USAGE: + $0 [options...] version + or + modbuild BUILD_SCRIPT [options...] version + +MANDATORY ARGUMENTS: + +version + Version of module to build. + +SELECT VARIANT TO BUILD: + +--system + Specify the system for selecting variants. Defaults to the + OS version and release like 'rhel6'. + +--with=P/V + Select compiler, MPI implementation and/or HDF5 version to be + used to compile the module. Use multiple '--with' arguments to + disambiguate the selected variant. + + +--variant=VARIANT + With this option a specific variant to build can be specified. + +BUILD-STEPS OPTIONS: + +--clean-install + Remove module if already exists before building. + +--prep + Prepare sources: unpack sources and apply patches only. + +--configure + Prepare and configure sources. + +--compile + Prepare, configure and compile everything. + +--install + Prepare, configure and compile everything. Finally run install + step. Do not clean up build and source directory. + +--all + Run through all steps including cleanup. + +--update-modulefiles + Install only the modulefile and set the release stage. + +--update-relstage + Update the release stage. + +--skip-subpkgs + Don't (re-)build sub-packages. + +--cleanup-modulefiles + Remove modulefiles in other overlays. + +MISCELLANEOUS OPTIONS: + +-? | -h | --help + Print usage. + +-V | --version + Print version. + +-v | --verbose + Verbose output. + +--debug + Run in debug mode. + +-j N | --jobs=N + Run N parallel make jobs. + +-f | --force-rebuild + Force rebuild of module. + +--config-file=FILE + Use this config file instead of the default. + +--disable-cleanup-build +--disable-cleanup-src +--disable-cleanup + Disable cleanup of files in the build and/or source + directories. By default, all files in the build and + source directories are removed at the start of a + build and after a successful build. + +--distdir=DIR + Directory where downloaded files are stored and + looked up. + +--tmpdir=DIR + Directory used for building modules. + +--exit-on-error + Set \"exit on error\" option in Bash. This option should + be used by modbuild developers only. + +DOCUMENTATION: + Full documentation is available at + https://pmodules.github.io +" + exit 1 +} + +############################################################################## +# +# parse options and arguments +# + +# save arguments, required for building dependencies +declare -ra ARGS=( "$@" ) + +# used in some build-recipes, hence we have to export it! +declare -x JOBS=0 + +declare -A BuildOpts=() +BuildOpts['force_rebuild']='no' +BuildOpts['cleanup_build']='yes' +BuildOpts['cleanup_src']='yes' +BuildOpts['update_relstage']='no' +BuildOpts['update_modulefiles']='no' +BuildOpts['cleanup_modulefiles']='no' +BuildOpts['build_target']='all' +BuildOpts['clean_install']='no' +BuildOpts['num_jobs']=0 +BuildOpts['verbose']=0 +BuildOpts['debug']='no' +BuildOpts['prefix']='' +BuildOpts['is_subpkg']='no' +BuildOpts['skip_subpkgs']='no' +BuildOpts['config_file']='' + +# versions to be built, '.*' or none means all +declare -a versions_to_build=() +declare opt_system='' +declare -a opt_with_modules=() +declare -A opt_with_dict=() +declare -- opt_config_file='' +declare -- opt_variant='' + +declare -- opt_parent_prefix='' + +declare -- BUILD_SCRIPT='' +declare -- module_name='' + +parse_args() { + # + # The first argument ($1) is the build-script, if called in the + # usual way: + # ./ [options] + # If called via: + # modbuild [options] + # the build-script MUST be passed as first argument. + # + (( $# == 0 )) && usage + while (( $# > 0 )); do + case $1 in + -j | --jobs=*) + local -- val='' + if [[ $1 == *=* ]]; then + val="${1#--*=}" + else + val="$2" + shift + fi + [[ "${val}" =~ ^[0-9]+$ ]] || \ + std::die 1 "Invalid jobs value: ${val}" + BuildOpts['num_jobs']="${val}" + shift + ;; + -v | --verbose ) + trap 'echo "$BASH_COMMAND"' DEBUG + (( BuildOpts['verbose']+=1 )) + ;; + --debug ) + BuildOpts['debug']='yes' + set -x + ;; + -f | --force-rebuild ) + BuildOpts['force_rebuild']='yes' + ;; + -\? | -h | --help ) + usage + ;; + -V | --version ) + std::die 0 "\nPmodules version ${VERSION}\nCopyright GNU GPL v2\n" + ;; + --disable-cleanup ) + BuildOpts['cleanup_build']='no' + BuildOpts['cleanup_src']='no' + ;; + --disable-cleanup-build ) + BuildOpts['cleanup_build']='no' + ;; + --disable-cleanup-src ) + BuildOpts['cleanup_src']='no' + ;; + --distdir | --distdir=* ) + if [[ $1 == *=* ]]; then + PMODULES_DISTFILESDIR="${1#--*=}" + else + PMODULES_DISTFILESDIR="$2" + shift + fi + ;; + --exit-on-error ) + # this is for testing! + set -e + ;; + --tmpdir | --tmpdir=* ) + if [[ $1 == *=* ]]; then + PMODULES_TMPDIR="${1#--*=}" + else + PMODULES_TMPDIR="$2" + shift + fi + ;; + --system | --system=* ) + if [[ $1 == *=* ]]; then + opt_system="${1#--*=}" + else + opt_system="$2" + shift + fi + ;; + --with | --with=* ) + if [[ $1 == *=* ]]; then + opt_with_modules+=( "${1#--*=}" ) + opt_with_dict[${1#--*=}]=0 + else + opt_with_modules+=( "$2" ) + opt_with_dict[$2]=0 + shift + fi + ;; + --prep | --configure | --compile | --install | --all ) + BuildOpts['build_target']=${1:2} + ;; + --clean-install ) + BuildOpts['force_rebuild']='yes' + BuildOpts['clean_install']='yes' + ;; + --update-relstage ) + BuildOpts['update_relstage']='yes' + ;; + --update-modulefiles ) + BuildOpts['update_modulefiles']='yes' + ;; + --skip-subpkgs ) + BuildOpts['skip_subpkgs']='yes' + ;; + --cleanup-modulefiles ) + BuildOpts['cleanup_modulefiles']='yes' + ;; + --config-file | --config-file=* ) + if [[ $1 == *=* ]]; then + opt_config_file="${1#--*=}" + else + opt_config_file="$2" + shift + fi + ;; + --variant | --variant=* ) + if [[ $1 == *=* ]]; then + opt_variant="${1#--*=}" + else + opt_variant="$2" + shift + fi + ;; + --parent-prefix | --parent-prefix=* ) + if [[ $1 == *=* ]]; then + BuildOpts['prefix']="${1#--*=}" + else + BuildOpts['prefix']="$2" + shift + fi + BuildOpts['is_subpkg']='yes' + ;; + -- | '' ) + : + ;; + -* ) + std::die 1 "Invalid option -- '$1'" + ;; + * ) + local -- arg="$1" + if [[ -f "${arg}" && -x "${arg}" ]]; then + BUILD_SCRIPT="$(std::get_abspath "${arg}")" + BUILDBLOCK_DIR=$(dirname "${BUILD_SCRIPT}") + elif [[ "${arg}" == */* ]]; then + module_name="${arg%/*}" + versions_to_build+=( "${arg#*/}" ) + else + versions_to_build+=( "$1" ) + fi + ;; + esac + shift + done + + [[ -z "${BUILD_SCRIPT}" ]] && \ + std::die 1 "%s " \ + "Build script argument missing!" + + # if no version is specified on the cmd-line, build all versions + (( ${#versions_to_build[@]} > 0)) || versions_to_build+=( '.*' ) + + # set system if not set on the cmd-line + opt_system="${opt_system:-$(std::get_os_release)}" + + if (( ${BuildOpts['num_jobs']} == 0 )); then + BuildOpts['num_jobs']=$(std::get_num_cores) + (( BuildOpts['num_jobs'] > 10 )) && BuildOpts['num_jobs']=10 || : + fi + JOBS="${BuildOpts[num_jobs]}" + # set config file + local -r config_file="${opt_config_file:-${BUILDBLOCK_DIR}/files/config.yaml}" + [[ -f "${config_file}" && -r "${config_file}" ]] || \ + std::die 2 \ + "%s -- %s" \ + "YAML config file doesn't exist or is not readable" \ + "${config_file}" + BuildOpts['config_file']="${config_file}" + std::info "Using YAML configuration file - ${config_file}" +} + +## +## cfg::get_file_fmt - get file format of configuration file +## +## The format defaults to 1 if not defined in the configuration file. +## For now, this is the only supported format. +## +## Arguments: +## $1 - [out] return format in this reference variable +## $2 - [in] YAML string +## +cfg::get_file_fmt(){ + local -n yml_fmt="$1" + local -n yml_content="$2" + + if yml::has_key yml_content 'format'; then + yml::get_value yml_fmt yml_content '.format' '!!int' + else + yml_fmt='1' + fi + case "${yml_fmt}" in + 1 ) + : + ;; + * ) + std::die 3 "Unsupported YAML configuration file format -- ${yml_fmt}" + ;; + esac +} + +# these variables must be exported for envsubst(1) +declare -x P='' +declare -x V='' +declare -x V_PKG='' +declare -x V_MAJOR='' # first number in version string +declare -x V_MINOR='' # second number in version string (or empty) +declare -x V_PATCHLVL='' # third number in version string (or empty) +declare -x V_RELEASE='' # module release (or empty) +declare -x PREFIX='' + +declare -A Yaml_valid_keys_for_module=( + ['defaults']=1 + ['shasums']=1 + ['type']=1 + ['versions']=1 +) + +declare -A Yaml_default_config=( + ['build_requires']='' # !!seq of strings + ['build_functions']='' # !!seq of strings + ['build_variants']='' # !!seq of strings + ['compile_in_sourcetree']='no' # !!str + ['configure_args']='' # !!seq of strings + ['configure_args+']='' # !!seq of strings + ['configure_with']='auto' # !!str + ['default_variant']='' # !!str + ['docfiles']='' # !!seq of strings + ['docfiles+']='' # !!seq of strings + ['download_dir']='' # !!str + ['group']='Tools' # !!str + ['group_deps']='' # !!map + ['kernels']='' # !!seq of strings + ['modulefile']='' # !!str + ['overlay']='base' # !!str + ['patch_files']='' # !!seq of strings + ['patch_files+']='' # !!seq of strings + ['relstage']='unstable' # !!str + ['runtime_deps']='' # !!seq of strings + ['script']='build' # !!str + ['sub_packages']='' # !!map + ['suffix']='' # !!str + ['systems']='' # !!seq of strings + ['target_cpus']='' # !!seq of strings + ['urls']='' # !!map + ['sources']='' # !!map; alias for urls + ['use_flags']='' # !!seq of strings + ['use_overlays']='' # !!seq of strings + ['variant']='' # !!str + ['target_funcs:prep']='pbuild::pre_prep pbuild::prep pbuild::post_prep' + ['target_funcs:configure']='pbuild::pre_configure pbuild::configure pbuild::post_configure' + ['target_funcs:compile']='pbuild::pre_compile pbuild::compile pbuild::post_compile' + ['target_funcs:install']='pbuild::pre_install pbuild::install pbuild::post_install' + ['num_sources']=0 +) + +declare -A Yaml_valid_vk_keys=( + ['config']='1' # !!map + ['variants']='1' # !!map +) + +declare -A Yaml_source_keys=( + ['url']='' + ['name']='' + ['strip_dirs']=1 + ['unpacker']='tar' + ['unpack_dir']='' + ['patch_file']='' + ['patch_strip']=0 +) + +declare -A Unpackers=( + ['tar']='tar' + ['7z']='7z' + ['none']='none' +) + +declare -A KernelNames=( + ['linux']='1' + ['darwin']='1' + ['any']='1' +) + +declare -A TargetCPUs=( + ['x86_64']='x86_64' + ['arm64']='arm64' + ['aarch64']='arm64' + ['any']='1' +) + +declare -A hierarchical_groups=( + ['compiler']='compiler' + ['mpi']='compiler mpi' + ['hdf5']='compiler mpi hdf5' + ['hdf5_serial']='compiler hdf5_serial' +) + +cfg::err_missing_group_dep(){ + std::die 3 "%s/%s: %s" \ + "${1}" "${2}" \ + "is in group '$3', but the group dependency for this group is missing!" +} + +cfg::err_missing_key(){ + std::die 3 "Key '$3' missing in $2\n----\n$1\n----" +} + +cfg::err_illegal_group_dep(){ + std::die 3 "%s/%s: %s" \ + "${1}" "${2}" \ + "illegal group dependency '$4' for module in group '$3'!" +} + +cfg::err_invalid_group_dep(){ + std::die 3 "%s/%s: %s" \ + "${1}" "${2}" \ + "invalid group dependency '$3' for module in group '$4'!" +} + +cfg::err_invalid_variants_block(){ + std::die 3 "%s/%s: %s" \ + "${1}" "${2}" \ + "invalid type of variants block: must be '!!seq' but is '$3'!" +} + +cfg::err_invalid_value(){ + std::die 3 "Invalid value for key '$3' in $2 -- '$4'\n----\n$1\n----" +} + +cfg::err_invalid_key(){ + std::die 3 "Invalid key '$3' in $2\n----\n$1\n----" +} + +cfg::err_wrong_module_type(){ + std::die 3 "Module type is '$1' but was called as '$2'!" +} + +cfg::err_invalid_module_type(){ + std::die 3 "Invalid module type -- '$1'!" +} + +## +## cfg::chk_group_dependencies - check required group dependencies +## +## Check whether all required group dependencies are defined. Terminate if +## - a group dependency is missing +## - a group dependency is defined, which is not required +## - an invalid group name has been specified +## +## Arguments: +## $1 - YAML input +## $2 - group of module (compiler|mpi|hdf5|hdf5_serial) +## $3 - module name +## $4 - module version +## +## Used global variables: +## hierarchical_groups +## +cfg::chk_group_dependencies(){ + local -- yaml_input="$1" + local -- group="$2" + local -- name="$3" + local -- version="$4" + + # query all specified group dependencies + local -- key='' + local -a keys=() + yml::get_keys keys yaml_input '.' + for key in "${keys[@]}"; do + # is ${key} a hierarchical group name? + [[ -v hierarchical_groups[${key}] ]] || \ + cfg::err_illegal_group_dep "${name}" "${version}" "${group}" "${key}" + + # is this in the list of required group dependencies? + std::array::contains "${key}" ${hierarchical_groups[${group,,}]} || \ + cfg::err_invalid_group_dep "${name}" "${version}" "${key}" "${group}" + done + # are all required group dependencies defined? + for key in ${hierarchical_groups[${group,,}]}; do + std::array::contains "${key,,}" "${keys[@]}" || \ + cfg::err_missing_group_dep "${name}" "${version}" "${group}" + done +} + +## +## cfg::get_group_dependencies - get group dependencies from configuration file +## +## Arguments: +## $1 - [in] YAML formatted variant configuration +## $2 - [in] hierarchical group (compiler|mpi|hdf5|hdf5_serial) +## $3 - [out] group dependencies to be used to compile the module +## +## Used global variables: +## opt_with_dict +## +cfg::get_group_dependencies(){ + local -- yaml_input="$1" + local -- group="$2" + local -n with_modules="$3" + with_modules=() + + local -a modules=() + local -- key + local -a keys=() + yml::get_keys keys yaml_input ".${group,,}" + for key in "${keys[@]}"; do + local -- version + local -a versions=() + local -- value='' + yml::get_seq value yaml_input ".${group,,}.${key}" || \ + yml::die_parsing "${yaml_input}" + readarray -t versions <<<"${value}" + for version in "${versions[@]}"; do + # use only dependencies specified on the cmd-line! + if [[ -v opt_with_dict[${key}/${version}] ]]; then + with_modules+=( "${key}/${version}" ) + fi + modules+=( "${key}/${version}" ) + done + done + # For this hierarchical group nothing has been specified on the cmd-line. + # All dependencies listed in the YAML file will be used. + if (( ${#with_modules[@]} == 0 )); then + with_modules=( "${modules[@]}" ) + fi +} + +## +## cfg::get_variant_config - get settings from a variant configuration structure +## +## Arguments: +## $1 - [in] reference to YAML formatted string +## $2 - [in] key of variant configuration +## $3 - [out] reference to Bash dictionary +## +cfg::get_variant_config(){ + local -n yml_input="$1" + local -- cfg_key="$2" + local -n cfg="$3" + + local -- key='' + local -- value='' + + get_build_functions(){ + local -a keys=() + yml::get_keys \ + keys \ + yml_input \ + "${cfg_key}.build_functions" + + local -- key='' + local -- value='' + for key in "${keys[@]}"; do + case ${key} in + prep | configure | compile | install) + yml::get_seq \ + value \ + yml_input \ + "${cfg_key}.build_functions.${key}" || \ + yml::die_parsing "${yml_input}" + cfg[target_funcs:${key}]="${value}" + ;; + * ) + cfg::err_invalid_key \ + "${yml_input}" \ + 'build functions' \ + "${key}" + ;; + esac + done + } + + if [[ -z "${yml_input}" ]]; then + return 0 + fi + + local -a keys=() + yml::get_keys keys yml_input "${cfg_key}" + for key in "${keys[@]}"; do + case ${key} in + build_functions ) + get_build_functions value + ;; + build_variants ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!str' + case ${value,,} in + all ) : ;; + first_match ) : ;; + * ) + cfg::err_invalid_value \ + "${yml_input}" \ + 'config section' \ + "${key}" \ + "${value}" + ;; + esac + cfg[${key,,}]="${value}" + ;; + compile_in_sourcetree ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!bool' + case ${value,,} in + true ) + cfg[${key,,}]='yes' + ;; + false ) + cfg[${key,,}]='no' + ;; + * ) + cfg::err_invalid_value \ + "${yml_input}" \ + 'config section' \ + "${key}" \ + "${value}" + ;; + esac + ;; + configure_with ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!str' + case ${value,,} in + auto | cmake | autotools ) + cfg[${key,,}]="${value,,}" + ;; + * ) + cfg::err_invalid_value \ + "${yml_input}" \ + 'config section' \ + "${key}" \ + "${value}" + ;; + esac + ;; + default_variant | download_dir | group | modulefile | overlay \ + | script | suffix ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!str' + cfg[${key,,}]="${value}" + ;; + group_deps ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!map' + cfg[${key,,}]="${value}" + ;; + use_flags ) + yml::get_seq \ + value \ + yml_input \ + "${cfg_key}.${key}" || \ + yml::die_parsing "${yml_input}" + local -a tmp=() + readarray -t tmp <<<"${value}" + cfg[${key,,}]=" ${tmp[*]} " + ;; + relstage ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!str' + case ${value,,} in + unstable | stable | deprecated ) + cfg[${key,,}]="${value,,}" + ;; + remove | removed ) + cfg[${key,,}]='remove' + ;; + * ) + cfg::err_invalid_value \ + "${yml_input}" \ + 'config section' \ + "${key}" \ + "${value}" + ;; + esac + ;; + sub_packages ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!seq' + cfg[${key,,}]="${value}" + ;; + urls | sources ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!seq' + cfg::set_urls 'set' "${value}" cfg + ;; + urls+ | sources+ ) + yml::get_value \ + value \ + yml_input \ + "${cfg_key}.${key}" '!!seq' + cfg::set_urls 'add' "${value}" cfg + ;; + build_requires | configure_args | docfiles | patch_files \ + | runtime_deps | systems | use_overlays | variant ) + yml::get_seq \ + value \ + yml_input \ + "${cfg_key}.${key}" || \ + yml::die_parsing "${yml_input}" + cfg[${key,,}]="${value}" + ;; + kernels ) + yml::get_seq \ + value \ + yml_input \ + "${cfg_key}.${key}" || \ + yml::die_parsing "${yml_input}" + local -a items=() + readarray -t items <<< "${value,,}" + local -- item='' + for item in "${items[@]}"; do + [[ -v KernelNames[${item}] ]] || \ + cfg::err_invalid_value \ + "${yml_input}" \ + 'config section' \ + 'kernel' \ + "${item}" + done + cfg[${key,,}]="${value}" + ;; + target_cpus ) + yml::get_seq \ + value \ + yml_input \ + "${cfg_key}.${key}" || \ + yml::die_parsing "${yml_input}" + local -a items=() + readarray -t items <<< "${value,,}" + local -- item='' + for item in "${items[@]}"; do + [[ -v TargetCPUs[${item}] ]] || \ + cfg::err_invalid_value \ + "${yml_input}" \ + 'config section' \ + 'CPU' \ + "${item}" + done + cfg[${key,,}]="${value}" + ;; + 'configure_args+' | 'docfiles+' | 'patch_files+' ) + yml::get_seq \ + value \ + yml_input \ + "${cfg_key}.${key}" || \ + yml::die_parsing "${yml_input}" + key="${key:0:-1}" + if [[ -z "${cfg[${key,,}]}" ]]; then + cfg[${key,,}]="${value}" + else + cfg[${key,,}]+=$'\n'"${value}" + fi + ;; + + * ) + cfg::err_invalid_key \ + "${yml_input}" \ + 'configuration' \ + "${key}" + ;; + esac + done +} + +## +## cfg::set_urls - read sources/urls +## +## Arguments: +## $1 - mode: set or add +## $2 - sources/urls in YAML format +## $3 - reference to a dictionary holding the configuration +## +cfg::set_urls(){ + local -r mode="$1" + local -- yaml="$2" + local -n _cfg="$3" + + # this query is used in the for loop below + local -r str=$(printf '.%s, ' "${!Yaml_source_keys[@]}") + local -r query="[${str%, }] | @tsv" + + local -i i=0 len=0 n=0 + yml::get_seq_length len yaml . + [[ "${mode}" == 'add' ]] && n=${_cfg['num_sources']} + for ((i=0; i/dev/null) + local k v + while read -r k v; do + [[ -z ${k} ]] && continue + mod_config_default[shasum:${k//:}]="${v}" + done <<<"${yaml_shasums}" + ;; + 'type' ) + local -- value='' + yml::get_value \ + value \ + yaml_module_config \ + ".${key}" '!!str' + case "${value,,}" in + 'module' ) + [[ "${BuildOpts['is_subpkg']}" == 'yes' ]] && \ + cfg::err_wrong_module_type \ + 'module' 'sub_package' + ;; + 'sub_package' ) + [[ "${BuildOpts['is_subpkg']}" != 'yes' ]] && \ + cfg::err_wrong_module_type \ + 'sub_package' 'module' + ;; + * ) + cfg::err_invalid_module_type "${value}" + ;; + esac + ;; + 'versions' ) + cfg::get_matching_version_keys \ + yaml_module_config \ + version_keys \ + "${version_pattern}" + ;; + esac + done + (( ${#version_keys[@]} > 0 )) || \ + std::die 3 "No version(s) specified in YAML configuration file." + + local -A mod_config_vk=() + local -A mod_config=() + + # loop over all version keys in the YAML config file + local -- version_key='' + local -i num_variants=0 + for version_key in "${version_keys[@]}"; do + std::dict::copy mod_config_vk mod_config_default + local -- node=".versions.\"${version_key}\"" + yml::get_keys \ + found_keys \ + yaml_module_config \ + "${node}" + for key in "${found_keys[@]}"; do + case "${key}" in + 'config' ) + cfg::get_variant_config \ + yaml_module_config \ + "${node}.config" \ + mod_config_vk + ;; + 'variants' ) + # check type of node (!!seq) and query the + # number of variants under the given version + # key. + local -- type_of_node='' + yml::get_type type_of_node yaml_module_config \ + "${node}.variants" + if [[ "${type_of_node}" == '!!null' ]]; then + num_variants=0 + elif [[ "${type_of_node}" != '!!seq' ]]; then + cfg::err_invalid_variants_block "${name}" \ + "${version_pattern}" \ + "${type_of_node}" + else + yml::get_seq_length \ + num_variants \ + yaml_module_config \ + "${node}.variants" + fi + ;; + # :FIXME: add default case: invalid key + esac + done + + # A version key in the YAML config is a semicolon-separated + # list of version specifications, for example: + # 42.0.0;41.0.{0..9};40.4.2 + # + std::info "Number of variants for ${name}/${version_pattern}: ${num_variants}" + local -a versions=() + cfg::expand_version_key versions "${version_key}" "${version_pattern}" + local -- version='' + for version in "${versions[@]}"; do + P="${name}" + cfg::parse_version "${version}" + + if (( num_variants == 0 )); then + cfg::is_variant_to_build \ + "${name}" \ + "${version}" \ + mod_config_vk || continue + build::modules_variant \ + "${name}" "${version}" \ + mod_config_vk + else + local -i n=0 + for ((n=0; n 0 )); then + exec > >(tee -a "${logfile}") +else + exec > >(cat >> "${logfile}") +fi +exec 2> >(tee -a "${logfile}" >&2) + +# +# read runtime configuration for modbuild +# +rtcfg::read_config + +declare -r BUILD_SCRIPT +declare -r BUILDBLOCK_DIR + +if [[ -z ${module_name} ]]; then + # the module name is defined by the directory the build script is in + IFS=/ read -r -a fname <<< "${BUILD_SCRIPT:1}" + module_name=${fname[${#fname[@]}-2]} +fi + +declare version='' +for version in "${versions_to_build[@]}"; do + build::modules "${module_name}" "${version}" "${opt_with_modules[@]}" +done + +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: