diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..d18209b71 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +output +node_modules diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..6f132e612 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,95 @@ +env: + node: true + es6: true + +plugins: + - sonarjs + +extends: + - plugin:sonarjs/recommended + +parserOptions: + ecmaVersion: 2018 + +rules: + # Ignore Rules + strict: 0 + no-underscore-dangle: 0 + no-mixed-requires: 0 + no-process-exit: 0 + no-warning-comments: 0 + curly: 0 + no-multi-spaces: 0 + no-alert: 0 + consistent-return: 0 + consistent-this: [0, self] + func-style: 0 + max-nested-callbacks: 0 + + # Warnings + no-debugger: 1 + no-empty: 1 + no-invalid-regexp: 1 + no-unused-expressions: 1 + no-native-reassign: 1 + no-fallthrough: 1 + camelcase: 0 + + # Errors + eqeqeq: 2 + no-undef: 2 + no-dupe-keys: 2 + no-empty-character-class: 2 + no-self-compare: 2 + valid-typeof: 2 + no-unused-vars: [2, { "args": "none" }] + handle-callback-err: 2 + no-shadow-restricted-names: 2 + no-new-require: 2 + no-mixed-spaces-and-tabs: 2 + block-scoped-var: 2 + no-else-return: 2 + no-throw-literal: 2 + no-void: 2 + radix: 2 + wrap-iife: [2, outside] + no-shadow: 0 + no-use-before-define: [2, nofunc] + no-path-concat: 2 + valid-jsdoc: [0, {requireReturn: false, requireParamDescription: false, requireReturnDescription: false}] + + # stylistic errors + no-spaced-func: 2 + semi-spacing: 2 + quotes: [2, 'single'] + key-spacing: [2, { beforeColon: false, afterColon: true }] + indent: [2, 2] + no-lonely-if: 2 + no-floating-decimal: 2 + brace-style: [2, 1tbs, { allowSingleLine: true }] + comma-style: [2, last] + no-multiple-empty-lines: [2, {max: 1}] + no-nested-ternary: 2 + operator-assignment: [2, always] + padded-blocks: [2, never] + quote-props: [2, as-needed] + keyword-spacing: [2, {'before': true, 'after': true, 'overrides': {}}] + space-before-blocks: [2, always] + array-bracket-spacing: [2, never] + computed-property-spacing: [2, never] + space-in-parens: [2, never] + space-unary-ops: [2, {words: true, nonwords: false}] + wrap-regex: 2 + linebreak-style: [2, unix] + semi: [2, always] + arrow-spacing: [2, {before: true, after: true}] + no-class-assign: 2 + no-const-assign: 2 + no-dupe-class-members: 2 + no-this-before-super: 2 + no-var: 2 + object-shorthand: [2, always] + prefer-arrow-callback: 2 + prefer-const: 2 + prefer-spread: 2 + prefer-template: 2 diff --git a/.github/workflows/automerge-release-pr-bump.yml b/.github/workflows/automerge-release-pr-bump.yml new file mode 100644 index 000000000..e84abcbb1 --- /dev/null +++ b/.github/workflows/automerge-release-pr-bump.yml @@ -0,0 +1,47 @@ +name: Automerge release bump PR + +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} + +jobs: + + autoapprove: + runs-on: ubuntu-latest + steps: + - name: Autoapproving + uses: hmarr/auto-approve-action@v2.0.0 + if: github.actor == 'asyncapi-bot' + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + automerge: + needs: [autoapprove] + runs-on: ubuntu-latest + steps: + - name: Automerging + uses: pascalgn/automerge-action@v0.7.5 + if: github.actor == 'asyncapi-bot' + env: + GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}" + GITHUB_LOGIN: asyncapi-bot + MERGE_LABELS: "" + MERGE_METHOD: "squash" + MERGE_COMMIT_MESSAGE: "pull-request-title" + MERGE_RETRIES: "10" + MERGE_RETRY_SLEEP: "10000" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..87c7d5dac --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + push: + branches: + - master + +jobs: + release: + name: 'Release GitHub' + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 13 + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm test + - name: Get version from package.json before release step + id: initversion + run: echo "::set-output name=version::$(npm run get-version --silent)" + - name: Release to GitHub + id: release + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GIT_AUTHOR_NAME: asyncapi-bot + GIT_AUTHOR_EMAIL: info@asyncapi.io + GIT_COMMITTER_NAME: asyncapi-bot + GIT_COMMITTER_EMAIL: info@asyncapi.io + run: npm run release + - name: Get version from package.json after release step + id: extractver + run: echo "::set-output name=version::$(npm run get-version --silent)" + - name: Create Pull Request with updated package files + if: steps.initversion.outputs.version != steps.extractver.outputs.version + uses: peter-evans/create-pull-request@v2.4.4 + with: + token: ${{ secrets.GH_TOKEN }} + commit-message: 'chore(release): ${{ steps.extractver.outputs.version }}' + committer: asyncapi-bot + author: asyncapi-bot + title: 'chore(release): ${{ steps.extractver.outputs.version }}' + body: 'Version bump in package.json and package-lock.json for release [${{ steps.extractver.outputs.version }}](https://github.com/${{github.repository}}/releases/tag/v${{ steps.extractver.outputs.version }})' + branch: version-bump/${{ steps.extractver.outputs.version }} diff --git a/.github/workflows/stale-issues-prs.yml b/.github/workflows/stale-issues-prs.yml new file mode 100644 index 000000000..4cb32bf98 --- /dev/null +++ b/.github/workflows/stale-issues-prs.yml @@ -0,0 +1,27 @@ +name: Manage stale issues and PRs + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v1.1.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: | + This issue has been automatically marked as stale because it has not had recent activity :sleeping: + It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. + Thank you for your contributions :heart: + stale-pr-message: | + This pull request has been automatically marked as stale because it has not had recent activity :sleeping: + It will be closed in 30 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. + Thank you for your contributions :heart: + days-before-stale: 60 + days-before-close: 30 + stale-issue-label: stale + stale-pr-label: stale + exempt-issue-label: keep-open + exempt-pr-label: keep-open \ No newline at end of file diff --git a/.github/workflows/welcome-first-time-contrib.yml b/.github/workflows/welcome-first-time-contrib.yml new file mode 100644 index 000000000..8ad01d51d --- /dev/null +++ b/.github/workflows/welcome-first-time-contrib.yml @@ -0,0 +1,23 @@ +name: Welcome first time contributors + +on: + pull_request: + types: + - opened + issues: + types: + - opened + +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + Welcome to AsyncAPI. Thanks a lot for reporting your first issue. + Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115). + pr-message: | + Welcome to AsyncAPI. Thanks a lot for creating your first pull request. + Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115). \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..82978cc68 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ + +node_modules +.DS_Store +output diff --git a/README.md b/README.md new file mode 100644 index 000000000..52a31db40 --- /dev/null +++ b/README.md @@ -0,0 +1,114 @@ +# GitHub Action for Generator + +This action generates whatever you want using your AsyncAPI document. It uses [AsyncAPI Generator](https://github.com/asyncapi/generator/). + +## Inputs + +### `template` + +Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template. + +**Default** points to `@asyncapi/markdown-template` template. + +### `filepath` + +Location of the AsyncAPI document. + +**Default** expects `asyncapi.yml` in the root of the working directory. + +### `parameters` + +The template that you use might support and even require specific parameters to be passed to the template for the generation. + +### `output` + +Directory where to put the generated files. + +**Default** points to `output` directory in the working directory. + +## Outputs + +### `files` + +List of generated files. + +## Example usage + +### Basic + +In case all defaults are fine for you, just add such step: + +``` +- name: Generating Markdown from my AsyncAPI document + uses: asyncapi/github-action-for-generator@v0.0.2 +``` + +### Using all possible inputs + +In case you do not want to use defaults, you for example want to use different template: + +``` +- name: Generating HTML from my AsyncAPI document + uses: asyncapi/github-action-for-generator@v0.0.2 + with: + template: '@asyncapi/html-template' #In case of template from npm, because of @ it must be in quotes + filepath: docs/api/my-asyncapi.yml + parameters: baseHref=/test-experiment/ sidebarOrganization=byTags #space separated list of key/values + output: generated-html +``` + +### Accessing output of generation step + +In case you want to have more steps in your workflow after generation and you need to know what files were exactly generated, you can access this information as shown below: + +``` +- name: Generating Markdown from my AsyncAPI document + id: generation + uses: asyncapi/github-action-for-generator@v0.0.2 +- name: Another step where I want to know what files were generated so I can pass it to another step and process them forward if needed + run: echo '${{steps.generation.outputs.files}}' +``` + +### Example workflow with publishing generated HTML to GitHub Pages + +In case you want to validate your asyncapi file first, and also send generated HTML to GitHub Pages this is how full workflow could look like: + +``` + +name: AsyncAPI documents processing + +on: + push: + branches: [ master ] + +jobs: + generate: + runs-on: ubuntu-latest + steps: + #"standard step" where repo needs to be checked-out first + - name: Checkout repo + uses: actions/checkout@v2 + + #Using another action for AsyncAPI for validation + - name: Validating AsyncAPI document + uses: WaleedAshraf/asyncapi-github-action@v0.0.2 + with: + filepath: docs/api/my-asyncapi.yml + + #In case you do not want to use defaults, you for example want to use different template + - name: Generating HTML from my AsyncAPI document + uses: asyncapi/github-action-for-generator@v0.0.2 + with: + template: '@asyncapi/html-template' #In case of template from npm, because of @ it must be in quotes + filepath: docs/api/my-asyncapi.yml + parameters: baseHref=/test-experiment/ sidebarOrganization=byTags #space separated list of key/values + output: generated-html + + #Using another action that takes generated HTML and pushes it to GH Pages + - name: Deploy GH page + uses: JamesIves/github-pages-deploy-action@3.4.2 + with: + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: generated-html +``` diff --git a/action.yml b/action.yml new file mode 100644 index 000000000..b7ac5c41e --- /dev/null +++ b/action.yml @@ -0,0 +1,27 @@ +name: 'Generator for AsyncAPI documents' +description: 'Use this action to generate docs or code from your AsyncAPI document. Use default templates or provide your custom ones.' +inputs: + template: + description: 'Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template.' + default: '@asyncapi/markdown-template' + required: false + filepath: + description: 'Location of the AsyncAPI document.' + default: 'asyncapi.yml' + required: false + parameters: + description: 'The template that you use might support and even require specific parameters to be passed to the template for the generation.' + required: false + output: + description: 'Directory where to put the generated files.' + required: false + default: 'output' +outputs: + files: + description: 'List of generated files.' +runs: + using: 'node12' + main: 'dist/index.js' +branding: + icon: 'file-text' + color: purple diff --git a/dist/fsevents.node b/dist/fsevents.node new file mode 100755 index 000000000..83af92f7b Binary files /dev/null and b/dist/fsevents.node differ diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 000000000..53d519c41 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,67806 @@ +module.exports = +/******/ (function(modules, runtime) { // webpackBootstrap +/******/ "use strict"; +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ __webpack_require__.ab = __dirname + "/"; +/******/ +/******/ // the startup function +/******/ function startup() { +/******/ // Load entry module and return exports +/******/ return __webpack_require__(526); +/******/ }; +/******/ +/******/ // run startup +/******/ return startup(); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */, +/* 1 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const path = __webpack_require__(622); +const scan = __webpack_require__(537); +const parse = __webpack_require__(806); +const utils = __webpack_require__(265); +const constants = __webpack_require__(446); +const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState + ? picomatch.compileRe(glob, options) + : picomatch.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(path.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); + return parse(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch.scan = (input, options) => scan(input, options); + +/** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return parsed.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${parsed.output})${append}`; + if (parsed && parsed.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = parsed; + } + + return regex; +}; + +picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + const opts = options || {}; + let parsed = { negated: false, fastpaths: true }; + let prefix = ''; + let output; + + if (input.startsWith('./')) { + input = input.slice(2); + prefix = parsed.prefix = './'; + } + + if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + output = parse.fastpaths(input, options); + } + + if (output === undefined) { + parsed = parse(input, options); + parsed.prefix = prefix + (parsed.prefix || ''); + } else { + parsed.output = output; + } + + return picomatch.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch.constants = constants; + +/** + * Expose "picomatch" + */ + +module.exports = picomatch; + + +/***/ }), +/* 2 */, +/* 3 */, +/* 4 */ +/***/ (function(module) { + +module.exports = require("child_process"); + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); + +const picomatch = __webpack_require__(827); +const normalizePath = __webpack_require__(861); + +/** + * @typedef {(testString: string) => boolean} AnymatchFn + * @typedef {string|RegExp|AnymatchFn} AnymatchPattern + * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher + */ +const BANG = '!'; +const DEFAULT_OPTIONS = {returnIndex: false}; +const arrify = (item) => Array.isArray(item) ? item : [item]; + +/** + * @param {AnymatchPattern} matcher + * @param {object} options + * @returns {AnymatchFn} + */ +const createPattern = (matcher, options) => { + if (typeof matcher === 'function') { + return matcher; + } + if (typeof matcher === 'string') { + const glob = picomatch(matcher, options); + return (string) => matcher === string || glob(string); + } + if (matcher instanceof RegExp) { + return (string) => matcher.test(string); + } + return (string) => false; +}; + +/** + * @param {Array} patterns + * @param {Array} negPatterns + * @param {String|Array} args + * @param {Boolean} returnIndex + * @returns {boolean|number} + */ +const matchPatterns = (patterns, negPatterns, args, returnIndex) => { + const isList = Array.isArray(args); + const _path = isList ? args[0] : args; + if (!isList && typeof _path !== 'string') { + throw new TypeError('anymatch: second argument must be a string: got ' + + Object.prototype.toString.call(_path)) + } + const path = normalizePath(_path); + + for (let index = 0; index < negPatterns.length; index++) { + const nglob = negPatterns[index]; + if (nglob(path)) { + return returnIndex ? -1 : false; + } + } + + const applied = isList && [path].concat(args.slice(1)); + for (let index = 0; index < patterns.length; index++) { + const pattern = patterns[index]; + if (isList ? pattern(...applied) : pattern(path)) { + return returnIndex ? index : true; + } + } + + return returnIndex ? -1 : false; +}; + +/** + * @param {AnymatchMatcher} matchers + * @param {Array|string} testString + * @param {object} options + * @returns {boolean|number|Function} + */ +const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => { + if (matchers == null) { + throw new TypeError('anymatch: specify first argument'); + } + const opts = typeof options === 'boolean' ? {returnIndex: options} : options; + const returnIndex = opts.returnIndex || false; + + // Early cache for matchers. + const mtchers = arrify(matchers); + const negatedGlobs = mtchers + .filter(item => typeof item === 'string' && item.charAt(0) === BANG) + .map(item => item.slice(1)) + .map(item => picomatch(item, opts)); + const patterns = mtchers.map(matcher => createPattern(matcher, opts)); + + if (testString == null) { + return (testString, ri = false) => { + const returnIndex = typeof ri === 'boolean' ? ri : false; + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); + } + } + + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); +}; + +anymatch.default = anymatch; +module.exports = anymatch; + + +/***/ }), +/* 6 */ +/***/ (function(module) { + +"use strict"; + + +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; +var toStr = Object.prototype.toString; + +var isStandardArguments = function isArguments(value) { + if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) { + return false; + } + return toStr.call(value) === '[object Arguments]'; +}; + +var isLegacyArguments = function isArguments(value) { + if (isStandardArguments(value)) { + return true; + } + return value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value) !== '[object Array]' && + toStr.call(value.callee) === '[object Function]'; +}; + +var supportsStandardArguments = (function () { + return isStandardArguments(arguments); +}()); + +isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests + +module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; + + +/***/ }), +/* 7 */, +/* 8 */, +/* 9 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + + +var loader = __webpack_require__(457); +var dumper = __webpack_require__(685); + + +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} + + +module.exports.Type = __webpack_require__(945); +module.exports.Schema = __webpack_require__(43); +module.exports.FAILSAFE_SCHEMA = __webpack_require__(581); +module.exports.JSON_SCHEMA = __webpack_require__(23); +module.exports.CORE_SCHEMA = __webpack_require__(611); +module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(570); +module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(910); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.safeLoad = loader.safeLoad; +module.exports.safeLoadAll = loader.safeLoadAll; +module.exports.dump = dumper.dump; +module.exports.safeDump = dumper.safeDump; +module.exports.YAMLException = __webpack_require__(556); + +// Deprecated schema names from JS-YAML 2.0.x +module.exports.MINIMAL_SCHEMA = __webpack_require__(581); +module.exports.SAFE_SCHEMA = __webpack_require__(570); +module.exports.DEFAULT_SCHEMA = __webpack_require__(910); + +// Deprecated functions from JS-YAML 1.x.x +module.exports.scan = deprecated('scan'); +module.exports.parse = deprecated('parse'); +module.exports.compose = deprecated('compose'); +module.exports.addConstructor = deprecated('addConstructor'); + + +/***/ }), +/* 10 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' { + let newStack = lazyStack.get.apply(newError); + return joinStacks({ stack: newStack }, originalError); + }, + enumerable: false, + configurable: true + }); + } + else { + lazyPopStack(newError, lazyStack); + } +} +exports.lazyJoinStacks = lazyJoinStacks; +/** + * Removes Ono from the stack, so that the stack starts at the original error location + */ +function popStack(stack) { + if (stack) { + let lines = stack.split(newline); + // Find the Ono call(s) in the stack, and remove them + let onoStart; + for (let i = 0; i < lines.length; i++) { + let line = lines[i]; + if (onoCall.test(line)) { + if (onoStart === undefined) { + // We found the first Ono call in the stack trace. + // There may be other subsequent Ono calls as well. + onoStart = i; + } + } + else if (onoStart !== undefined) { + // We found the first non-Ono call after one or more Ono calls. + // So remove the Ono call lines from the stack trace + lines.splice(onoStart, i - onoStart); + break; + } + } + if (lines.length > 0) { + return lines.join("\n"); + } + } + // If we get here, then the stack doesn't contain a call to `ono`. + // This may be due to minification or some optimization of the JS engine. + // So just return the stack as-is. + return stack; +} +/** + * Calls `popStack` lazily, when the `Error.stack` property is accessed. + */ +function lazyPopStack(error, lazyStack) { + Object.defineProperty(error, "stack", { + get: () => popStack(lazyStack.get.apply(error)), + enumerable: false, + configurable: true + }); +} +//# sourceMappingURL=stack.js.map + +/***/ }), +/* 22 */, +/* 23 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + + + + +var Schema = __webpack_require__(43); + + +module.exports = new Schema({ + include: [ + __webpack_require__(581) + ], + implicit: [ + __webpack_require__(809), + __webpack_require__(228), + __webpack_require__(44), + __webpack_require__(312) + ] +}); + + +/***/ }), +/* 24 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const { ono } = __webpack_require__(114); +const $Ref = __webpack_require__(289); +const url = __webpack_require__(639); + +module.exports = $Refs; + +/** + * This class is a map of JSON references and their resolved values. + */ +function $Refs () { + /** + * Indicates whether the schema contains any circular references. + * + * @type {boolean} + */ + this.circular = false; + + /** + * A map of paths/urls to {@link $Ref} objects + * + * @type {object} + * @protected + */ + this._$refs = {}; + + /** + * The {@link $Ref} object that is the root of the JSON schema. + * + * @type {$Ref} + * @protected + */ + this._root$Ref = null; +} + +/** + * Returns the paths of all the files/URLs that are referenced by the JSON schema, + * including the schema itself. + * + * @param {...string|string[]} [types] - Only return paths of the given types ("file", "http", etc.) + * @returns {string[]} + */ +$Refs.prototype.paths = function (types) { + let paths = getPaths(this._$refs, arguments); + return paths.map((path) => { + return path.decoded; + }); +}; + +/** + * Returns the map of JSON references and their resolved values. + * + * @param {...string|string[]} [types] - Only return references of the given types ("file", "http", etc.) + * @returns {object} + */ +$Refs.prototype.values = function (types) { + let $refs = this._$refs; + let paths = getPaths($refs, arguments); + return paths.reduce((obj, path) => { + obj[path.decoded] = $refs[path.encoded].value; + return obj; + }, {}); +}; + +/** + * Returns a POJO (plain old JavaScript object) for serialization as JSON. + * + * @returns {object} + */ +$Refs.prototype.toJSON = $Refs.prototype.values; + +/** + * Determines whether the given JSON reference exists. + * + * @param {string} path - The path being resolved, optionally with a JSON pointer in the hash + * @param {$RefParserOptions} [options] + * @returns {boolean} + */ +$Refs.prototype.exists = function (path, options) { + try { + this._resolve(path, options); + return true; + } + catch (e) { + return false; + } +}; + +/** + * Resolves the given JSON reference and returns the resolved value. + * + * @param {string} path - The path being resolved, with a JSON pointer in the hash + * @param {$RefParserOptions} [options] + * @returns {*} - Returns the resolved value + */ +$Refs.prototype.get = function (path, options) { + return this._resolve(path, options).value; +}; + +/** + * Sets the value of a nested property within this {@link $Ref#value}. + * If the property, or any of its parents don't exist, they will be created. + * + * @param {string} path - The path of the property to set, optionally with a JSON pointer in the hash + * @param {*} value - The value to assign + */ +$Refs.prototype.set = function (path, value) { + let absPath = url.resolve(this._root$Ref.path, path); + let withoutHash = url.stripHash(absPath); + let $ref = this._$refs[withoutHash]; + + if (!$ref) { + throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`); + } + + $ref.set(absPath, value); +}; + +/** + * Creates a new {@link $Ref} object and adds it to this {@link $Refs} object. + * + * @param {string} path - The file path or URL of the referenced file + */ +$Refs.prototype._add = function (path) { + let withoutHash = url.stripHash(path); + + let $ref = new $Ref(); + $ref.path = withoutHash; + $ref.$refs = this; + + this._$refs[withoutHash] = $ref; + this._root$Ref = this._root$Ref || $ref; + + return $ref; +}; + +/** + * Resolves the given JSON reference. + * + * @param {string} path - The path being resolved, optionally with a JSON pointer in the hash + * @param {$RefParserOptions} [options] + * @returns {Pointer} + * @protected + */ +$Refs.prototype._resolve = function (path, options) { + let absPath = url.resolve(this._root$Ref.path, path); + let withoutHash = url.stripHash(absPath); + let $ref = this._$refs[withoutHash]; + + if (!$ref) { + throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`); + } + + return $ref.resolve(absPath, options, path); +}; + +/** + * Returns the specified {@link $Ref} object, or undefined. + * + * @param {string} path - The path being resolved, optionally with a JSON pointer in the hash + * @returns {$Ref|undefined} + * @protected + */ +$Refs.prototype._get$Ref = function (path) { + path = url.resolve(this._root$Ref.path, path); + let withoutHash = url.stripHash(path); + return this._$refs[withoutHash]; +}; + +/** + * Returns the encoded and decoded paths keys of the given object. + * + * @param {object} $refs - The object whose keys are URL-encoded paths + * @param {...string|string[]} [types] - Only return paths of the given types ("file", "http", etc.) + * @returns {object[]} + */ +function getPaths ($refs, types) { + let paths = Object.keys($refs); + + // Filter the paths by type + types = Array.isArray(types[0]) ? types[0] : Array.prototype.slice.call(types); + if (types.length > 0 && types[0]) { + paths = paths.filter((key) => { + return types.indexOf($refs[key].pathType) !== -1; + }); + } + + // Decode local filesystem paths + return paths.map((path) => { + return { + encoded: path, + decoded: $refs[path].pathType === "file" ? url.toFileSystemPath(path, true) : path + }; + }); +} + + +/***/ }), +/* 25 */ +/***/ (function(module) { + + +module.exports = function deferred () { + var d = {}; + d.promise = new Promise(function (resolve, reject) { + d.resolve = resolve; + d.reject = reject + }); + + return d; +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const Base = __webpack_require__(31); + +/** + * Implements functions to deal with a ServerSecurityRequirement object. + * @class + * @extends Base + * @returns {ServerSecurityRequirement} + */ +class ServerSecurityRequirement extends Base { +} + +module.exports = ServerSecurityRequirement; + + +/***/ }), +/* 27 */, +/* 28 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + + +/***/ }), +/* 29 */, +/* 30 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_required(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $vSchema = 'schema' + $lvl; + if (!$isData) { + if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { + var $required = []; + var arr1 = $schema; + if (arr1) { + var $property, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $property = arr1[i1 += 1]; + var $propertySch = it.schema.properties[$property]; + if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + + +/***/ }), +/* 31 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const ParserError = __webpack_require__(59); + +/** + * Implements common functionality for all the models. + * @class + * @returns {Base} + */ +class Base { + constructor (json) { + if (!json) throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`); + this._json = json; + } + + /** + * @returns {Any} + */ + json(key) { + if (key === undefined) return this._json; + if (!this._json) return; + return this._json[key]; + } +} + +module.exports = Base; + + +/***/ }), +/* 32 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(747); +const sysPath = __webpack_require__(622); +const { promisify } = __webpack_require__(669); + +let fsevents; +try { + fsevents = __webpack_require__(399); +} catch (error) { + if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error); +} + +if (fsevents) { + // TODO: real check + const mtch = process.version.match(/v(\d+)\.(\d+)/); + if (mtch && mtch[1] && mtch[2]) { + const maj = Number.parseInt(mtch[1], 10); + const min = Number.parseInt(mtch[2], 10); + if (maj === 8 && min < 16) { + fsevents = undefined; + } + } +} + +const { + EV_ADD, + EV_CHANGE, + EV_ADD_DIR, + EV_UNLINK, + EV_ERROR, + STR_DATA, + STR_END, + FSEVENT_CREATED, + FSEVENT_MODIFIED, + FSEVENT_DELETED, + FSEVENT_MOVED, + // FSEVENT_CLONED, + FSEVENT_UNKNOWN, + FSEVENT_TYPE_DIRECTORY, + FSEVENT_TYPE_SYMLINK, + + ROOT_GLOBSTAR, + DIR_SUFFIX, + DOT_SLASH, + FUNCTION_TYPE, + EMPTY_FN, + IDENTITY_FN +} = __webpack_require__(677); +const FS_MODE_READ = 'r'; + +const Depth = (value) => isNaN(value) ? {} : {depth: value}; + +const stat = promisify(fs.stat); +const open = promisify(fs.open); +const close = promisify(fs.close); +const lstat = promisify(fs.lstat); +const realpath = promisify(fs.realpath); + +const statMethods = { stat, lstat }; + +/** + * @typedef {String} Path + */ + +/** + * @typedef {Object} FsEventsWatchContainer + * @property {Set} listeners + * @property {Function} rawEmitter + * @property {{stop: Function}} watcher + */ + +// fsevents instance helper functions +/** + * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances) + * @type {Map} + */ +const FSEventsWatchers = new Map(); + +// Threshold of duplicate path prefixes at which to start +// consolidating going forward +const consolidateThreshhold = 10; + +const wrongEventFlags = new Set([ + 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 +]); + +/** + * Instantiates the fsevents interface + * @param {Path} path path to be watched + * @param {Function} callback called when fsevents is bound and ready + * @returns {{stop: Function}} new fsevents instance + */ +const createFSEventsInstance = (path, callback) => { + const stop = fsevents.watch(path, callback); + return {stop}; +}; + +/** + * Instantiates the fsevents interface or binds listeners to an existing one covering + * the same file tree. + * @param {Path} path - to be watched + * @param {Path} realPath - real path for symlinks + * @param {Function} listener - called when fsevents emits events + * @param {Function} rawEmitter - passes data to listeners of the 'raw' event + * @returns {Function} closer + */ +function setFSEventsListener(path, realPath, listener, rawEmitter, fsw) { + let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path; + const parentPath = sysPath.dirname(watchPath); + let cont = FSEventsWatchers.get(watchPath); + + // If we've accumulated a substantial number of paths that + // could have been consolidated by watching one directory + // above the current one, create a watcher on the parent + // path instead, so that we do consolidate going forward. + if (couldConsolidate(parentPath)) { + watchPath = parentPath; + } + + const resolvedPath = sysPath.resolve(path); + const hasSymlink = resolvedPath !== realPath; + + const filteredListener = (fullPath, flags, info) => { + if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); + if ( + fullPath === resolvedPath || + !fullPath.indexOf(resolvedPath + sysPath.sep) + ) listener(fullPath, flags, info); + }; + + // check if there is already a watcher on a parent path + // modifies `watchPath` to the parent path when it finds a match + let watchedParent = false; + for (const watchedPath of FSEventsWatchers.keys()) { + if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) { + watchPath = watchedPath; + cont = FSEventsWatchers.get(watchPath); + watchedParent = true; + break; + } + } + + if (cont || watchedParent) { + cont.listeners.add(filteredListener); + } else { + cont = { + listeners: new Set([filteredListener]), + rawEmitter, + watcher: createFSEventsInstance(watchPath, (fullPath, flags) => { + if (fsw.closed) return; + const info = fsevents.getInfo(fullPath, flags); + cont.listeners.forEach(list => { + list(fullPath, flags, info); + }); + + cont.rawEmitter(info.event, fullPath, info); + }) + }; + FSEventsWatchers.set(watchPath, cont); + } + + // removes this instance's listeners and closes the underlying fsevents + // instance if there are no more listeners left + return () => { + const lst = cont.listeners; + + lst.delete(filteredListener); + if (!lst.size) { + FSEventsWatchers.delete(watchPath); + if (cont.watcher) return cont.watcher.stop().then(() => { + cont.rawEmitter = cont.watcher = undefined; + Object.freeze(cont); + }); + } + }; +} + +// Decide whether or not we should start a new higher-level +// parent watcher +const couldConsolidate = (path) => { + let count = 0; + for (const watchPath of FSEventsWatchers.keys()) { + if (watchPath.indexOf(path) === 0) { + count++; + if (count >= consolidateThreshhold) { + return true; + } + } + } + + return false; +}; + +// returns boolean indicating whether fsevents can be used +const canUse = () => fsevents && FSEventsWatchers.size < 128; + +// determines subdirectory traversal levels from root to path +const calcDepth = (path, root) => { + let i = 0; + while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++; + return i; +}; + +/** + * @mixin + */ +class FsEventsHandler { + +/** + * @param {import('../index').FSWatcher} fsw + */ +constructor(fsw) { + this.fsw = fsw; +} +checkIgnored(path, stats) { + const ipaths = this.fsw._ignoredPaths; + if (this.fsw._isIgnored(path, stats)) { + ipaths.add(path); + if (stats && stats.isDirectory()) { + ipaths.add(path + ROOT_GLOBSTAR); + } + return true; + } + + ipaths.delete(path); + ipaths.delete(path + ROOT_GLOBSTAR); +} + +addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD; + this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts); +} + +async checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + try { + const fd = await open(path, FS_MODE_READ); + if (this.fsw.closed) return; + await close(fd); + if (this.fsw.closed) return; + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } catch (error) { + if (error.code === 'EACCES') { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } +} + +handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) { + if (this.fsw.closed || this.checkIgnored(path)) return; + + if (event === EV_UNLINK) { + // suppress unlink events on never before seen files + if (info.type === FSEVENT_TYPE_DIRECTORY || watchedDir.has(item)) { + this.fsw._remove(parent, item); + } + } else { + if (event === EV_ADD) { + // track new directories + if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path); + + if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) { + // push symlinks back to the top of the stack to get handled + const curDepth = opts.depth === undefined ? + undefined : calcDepth(fullPath, realPath) + 1; + return this._addToFsEvents(path, false, true, curDepth); + } + + // track new paths + // (other than symlinks being followed, which will be tracked soon) + this.fsw._getWatchedDir(parent).add(item); + } + /** + * @type {'add'|'addDir'|'unlink'|'unlinkDir'} + */ + const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event; + this.fsw._emit(eventName, path); + if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true); + } +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} watchPath - file/dir path to be watched with fsevents + * @param {String} realPath - real path (in case of symlinks) + * @param {Function} transform - path transformer + * @param {Function} globFilter - path filter in case a glob pattern was provided + * @returns {Function} closer for the watcher instance +*/ +_watchWithFsEvents(watchPath, realPath, transform, globFilter) { + if (this.fsw.closed) return; + if (this.fsw._isIgnored(watchPath)) return; + const opts = this.fsw.options; + const watchCallback = async (fullPath, flags, info) => { + if (this.fsw.closed) return; + if ( + opts.depth !== undefined && + calcDepth(fullPath, realPath) > opts.depth + ) return; + const path = transform(sysPath.join( + watchPath, sysPath.relative(watchPath, fullPath) + )); + if (globFilter && !globFilter(path)) return; + // ensure directories are tracked + const parent = sysPath.dirname(path); + const item = sysPath.basename(path); + const watchedDir = this.fsw._getWatchedDir( + info.type === FSEVENT_TYPE_DIRECTORY ? path : parent + ); + + // correct for wrong events emitted + if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) { + if (typeof opts.ignored === FUNCTION_TYPE) { + let stats; + try { + stats = await stat(path); + } catch (error) {} + if (this.fsw.closed) return; + if (this.checkIgnored(path, stats)) return; + if (stats) { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + this.checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + switch (info.event) { + case FSEVENT_CREATED: + case FSEVENT_MODIFIED: + return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + case FSEVENT_DELETED: + case FSEVENT_MOVED: + return this.checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } + }; + + const closer = setFSEventsListener( + watchPath, + realPath, + watchCallback, + this.fsw._emitRaw, + this.fsw + ); + + this.fsw._emitReady(); + return closer; +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} linkPath path to symlink + * @param {String} fullPath absolute path to the symlink + * @param {Function} transform pre-existing path transformer + * @param {Number} curDepth level of subdirectories traversed to where symlink is + * @returns {Promise} + */ +async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { + // don't follow the same symlink more than once + if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return; + + this.fsw._symlinkPaths.set(fullPath, true); + this.fsw._incrReadyCount(); + + try { + const linkTarget = await realpath(linkPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(linkTarget)) { + return this.fsw._emitReady(); + } + + this.fsw._incrReadyCount(); + + // add the linkTarget for watching with a wrapper for transform + // that causes emitted paths to incorporate the link's path + this._addToFsEvents(linkTarget || linkPath, (path) => { + let aliasedPath = linkPath; + if (linkTarget && linkTarget !== DOT_SLASH) { + aliasedPath = path.replace(linkTarget, linkPath); + } else if (path !== DOT_SLASH) { + aliasedPath = sysPath.join(linkPath, path); + } + return transform(aliasedPath); + }, false, curDepth); + } catch(error) { + if (this.fsw._handleError(error)) { + return this.fsw._emitReady(); + } + } +} + +/** + * + * @param {Path} newPath + * @param {fs.Stats} stats + */ +emitAdd(newPath, stats, processPath, opts, forceAdd) { + const pp = processPath(newPath); + const isDir = stats.isDirectory(); + const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp)); + const base = sysPath.basename(pp); + + // ensure empty dirs get tracked + if (isDir) this.fsw._getWatchedDir(pp); + if (dirObj.has(base)) return; + dirObj.add(base); + + if (!opts.ignoreInitial || forceAdd === true) { + this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats); + } +} + +initWatch(realPath, path, wh, processPath) { + if (this.fsw.closed) return; + const closer = this._watchWithFsEvents( + wh.watchPath, + sysPath.resolve(realPath || wh.watchPath), + processPath, + wh.globFilter + ); + this.fsw._addPathCloser(path, closer); +} + +/** + * Handle added path with fsevents + * @param {String} path file/dir path or glob pattern + * @param {Function|Boolean=} transform converts working path to what the user expects + * @param {Boolean=} forceAdd ensure add is emitted + * @param {Number=} priorDepth Level of subdirectories already traversed. + * @returns {Promise} + */ +async _addToFsEvents(path, transform, forceAdd, priorDepth) { + if (this.fsw.closed) { + return; + } + const opts = this.fsw.options; + const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN; + + const wh = this.fsw._getWatchHelpers(path); + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + throw null; + } + if (stats.isDirectory()) { + // emit addDir unless this is a glob parent + if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd); + + // don't recurse further if it would exceed depth setting + if (priorDepth && priorDepth > opts.depth) return; + + // scan the contents of the dir + this.fsw._readdirp(wh.watchPath, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + ...Depth(opts.depth - (priorDepth || 0)) + }).on(STR_DATA, (entry) => { + // need to check filterPath on dirs b/c filterDir is less restrictive + if (this.fsw.closed) { + return; + } + if (entry.stats.isDirectory() && !wh.filterPath(entry)) return; + + const joinedPath = sysPath.join(wh.watchPath, entry.path); + const {fullPath} = entry; + + if (wh.followSymlinks && entry.stats.isSymbolicLink()) { + // preserve the current depth here since it can't be derived from + // real paths past the symlink + const curDepth = opts.depth === undefined ? + undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1; + + this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); + } else { + this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd); + } + }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => { + this.fsw._emitReady(); + }); + } else { + this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd); + this.fsw._emitReady(); + } + } catch (error) { + if (!error || this.fsw._handleError(error)) { + // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__- + this.fsw._emitReady(); + this.fsw._emitReady(); + } + } + + if (opts.persistent && forceAdd !== true) { + if (typeof transform === FUNCTION_TYPE) { + // realpath has already been resolved + this.initWatch(undefined, path, wh, processPath); + } else { + let realPath; + try { + realPath = await realpath(wh.watchPath); + } catch (e) {} + this.initWatch(realPath, path, wh, processPath); + } + } +} + +} + +module.exports = FsEventsHandler; +module.exports.canUse = canUse; + + +/***/ }), +/* 33 */, +/* 34 */, +/* 35 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 36 */, +/* 37 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; +/* eslint-disable no-console */ + + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var fs = __webpack_require__(747); + +var path = __webpack_require__(622); + +var Loader = __webpack_require__(857); + +var _require = __webpack_require__(818), + PrecompiledLoader = _require.PrecompiledLoader; + +var chokidar; + +var FileSystemLoader = /*#__PURE__*/function (_Loader) { + _inheritsLoose(FileSystemLoader, _Loader); + + function FileSystemLoader(searchPaths, opts) { + var _this; + + _this = _Loader.call(this) || this; + + if (typeof opts === 'boolean') { + console.log('[nunjucks] Warning: you passed a boolean as the second ' + 'argument to FileSystemLoader, but it now takes an options ' + 'object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader'); + } + + opts = opts || {}; + _this.pathsToNames = {}; + _this.noCache = !!opts.noCache; + + if (searchPaths) { + searchPaths = Array.isArray(searchPaths) ? searchPaths : [searchPaths]; // For windows, convert to forward slashes + + _this.searchPaths = searchPaths.map(path.normalize); + } else { + _this.searchPaths = ['.']; + } + + if (opts.watch) { + // Watch all the templates in the paths and fire an event when + // they change + try { + chokidar = __webpack_require__(101); // eslint-disable-line global-require + } catch (e) { + throw new Error('watch requires chokidar to be installed'); + } + + var paths = _this.searchPaths.filter(fs.existsSync); + + var watcher = chokidar.watch(paths); + watcher.on('all', function (event, fullname) { + fullname = path.resolve(fullname); + + if (event === 'change' && fullname in _this.pathsToNames) { + _this.emit('update', _this.pathsToNames[fullname], fullname); + } + }); + watcher.on('error', function (error) { + console.log('Watcher error: ' + error); + }); + } + + return _this; + } + + var _proto = FileSystemLoader.prototype; + + _proto.getSource = function getSource(name) { + var fullpath = null; + var paths = this.searchPaths; + + for (var i = 0; i < paths.length; i++) { + var basePath = path.resolve(paths[i]); + var p = path.resolve(paths[i], name); // Only allow the current directory and anything + // underneath it to be searched + + if (p.indexOf(basePath) === 0 && fs.existsSync(p)) { + fullpath = p; + break; + } + } + + if (!fullpath) { + return null; + } + + this.pathsToNames[fullpath] = name; + var source = { + src: fs.readFileSync(fullpath, 'utf-8'), + path: fullpath, + noCache: this.noCache + }; + this.emit('load', name, source); + return source; + }; + + return FileSystemLoader; +}(Loader); + +var NodeResolveLoader = /*#__PURE__*/function (_Loader2) { + _inheritsLoose(NodeResolveLoader, _Loader2); + + function NodeResolveLoader(opts) { + var _this2; + + _this2 = _Loader2.call(this) || this; + opts = opts || {}; + _this2.pathsToNames = {}; + _this2.noCache = !!opts.noCache; + + if (opts.watch) { + try { + chokidar = __webpack_require__(101); // eslint-disable-line global-require + } catch (e) { + throw new Error('watch requires chokidar to be installed'); + } + + _this2.watcher = chokidar.watch(); + + _this2.watcher.on('change', function (fullname) { + _this2.emit('update', _this2.pathsToNames[fullname], fullname); + }); + + _this2.watcher.on('error', function (error) { + console.log('Watcher error: ' + error); + }); + + _this2.on('load', function (name, source) { + _this2.watcher.add(source.path); + }); + } + + return _this2; + } + + var _proto2 = NodeResolveLoader.prototype; + + _proto2.getSource = function getSource(name) { + // Don't allow file-system traversal + if (/^\.?\.?(\/|\\)/.test(name)) { + return null; + } + + if (/^[A-Z]:/.test(name)) { + return null; + } + + var fullpath; + + try { + fullpath = require.resolve(name); + } catch (e) { + return null; + } + + this.pathsToNames[fullpath] = name; + var source = { + src: fs.readFileSync(fullpath, 'utf-8'), + path: fullpath, + noCache: this.noCache + }; + this.emit('load', name, source); + return source; + }; + + return NodeResolveLoader; +}(Loader); + +module.exports = { + FileSystemLoader: FileSystemLoader, + PrecompiledLoader: PrecompiledLoader, + NodeResolveLoader: NodeResolveLoader +}; + +/***/ }), +/* 38 */, +/* 39 */ +/***/ (function(module) { + + +module.exports = PullSummary; + +/** + * The PullSummary is returned as a response to getting `git().pull()` + * + * @constructor + */ +function PullSummary () { + this.files = []; + this.insertions = {}; + this.deletions = {}; + + this.summary = { + changes: 0, + insertions: 0, + deletions: 0 + }; + + this.created = []; + this.deleted = []; +} + +/** + * Array of files that were created + * @type {string[]} + */ +PullSummary.prototype.created = null; + +/** + * Array of files that were deleted + * @type {string[]} + */ +PullSummary.prototype.deleted = null; + +/** + * The array of file paths/names that have been modified in any part of the pulled content + * @type {string[]} + */ +PullSummary.prototype.files = null; + +/** + * A map of file path to number to show the number of insertions per file. + * @type {Object} + */ +PullSummary.prototype.insertions = null; + +/** + * A map of file path to number to show the number of deletions per file. + * @type {Object} + */ +PullSummary.prototype.deletions = null; + +/** + * Overall summary of changes/insertions/deletions and the number associated with each + * across all content that was pulled. + * @type {Object} + */ +PullSummary.prototype.summary = null; + +PullSummary.FILE_UPDATE_REGEX = /^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/; +PullSummary.SUMMARY_REGEX = /(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/; +PullSummary.ACTION_REGEX = /(create|delete) mode \d+ (.+)/; + +PullSummary.parse = function (text) { + var pullSummary = new PullSummary; + var lines = text.split('\n'); + + while (lines.length) { + var line = lines.shift().trim(); + if (!line) { + continue; + } + + update(pullSummary, line) || summary(pullSummary, line) || action(pullSummary, line); + } + + return pullSummary; +}; + +function update (pullSummary, line) { + + var update = PullSummary.FILE_UPDATE_REGEX.exec(line); + if (!update) { + return false; + } + + pullSummary.files.push(update[1]); + + var insertions = update[2].length; + if (insertions) { + pullSummary.insertions[update[1]] = insertions; + } + + var deletions = update[3].length; + if (deletions) { + pullSummary.deletions[update[1]] = deletions; + } + + return true; +} + +function summary (pullSummary, line) { + if (!pullSummary.files.length) { + return false; + } + + var update = PullSummary.SUMMARY_REGEX.exec(line); + if (!update || (update[3] === undefined && update[5] === undefined)) { + return false; + } + + pullSummary.summary.changes = +update[1] || 0; + pullSummary.summary.insertions = +update[3] || 0; + pullSummary.summary.deletions = +update[5] || 0; + + return true; +} + +function action (pullSummary, line) { + + var match = PullSummary.ACTION_REGEX.exec(line); + if (!match) { + return false; + } + + var file = match[2]; + + if (pullSummary.files.indexOf(file) < 0) { + pullSummary.files.push(file); + } + + var container = (match[1] === 'create') ? pullSummary.created : pullSummary.deleted; + container.push(file); + + return true; +} + + +/***/ }), +/* 40 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = __webpack_require__(203); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword +}; + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + if (definition.macro && definition.valid !== undefined) + throw new Error('"valid" option cannot be used with macro keywords'); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + var i, len = dataType.length; + for (i=0; i= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + + +/***/ }), +/* 45 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = __webpack_require__(314); +var definitionSchema = __webpack_require__(952); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i 0) { + return require(GLOBAL_NPM_PATH) + } else { + throwNotFoundError() + } + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND') { + throw e + } + throwNotFoundError() + } +})() + +module.exports.GLOBAL_NPM_PATH = GLOBAL_NPM_PATH +module.exports.GLOBAL_NPM_BIN = GLOBAL_NPM_BIN + + +/***/ }), +/* 49 */, +/* 50 */, +/* 51 */, +/* 52 */, +/* 53 */, +/* 54 */, +/* 55 */, +/* 56 */, +/* 57 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + + +if (typeof Promise === 'undefined') { + throw new ReferenceError("Promise wrappers must be enabled to use the promise API"); +} + +function isAsyncCall (fn) { + return /^[^)]+then\s*\)/.test(fn) || /\._run\(/.test(fn); +} + +module.exports = function (baseDir) { + + var Git = __webpack_require__(478); + var gitFactory = __webpack_require__(964); + var git; + + + var chain = Promise.resolve(); + + try { + git = gitFactory(baseDir); + } + catch (e) { + chain = Promise.reject(e); + } + + return Object.keys(Git.prototype).reduce(function (promiseApi, fn) { + if (/^_|then/.test(fn)) { + return promiseApi; + } + + if (isAsyncCall(Git.prototype[fn])) { + promiseApi[fn] = git ? asyncWrapper(fn, git) : function () { + return chain; + }; + } + + else { + promiseApi[fn] = git ? syncWrapper(fn, git, promiseApi) : function () { + return promiseApi; + }; + } + + return promiseApi; + + }, {}); + + function asyncWrapper (fn, git) { + return function () { + var args = [].slice.call(arguments); + + if (typeof args[args.length] === 'function') { + throw new TypeError( + "Promise interface requires that handlers are not supplied inline, " + + "trailing function not allowed in call to " + fn); + } + + return chain.then(function () { + return new Promise(function (resolve, reject) { + args.push(function (err, result) { + if (err) { + return reject(toError(err)); + } + + resolve(result); + }); + + git[fn].apply(git, args); + }); + }); + }; + } + + function syncWrapper (fn, git, api) { + return function () { + git[fn].apply(git, arguments); + + return api; + }; + } + +}; + +function toError (error) { + + if (error instanceof Error) { + return error; + } + + if (typeof error === 'string') { + return new Error(error); + } + + return Object.create(new Error(error), { + git: { value: error }, + }); +} + + +/***/ }), +/* 58 */, +/* 59 */ +/***/ (function(module) { + +class ParserError extends Error { + constructor(e, json, errors) { + super(e); + + let msg; + + if (typeof e === 'string') { + msg = e; + } + if (typeof e.message === 'string') { + msg = e.message; + } + + if (json) { + this.parsedJSON = json; + } + + if (errors) { + this.errors = errors; + } + + this.message = msg; + } +} + +module.exports = ParserError; + + +/***/ }), +/* 60 */, +/* 61 */, +/* 62 */, +/* 63 */, +/* 64 */, +/* 65 */, +/* 66 */, +/* 67 */, +/* 68 */, +/* 69 */, +/* 70 */ +/***/ (function(module) { + +module.exports = InvalidInputError + +function InvalidInputError (message) { + this.name = 'InvalidInputError' + this.message = message +} + +InvalidInputError.prototype = new Error() + + +/***/ }), +/* 71 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const $Ref = __webpack_require__(289); +const Pointer = __webpack_require__(709); +const url = __webpack_require__(639); + +module.exports = bundle; + +/** + * Bundles all external JSON references into the main JSON schema, thus resulting in a schema that + * only has *internal* references, not any *external* references. + * This method mutates the JSON schema object, adding new references and re-mapping existing ones. + * + * @param {$RefParser} parser + * @param {$RefParserOptions} options + */ +function bundle (parser, options) { + // console.log('Bundling $ref pointers in %s', parser.$refs._root$Ref.path); + + // Build an inventory of all $ref pointers in the JSON Schema + let inventory = []; + crawl(parser, "schema", parser.$refs._root$Ref.path + "#", "#", 0, inventory, parser.$refs, options); + + // Remap all $ref pointers + remap(inventory); +} + +/** + * Recursively crawls the given value, and inventories all JSON references. + * + * @param {object} parent - The object containing the value to crawl. If the value is not an object or array, it will be ignored. + * @param {string} key - The property key of `parent` to be crawled + * @param {string} path - The full path of the property being crawled, possibly with a JSON Pointer in the hash + * @param {string} pathFromRoot - The path of the property being crawled, from the schema root + * @param {object[]} inventory - An array of already-inventoried $ref pointers + * @param {$Refs} $refs + * @param {$RefParserOptions} options + */ +function crawl (parent, key, path, pathFromRoot, indirections, inventory, $refs, options) { + let obj = key === null ? parent : parent[key]; + + if (obj && typeof obj === "object") { + if ($Ref.isAllowed$Ref(obj)) { + inventory$Ref(parent, key, path, pathFromRoot, indirections, inventory, $refs, options); + } + else { + // Crawl the object in a specific order that's optimized for bundling. + // This is important because it determines how `pathFromRoot` gets built, + // which later determines which keys get dereferenced and which ones get remapped + let keys = Object.keys(obj) + .sort((a, b) => { + // Most people will expect references to be bundled into the the "definitions" property, + // so we always crawl that property first, if it exists. + if (a === "definitions") { + return -1; + } + else if (b === "definitions") { + return 1; + } + else { + // Otherwise, crawl the keys based on their length. + // This produces the shortest possible bundled references + return a.length - b.length; + } + }); + + // eslint-disable-next-line no-shadow + for (let key of keys) { + let keyPath = Pointer.join(path, key); + let keyPathFromRoot = Pointer.join(pathFromRoot, key); + let value = obj[key]; + + if ($Ref.isAllowed$Ref(value)) { + inventory$Ref(obj, key, path, keyPathFromRoot, indirections, inventory, $refs, options); + } + else { + crawl(obj, key, keyPath, keyPathFromRoot, indirections, inventory, $refs, options); + } + } + } + } +} + +/** + * Inventories the given JSON Reference (i.e. records detailed information about it so we can + * optimize all $refs in the schema), and then crawls the resolved value. + * + * @param {object} $refParent - The object that contains a JSON Reference as one of its keys + * @param {string} $refKey - The key in `$refParent` that is a JSON Reference + * @param {string} path - The full path of the JSON Reference at `$refKey`, possibly with a JSON Pointer in the hash + * @param {string} pathFromRoot - The path of the JSON Reference at `$refKey`, from the schema root + * @param {object[]} inventory - An array of already-inventoried $ref pointers + * @param {$Refs} $refs + * @param {$RefParserOptions} options + */ +function inventory$Ref ($refParent, $refKey, path, pathFromRoot, indirections, inventory, $refs, options) { + let $ref = $refKey === null ? $refParent : $refParent[$refKey]; + let $refPath = url.resolve(path, $ref.$ref); + let pointer = $refs._resolve($refPath, options); + let depth = Pointer.parse(pathFromRoot).length; + let file = url.stripHash(pointer.path); + let hash = url.getHash(pointer.path); + let external = file !== $refs._root$Ref.path; + let extended = $Ref.isExtended$Ref($ref); + indirections += pointer.indirections; + + let existingEntry = findInInventory(inventory, $refParent, $refKey); + if (existingEntry) { + // This $Ref has already been inventoried, so we don't need to process it again + if (depth < existingEntry.depth || indirections < existingEntry.indirections) { + removeFromInventory(inventory, existingEntry); + } + else { + return; + } + } + + inventory.push({ + $ref, // The JSON Reference (e.g. {$ref: string}) + parent: $refParent, // The object that contains this $ref pointer + key: $refKey, // The key in `parent` that is the $ref pointer + pathFromRoot, // The path to the $ref pointer, from the JSON Schema root + depth, // How far from the JSON Schema root is this $ref pointer? + file, // The file that the $ref pointer resolves to + hash, // The hash within `file` that the $ref pointer resolves to + value: pointer.value, // The resolved value of the $ref pointer + circular: pointer.circular, // Is this $ref pointer DIRECTLY circular? (i.e. it references itself) + extended, // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref") + external, // Does this $ref pointer point to a file other than the main JSON Schema file? + indirections, // The number of indirect references that were traversed to resolve the value + }); + + // Recursively crawl the resolved value + crawl(pointer.value, null, pointer.path, pathFromRoot, indirections + 1, inventory, $refs, options); +} + +/** + * Re-maps every $ref pointer, so that they're all relative to the root of the JSON Schema. + * Each referenced value is dereferenced EXACTLY ONCE. All subsequent references to the same + * value are re-mapped to point to the first reference. + * + * @example: + * { + * first: { $ref: somefile.json#/some/part }, + * second: { $ref: somefile.json#/another/part }, + * third: { $ref: somefile.json }, + * fourth: { $ref: somefile.json#/some/part/sub/part } + * } + * + * In this example, there are four references to the same file, but since the third reference points + * to the ENTIRE file, that's the only one we need to dereference. The other three can just be + * remapped to point inside the third one. + * + * On the other hand, if the third reference DIDN'T exist, then the first and second would both need + * to be dereferenced, since they point to different parts of the file. The fourth reference does NOT + * need to be dereferenced, because it can be remapped to point inside the first one. + * + * @param {object[]} inventory + */ +function remap (inventory) { + // Group & sort all the $ref pointers, so they're in the order that we need to dereference/remap them + inventory.sort((a, b) => { + if (a.file !== b.file) { + // Group all the $refs that point to the same file + return a.file < b.file ? -1 : +1; + } + else if (a.hash !== b.hash) { + // Group all the $refs that point to the same part of the file + return a.hash < b.hash ? -1 : +1; + } + else if (a.circular !== b.circular) { + // If the $ref points to itself, then sort it higher than other $refs that point to this $ref + return a.circular ? -1 : +1; + } + else if (a.extended !== b.extended) { + // If the $ref extends the resolved value, then sort it lower than other $refs that don't extend the value + return a.extended ? +1 : -1; + } + else if (a.indirections !== b.indirections) { + // Sort direct references higher than indirect references + return a.indirections - b.indirections; + } + else if (a.depth !== b.depth) { + // Sort $refs by how close they are to the JSON Schema root + return a.depth - b.depth; + } + else { + // Determine how far each $ref is from the "definitions" property. + // Most people will expect references to be bundled into the the "definitions" property if possible. + let aDefinitionsIndex = a.pathFromRoot.lastIndexOf("/definitions"); + let bDefinitionsIndex = b.pathFromRoot.lastIndexOf("/definitions"); + + if (aDefinitionsIndex !== bDefinitionsIndex) { + // Give higher priority to the $ref that's closer to the "definitions" property + return bDefinitionsIndex - aDefinitionsIndex; + } + else { + // All else is equal, so use the shorter path, which will produce the shortest possible reference + return a.pathFromRoot.length - b.pathFromRoot.length; + } + } + }); + + let file, hash, pathFromRoot; + for (let entry of inventory) { + // console.log('Re-mapping $ref pointer "%s" at %s', entry.$ref.$ref, entry.pathFromRoot); + + if (!entry.external) { + // This $ref already resolves to the main JSON Schema file + entry.$ref.$ref = entry.hash; + } + else if (entry.file === file && entry.hash === hash) { + // This $ref points to the same value as the prevous $ref, so remap it to the same path + entry.$ref.$ref = pathFromRoot; + } + else if (entry.file === file && entry.hash.indexOf(hash + "/") === 0) { + // This $ref points to a sub-value of the prevous $ref, so remap it beneath that path + entry.$ref.$ref = Pointer.join(pathFromRoot, Pointer.parse(entry.hash.replace(hash, "#"))); + } + else { + // We've moved to a new file or new hash + file = entry.file; + hash = entry.hash; + pathFromRoot = entry.pathFromRoot; + + // This is the first $ref to point to this value, so dereference the value. + // Any other $refs that point to the same value will point to this $ref instead + entry.$ref = entry.parent[entry.key] = $Ref.dereference(entry.$ref, entry.value); + + if (entry.circular) { + // This $ref points to itself + entry.$ref.$ref = entry.pathFromRoot; + } + } + + // console.log(' new value: %s', (entry.$ref && entry.$ref.$ref) ? entry.$ref.$ref : '[object Object]'); + } +} + +/** + * TODO + */ +function findInInventory (inventory, $refParent, $refKey) { + for (let i = 0; i < inventory.length; i++) { + let existingEntry = inventory[i]; + if (existingEntry.parent === $refParent && existingEntry.key === $refKey) { + return existingEntry; + } + } +} + +function removeFromInventory (inventory, entry) { + let index = inventory.indexOf(entry); + inventory.splice(index, 1); +} + + +/***/ }), +/* 72 */, +/* 73 */, +/* 74 */ +/***/ (function(module) { + +module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#","description":"Meta-schema for $data reference (JSON-schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}; + +/***/ }), +/* 75 */, +/* 76 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return it.util.schemaHasRules($sch, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), +/* 77 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var resolve = __webpack_require__(545); + +module.exports = { + Validation: errorSubclass(ValidationError), + MissingRef: errorSubclass(MissingRefError) +}; + + +function ValidationError(errors) { + this.message = 'validation failed'; + this.errors = errors; + this.ajv = this.validation = true; +} + + +MissingRefError.message = function (baseId, ref) { + return 'can\'t resolve reference ' + ref + ' from id ' + baseId; +}; + + +function MissingRefError(baseId, ref, message) { + this.message = message || MissingRefError.message(baseId, ref); + this.missingRef = resolve.url(baseId, ref); + this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); +} + + +function errorSubclass(Subclass) { + Subclass.prototype = Object.create(Error.prototype); + Subclass.prototype.constructor = Subclass; + return Subclass; +} + + +/***/ }), +/* 78 */, +/* 79 */, +/* 80 */, +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Module dependencies. + */ + +const tty = __webpack_require__(993); +const util = __webpack_require__(669); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __webpack_require__(106); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = __webpack_require__(649)(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var Type = __webpack_require__(945); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + + +/***/ }), +/* 83 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(622); +const trimRepeated = __webpack_require__(165); +const filenameReservedRegex = __webpack_require__(634); +const stripOuter = __webpack_require__(448); + +// Doesn't make sense to have longer filenames +const MAX_FILENAME_LENGTH = 100; + +const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g; // eslint-disable-line no-control-regex +const reRelativePath = /^\.+/; + +const filenamify = (string, options = {}) => { + if (typeof string !== 'string') { + throw new TypeError('Expected a string'); + } + + const replacement = options.replacement === undefined ? '!' : options.replacement; + + if (filenameReservedRegex().test(replacement) && reControlChars.test(replacement)) { + throw new Error('Replacement string cannot contain reserved filename characters'); + } + + string = string.replace(filenameReservedRegex(), replacement); + string = string.replace(reControlChars, replacement); + string = string.replace(reRelativePath, replacement); + + if (replacement.length > 0) { + string = trimRepeated(string, replacement); + string = string.length > 1 ? stripOuter(string, replacement) : string; + } + + string = filenameReservedRegex.windowsNames().test(string) ? string + replacement : string; + string = string.slice(0, typeof options.maxLength === 'number' ? options.maxLength : MAX_FILENAME_LENGTH); + + return string; +}; + +filenamify.path = (filePath, options) => { + filePath = path.resolve(filePath); + return path.join(path.dirname(filePath), filenamify(path.basename(filePath), options)); +}; + +module.exports = filenamify; + + +/***/ }), +/* 84 */, +/* 85 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 86 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 87 */ +/***/ (function(module) { + +module.exports = require("os"); + +/***/ }), +/* 88 */, +/* 89 */, +/* 90 */, +/* 91 */, +/* 92 */, +/* 93 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var Stream = __webpack_require__(413).Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} + + +/***/ }), +/* 94 */ +/***/ (function(module) { + + +module.exports = BranchSummary; + +function BranchSummary () { + this.detached = false; + this.current = ''; + this.all = []; + this.branches = {}; +} + +BranchSummary.prototype.push = function (current, detached, name, commit, label) { + if (current) { + this.detached = detached; + this.current = name; + } + this.all.push(name); + this.branches[name] = { + current: current, + name: name, + commit: commit, + label: label + }; +}; + +BranchSummary.detachedRegex = /^(\*?\s+)\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/; +BranchSummary.branchRegex = /^(\*?\s+)(\S+)\s+([a-z0-9]+)\s(.*)$/; + +BranchSummary.parse = function (commit) { + var branchSummary = new BranchSummary(); + + commit.split('\n') + .forEach(function (line) { + var detached = true; + var branch = BranchSummary.detachedRegex.exec(line); + if (!branch) { + detached = false; + branch = BranchSummary.branchRegex.exec(line); + } + + if (branch) { + branchSummary.push( + branch[1].charAt(0) === '*', + detached, + branch[2], + branch[3], + branch[4] + ); + } + }); + + return branchSummary; +}; + + +/***/ }), +/* 95 */, +/* 96 */, +/* 97 */ +/***/ (function(module) { + +"use strict"; + + +let TEXT_REGEXP = /\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i; + +module.exports = { + /** + * The order that this parser will run, in relation to other parsers. + * + * @type {number} + */ + order: 300, + + /** + * Whether to allow "empty" files (zero bytes). + * + * @type {boolean} + */ + allowEmpty: true, + + /** + * The encoding that the text is expected to be in. + * + * @type {string} + */ + encoding: "utf8", + + /** + * Determines whether this parser can parse a given file reference. + * Parsers that return true will be tried, in order, until one successfully parses the file. + * Parsers that return false will be skipped, UNLESS all parsers returned false, in which case + * every parser will be tried. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {boolean} + */ + canParse (file) { + // Use this parser if the file is a string or Buffer, and has a known text-based extension + return (typeof file.data === "string" || Buffer.isBuffer(file.data)) && TEXT_REGEXP.test(file.url); + }, + + /** + * Parses the given file as text + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {Promise} + */ + parse (file) { + if (typeof file.data === "string") { + return file.data; + } + else if (Buffer.isBuffer(file.data)) { + return file.data.toString(this.encoding); + } + else { + throw new Error("data is not text"); + } + } +}; + + +/***/ }), +/* 98 */, +/* 99 */, +/* 100 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var Type = __webpack_require__(945); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + + +/***/ }), +/* 101 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +const { EventEmitter } = __webpack_require__(614); +const fs = __webpack_require__(747); +const sysPath = __webpack_require__(622); +const { promisify } = __webpack_require__(669); +const readdirp = __webpack_require__(365); +const anymatch = __webpack_require__(5).default; +const globParent = __webpack_require__(763); +const isGlob = __webpack_require__(486); +const braces = __webpack_require__(783); +const normalizePath = __webpack_require__(861); + +const NodeFsHandler = __webpack_require__(520); +const FsEventsHandler = __webpack_require__(32); +const { + EV_ALL, + EV_READY, + EV_ADD, + EV_CHANGE, + EV_UNLINK, + EV_ADD_DIR, + EV_UNLINK_DIR, + EV_RAW, + EV_ERROR, + + STR_CLOSE, + STR_END, + + BACK_SLASH_RE, + DOUBLE_SLASH_RE, + SLASH_OR_BACK_SLASH_RE, + DOT_RE, + REPLACER_RE, + + SLASH, + BRACE_START, + BANG, + ONE_DOT, + TWO_DOTS, + GLOBSTAR, + SLASH_GLOBSTAR, + ANYMATCH_OPTS, + STRING_TYPE, + FUNCTION_TYPE, + EMPTY_STR, + EMPTY_FN, + + isWindows, + isMacos +} = __webpack_require__(677); + +const stat = promisify(fs.stat); +const readdir = promisify(fs.readdir); + +/** + * @typedef {String} Path + * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName + * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType + */ + +/** + * + * @typedef {Object} WatchHelpers + * @property {Boolean} followSymlinks + * @property {'stat'|'lstat'} statMethod + * @property {Path} path + * @property {Path} watchPath + * @property {Function} entryPath + * @property {Boolean} hasGlob + * @property {Object} globFilter + * @property {Function} filterPath + * @property {Function} filterDir + */ + +const arrify = (value = []) => Array.isArray(value) ? value : [value]; +const flatten = (list, result = []) => { + list.forEach(item => { + if (Array.isArray(item)) { + flatten(item, result); + } else { + result.push(item); + } + }); + return result; +}; + +const unifyPaths = (paths_) => { + /** + * @type {Array} + */ + const paths = flatten(arrify(paths_)); + if (!paths.every(p => typeof p === STRING_TYPE)) { + throw new TypeError(`Non-string provided as watch path: ${paths}`); + } + return paths.map(normalizePathToUnix); +}; + +const toUnix = (string) => { + let str = string.replace(BACK_SLASH_RE, SLASH); + while (str.match(DOUBLE_SLASH_RE)) { + str = str.replace(DOUBLE_SLASH_RE, SLASH); + } + return str; +}; + +// Our version of upath.normalize +// TODO: this is not equal to path-normalize module - investigate why +const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path))); + +const normalizeIgnored = (cwd = EMPTY_STR) => (path) => { + if (typeof path !== STRING_TYPE) return path; + return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path)); +}; + +const getAbsolutePath = (path, cwd) => { + if (sysPath.isAbsolute(path)) { + return path; + } + if (path.startsWith(BANG)) { + return BANG + sysPath.join(cwd, path.slice(1)); + } + return sysPath.join(cwd, path); +}; + +const undef = (opts, key) => opts[key] === undefined; + +/** + * Directory entry. + * @property {Path} path + * @property {Set} items + */ +class DirEntry { + /** + * @param {Path} dir + * @param {Function} removeWatcher + */ + constructor(dir, removeWatcher) { + this.path = dir; + this._removeWatcher = removeWatcher; + /** @type {Set} */ + this.items = new Set(); + } + + add(item) { + const {items} = this; + if (!items) return; + if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item); + } + + async remove(item) { + const {items} = this; + if (!items) return; + items.delete(item); + + if (!items.size) { + const dir = this.path; + try { + await readdir(dir); + } catch (err) { + this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); + } + } + } + + has(item) { + const {items} = this; + if (!items) return; + return items.has(item); + } + + /** + * @returns {Array} + */ + getChildren() { + const {items} = this; + if (!items) return; + return [...items.values()]; + } + + dispose() { + this.items.clear(); + delete this.path; + delete this._removeWatcher; + delete this.items; + Object.freeze(this); + } +} + +const STAT_METHOD_F = 'stat'; +const STAT_METHOD_L = 'lstat'; +class WatchHelper { + constructor(path, watchPath, follow, fsw) { + this.fsw = fsw; + this.path = path = path.replace(REPLACER_RE, EMPTY_STR); + this.watchPath = watchPath; + this.fullWatchPath = sysPath.resolve(watchPath); + this.hasGlob = watchPath !== path; + /** @type {object|boolean} */ + if (path === EMPTY_STR) this.hasGlob = false; + this.globSymlink = this.hasGlob && follow ? undefined : false; + this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false; + this.dirParts = this.getDirParts(path); + this.dirParts.forEach((parts) => { + if (parts.length > 1) parts.pop(); + }); + this.followSymlinks = follow; + this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; + } + + checkGlobSymlink(entry) { + // only need to resolve once + // first entry should always have entry.parentDir === EMPTY_STR + if (this.globSymlink === undefined) { + this.globSymlink = entry.fullParentDir === this.fullWatchPath ? + false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath}; + } + + if (this.globSymlink) { + return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath); + } + + return entry.fullPath; + } + + entryPath(entry) { + return sysPath.join(this.watchPath, + sysPath.relative(this.watchPath, this.checkGlobSymlink(entry)) + ); + } + + filterPath(entry) { + const {stats} = entry; + if (stats && stats.isSymbolicLink()) return this.filterDir(entry); + const resolvedPath = this.entryPath(entry); + const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? + this.globFilter(resolvedPath) : true; + return matchesGlob && + this.fsw._isntIgnored(resolvedPath, stats) && + this.fsw._hasReadPermissions(stats); + } + + getDirParts(path) { + if (!this.hasGlob) return []; + const parts = []; + const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path]; + expandedPath.forEach((path) => { + parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); + }); + return parts; + } + + filterDir(entry) { + if (this.hasGlob) { + const entryParts = this.getDirParts(this.checkGlobSymlink(entry)); + let globstar = false; + this.unmatchedGlob = !this.dirParts.some((parts) => { + return parts.every((part, i) => { + if (part === GLOBSTAR) globstar = true; + return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS); + }); + }); + } + return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats); + } +} + +/** + * Watches files & directories for changes. Emitted events: + * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` + * + * new FSWatcher() + * .add(directories) + * .on('add', path => log('File', path, 'was added')) + */ +class FSWatcher extends EventEmitter { +// Not indenting methods for history sake; for now. +constructor(_opts) { + super(); + + const opts = {}; + if (_opts) Object.assign(opts, _opts); // for frozen objects + + /** @type {Map} */ + this._watched = new Map(); + /** @type {Map} */ + this._closers = new Map(); + /** @type {Set} */ + this._ignoredPaths = new Set(); + + /** @type {Map} */ + this._throttled = new Map(); + + /** @type {Map} */ + this._symlinkPaths = new Map(); + + this._streams = new Set(); + this.closed = false; + + // Set up default options. + if (undef(opts, 'persistent')) opts.persistent = true; + if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false; + if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false; + if (undef(opts, 'interval')) opts.interval = 100; + if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300; + if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false; + opts.enableBinaryInterval = opts.binaryInterval !== opts.interval; + + // Enable fsevents on OS X when polling isn't explicitly enabled. + if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling; + + // If we can't use fsevents, ensure the options reflect it's disabled. + const canUseFsEvents = FsEventsHandler.canUse(); + if (!canUseFsEvents) opts.useFsEvents = false; + + // Use polling on Mac if not using fsevents. + // Other platforms use non-polling fs_watch. + if (undef(opts, 'usePolling') && !opts.useFsEvents) { + opts.usePolling = isMacos; + } + + // Global override (useful for end-developers that need to force polling for all + // instances of chokidar, regardless of usage/dependency depth) + const envPoll = process.env.CHOKIDAR_USEPOLLING; + if (envPoll !== undefined) { + const envLower = envPoll.toLowerCase(); + + if (envLower === 'false' || envLower === '0') { + opts.usePolling = false; + } else if (envLower === 'true' || envLower === '1') { + opts.usePolling = true; + } else { + opts.usePolling = !!envLower; + } + } + const envInterval = process.env.CHOKIDAR_INTERVAL; + if (envInterval) { + opts.interval = Number.parseInt(envInterval, 10); + } + + // Editor atomic write normalization enabled by default with fs.watch + if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; + if (opts.atomic) this._pendingUnlinks = new Map(); + + if (undef(opts, 'followSymlinks')) opts.followSymlinks = true; + + if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false; + if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; + const awf = opts.awaitWriteFinish; + if (awf) { + if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; + if (!awf.pollInterval) awf.pollInterval = 100; + this._pendingWrites = new Map(); + } + if (opts.ignored) opts.ignored = arrify(opts.ignored); + + let readyCalls = 0; + this._emitReady = () => { + readyCalls++; + if (readyCalls >= this._readyCount) { + this._emitReady = EMPTY_FN; + this._readyEmitted = true; + // use process.nextTick to allow time for listener to be bound + process.nextTick(() => this.emit(EV_READY)); + } + }; + this._emitRaw = (...args) => this.emit(EV_RAW, ...args); + this._readyEmitted = false; + this.options = opts; + + // Initialize with proper watcher. + if (opts.useFsEvents) { + this._fsEventsHandler = new FsEventsHandler(this); + } else { + this._nodeFsHandler = new NodeFsHandler(this); + } + + // You’re frozen when your heart’s not open. + Object.freeze(opts); +} + +// Public methods + +/** + * Adds paths to be watched on an existing FSWatcher instance + * @param {Path|Array} paths_ + * @param {String=} _origAdd private; for handling non-existent paths to be watched + * @param {Boolean=} _internal private; indicates a non-user add + * @returns {FSWatcher} for chaining + */ +add(paths_, _origAdd, _internal) { + const {cwd, disableGlobbing} = this.options; + this.closed = false; + let paths = unifyPaths(paths_); + if (cwd) { + paths = paths.map((path) => { + const absPath = getAbsolutePath(path, cwd); + + // Check `path` instead of `absPath` because the cwd portion can't be a glob + if (disableGlobbing || !isGlob(path)) { + return absPath; + } + return normalizePath(absPath); + }); + } + + // set aside negated glob strings + paths = paths.filter((path) => { + if (path.startsWith(BANG)) { + this._ignoredPaths.add(path.slice(1)); + return false; + } + + // if a path is being added that was previously ignored, stop ignoring it + this._ignoredPaths.delete(path); + this._ignoredPaths.delete(path + SLASH_GLOBSTAR); + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + + return true; + }); + + if (this.options.useFsEvents && this._fsEventsHandler) { + if (!this._readyCount) this._readyCount = paths.length; + if (this.options.persistent) this._readyCount *= 2; + paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path)); + } else { + if (!this._readyCount) this._readyCount = 0; + this._readyCount += paths.length; + Promise.all( + paths.map(async path => { + const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd); + if (res) this._emitReady(); + return res; + }) + ).then(results => { + if (this.closed) return; + results.filter(item => item).forEach(item => { + this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); + }); + }); + } + + return this; +} + +/** + * Close watchers or start ignoring events from specified paths. + * @param {Path|Array} paths_ - string or array of strings, file/directory paths and/or globs + * @returns {FSWatcher} for chaining +*/ +unwatch(paths_) { + if (this.closed) return this; + const paths = unifyPaths(paths_); + const {cwd} = this.options; + + paths.forEach((path) => { + // convert to absolute path unless relative path already matches + if (!sysPath.isAbsolute(path) && !this._closers.has(path)) { + if (cwd) path = sysPath.join(cwd, path); + path = sysPath.resolve(path); + } + + this._closePath(path); + + this._ignoredPaths.add(path); + if (this._watched.has(path)) { + this._ignoredPaths.add(path + SLASH_GLOBSTAR); + } + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + }); + + return this; +} + +/** + * Close watchers and remove all listeners from watched paths. + * @returns {Promise}. +*/ +close() { + if (this.closed) return this; + this.closed = true; + + // Memory management. + this.removeAllListeners(); + const closers = []; + this._closers.forEach(closerList => closerList.forEach(closer => { + const promise = closer(); + if (promise instanceof Promise) closers.push(promise); + })); + this._streams.forEach(stream => stream.destroy()); + this._userIgnored = undefined; + this._readyCount = 0; + this._readyEmitted = false; + this._watched.forEach(dirent => dirent.dispose()); + ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => { + this[`_${key}`].clear(); + }); + return closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve(); +} + +/** + * Expose list of watched paths + * @returns {Object} for chaining +*/ +getWatched() { + const watchList = {}; + this._watched.forEach((entry, dir) => { + const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; + watchList[key || ONE_DOT] = entry.getChildren().sort(); + }); + return watchList; +} + +emitWithAll(event, args) { + this.emit(...args); + if (event !== EV_ERROR) this.emit(EV_ALL, ...args); +} + +// Common helpers +// -------------- + +/** + * Normalize and emit events. + * Calling _emit DOES NOT MEAN emit() would be called! + * @param {EventName} event Type of event + * @param {Path} path File or directory path + * @param {*=} val1 arguments to be passed with event + * @param {*=} val2 + * @param {*=} val3 + * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +async _emit(event, path, val1, val2, val3) { + if (this.closed) return; + + const opts = this.options; + if (isWindows) path = sysPath.normalize(path); + if (opts.cwd) path = sysPath.relative(opts.cwd, path); + /** @type Array */ + const args = [event, path]; + if (val3 !== undefined) args.push(val1, val2, val3); + else if (val2 !== undefined) args.push(val1, val2); + else if (val1 !== undefined) args.push(val1); + + const awf = opts.awaitWriteFinish; + let pw; + if (awf && (pw = this._pendingWrites.get(path))) { + pw.lastChange = new Date(); + return this; + } + + if (opts.atomic) { + if (event === EV_UNLINK) { + this._pendingUnlinks.set(path, args); + setTimeout(() => { + this._pendingUnlinks.forEach((entry, path) => { + this.emit(...entry); + this.emit(EV_ALL, ...entry); + this._pendingUnlinks.delete(path); + }); + }, typeof opts.atomic === 'number' ? opts.atomic : 100); + return this; + } + if (event === EV_ADD && this._pendingUnlinks.has(path)) { + event = args[0] = EV_CHANGE; + this._pendingUnlinks.delete(path); + } + } + + if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) { + const awfEmit = (err, stats) => { + if (err) { + event = args[0] = EV_ERROR; + args[1] = err; + this.emitWithAll(event, args); + } else if (stats) { + // if stats doesn't exist the file must have been deleted + if (args.length > 2) { + args[2] = stats; + } else { + args.push(stats); + } + this.emitWithAll(event, args); + } + }; + + this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); + return this; + } + + if (event === EV_CHANGE) { + const isThrottled = !this._throttle(EV_CHANGE, path, 50); + if (isThrottled) return this; + } + + if (opts.alwaysStat && val1 === undefined && + (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE) + ) { + const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; + try { + const stats = await stat(fullPath); + // Suppress event when fs_stat fails, to avoid sending undefined 'stat' + if (!stats) return; + args.push(stats); + this.emitWithAll(event, args); + } catch (err) {} + } else { + this.emitWithAll(event, args); + } + + return this; +} + +/** + * Common handler for errors + * @param {Error} error + * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +_handleError(error) { + const code = error && error.code; + if (error && code !== 'ENOENT' && code !== 'ENOTDIR' && + (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES')) + ) { + this.emit(EV_ERROR, error); + } + return error || this.closed; +} + +/** + * Helper utility for throttling + * @param {ThrottleType} actionType type being throttled + * @param {Path} path being acted upon + * @param {Number} timeout duration of time to suppress duplicate actions + * @returns {Object|false} tracking object or false if action should be suppressed + */ +_throttle(actionType, path, timeout) { + if (!this._throttled.has(actionType)) { + this._throttled.set(actionType, new Map()); + } + + /** @type {Map} */ + const action = this._throttled.get(actionType); + /** @type {Object} */ + const actionPath = action.get(path); + + if (actionPath) { + actionPath.count++; + return false; + } + + let timeoutObject; + const clear = () => { + const item = action.get(path); + const count = item ? item.count : 0; + action.delete(path); + clearTimeout(timeoutObject); + if (item) clearTimeout(item.timeoutObject); + return count; + }; + timeoutObject = setTimeout(clear, timeout); + const thr = {timeoutObject, clear, count: 0}; + action.set(path, thr); + return thr; +} + +_incrReadyCount() { + return this._readyCount++; +} + +/** + * Awaits write operation to finish. + * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. + * @param {Path} path being acted upon + * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished + * @param {EventName} event + * @param {Function} awfEmit Callback to be called when ready for event to be emitted. + */ +_awaitWriteFinish(path, threshold, event, awfEmit) { + let timeoutHandler; + + let fullPath = path; + if (this.options.cwd && !sysPath.isAbsolute(path)) { + fullPath = sysPath.join(this.options.cwd, path); + } + + const now = new Date(); + + const awaitWriteFinish = (prevStat) => { + fs.stat(fullPath, (err, curStat) => { + if (err || !this._pendingWrites.has(path)) { + if (err && err.code !== 'ENOENT') awfEmit(err); + return; + } + + const now = Number(new Date()); + + if (prevStat && curStat.size !== prevStat.size) { + this._pendingWrites.get(path).lastChange = now; + } + const pw = this._pendingWrites.get(path); + const df = now - pw.lastChange; + + if (df >= threshold) { + this._pendingWrites.delete(path); + awfEmit(undefined, curStat); + } else { + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval, + curStat + ); + } + }); + }; + + if (!this._pendingWrites.has(path)) { + this._pendingWrites.set(path, { + lastChange: now, + cancelWait: () => { + this._pendingWrites.delete(path); + clearTimeout(timeoutHandler); + return event; + } + }); + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval + ); + } +} + +_getGlobIgnored() { + return [...this._ignoredPaths.values()]; +} + +/** + * Determines whether user has asked to ignore this path. + * @param {Path} path filepath or dir + * @param {fs.Stats=} stats result of fs.stat + * @returns {Boolean} + */ +_isIgnored(path, stats) { + if (this.options.atomic && DOT_RE.test(path)) return true; + if (!this._userIgnored) { + const {cwd} = this.options; + const ign = this.options.ignored; + + const ignored = ign && ign.map(normalizeIgnored(cwd)); + const paths = arrify(ignored) + .filter((path) => typeof path === STRING_TYPE && !isGlob(path)) + .map((path) => path + SLASH_GLOBSTAR); + const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths); + this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS); + } + + return this._userIgnored([path, stats]); +} + +_isntIgnored(path, stat) { + return !this._isIgnored(path, stat); +} + +/** + * Provides a set of common helpers and properties relating to symlink and glob handling. + * @param {Path} path file, directory, or glob pattern being watched + * @param {Number=} depth at any depth > 0, this isn't a glob + * @returns {WatchHelper} object containing helpers for this path + */ +_getWatchHelpers(path, depth) { + const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path); + const follow = this.options.followSymlinks; + + return new WatchHelper(path, watchPath, follow, this); +} + +// Directory helpers +// ----------------- + +/** + * Provides directory tracking objects + * @param {String} directory path of the directory + * @returns {DirEntry} the directory's tracking object + */ +_getWatchedDir(directory) { + if (!this._boundRemove) this._boundRemove = this._remove.bind(this); + const dir = sysPath.resolve(directory); + if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); + return this._watched.get(dir); +} + +// File helpers +// ------------ + +/** + * Check for read permissions. + * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405 + * @param {fs.Stats} stats - object, result of fs_stat + * @returns {Boolean} indicates whether the file can be read +*/ +_hasReadPermissions(stats) { + if (this.options.ignorePermissionErrors) return true; + + // stats.mode may be bigint + const md = stats && Number.parseInt(stats.mode, 10); + const st = md & 0o777; + const it = Number.parseInt(st.toString(8)[0], 10); + return Boolean(4 & it); +} + +/** + * Handles emitting unlink events for + * files and directories, and via recursion, for + * files and directories within directories that are unlinked + * @param {String} directory within which the following item is located + * @param {String} item base path of item/directory + * @returns {void} +*/ +_remove(directory, item) { + // if what is being deleted is a directory, get that directory's paths + // for recursive deleting and cleaning of watched object + // if it is not a directory, nestedDirectoryChildren will be empty array + const path = sysPath.join(directory, item); + const fullPath = sysPath.resolve(path); + const isDirectory = this._watched.has(path) || this._watched.has(fullPath); + + // prevent duplicate handling in case of arriving here nearly simultaneously + // via multiple paths (such as _handleFile and _handleDir) + if (!this._throttle('remove', path, 100)) return; + + // if the only watched file is removed, watch for its return + if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) { + this.add(directory, item, true); + } + + // This will create a new entry in the watched object in either case + // so we got to do the directory check beforehand + const wp = this._getWatchedDir(path); + const nestedDirectoryChildren = wp.getChildren(); + + // Recursively remove children directories / files. + nestedDirectoryChildren.forEach(nested => this._remove(path, nested)); + + // Check if item was on the watched list and remove it + const parent = this._getWatchedDir(directory); + const wasTracked = parent.has(item); + parent.remove(item); + + // If we wait for this file to be fully written, cancel the wait. + let relPath = path; + if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path); + if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { + const event = this._pendingWrites.get(relPath).cancelWait(); + if (event === EV_ADD) return; + } + + // The Entry will either be a directory that just got removed + // or a bogus entry to a file, in either case we have to remove it + this._watched.delete(path); + this._watched.delete(fullPath); + const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK; + if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); + + // Avoid conflicts if we later create another file with the same name + if (!this.options.useFsEvents) { + this._closePath(path); + } +} + +/** + * + * @param {Path} path + */ +_closePath(path) { + const closers = this._closers.get(path); + if (!closers) return; + closers.forEach(closer => closer()); + this._closers.delete(path); + const dir = sysPath.dirname(path); + this._getWatchedDir(dir).remove(sysPath.basename(path)); +} + +/** + * + * @param {Path} path + * @param {Function} closer + */ +_addPathCloser(path, closer) { + if (!closer) return; + let list = this._closers.get(path); + if (!list) { + list = []; + this._closers.set(path, list); + } + list.push(closer); +} + +_readdirp(root, opts) { + if (this.closed) return; + const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts}; + let stream = readdirp(root, options); + this._streams.add(stream); + stream.once(STR_CLOSE, () => { + stream = undefined; + }); + stream.once(STR_END, () => { + if (stream) { + this._streams.delete(stream); + stream = undefined; + } + }); + return stream; +} + +} + +// Export FSWatcher class +exports.FSWatcher = FSWatcher; + +/** + * Instantiates watcher with paths to be tracked. + * @param {String|Array} paths file/directory paths and/or globs + * @param {Object=} options chokidar opts + * @returns an instance of FSWatcher for chaining. + */ +const watch = (paths, options) => { + const watcher = new FSWatcher(options); + watcher.add(paths); + return watcher; +}; + +exports.watch = watch; + + +/***/ }), +/* 102 */ +/***/ (function(module) { + +"use strict"; + + +function FetchSummary (raw) { + this.raw = raw; + + this.remote = null; + this.branches = []; + this.tags = []; +} + +FetchSummary.parsers = [ + [ + /From (.+)$/, function (fetchSummary, matches) { + fetchSummary.remote = matches[0]; + } + ], + [ + /\* \[new branch\]\s+(\S+)\s*\-> (.+)$/, function (fetchSummary, matches) { + fetchSummary.branches.push({ + name: matches[0], + tracking: matches[1] + }); + } + ], + [ + /\* \[new tag\]\s+(\S+)\s*\-> (.+)$/, function (fetchSummary, matches) { + fetchSummary.tags.push({ + name: matches[0], + tracking: matches[1] + }); + } + ] +]; + +FetchSummary.parse = function (data) { + var fetchSummary = new FetchSummary(data); + + String(data) + .trim() + .split('\n') + .forEach(function (line) { + var original = line.trim(); + FetchSummary.parsers.some(function (parser) { + var parsed = parser[0].exec(original); + if (parsed) { + parser[1](fetchSummary, parsed.slice(1)); + return true; + } + }); + }); + + return fetchSummary; +}; + +module.exports = FetchSummary; + + +/***/ }), +/* 103 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var fs = __webpack_require__(747); + +var me = module.exports; + +me.spaces = 2; + +me.readFile = function(file, callback) { + fs.readFile(file, 'utf8', function(err, data) { + if (err) return callback(err, null); + + try { + var obj = JSON.parse(data); + callback(null, obj); + } catch (err2) { + callback(err2, null); + } + }) +} + +me.readFileSync = function(file) { + return JSON.parse(fs.readFileSync(file, 'utf8')); +} + +me.writeFile = function(file, obj, callback) { + var str = ''; + try { + str = JSON.stringify(obj, null, module.exports.spaces); + } catch (err) { + callback(err, null); + } + fs.writeFile(file, str, callback); +} + +me.writeFileSync = function(file, obj) { + var str = JSON.stringify(obj, null, module.exports.spaces); + return fs.writeFileSync(file, str); //not sure if fs.writeFileSync returns anything, but just in case +} + +/***/ }), +/* 104 */, +/* 105 */, +/* 106 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + +const os = __webpack_require__(87); +const hasFlag = __webpack_require__(364); + +const env = process.env; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + const min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; + + +/***/ }), +/* 107 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 108 */, +/* 109 */, +/* 110 */, +/* 111 */, +/* 112 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +(function () { + "use strict"; + + var fs = __webpack_require__(747) + ; + + function noop() {} + + function copy(src, dst, opts, cb) { + if ('function' === typeof opts) { + cb = opts; + opts = null; + } + opts = opts || {}; + + function copyHelper(err) { + var is + , os + ; + + if (!err && !(opts.replace || opts.overwrite)) { + return cb(new Error("File " + dst + " exists.")); + } + + fs.stat(src, function (err, stat) { + if (err) { + return cb(err); + } + + is = fs.createReadStream(src); + os = fs.createWriteStream(dst); + + is.pipe(os); + os.on('close', function (err) { + if (err) { + return cb(err); + } + + fs.utimes(dst, stat.atime, stat.mtime, cb); + }); + }); + } + + cb = cb || noop; + fs.stat(dst, copyHelper); + } + + module.exports = copy; +}()); + + +/***/ }), +/* 113 */, +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const singleton_1 = __webpack_require__(951); +exports.ono = singleton_1.ono; +var constructor_1 = __webpack_require__(181); +exports.Ono = constructor_1.Ono; +// tslint:disable-next-line: no-default-export +exports.default = singleton_1.ono; +// CommonJS default export hack +if ( true && typeof module.exports === "object") { + module.exports = Object.assign(module.exports.default, module.exports); // tslint:disable-line: no-unsafe-any +} +//# sourceMappingURL=index.js.map + +/***/ }), +/* 115 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return it.util.schemaHasRules($sch, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), +/* 116 */, +/* 117 */, +/* 118 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 119 */, +/* 120 */, +/* 121 */, +/* 122 */, +/* 123 */, +/* 124 */, +/* 125 */ +/***/ (function(module) { + +"use strict"; + + +function _cycler(items) { + var index = -1; + return { + current: null, + reset: function reset() { + index = -1; + this.current = null; + }, + next: function next() { + index++; + + if (index >= items.length) { + index = 0; + } + + this.current = items[index]; + return this.current; + } + }; +} + +function _joiner(sep) { + sep = sep || ','; + var first = true; + return function () { + var val = first ? '' : sep; + first = false; + return val; + }; +} // Making this a function instead so it returns a new object +// each time it's called. That way, if something like an environment +// uses it, they will each have their own copy. + + +function globals() { + return { + range: function range(start, stop, step) { + if (typeof stop === 'undefined') { + stop = start; + start = 0; + step = 1; + } else if (!step) { + step = 1; + } + + var arr = []; + + if (step > 0) { + for (var i = start; i < stop; i += step) { + arr.push(i); + } + } else { + for (var _i = start; _i > stop; _i += step) { + // eslint-disable-line for-direction + arr.push(_i); + } + } + + return arr; + }, + cycler: function cycler() { + return _cycler(Array.prototype.slice.call(arguments)); + }, + joiner: function joiner(sep) { + return _joiner(sep); + } + }; +} + +module.exports = globals; + +/***/ }), +/* 126 */, +/* 127 */, +/* 128 */, +/* 129 */ +/***/ (function(module) { + + +module.exports = DiffSummary; + +/** + * The DiffSummary is returned as a response to getting `git().status()` + * + * @constructor + */ +function DiffSummary () { + this.files = []; + this.insertions = 0; + this.deletions = 0; + this.changed = 0; +} + +/** + * Number of lines added + * @type {number} + */ +DiffSummary.prototype.insertions = 0; + +/** + * Number of lines deleted + * @type {number} + */ +DiffSummary.prototype.deletions = 0; + +/** + * Number of files changed + * @type {number} + */ +DiffSummary.prototype.changed = 0; + +DiffSummary.parse = function (text) { + var line, handler; + + var lines = text.trim().split('\n'); + var status = new DiffSummary(); + + var summary = lines.pop(); + if (summary) { + summary.trim().split(', ').forEach(function (text) { + var summary = /(\d+)\s([a-z]+)/.exec(text); + if (!summary) { + return; + } + + if (/files?/.test(summary[2])) { + status.changed = parseInt(summary[1], 10); + } + else { + status[summary[2].replace(/s$/, '') + 's'] = parseInt(summary[1], 10); + } + }); + } + + while (line = lines.shift()) { + textFileChange(line, status.files) || binaryFileChange(line, status.files); + } + + return status; +}; + +function textFileChange (line, files) { + line = line.trim().match(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/); + + if (line) { + var alterations = (line[3] || '').trim(); + files.push({ + file: line[1].trim(), + changes: parseInt(line[2], 10), + insertions: alterations.replace(/-/g, '').length, + deletions: alterations.replace(/\+/g, '').length, + binary: false + }); + + return true; + } +} + +function binaryFileChange (line, files) { + line = line.match(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/); + if (line) { + files.push({ + file: line[1].trim(), + before: +line[2], + after: +line[3], + binary: true + }); + return true; + } +} + + +/***/ }), +/* 130 */, +/* 131 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(747); +const { Readable } = __webpack_require__(413); +const sysPath = __webpack_require__(622); +const { promisify } = __webpack_require__(669); +const picomatch = __webpack_require__(827); + +const readdir = promisify(fs.readdir); +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); +const realpath = promisify(fs.realpath); + +/** + * @typedef {Object} EntryInfo + * @property {String} path + * @property {String} fullPath + * @property {fs.Stats=} stats + * @property {fs.Dirent=} dirent + * @property {String} basename + */ + +const BANG = '!'; +const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP']); +const FILE_TYPE = 'files'; +const DIR_TYPE = 'directories'; +const FILE_DIR_TYPE = 'files_directories'; +const EVERYTHING_TYPE = 'all'; +const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; + +const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); + +const normalizeFilter = filter => { + if (filter === undefined) return; + if (typeof filter === 'function') return filter; + + if (typeof filter === 'string') { + const glob = picomatch(filter.trim()); + return entry => glob(entry.basename); + } + + if (Array.isArray(filter)) { + const positive = []; + const negative = []; + for (const item of filter) { + const trimmed = item.trim(); + if (trimmed.charAt(0) === BANG) { + negative.push(picomatch(trimmed.slice(1))); + } else { + positive.push(picomatch(trimmed)); + } + } + + if (negative.length > 0) { + if (positive.length > 0) { + return entry => + positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); + } + return entry => !negative.some(f => f(entry.basename)); + } + return entry => positive.some(f => f(entry.basename)); + } +}; + +class ReaddirpStream extends Readable { + static get defaultOptions() { + return { + root: '.', + /* eslint-disable no-unused-vars */ + fileFilter: (path) => true, + directoryFilter: (path) => true, + /* eslint-enable no-unused-vars */ + type: FILE_TYPE, + lstat: false, + depth: 2147483648, + alwaysStat: false + }; + } + + constructor(options = {}) { + super({ + objectMode: true, + autoDestroy: true, + highWaterMark: options.highWaterMark || 4096 + }); + const opts = { ...ReaddirpStream.defaultOptions, ...options }; + const { root, type } = opts; + + this._fileFilter = normalizeFilter(opts.fileFilter); + this._directoryFilter = normalizeFilter(opts.directoryFilter); + + const statMethod = opts.lstat ? lstat : stat; + // Use bigint stats if it's windows and stat() supports options (node 10+). + if (process.platform === 'win32' && stat.length === 3) { + this._stat = path => statMethod(path, { bigint: true }); + } else { + this._stat = statMethod; + } + + this._maxDepth = opts.depth; + this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsEverything = type === EVERYTHING_TYPE; + this._root = sysPath.resolve(root); + this._isDirent = ('Dirent' in fs) && !opts.alwaysStat; + this._statsProp = this._isDirent ? 'dirent' : 'stats'; + this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; + + // Launch stream with one parent, the root dir. + this.parents = [this._exploreDir(root, 1)]; + this.reading = false; + this.parent = undefined; + } + + async _read(batch) { + if (this.reading) return; + this.reading = true; + + try { + while (!this.destroyed && batch > 0) { + const { path, depth, files = [] } = this.parent || {}; + + if (files.length > 0) { + const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); + for (const entry of await Promise.all(slice)) { + if (this.destroyed) return; + + const entryType = await this._getEntryType(entry); + if (entryType === 'directory' && this._directoryFilter(entry)) { + if (depth <= this._maxDepth) { + this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); + } + + if (this._wantsDir) { + this.push(entry); + batch--; + } + } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) { + if (this._wantsFile) { + this.push(entry); + batch--; + } + } + } + } else { + const parent = this.parents.pop(); + if (!parent) { + this.push(null); + break; + } + this.parent = await parent; + if (this.destroyed) return; + } + } + } catch (error) { + this.destroy(error); + } finally { + this.reading = false; + } + } + + async _exploreDir(path, depth) { + let files; + try { + files = await readdir(path, this._rdOptions); + } catch (error) { + this._onError(error); + } + return {files, depth, path}; + } + + async _formatEntry(dirent, path) { + let entry; + try { + const basename = this._isDirent ? dirent.name : dirent; + const fullPath = sysPath.resolve(sysPath.join(path, basename)); + entry = {path: sysPath.relative(this._root, fullPath), fullPath, basename}; + entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); + } catch (err) { + this._onError(err); + } + return entry; + } + + _onError(err) { + if (isNormalFlowError(err) && !this.destroyed) { + this.emit('warn', err); + } else { + this.destroy(err); + } + } + + async _getEntryType(entry) { + // entry may be undefined, because a warning or an error were emitted + // and the statsProp is undefined + const stats = entry && entry[this._statsProp]; + if (!stats) { + return; + } + if (stats.isFile()) { + return 'file'; + } + if (stats.isDirectory()) { + return 'directory'; + } + if (stats && stats.isSymbolicLink()) { + try { + const entryRealPath = await realpath(entry.fullPath); + const entryRealPathStats = await lstat(entryRealPath); + if (entryRealPathStats.isFile()) { + return 'file'; + } + if (entryRealPathStats.isDirectory()) { + return 'directory'; + } + } catch (error) { + this._onError(error); + } + } + } + + _includeAsFile(entry) { + const stats = entry && entry[this._statsProp]; + + return stats && this._wantsEverything && !stats.isDirectory(); + } +} + +/** + * @typedef {Object} ReaddirpArguments + * @property {Function=} fileFilter + * @property {Function=} directoryFilter + * @property {String=} type + * @property {Number=} depth + * @property {String=} root + * @property {Boolean=} lstat + * @property {Boolean=} bigint + */ + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param {String} root Root directory + * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth + */ +const readdirp = (root, options = {}) => { + let type = options.entryType || options.type; + if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility + if (type) options.type = type; + if (!root) { + throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); + } else if (typeof root !== 'string') { + throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); + } else if (type && !ALL_TYPES.includes(type)) { + throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); + } + + options.root = root; + return new ReaddirpStream(options); +}; + +const readdirpPromise = (root, options = {}) => { + return new Promise((resolve, reject) => { + const files = []; + readdirp(root, options) + .on('data', entry => files.push(entry)) + .on('end', () => resolve(files)) + .on('error', error => reject(error)); + }); +}; + +readdirp.promise = readdirpPromise; +readdirp.ReaddirpStream = ReaddirpStream; +readdirp.default = readdirp; + +module.exports = readdirp; + + +/***/ }), +/* 132 */, +/* 133 */ +/***/ (function(module) { + +"use strict"; + + +let BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)$/i; + +module.exports = { + /** + * The order that this parser will run, in relation to other parsers. + * + * @type {number} + */ + order: 400, + + /** + * Whether to allow "empty" files (zero bytes). + * + * @type {boolean} + */ + allowEmpty: true, + + /** + * Determines whether this parser can parse a given file reference. + * Parsers that return true will be tried, in order, until one successfully parses the file. + * Parsers that return false will be skipped, UNLESS all parsers returned false, in which case + * every parser will be tried. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {boolean} + */ + canParse (file) { + // Use this parser if the file is a Buffer, and has a known binary extension + return Buffer.isBuffer(file.data) && BINARY_REGEXP.test(file.url); + }, + + /** + * Parses the given data as a Buffer (byte array). + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {Promise} + */ + parse (file) { + if (Buffer.isBuffer(file.data)) { + return file.data; + } + else { + // This will reject if data is anything other than a string or typed array + return Buffer.from(file.data); + } + } +}; + + +/***/ }), +/* 134 */, +/* 135 */, +/* 136 */, +/* 137 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(476); + +var supportsDescriptors = __webpack_require__(359).supportsDescriptors; +var $gOPD = Object.getOwnPropertyDescriptor; +var $TypeError = TypeError; + +module.exports = function getPolyfill() { + if (!supportsDescriptors) { + throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); + } + if ((/a/mig).flags === 'gim') { + var descriptor = $gOPD(RegExp.prototype, 'flags'); + if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') { + return descriptor.get; + } + } + return implementation; +}; + + +/***/ }), +/* 138 */ +/***/ (function(module) { + +"use strict"; + + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + + +/***/ }), +/* 139 */, +/* 140 */, +/* 141 */, +/* 142 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = __webpack_require__(622) +var COLON = isWindows ? ';' : ':' +var isexe = __webpack_require__(742) + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} + + +/***/ }), +/* 143 */, +/* 144 */, +/* 145 */, +/* 146 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), +/* 147 */, +/* 148 */, +/* 149 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var path = __webpack_require__(622); + +module.exports = function express(env, app) { + function NunjucksView(name, opts) { + this.name = name; + this.path = name; + this.defaultEngine = opts.defaultEngine; + this.ext = path.extname(name); + + if (!this.ext && !this.defaultEngine) { + throw new Error('No default engine was specified and no extension was provided.'); + } + + if (!this.ext) { + this.name += this.ext = (this.defaultEngine[0] !== '.' ? '.' : '') + this.defaultEngine; + } + } + + NunjucksView.prototype.render = function render(opts, cb) { + env.render(this.name, opts, cb); + }; + + app.set('view', NunjucksView); + app.set('nunjucksEnv', env); + return env; +}; + +/***/ }), +/* 150 */, +/* 151 */, +/* 152 */, +/* 153 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 154 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 155 */, +/* 156 */, +/* 157 */, +/* 158 */, +/* 159 */, +/* 160 */, +/* 161 */, +/* 162 */, +/* 163 */, +/* 164 */, +/* 165 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + +var escapeStringRegexp = __webpack_require__(138); + +module.exports = function (str, target) { + if (typeof str !== 'string' || typeof target !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(new RegExp('(?:' + escapeStringRegexp(target) + '){2,}', 'g'), target); +}; + + +/***/ }), +/* 166 */, +/* 167 */, +/* 168 */, +/* 169 */, +/* 170 */, +/* 171 */, +/* 172 */, +/* 173 */, +/* 174 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(739); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + + +/***/ }), +/* 175 */, +/* 176 */, +/* 177 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); + +/** + * Implements functions to deal with the Contact object. + * @class + * @extends Base + * @returns {Contact} + */ +class Contact extends Base { + /** + * @returns {string} + */ + name() { + return this._json.name; + } + + /** + * @returns {string} + */ + url() { + return this._json.url; + } + + /** + * @returns {string} + */ + email() { + return this._json.email; + } +} + +module.exports = addExtensions(Contact); + + +/***/ }), +/* 178 */, +/* 179 */, +/* 180 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + + +var common = __webpack_require__(740); + + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + + +module.exports = Mark; + + +/***/ }), +/* 181 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const extend_error_1 = __webpack_require__(196); +const normalize_1 = __webpack_require__(661); +const to_json_1 = __webpack_require__(648); +const constructor = Ono; +exports.Ono = constructor; +/** + * Returns an object containing all properties of the given Error object, + * which can be used with `JSON.stringify()`. + */ +Ono.toJSON = function toJSON(error) { + return to_json_1.toJSON.call(error); +}; +/** + * Creates an `Ono` instance for a specifc error type. + */ +// tslint:disable-next-line: variable-name +function Ono(ErrorConstructor, options) { + options = normalize_1.normalizeOptions(options); + function ono(...args) { + let { originalError, props, message } = normalize_1.normalizeArgs(args, options); + // Create a new error of the specified type + let newError = new ErrorConstructor(message); + // Extend the error with the properties of the original error and the `props` object + extend_error_1.extendError(newError, originalError, props); + return newError; + } + ono[Symbol.species] = ErrorConstructor; + return ono; +} +//# sourceMappingURL=constructor.js.map + +/***/ }), +/* 182 */, +/* 183 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 184 */, +/* 185 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const Operation = __webpack_require__(573); + +/** + * Implements functions to deal with a PublishOperation object. + * @class + * @extends Operation + * @returns {PublishOperation} + */ +class PublishOperation extends Operation { + /** + * @returns {boolean} + */ + isPublish() { + return true; + } + + /** + * @returns {boolean} + */ + isSubscribe() { + return false; + } + + /** + * @returns {string} + */ + kind() { + return 'publish'; + } +} + +module.exports = PublishOperation; + + +/***/ }), +/* 186 */, +/* 187 */, +/* 188 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + + +/***/ }), +/* 189 */, +/* 190 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 191 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +// Adapted from work by jorge@jorgechamorro.com on 2010-11-25 +(function () { + "use strict"; + + function noop() {} + + var fs = __webpack_require__(747) + , forEachAsync = __webpack_require__(724).forEachAsync + , EventEmitter = __webpack_require__(614).EventEmitter + , TypeEmitter = __webpack_require__(381) + , util = __webpack_require__(669) + , path = __webpack_require__(622) + ; + + function appendToDirs(stat) { + /*jshint validthis:true*/ + if(stat.flag && stat.flag === NO_DESCEND) { return; } + this.push(stat.name); + } + + function wFilesHandlerWrapper(items) { + /*jshint validthis:true*/ + this._wFilesHandler(noop, items); + } + + function Walker(pathname, options, sync) { + EventEmitter.call(this); + + var me = this + ; + + options = options || {}; + me._wStat = options.followLinks && 'stat' || 'lstat'; + me._wStatSync = me._wStat + 'Sync'; + me._wsync = sync; + me._wq = []; + me._wqueue = [me._wq]; + me._wcurpath = undefined; + me._wfilters = options.filters || []; + me._wfirstrun = true; + me._wcurpath = pathname; + + if (me._wsync) { + //console.log('_walkSync'); + me._wWalk = me._wWalkSync; + } else { + //console.log('_walkASync'); + me._wWalk = me._wWalkAsync; + } + + options.listeners = options.listeners || {}; + Object.keys(options.listeners).forEach(function (event) { + var callbacks = options.listeners[event] + ; + + if ('function' === typeof callbacks) { + callbacks = [callbacks]; + } + + callbacks.forEach(function (callback) { + me.on(event, callback); + }); + }); + + me._wWalk(); + } + + // Inherits must come before prototype additions + util.inherits(Walker, EventEmitter); + + Walker.prototype._wLstatHandler = function (err, stat) { + var me = this + ; + + stat = stat || {}; + stat.name = me._wcurfile; + + if (err) { + stat.error = err; + //me.emit('error', curpath, stat); + // TODO v3.0 (don't noop the next if there are listeners) + me.emit('nodeError', me._wcurpath, stat, noop); + me._wfnodegroups.errors.push(stat); + me._wCurFileCallback(); + } else { + TypeEmitter.sortFnodesByType(stat, me._wfnodegroups); + // NOTE: wCurFileCallback doesn't need thisness, so this is okay + TypeEmitter.emitNodeType(me, me._wcurpath, stat, me._wCurFileCallback, me); + } + }; + Walker.prototype._wFilesHandler = function (cont, file) { + var statPath + , me = this + ; + + + me._wcurfile = file; + me._wCurFileCallback = cont; + me.emit('name', me._wcurpath, file, noop); + + statPath = me._wcurpath + path.sep + file; + + if (!me._wsync) { + // TODO how to remove this anony? + fs[me._wStat](statPath, function (err, stat) { + me._wLstatHandler(err, stat); + }); + return; + } + + try { + me._wLstatHandler(null, fs[me._wStatSync](statPath)); + } catch(e) { + me._wLstatHandler(e); + } + }; + Walker.prototype._wOnEmitDone = function () { + var me = this + , dirs = [] + ; + + me._wfnodegroups.directories.forEach(appendToDirs, dirs); + dirs.forEach(me._wJoinPath, me); + me._wqueue.push(me._wq = dirs); + me._wNext(); + }; + Walker.prototype._wPostFilesHandler = function () { + var me = this + ; + + if (me._wfnodegroups.errors.length) { + // TODO v3.0 (don't noop the next) + // .errors is an array of stats with { name: name, error: error } + me.emit('errors', me._wcurpath, me._wfnodegroups.errors, noop); + } + // XXX emitNodeTypes still needs refactor + TypeEmitter.emitNodeTypeGroups(me, me._wcurpath, me._wfnodegroups, me._wOnEmitDone, me); + }; + Walker.prototype._wReadFiles = function () { + var me = this + ; + + if (!me._wcurfiles || 0 === me._wcurfiles.length) { + return me._wNext(); + } + + // TODO could allow user to selectively stat + // and don't stat if there are no stat listeners + me.emit('names', me._wcurpath, me._wcurfiles, noop); + + if (me._wsync) { + me._wcurfiles.forEach(wFilesHandlerWrapper, me); + me._wPostFilesHandler(); + } else { + forEachAsync(me._wcurfiles, me._wFilesHandler, me).then(me._wPostFilesHandler); + } + }; + Walker.prototype._wReaddirHandler = function (err, files) { + var fnodeGroups = TypeEmitter.createNodeGroups() + , me = this + , parent + , child + ; + + me._wfnodegroups = fnodeGroups; + me._wcurfiles = files; + + // no error, great + if (!err) { + me._wReadFiles(); + return; + } + + // TODO path.sep + me._wcurpath = me._wcurpath.replace(/\/$/, ''); + + // error? not first run? => directory error + if (!me._wfirstrun) { + // TODO v3.0 (don't noop the next if there are listeners) + me.emit('directoryError', me._wcurpath, { error: err }, noop); + // TODO v3.0 + //me.emit('directoryError', me._wcurpath.replace(/^(.*)\/.*$/, '$1'), { name: me._wcurpath.replace(/^.*\/(.*)/, '$1'), error: err }, noop); + me._wReadFiles(); + return; + } + + // error? first run? => maybe a file, maybe a true error + me._wfirstrun = false; + + // readdir failed (might be a file), try a stat on the parent + parent = me._wcurpath.replace(/^(.*)\/.*$/, '$1'); + fs[me._wStat](parent, function (e, stat) { + + if (stat) { + // success + // now try stat on this as a child of the parent directory + child = me._wcurpath.replace(/^.*\/(.*)$/, '$1'); + me._wcurfiles = [child]; + me._wcurpath = parent; + } else { + // TODO v3.0 + //me.emit('directoryError', me._wcurpath.replace(/^(.*)\/.*$/, '$1'), { name: me._wcurpath.replace(/^.*\/(.*)/, '$1'), error: err }, noop); + // TODO v3.0 (don't noop the next) + // the original readdir error, not the parent stat error + me.emit('nodeError', me._wcurpath, { error: err }, noop); + } + + me._wReadFiles(); + }); + }; + Walker.prototype._wFilter = function () { + var me = this + , exclude + ; + + // Stop directories that contain filter keywords + // from continuing through the walk process + exclude = me._wfilters.some(function (filter) { + if (me._wcurpath.match(filter)) { + return true; + } + }); + + return exclude; + }; + Walker.prototype._wWalkSync = function () { + //console.log('walkSync'); + var err + , files + , me = this + ; + + try { + files = fs.readdirSync(me._wcurpath); + } catch(e) { + err = e; + } + + me._wReaddirHandler(err, files); + }; + Walker.prototype._wWalkAsync = function () { + //console.log('walkAsync'); + var me = this + ; + + // TODO how to remove this anony? + fs.readdir(me._wcurpath, function (err, files) { + me._wReaddirHandler(err, files); + }); + }; + Walker.prototype._wNext = function () { + var me = this + ; + + if (me._paused) { + return; + } + if (me._wq.length) { + me._wcurpath = me._wq.pop(); + while (me._wq.length && me._wFilter()) { + me._wcurpath = me._wq.pop(); + } + if (me._wcurpath && !me._wFilter()) { + me._wWalk(); + } else { + me._wNext(); + } + return; + } + me._wqueue.length -= 1; + if (me._wqueue.length) { + me._wq = me._wqueue[me._wqueue.length - 1]; + return me._wNext(); + } + + // To not break compatibility + //process.nextTick(function () { + me.emit('end'); + //}); + }; + Walker.prototype._wJoinPath = function (v, i, o) { + var me = this + ; + + o[i] = [me._wcurpath, path.sep, v].join(''); + }; + Walker.prototype.pause = function () { + this._paused = true; + }; + Walker.prototype.resume = function () { + this._paused = false; + this._wNext(); + }; + + exports.walk = function (path, opts) { + return new Walker(path, opts, false); + }; + + exports.walkSync = function (path, opts) { + return new Walker(path, opts, true); + }; +}()); + + +/***/ }), +/* 192 */, +/* 193 */, +/* 194 */ +/***/ (function(module) { + +"use strict"; + + +var isArray = Array.isArray; +var keyList = Object.keys; +var hasProp = Object.prototype.hasOwnProperty; + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = isArray(a) + , arrB = isArray(b) + , i + , length + , key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) + return false; + + for (i = length; i-- !== 0;) + if (!hasProp.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + key = keys[i]; + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + return a!==a && b!==b; +}; + + +/***/ }), +/* 195 */, +/* 196 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const isomorphic_node_1 = __webpack_require__(665); +const stack_1 = __webpack_require__(21); +const to_json_1 = __webpack_require__(648); +const protectedProps = ["name", "message", "stack"]; +/** + * Extends the new error with the properties of the original error and the `props` object. + * + * @param newError - The error object to extend + * @param originalError - The original error object, if any + * @param props - Additional properties to add, if any + */ +function extendError(newError, originalError, props) { + extendStack(newError, originalError); + // Copy properties from the original error + if (originalError && typeof originalError === "object") { + mergeErrors(newError, originalError); + } + // The default `toJSON` method doesn't output props like `name`, `message`, `stack`, etc. + // So replace it with one that outputs every property of the error. + newError.toJSON = to_json_1.toJSON; + // On Node.js, add support for the `util.inspect()` method + if (isomorphic_node_1.addInspectMethod) { + isomorphic_node_1.addInspectMethod(newError); + } + // Finally, copy custom properties that were specified by the user. + // These props OVERWRITE any previous props + if (props && typeof props === "object") { + Object.assign(newError, props); + } +} +exports.extendError = extendError; +/** + * Extend the error stack to include its cause + */ +function extendStack(newError, originalError) { + let stackProp = Object.getOwnPropertyDescriptor(newError, "stack"); + if (stack_1.isLazyStack(stackProp)) { + stack_1.lazyJoinStacks(stackProp, newError, originalError); + } + else if (stack_1.isWritableStack(stackProp)) { + newError.stack = stack_1.joinStacks(newError, originalError); + } +} +/** + * Merges properties of the original error with the new error. + * + * @param newError - The error object to extend + * @param originalError - The original error object, if any + */ +function mergeErrors(newError, originalError) { + // Get the original error's keys + // NOTE: We specifically exclude properties that we have already set on the new error. + // This is _especially_ important for the `stack` property, because this property has + // a lazy getter in some environments + let keys = to_json_1.getDeepKeys(originalError, protectedProps); + // HACK: We have to cast the errors to `any` so we can use symbol indexers. + // see https://github.com/Microsoft/TypeScript/issues/1863 + // tslint:disable: no-any no-unsafe-any + let _newError = newError; + let _originalError = originalError; + for (let key of keys) { + if (_newError[key] === undefined) { + try { + _newError[key] = _originalError[key]; + } + catch (e) { + // This property is read-only, so it can't be copied + } + } + } +} +//# sourceMappingURL=extend-error.js.map + +/***/ }), +/* 197 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = isexe +isexe.sync = sync + +var fs = __webpack_require__(747) + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} + + +/***/ }), +/* 198 */, +/* 199 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const path = __webpack_require__(622) + +/** + * Generate default location for basePath. + * + * @param {string} basePath - Path to generate location for. + * @param {string} ext - Generated location document extension. + * @return {string} Generated location with "file://" prefix. + */ +function genBasePathLocation (basePath, ext) { + if (basePath.endsWith(`.${ext}`)) { + return `file://${basePath}` + } + const docName = `basepath_default_doc.${ext}` + return `file://${path.resolve(basePath, docName)}` +} + +/** + * Validates draft version. + * + * @param {string} draft - Output JSON Schema draft version. + * throws {Error} If specified draft is not supported. + */ +function validateDraft (draft) { + const supportedDrafts = ['04', '06', '07'] + if (supportedDrafts.indexOf(draft) < 0) { + throw new Error( + `Unsupported draft version. Supported versions are: ${supportedDrafts}`) + } +} + +module.exports = { + genBasePathLocation: genBasePathLocation, + validateDraft: validateDraft, + DEFAULT_DRAFT: '07' +} + + +/***/ }), +/* 200 */, +/* 201 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var convertFromSchema = __webpack_require__(647) +var InvalidInputError = __webpack_require__(70) + +module.exports = convertFromParameter + +// Convert from OpenAPI 3.0 `ParameterObject` to JSON schema v4 +function convertFromParameter (parameter, options) { + if (parameter.schema !== undefined) { + return convertParameterSchema(parameter, parameter.schema, options) + } else if (parameter.content !== undefined) { + return convertFromContents(parameter, options) + } else { + if (options.strictMode) { + throw new InvalidInputError('OpenAPI parameter must have either a \'schema\' or a \'content\' property') + } + return convertParameterSchema(parameter, {}, options) + } +} + +function convertFromContents (parameter, options) { + var schemas = {} + + for (var mime in parameter.content) { + schemas[mime] = convertParameterSchema(parameter, parameter.content[mime].schema, options) + } + + return schemas +} + +function convertParameterSchema (parameter, schema, options) { + var jsonSchema = convertFromSchema(schema || {}, options) + + if (parameter.description) { + jsonSchema.description = parameter.description + } + + return jsonSchema +} + + +/***/ }), +/* 202 */, +/* 203 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += '' + (it.yieldAwait); + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 215 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +/** + * Returns the given plugins as an array, rather than an object map. + * All other methods in this module expect an array of plugins rather than an object map. + * + * @param {object} plugins - A map of plugin objects + * @return {object[]} + */ +exports.all = function (plugins) { + return Object.keys(plugins) + .filter((key) => { + return typeof plugins[key] === "object"; + }) + .map((key) => { + plugins[key].name = key; + return plugins[key]; + }); +}; + +/** + * Filters the given plugins, returning only the ones return `true` for the given method. + * + * @param {object[]} plugins - An array of plugin objects + * @param {string} method - The name of the filter method to invoke for each plugin + * @param {object} file - A file info object, which will be passed to each method + * @return {object[]} + */ +exports.filter = function (plugins, method, file) { + return plugins + .filter((plugin) => { + return !!getResult(plugin, method, file); + }); +}; + +/** + * Sorts the given plugins, in place, by their `order` property. + * + * @param {object[]} plugins - An array of plugin objects + * @returns {object[]} + */ +exports.sort = function (plugins) { + for (let plugin of plugins) { + plugin.order = plugin.order || Number.MAX_SAFE_INTEGER; + } + + return plugins.sort((a, b) => { return a.order - b.order; }); +}; + +/** + * Runs the specified method of the given plugins, in order, until one of them returns a successful result. + * Each method can return a synchronous value, a Promise, or call an error-first callback. + * If the promise resolves successfully, or the callback is called without an error, then the result + * is immediately returned and no further plugins are called. + * If the promise rejects, or the callback is called with an error, then the next plugin is called. + * If ALL plugins fail, then the last error is thrown. + * + * @param {object[]} plugins - An array of plugin objects + * @param {string} method - The name of the method to invoke for each plugin + * @param {object} file - A file info object, which will be passed to each method + * @returns {Promise} + */ +exports.run = function (plugins, method, file, $refs) { + let plugin, lastError, index = 0; + + return new Promise(((resolve, reject) => { + runNextPlugin(); + + function runNextPlugin () { + plugin = plugins[index++]; + if (!plugin) { + // There are no more functions, so re-throw the last error + return reject(lastError); + } + + try { + // console.log(' %s', plugin.name); + let result = getResult(plugin, method, file, callback, $refs); + if (result && typeof result.then === "function") { + // A promise was returned + result.then(onSuccess, onError); + } + else if (result !== undefined) { + // A synchronous result was returned + onSuccess(result); + } + // else { the callback will be called } + } + catch (e) { + onError(e); + } + } + + function callback (err, result) { + if (err) { + onError(err); + } + else { + onSuccess(result); + } + } + + function onSuccess (result) { + // console.log(' success'); + resolve({ + plugin, + result + }); + } + + function onError (err) { + // console.log(' %s', err.message || err); + lastError = err; + runNextPlugin(); + } + })); +}; + +/** + * Returns the value of the given property. + * If the property is a function, then the result of the function is returned. + * If the value is a RegExp, then it will be tested against the file URL. + * If the value is an aray, then it will be compared against the file extension. + * + * @param {object} obj - The object whose property/method is called + * @param {string} prop - The name of the property/method to invoke + * @param {object} file - A file info object, which will be passed to the method + * @param {function} [callback] - A callback function, which will be passed to the method + * @returns {*} + */ +function getResult (obj, prop, file, callback, $refs) { + let value = obj[prop]; + + if (typeof value === "function") { + return value.apply(obj, [file, callback, $refs]); + } + + if (!callback) { + // The synchronous plugin functions (canParse and canRead) + // allow a "shorthand" syntax, where the user can match + // files by RegExp or by file extension. + if (value instanceof RegExp) { + return value.test(file.url); + } + else if (typeof value === "string") { + return value === file.extension; + } + else if (Array.isArray(value)) { + return value.indexOf(file.extension) !== -1; + } + } + + return value; +} + + +/***/ }), +/* 216 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var ruleModules = __webpack_require__(404) + , toHash = __webpack_require__(676).toHash; + +module.exports = function rules() { + var RULES = [ + { type: 'number', + rules: [ { 'maximum': ['exclusiveMaximum'] }, + { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, + { type: 'string', + rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, + { type: 'array', + rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, + { type: 'object', + rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', + { 'properties': ['additionalProperties', 'patternProperties'] } ] }, + { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } + ]; + + var ALL = [ 'type', '$comment' ]; + var KEYWORDS = [ + '$schema', '$id', 'id', '$data', 'title', + 'description', 'default', 'definitions', + 'examples', 'readOnly', 'writeOnly', + 'contentMediaType', 'contentEncoding', + 'additionalItems', 'then', 'else' + ]; + var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; + RULES.all = toHash(ALL); + RULES.types = toHash(TYPES); + + RULES.forEach(function (group) { + group.rules = group.rules.map(function (keyword) { + var implKeywords; + if (typeof keyword == 'object') { + var key = Object.keys(keyword)[0]; + implKeywords = keyword[key]; + keyword = key; + implKeywords.forEach(function (k) { + ALL.push(k); + RULES.all[k] = true; + }); + } + ALL.push(keyword); + var rule = RULES.all[keyword] = { + keyword: keyword, + code: ruleModules[keyword], + implements: implKeywords + }; + return rule; + }); + + RULES.all.$comment = { + keyword: '$comment', + code: ruleModules.$comment + }; + + if (group.type) RULES.types[group.type] = group; + }); + + RULES.keywords = toHash(ALL.concat(KEYWORDS)); + RULES.custom = {}; + + return RULES; +}; + + +/***/ }), +/* 217 */, +/* 218 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { createMapOfType, getMapKeyOfType, addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); +const ServerVariable = __webpack_require__(567); +const ServerSecurityRequirement = __webpack_require__(26); + +/** + * Implements functions to deal with a Server object. + * @class + * @extends Base + * @returns {Server} + */ +class Server extends Base { + /** + * @returns {string} + */ + description() { + return this._json.description; + } + + /** + * @returns {string} + */ + url() { + return this._json.url; + } + + /** + * @returns {string} + */ + protocol() { + return this._json.protocol; + } + + /** + * @returns {string} + */ + protocolVersion() { + return this._json.protocolVersion; + } + + /** + * @returns {Object} + */ + variables() { + return createMapOfType(this._json.variables, ServerVariable); + } + + /** + * @param {string} name - Name of the server variable. + * @returns {ServerVariable} + */ + variable(name) { + return getMapKeyOfType(this._json.variables, name, ServerVariable); + } + + /** + * @returns {boolean} + */ + hasVariables() { + return !!this._json.variables; + } + + /** + * @returns {ServerSecurityRequirement[]} + */ + security() { + if (!this._json.security) return null; + return this._json.security.map(sec => new ServerSecurityRequirement(sec)); + } + + /** + * @returns {Object} + */ + bindings() { + return this._json.bindings || null; + } + + /** + * @param {string} name - Name of the binding. + * @returns {Object} + */ + binding(name) { + return this._json.bindings ? this._json.bindings[name] : null; + } +} + +module.exports = addExtensions(Server); + + +/***/ }), +/* 219 */, +/* 220 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 221 */ +/***/ (function(module) { + +module.exports = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}; + +/***/ }), +/* 222 */, +/* 223 */, +/* 224 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +// This file will automatically be rewired to web-loader.js when +// building for the browser +module.exports = __webpack_require__(37); + +/***/ }), +/* 225 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args); + return result; +}; + + +/***/ }), +/* 226 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var fs = null + , path = __webpack_require__(622) + , jsonFile = __webpack_require__(103) + , json = __webpack_require__(944) + , fse = {}; + +try { + // optional dependency + fs = __webpack_require__(598) +} catch (er) { + fs = __webpack_require__(747) +} + +Object.keys(fs).forEach(function(key) { + var func = fs[key]; + if (typeof func == 'function') + fse[key] = func; +}); + +fs = fse; + +// copy + +fs.copy = __webpack_require__(766).copy; + +// remove + +var remove = __webpack_require__(366); +fs.remove = remove.remove; +fs.removeSync = remove.removeSync; +fs['delete'] = fs.remove +fs.deleteSync = fs.removeSync + +// mkdir + +var mkdir = __webpack_require__(777) +fs.mkdirs = mkdir.mkdirs +fs.mkdirsSync = mkdir.mkdirsSync +fs.mkdirp = mkdir.mkdirs +fs.mkdirpSync = mkdir.mkdirsSync + +// create + +var create = __webpack_require__(897) +fs.createFile = create.createFile; +fs.createFileSync = create.createFileSync; + +//deprecated +fs.touch = function touch() { + console.log('fs.touch() is deprecated. Please use fs.createFile().') + fs.createFile.apply(null, arguments) +} + +fs.touchSync = function touchSync() { + console.log('fs.touchSync() is deprecated. Please use fs.createFileSync().') + fs.createFileSync.apply(null, arguments) +} + +// output + +var output = __webpack_require__(814); +fs.outputFile = output.outputFile; +fs.outputFileSync = output.outputFileSync; + +// read + +/*fs.readTextFile = function(file, callback) { + return fs.readFile(file, 'utf8', callback) +} + +fs.readTextFileSync = function(file, callback) { + return fs.readFileSync(file, 'utf8') +}*/ + +// json files + +fs.readJsonFile = jsonFile.readFile; +fs.readJSONFile = jsonFile.readFile; +fs.readJsonFileSync = jsonFile.readFileSync; +fs.readJSONFileSync = jsonFile.readFileSync; + +fs.readJson = jsonFile.readFile; +fs.readJSON = jsonFile.readFile; +fs.readJsonSync = jsonFile.readFileSync; +fs.readJSONSync = jsonFile.readFileSync; + +fs.outputJsonSync = json.outputJsonSync; +fs.outputJSONSync = json.outputJsonSync; +fs.outputJson = json.outputJson; +fs.outputJSON = json.outputJson; + +fs.writeJsonFile = jsonFile.writeFile; +fs.writeJSONFile = jsonFile.writeFile; +fs.writeJsonFileSync = jsonFile.writeFileSync; +fs.writeJSONFileSync = jsonFile.writeFileSync; + +fs.writeJson = jsonFile.writeFile; +fs.writeJSON = jsonFile.writeFile; +fs.writeJsonSync = jsonFile.writeFileSync; +fs.writeJSONSync = jsonFile.writeFileSync; + + +module.exports = fs + +jsonFile.spaces = 2; //set to 2 +module.exports.jsonfile = jsonFile; //so users of fs-extra can modify jsonFile.spaces; + + + +/***/ }), +/* 227 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const stringify = __webpack_require__(382); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = __webpack_require__(807); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + let opts = options || {}; + let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + let ast = { type: 'root', input, nodes: [] }; + let stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let closed = true; + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + let brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + let type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + let parent = stack[stack.length - 1]; + let index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; + + +/***/ }), +/* 228 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var Type = __webpack_require__(945); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + + +/***/ }), +/* 229 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const Operation = __webpack_require__(573); + +/** + * Implements functions to deal with a SubscribeOperation object. + * @class + * @extends Operation + * @returns {SubscribeOperation} + */ +class SubscribeOperation extends Operation { + /** + * @returns {boolean} + */ + isPublish() { + return false; + } + + /** + * @returns {boolean} + */ + isSubscribe() { + return true; + } + + /** + * @returns {string} + */ + kind() { + return 'subscribe'; + } +} + +module.exports = SubscribeOperation; + + +/***/ }), +/* 230 */, +/* 231 */, +/* 232 */, +/* 233 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_dependencies(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $schemaDeps = {}, + $propertyDeps = {}, + $ownProperties = it.opts.ownProperties; + for ($property in $schema) { + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } + out += 'var ' + ($errs) + ' = errors;'; + var $currentErrorPath = it.errorPath; + out += 'var missing' + ($lvl) + ';'; + for (var $property in $propertyDeps) { + $deps = $propertyDeps[$property]; + if ($deps.length) { + out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + if ($breakOnError) { + out += ' && ( '; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ')) { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + out += ' ) { '; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + } + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; + for (var $property in $schemaDeps) { + var $sch = $schemaDeps[$property]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 234 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var npm = __webpack_require__(48); +var fs = __webpack_require__(747); +var path = __webpack_require__(622); +var semver = __webpack_require__(280); + +var LOAD_ERR = 'NPM_LOAD_ERR', + INSTALL_ERR = 'NPM_INSTALL_ERR', + VIEW_ERR = 'NPM_VIEW_ERR'; + +/** + * Created with IntelliJ IDEA. + * User: leiko + * Date: 30/01/14 + * Time: 10:28 + */ +var npmi = function (options, callback) { + callback = callback || function () {}; + + var name = options.name, + pkgName = options.pkgName || name, + version = options.version || 'latest', + installPath = options.path || '.', + forceInstall = options.forceInstall || false, + localInstall = options.localInstall || false, + npmLoad = options.npmLoad || {loglevel: 'silent'}, + savedPrefix = null; + + function viewCallback(installedVersion) { + return function (err, view) { + if (err) { + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + err.code = VIEW_ERR; + return callback(err); + } + + // npm view success + var latestVersion = Object.keys(view)[0]; + if ((typeof latestVersion !== 'undefined') && (latestVersion === installedVersion)) { + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + return callback(); + } else { + npm.commands.install(installPath, [name+'@'+latestVersion], installCallback); + } + } + } + + function checkInstalled(isTarball) { + var module = name+'@'+version; + + if (isTarball) { + module = name; + if (pkgName === name) { + console.warn('npmi warn: install "'+name+'" from tarball/folder without options.pkgName specified => forceInstall: true'); + } + } + + // check that version matches + fs.readFile(path.resolve(installPath, 'node_modules', pkgName, 'package.json'), function (err, pkgRawData) { + if (err) { + // hmm, something went wrong while reading module's package.json file + // lets try to reinstall it just in case + return npm.commands.install(installPath, [module], installCallback); + } + + var pkg = JSON.parse(pkgRawData); + if (version === 'latest') { + // specified version is "latest" which means nothing for a comparison check + if (isTarball) { + // when a package is already installed and it comes from a tarball, you have to specify + // a real version => warn + console.warn('npmi warn: install from tarball without options.version specified => forceInstall: true'); + return npm.commands.install(installPath, [module], installCallback); + } else { + // so we need to ask npm to give us a view of the module from remote registry + // in order to check if it really is the latest one that is currently installed + return npm.commands.view([name], true, viewCallback(pkg.version)); + } + + } else if (pkg.version === version) { + // package is installed and version matches + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + return callback(); + + } else { + // version does not match: reinstall + return npm.commands.install(installPath, [module], installCallback); + } + }); + } + + function installCallback(err, result) { + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + + if (err) { + err.code = INSTALL_ERR; + } + + callback(err, result); + } + + function loadCallback(err) { + if (err) { + err.code = LOAD_ERR; + return callback(err); + } + + // npm loaded successfully + savedPrefix = npm.prefix; // save current npm.prefix + npm.prefix = installPath; // change npm.prefix to given installPath + if (!name) { + // just want to do an "npm install" where a package.json is + npm.commands.install(installPath, [], installCallback); + + } else if (localInstall) { + if (forceInstall) { + // local install won't work with version specified + npm.commands.install(installPath, [name], installCallback); + } else { + // check if there is already a local install of this module + fs.readFile(path.resolve(name, 'package.json'), 'utf8', function (err, sourcePkgData) { + if (err) { + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + callback(err); + + } else { + try { + var sourcePkg = JSON.parse(sourcePkgData) + } catch (err) { + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + callback(err); + return; + } + + var pkgName = sourcePkg.name || path.basename(name); + fs.readFile(path.resolve(installPath, 'node_modules', pkgName, 'package.json'), 'utf8', function (err, targetPkgData) { + if (err) { + // file probably doesn't exist, or is corrupted: install + // local install won't work with version specified + npm.commands.install(installPath, [name], installCallback); + } else { + // there is a module that looks a lot like the one you want to install: do some checks + try { + var targetPkg = JSON.parse(targetPkgData); + } catch (err) { + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + callback(err); + return; + } + + if (semver.gt(sourcePkg.version, targetPkg.version)) { + // install because current found version seems outdated + // local install won't work with version specified + npm.commands.install(installPath, [name], installCallback); + } else { + // reset npm.prefix to saved value + npm.prefix = savedPrefix; + callback(); + } + } + }); + } + }); + } + } else { + if (forceInstall) { + // reinstall package module + if (name.indexOf('/') === -1) { + // not a tarball + npm.commands.install(installPath, [name+'@'+version], installCallback); + } else { + // do not specify version for tarball + npm.commands.install(installPath, [name], installCallback); + } + + } else { + // check if package is installed + checkInstalled(name.indexOf('/') !== -1); + } + } + } + + npm.load(npmLoad, loadCallback); +}; + +npmi.LOAD_ERR = LOAD_ERR; +npmi.INSTALL_ERR = INSTALL_ERR; +npmi.VIEW_ERR = VIEW_ERR; + +npmi.NPM_VERSION = npm.version; + +module.exports = npmi; + +/***/ }), +/* 235 */, +/* 236 */, +/* 237 */ +/***/ (function(module) { + +"use strict"; + + +var traverse = module.exports = function (schema, opts, cb) { + // Legacy support for v0.3.1 and earlier. + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + + cb = opts.cb || cb; + var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; + var post = cb.post || function() {}; + + _traverse(opts, pre, post, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i= 0) { + notSupported.splice(index, 1); + } + } + + return notSupported; +} + + +/***/ }), +/* 240 */ +/***/ (function(module) { + +module.exports = ["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","oga","ogg","ogv","otf","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rtf","rz","s3m","s7z","scpt","sgi","shar","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]; + +/***/ }), +/* 241 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { addExtensions } = __webpack_require__(696); +const MessageTraitable = __webpack_require__(604); + +/** + * Implements functions to deal with a MessageTrait object. + * @class + * @extends Base + * @returns {MessageTrait} + */ +class MessageTrait extends MessageTraitable { +} + +module.exports = addExtensions(MessageTrait); + + +/***/ }), +/* 242 */, +/* 243 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 244 */, +/* 245 */, +/* 246 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var URI = __webpack_require__(853) + , equal = __webpack_require__(194) + , util = __webpack_require__(676) + , SchemaObject = __webpack_require__(925) + , traverse = __webpack_require__(237); + +module.exports = resolve; + +resolve.normalizeId = normalizeId; +resolve.fullPath = getFullPath; +resolve.url = resolveUrl; +resolve.ids = resolveIds; +resolve.inlineRef = inlineRef; +resolve.schema = resolveSchema; + +/** + * [resolve and compile the references ($ref)] + * @this Ajv + * @param {Function} compile reference to schema compilation funciton (localCompile) + * @param {Object} root object with information about the root schema for the current schema + * @param {String} ref reference to resolve + * @return {Object|Function} schema object (if the schema can be inlined) or validation function + */ +function resolve(compile, root, ref) { + /* jshint validthis: true */ + var refVal = this._refs[ref]; + if (typeof refVal == 'string') { + if (this._refs[refVal]) refVal = this._refs[refVal]; + else return resolve.call(this, compile, root, refVal); + } + + refVal = refVal || this._schemas[ref]; + if (refVal instanceof SchemaObject) { + return inlineRef(refVal.schema, this._opts.inlineRefs) + ? refVal.schema + : refVal.validate || this._compile(refVal); + } + + var res = resolveSchema.call(this, root, ref); + var schema, v, baseId; + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + + if (schema instanceof SchemaObject) { + v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); + } else if (schema !== undefined) { + v = inlineRef(schema, this._opts.inlineRefs) + ? schema + : compile.call(this, schema, root, undefined, baseId); + } + + return v; +} + + +/** + * Resolve schema, its root and baseId + * @this Ajv + * @param {Object} root root object with properties schema, refVal, refs + * @param {String} ref reference to resolve + * @return {Object} object with properties schema, root, baseId + */ +function resolveSchema(root, ref) { + /* jshint validthis: true */ + var p = URI.parse(ref) + , refPath = _getFullPath(p) + , baseId = getFullPath(this._getId(root.schema)); + if (Object.keys(root.schema).length === 0 || refPath !== baseId) { + var id = normalizeId(refPath); + var refVal = this._refs[id]; + if (typeof refVal == 'string') { + return resolveRecursive.call(this, root, refVal, p); + } else if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + root = refVal; + } else { + refVal = this._schemas[id]; + if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + if (id == normalizeId(ref)) + return { schema: refVal, root: root, baseId: baseId }; + root = refVal; + } else { + return; + } + } + if (!root.schema) return; + baseId = getFullPath(this._getId(root.schema)); + } + return getJsonPointer.call(this, p, baseId, root.schema, root); +} + + +/* @this Ajv */ +function resolveRecursive(root, ref, parsedRef) { + /* jshint validthis: true */ + var res = resolveSchema.call(this, root, ref); + if (res) { + var schema = res.schema; + var baseId = res.baseId; + root = res.root; + var id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + return getJsonPointer.call(this, parsedRef, baseId, schema, root); + } +} + + +var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); +/* @this Ajv */ +function getJsonPointer(parsedRef, baseId, schema, root) { + /* jshint validthis: true */ + parsedRef.fragment = parsedRef.fragment || ''; + if (parsedRef.fragment.slice(0,1) != '/') return; + var parts = parsedRef.fragment.split('/'); + + for (var i = 1; i < parts.length; i++) { + var part = parts[i]; + if (part) { + part = util.unescapeFragment(part); + schema = schema[part]; + if (schema === undefined) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + if (schema.$ref) { + var $ref = resolveUrl(baseId, schema.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + } + } + } + } + if (schema !== undefined && schema !== root.schema) + return { schema: schema, root: root, baseId: baseId }; +} + + +var SIMPLE_INLINED = util.toHash([ + 'type', 'format', 'pattern', + 'maxLength', 'minLength', + 'maxProperties', 'minProperties', + 'maxItems', 'minItems', + 'maximum', 'minimum', + 'uniqueItems', 'multipleOf', + 'required', 'enum' +]); +function inlineRef(schema, limit) { + if (limit === false) return false; + if (limit === undefined || limit === true) return checkNoRef(schema); + else if (limit) return countKeys(schema) <= limit; +} + + +function checkNoRef(schema) { + var item; + if (Array.isArray(schema)) { + for (var i=0; i fixStructureInconsistencies( + removeXAmfProperties( + fixFileTypeProperties(val))), + 2 + ) + const finalSchema = migrateDraft(JSON.parse(jsonSchema), options.draft) + if (options.validate) { + validateJsonSchema(finalSchema) + } + return finalSchema +} + +/** + * Migrates JSON Schema draft. + * + * @param {object} schema - JSON Schema containing converted type. + * @param {string} draft - Output JSON Schema draft version. + * @return {object} JSON Schema with migrated draft version. + */ +function migrateDraft (schema, draft = utils.DEFAULT_DRAFT) { + utils.validateDraft(draft) + if (draft === '04') { + return schema + } + + const migrate = __webpack_require__(800) + const mSchema = migrate.draft6(schema) + if (draft === '07') { + mSchema.$schema = 'http://json-schema.org/draft-07/schema#' + } + return mSchema +} + +/** + * Patches RAML string to be a regular RAML API doc with an endpoint. + * Is necessary to make it work with resolution. + * + * @param {string} ramlData - RAML file content. + * @param {string} typeName - Name of the type to be converted. + * @return {string} Patched RAML content. + */ +function patchRamlData (ramlData, typeName) { + let dataPieces = ramlData.split('\n') + dataPieces = dataPieces.filter(p => !!p) + dataPieces[0] = '#%RAML 1.0' + dataPieces.push(` +/for/conversion/${typeName}: + get: + responses: + 200: + body: + application/json: + type: ${typeName}`) + return dataPieces.join('\n') +} + +/** + * Fixes JSON Schema structure inconsistencies. + * In particular: + * - Changes 'examples' value to array (new in draft06); + * + * @param {object} obj - Object to be fixed. + * @return {object} Fixed object. + */ +function fixStructureInconsistencies (obj) { + if (!obj || obj.constructor !== Object) { + return obj + } + + if (obj.examples) { + obj.examples = Object.values(obj.examples) + } + return obj +} + +/** + * Fixes "type: file" objects converted from RAML. + * See https://github.com/aml-org/amf/issues/539 + * + * @param {object} obj - Object to be fixed. + * @return {object} Fixed object. + */ +function fixFileTypeProperties (obj) { + if (!obj || obj.constructor !== Object) { + return obj + } + + if (obj.type === 'file') { + obj.type = 'string' + obj.media = { + binaryEncoding: 'binary' + } + const fileTypes = obj['x-amf-fileTypes'] || [] + if (fileTypes.length > 0) { + obj.media.anyOf = fileTypes.map(el => { + return { mediaType: el } + }) + } + delete obj['x-amf-fileTypes'] + } + return obj +} + +/** + * Removes "x-amf-" prefixes from object properties. + * + * @param {object} obj - Object to be fixed. + * @return {object} Fixed object. + */ +function removeXAmfProperties (obj) { + if (!obj || obj.constructor !== Object) { + return obj + } + + const newObj = {} + Object.entries(obj).map(([k, v]) => { + k = k.startsWith('x-amf-facet-') ? k.replace('x-amf-facet-', '') : k + k = k.startsWith('x-amf-') ? k.replace('x-amf-', '') : k + newObj[k] = v + }) + return newObj +} + +/** + * Validates JSON Schema. + * + * @param {object} obj - JSON Schema object. + * @throws {Error} Invalid JSON Schema. + * @throws {Error} Validation requires "ajv" to be installed. + */ +function validateJsonSchema (obj) { + let Ajv + try { + Ajv = __webpack_require__(514) + } catch (err) { + throw new Error( + `Validation requires "ajv" to be installed. ${err.message}`) + } + const ajv = new Ajv({ allErrors: true, schemaId: 'auto' }) + + if (obj.$schema.indexOf('draft-04') > -1) { + ajv.addMetaSchema(__webpack_require__(780)) + } else if (obj.$schema.indexOf('draft-06') > -1) { + ajv.addMetaSchema(__webpack_require__(337)) + } + + const valid = ajv.validateSchema(obj) + if (!valid) { + const errorsText = ajv.errorsText(ajv.errors, { separator: '; ' }) + throw new Error(`Invalid JSON Schema: ${errorsText}`) + } +} + +module.exports.dt2js = dt2js + + +/***/ }), +/* 253 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var objectKeys = __webpack_require__(786); +var isArguments = __webpack_require__(6); +var is = __webpack_require__(412); +var isRegex = __webpack_require__(682); +var flags = __webpack_require__(330); +var isDate = __webpack_require__(878); + +var getTime = Date.prototype.getTime; + +function deepEqual(actual, expected, options) { + var opts = options || {}; + + // 7.1. All identical values are equivalent, as determined by ===. + if (opts.strict ? is(actual, expected) : actual === expected) { + return true; + } + + // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==. + if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) { + return opts.strict ? is(actual, expected) : actual == expected; + } + + /* + * 7.4. For all other Object pairs, including Array objects, equivalence is + * determined by having the same number of owned properties (as verified + * with Object.prototype.hasOwnProperty.call), the same set of keys + * (although not necessarily the same order), equivalent values for every + * corresponding key, and an identical 'prototype' property. Note: this + * accounts for both named and indexed properties on Arrays. + */ + // eslint-disable-next-line no-use-before-define + return objEquiv(actual, expected, opts); +} + +function isUndefinedOrNull(value) { + return value === null || value === undefined; +} + +function isBuffer(x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') { + return false; + } + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') { + return false; + } + return true; +} + +function objEquiv(a, b, opts) { + /* eslint max-statements: [2, 50] */ + var i, key; + if (typeof a !== typeof b) { return false; } + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; } + + // an identical 'prototype' property. + if (a.prototype !== b.prototype) { return false; } + + if (isArguments(a) !== isArguments(b)) { return false; } + + var aIsRegex = isRegex(a); + var bIsRegex = isRegex(b); + if (aIsRegex !== bIsRegex) { return false; } + if (aIsRegex || bIsRegex) { + return a.source === b.source && flags(a) === flags(b); + } + + if (isDate(a) && isDate(b)) { + return getTime.call(a) === getTime.call(b); + } + + var aIsBuffer = isBuffer(a); + var bIsBuffer = isBuffer(b); + if (aIsBuffer !== bIsBuffer) { return false; } + if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here + if (a.length !== b.length) { return false; } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; + } + + if (typeof a !== typeof b) { return false; } + + try { + var ka = objectKeys(a); + var kb = objectKeys(b); + } catch (e) { // happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates hasOwnProperty) + if (ka.length !== kb.length) { return false; } + + // the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + // ~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) { return false; } + } + // equivalent values for every corresponding key, and ~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) { return false; } + } + + return true; +} + +module.exports = deepEqual; + + +/***/ }), +/* 254 */, +/* 255 */, +/* 256 */, +/* 257 */, +/* 258 */, +/* 259 */, +/* 260 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const yaml = __webpack_require__(414); +const r2j = __webpack_require__(946); + +module.exports = async ({ message, defaultSchemaFormat }) => { + try { + let payload = message.payload; + if (typeof payload === 'object') { + payload = '#%RAML 1.0 Library\n' + + yaml.safeDump({ types: { tmpType: payload } }); + } + + // Draft 6 is compatible with 7. + const jsonModel = await r2j.dt2js(payload, 'tmpType', { draft: '06' }); + const convertedType = jsonModel.definitions.tmpType; + + message['x-parser-original-schema-format'] = message.schemaFormat || defaultSchemaFormat; + message['x-parser-original-payload'] = payload; + message.payload = convertedType; + delete message.schemaFormat; + } catch (e) { + console.error(e); + } +}; + + +/***/ }), +/* 261 */, +/* 262 */, +/* 263 */, +/* 264 */ +/***/ (function(module) { + +"use strict"; + + +// do not edit .js files directly - edit src/index.jst + + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; + + +/***/ }), +/* 265 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +const path = __webpack_require__(622); +const win32 = process.platform === 'win32'; +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = __webpack_require__(446); + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split('.').map(Number); + if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { + return true; + } + return false; +}; + +exports.isWindows = options => { + if (options && typeof options.windows === 'boolean') { + return options.windows; + } + return win32 === true || path.sep === '\\'; +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; + + +/***/ }), +/* 266 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_ref(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $async, $refCode; + if ($schema == '#' || $schema == '#/') { + if (it.isRoot) { + $async = it.async; + $refCode = 'validate'; + } else { + $async = it.root.schema.$async === true; + $refCode = 'root.refVal[0]'; + } + } else { + var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); + if ($refVal === undefined) { + var $message = it.MissingRefError.message(it.baseId, $schema); + if (it.opts.missingRefs == 'fail') { + it.logger.error($message); + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; + } + if (it.opts.verbose) { + out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + if ($breakOnError) { + out += ' if (false) { '; + } + } else if (it.opts.missingRefs == 'ignore') { + it.logger.warn($message); + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + throw new it.MissingRefError(it.baseId, $schema, $message); + } + } else if ($refVal.inline) { + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $refVal.schema; + $it.schemaPath = ''; + $it.errSchemaPath = $schema; + var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); + out += ' ' + ($code) + ' '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + } + } else { + $async = $refVal.$async === true || (it.async && $refVal.$async !== false); + $refCode = $refVal.code; + } + } + if ($refCode) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + if (it.opts.passContext) { + out += ' ' + ($refCode) + '.call(this, '; + } else { + out += ' ' + ($refCode) + '( '; + } + out += ' ' + ($data) + ', (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; + var __callValidate = out; + out = $$outStack.pop(); + if ($async) { + if (!it.async) throw new Error('async schema referenced by sync schema'); + if ($breakOnError) { + out += ' var ' + ($valid) + '; '; + } + out += ' try { await ' + (__callValidate) + '; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = true; '; + } + out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = false; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + } + } else { + out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; + if ($breakOnError) { + out += ' else { '; + } + } + } + return out; +} + + +/***/ }), +/* 267 */, +/* 268 */, +/* 269 */, +/* 270 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var fs = __webpack_require__(747); + +var path = __webpack_require__(622); + +var _require = __webpack_require__(388), + _prettifyError = _require._prettifyError; + +var compiler = __webpack_require__(377); + +var _require2 = __webpack_require__(423), + Environment = _require2.Environment; + +var precompileGlobal = __webpack_require__(813); + +function match(filename, patterns) { + if (!Array.isArray(patterns)) { + return false; + } + + return patterns.some(function (pattern) { + return filename.match(pattern); + }); +} + +function precompileString(str, opts) { + opts = opts || {}; + opts.isString = true; + var env = opts.env || new Environment([]); + var wrapper = opts.wrapper || precompileGlobal; + + if (!opts.name) { + throw new Error('the "name" option is required when compiling a string'); + } + + return wrapper([_precompile(str, opts.name, env)], opts); +} + +function precompile(input, opts) { + // The following options are available: + // + // * name: name of the template (auto-generated when compiling a directory) + // * isString: input is a string, not a file path + // * asFunction: generate a callable function + // * force: keep compiling on error + // * env: the Environment to use (gets extensions and async filters from it) + // * include: which file/folders to include (folders are auto-included, files are auto-excluded) + // * exclude: which file/folders to exclude (folders are auto-included, files are auto-excluded) + // * wrapper: function(templates, opts) {...} + // Customize the output format to store the compiled template. + // By default, templates are stored in a global variable used by the runtime. + // A custom loader will be necessary to load your custom wrapper. + opts = opts || {}; + var env = opts.env || new Environment([]); + var wrapper = opts.wrapper || precompileGlobal; + + if (opts.isString) { + return precompileString(input, opts); + } + + var pathStats = fs.existsSync(input) && fs.statSync(input); + var precompiled = []; + var templates = []; + + function addTemplates(dir) { + fs.readdirSync(dir).forEach(function (file) { + var filepath = path.join(dir, file); + var subpath = filepath.substr(path.join(input, '/').length); + var stat = fs.statSync(filepath); + + if (stat && stat.isDirectory()) { + subpath += '/'; + + if (!match(subpath, opts.exclude)) { + addTemplates(filepath); + } + } else if (match(subpath, opts.include)) { + templates.push(filepath); + } + }); + } + + if (pathStats.isFile()) { + precompiled.push(_precompile(fs.readFileSync(input, 'utf-8'), opts.name || input, env)); + } else if (pathStats.isDirectory()) { + addTemplates(input); + + for (var i = 0; i < templates.length; i++) { + var name = templates[i].replace(path.join(input, '/'), ''); + + try { + precompiled.push(_precompile(fs.readFileSync(templates[i], 'utf-8'), name, env)); + } catch (e) { + if (opts.force) { + // Don't stop generating the output if we're + // forcing compilation. + console.error(e); // eslint-disable-line no-console + } else { + throw e; + } + } + } + } + + return wrapper(precompiled, opts); +} + +function _precompile(str, name, env) { + env = env || new Environment([]); + var asyncFilters = env.asyncFilters; + var extensions = env.extensionsList; + var template; + name = name.replace(/\\/g, '/'); + + try { + template = compiler.compile(str, asyncFilters, extensions, name, env.opts); + } catch (err) { + throw _prettifyError(name, false, err); + } + + return { + name: name, + template: template + }; +} + +module.exports = { + precompile: precompile, + precompileString: precompileString +}; + +/***/ }), +/* 271 */, +/* 272 */, +/* 273 */, +/* 274 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const Options = __webpack_require__(16); +const $Refs = __webpack_require__(24); +const parse = __webpack_require__(756); +const normalizeArgs = __webpack_require__(238); +const resolveExternal = __webpack_require__(418); +const bundle = __webpack_require__(71); +const dereference = __webpack_require__(419); +const url = __webpack_require__(639); +const maybe = __webpack_require__(791); +const { ono } = __webpack_require__(114); + +module.exports = $RefParser; +module.exports.YAML = __webpack_require__(277); + +/** + * This class parses a JSON schema, builds a map of its JSON references and their resolved values, + * and provides methods for traversing, manipulating, and dereferencing those references. + * + * @constructor + */ +function $RefParser () { + /** + * The parsed (and possibly dereferenced) JSON schema object + * + * @type {object} + * @readonly + */ + this.schema = null; + + /** + * The resolved JSON references + * + * @type {$Refs} + * @readonly + */ + this.$refs = new $Refs(); +} + +/** + * Parses the given JSON schema. + * This method does not resolve any JSON references. + * It just reads a single file in JSON or YAML format, and parse it as a JavaScript object. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed + * @param {function} [callback] - An error-first callback. The second parameter is the parsed JSON schema object. + * @returns {Promise} - The returned promise resolves with the parsed JSON schema object. + */ +$RefParser.parse = function (path, schema, options, callback) { + let Class = this; // eslint-disable-line consistent-this + let instance = new Class(); + return instance.parse.apply(instance, arguments); +}; + +/** + * Parses the given JSON schema. + * This method does not resolve any JSON references. + * It just reads a single file in JSON or YAML format, and parse it as a JavaScript object. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed + * @param {function} [callback] - An error-first callback. The second parameter is the parsed JSON schema object. + * @returns {Promise} - The returned promise resolves with the parsed JSON schema object. + */ +$RefParser.prototype.parse = async function (path, schema, options, callback) { + let args = normalizeArgs(arguments); + let promise; + + if (!args.path && !args.schema) { + let err = ono(`Expected a file path, URL, or object. Got ${args.path || args.schema}`); + return maybe(args.callback, Promise.reject(err)); + } + + // Reset everything + this.schema = null; + this.$refs = new $Refs(); + + // If the path is a filesystem path, then convert it to a URL. + // NOTE: According to the JSON Reference spec, these should already be URLs, + // but, in practice, many people use local filesystem paths instead. + // So we're being generous here and doing the conversion automatically. + // This is not intended to be a 100% bulletproof solution. + // If it doesn't work for your use-case, then use a URL instead. + let pathType = "http"; + if (url.isFileSystemPath(args.path)) { + args.path = url.fromFileSystemPath(args.path); + pathType = "file"; + } + + // Resolve the absolute path of the schema + args.path = url.resolve(url.cwd(), args.path); + + if (args.schema && typeof args.schema === "object") { + // A schema object was passed-in. + // So immediately add a new $Ref with the schema object as its value + let $ref = this.$refs._add(args.path); + $ref.value = args.schema; + $ref.pathType = pathType; + promise = Promise.resolve(args.schema); + } + else { + // Parse the schema file/url + promise = parse(args.path, this.$refs, args.options); + } + + let me = this; + try { + let result = await promise; + + if (!result || typeof result !== "object" || Buffer.isBuffer(result)) { + throw ono.syntax(`"${me.$refs._root$Ref.path || result}" is not a valid JSON Schema`); + } + else { + me.schema = result; + return maybe(args.callback, Promise.resolve(me.schema)); + } + } + catch (e) { + return maybe(args.callback, Promise.reject(e)); + } +}; + +/** + * Parses the given JSON schema and resolves any JSON references, including references in + * externally-referenced files. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed and resolved + * @param {function} [callback] + * - An error-first callback. The second parameter is a {@link $Refs} object containing the resolved JSON references + * + * @returns {Promise} + * The returned promise resolves with a {@link $Refs} object containing the resolved JSON references + */ +$RefParser.resolve = function (path, schema, options, callback) { + let Class = this; // eslint-disable-line consistent-this + let instance = new Class(); + return instance.resolve.apply(instance, arguments); +}; + +/** + * Parses the given JSON schema and resolves any JSON references, including references in + * externally-referenced files. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed and resolved + * @param {function} [callback] + * - An error-first callback. The second parameter is a {@link $Refs} object containing the resolved JSON references + * + * @returns {Promise} + * The returned promise resolves with a {@link $Refs} object containing the resolved JSON references + */ +$RefParser.prototype.resolve = async function (path, schema, options, callback) { + let me = this; + let args = normalizeArgs(arguments); + + try { + await this.parse(args.path, args.schema, args.options); + await resolveExternal(me, args.options); + return maybe(args.callback, Promise.resolve(me.$refs)); + } + catch (err) { + return maybe(args.callback, Promise.reject(err)); + } +}; + +/** + * Parses the given JSON schema, resolves any JSON references, and bundles all external references + * into the main JSON schema. This produces a JSON schema that only has *internal* references, + * not any *external* references. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed, resolved, and dereferenced + * @param {function} [callback] - An error-first callback. The second parameter is the bundled JSON schema object + * @returns {Promise} - The returned promise resolves with the bundled JSON schema object. + */ +$RefParser.bundle = function (path, schema, options, callback) { + let Class = this; // eslint-disable-line consistent-this + let instance = new Class(); + return instance.bundle.apply(instance, arguments); +}; + +/** + * Parses the given JSON schema, resolves any JSON references, and bundles all external references + * into the main JSON schema. This produces a JSON schema that only has *internal* references, + * not any *external* references. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed, resolved, and dereferenced + * @param {function} [callback] - An error-first callback. The second parameter is the bundled JSON schema object + * @returns {Promise} - The returned promise resolves with the bundled JSON schema object. + */ +$RefParser.prototype.bundle = async function (path, schema, options, callback) { + let me = this; + let args = normalizeArgs(arguments); + + try { + await this.resolve(args.path, args.schema, args.options); + bundle(me, args.options); + return maybe(args.callback, Promise.resolve(me.schema)); + } + catch (err) { + return maybe(args.callback, Promise.reject(err)); + } +}; + +/** + * Parses the given JSON schema, resolves any JSON references, and dereferences the JSON schema. + * That is, all JSON references are replaced with their resolved values. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed, resolved, and dereferenced + * @param {function} [callback] - An error-first callback. The second parameter is the dereferenced JSON schema object + * @returns {Promise} - The returned promise resolves with the dereferenced JSON schema object. + */ +$RefParser.dereference = function (path, schema, options, callback) { + let Class = this; // eslint-disable-line consistent-this + let instance = new Class(); + return instance.dereference.apply(instance, arguments); +}; + +/** + * Parses the given JSON schema, resolves any JSON references, and dereferences the JSON schema. + * That is, all JSON references are replaced with their resolved values. + * + * @param {string} [path] - The file path or URL of the JSON schema + * @param {object} [schema] - A JSON schema object. This object will be used instead of reading from `path`. + * @param {$RefParserOptions} [options] - Options that determine how the schema is parsed, resolved, and dereferenced + * @param {function} [callback] - An error-first callback. The second parameter is the dereferenced JSON schema object + * @returns {Promise} - The returned promise resolves with the dereferenced JSON schema object. + */ +$RefParser.prototype.dereference = async function (path, schema, options, callback) { + let me = this; + let args = normalizeArgs(arguments); + + try { + await this.resolve(args.path, args.schema, args.options); + dereference(me, args.options); + return maybe(args.callback, Promise.resolve(me.schema)); + } + catch (err) { + return maybe(args.callback, Promise.reject(err)); + } +}; + + +/***/ }), +/* 275 */, +/* 276 */, +/* 277 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; +/* eslint lines-around-comment: [2, {beforeBlockComment: false}] */ + + +const yaml = __webpack_require__(414); +const { ono } = __webpack_require__(114); + +/** + * Simple YAML parsing functions, similar to {@link JSON.parse} and {@link JSON.stringify} + */ +module.exports = { + /** + * Parses a YAML string and returns the value. + * + * @param {string} text - The YAML string to be parsed + * @param {function} [reviver] - Not currently supported. Provided for consistency with {@link JSON.parse} + * @returns {*} + */ + parse (text, reviver) { + try { + return yaml.safeLoad(text); + } + catch (e) { + if (e instanceof Error) { + throw e; + } + else { + // https://github.com/nodeca/js-yaml/issues/153 + throw ono(e, e.message); + } + } + }, + + /** + * Converts a JavaScript value to a YAML string. + * + * @param {*} value - The value to convert to YAML + * @param {function|array} replacer - Not currently supported. Provided for consistency with {@link JSON.stringify} + * @param {string|number} space - The number of spaces to use for indentation, or a string containing the number of spaces. + * @returns {string} + */ + stringify (value, replacer, space) { + try { + let indent = (typeof space === "string" ? space.length : space) || 2; + return yaml.safeDump(value, { indent }); + } + catch (e) { + if (e instanceof Error) { + throw e; + } + else { + // https://github.com/nodeca/js-yaml/issues/153 + throw ono(e, e.message); + } + } + } +}; + + +/***/ }), +/* 278 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const fs = __webpack_require__(747); +const util = __webpack_require__(669); +const path = __webpack_require__(622); +const utils = module.exports; + +utils.lstat = util.promisify(fs.lstat); +utils.readlink = util.promisify(fs.readlink); +utils.readFile = util.promisify(fs.readFile); +utils.writeFile = util.promisify(fs.writeFile); +utils.copyFile = util.promisify(fs.copyFile); +utils.exists = util.promisify(fs.exists); +utils.readDir = util.promisify(fs.readdir); + +/** + * Checks if a string is a filesystem path. + * @private + * @param {String} string The string to check. + * @returns {Boolean} Whether the string is a filesystem path or not. + */ +utils.isFileSystemPath = (string) => { + return path.isAbsolute(string) + || string.startsWith(`.${path.sep}`) + || string.startsWith(`..${path.sep}`) + || string.startsWith('~'); +}; + +/** + * Takes the result of calling the npmi module and returns it in a more consumable form. + * @private + * @param {Array} result The result of calling npmi. + * @returns {Object} + */ +utils.beautifyNpmiResult = (result) => { + const [nameWithVersion, pkgPath] = result[result.length-1]; + const nameWithVersionArray = nameWithVersion.split('@'); + const version = nameWithVersionArray[nameWithVersionArray.length - 1]; + const name = nameWithVersionArray.splice(0, nameWithVersionArray.length - 1).join('@'); + + return { + name, + path: pkgPath, + version, + }; +}; + +/** + * Converts a Map into an object. + * @private + * @param {Map} map The map to transform. + * @returns {Object} + */ +utils.convertMapToObject = (map) => { + const tempObject = {}; + for (const [key, value] of map.entries()) { + tempObject[key] = value; + } + return tempObject; +}; + +/** + * Checks if template is local or not (i.e., it's remote). + * @private + * @param {String} templatePath The path to the template. + * @returns {Promise} + */ +utils.isLocalTemplate = async (templatePath) => { + const stats = await utils.lstat(templatePath); + return stats.isSymbolicLink(); +}; + +/** + * Gets the details (link and resolved link) of a local template. + * @private + * @param {String} templatePath The path to the template. + * @returns {Promise} + */ +utils.getLocalTemplateDetails = async (templatePath) => { + const linkTarget = await utils.readlink(templatePath); + return { + link: linkTarget, + resolvedLink: path.resolve(path.dirname(templatePath), linkTarget), + }; +}; + + +/***/ }), +/* 279 */, +/* 280 */ +/***/ (function(module, exports) { + +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var R = 0 + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} + + +/***/ }), +/* 281 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 282 */, +/* 283 */ +/***/ (function(module) { + +module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}; + +/***/ }), +/* 284 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +Ajv = __webpack_require__(538) +'use strict'; +'use strict';var d,aa="object"===typeof __ScalaJSEnv&&__ScalaJSEnv?__ScalaJSEnv:{},ba="object"===typeof aa.global&&aa.global?aa.global:"object"===typeof global&&global&&global.Object===Object?global:this;aa.global=ba;var n=exports;aa.exportsNamespace=n;ba.Object.freeze(aa);var aaa={envInfo:aa,semantics:{asInstanceOfs:2,arrayIndexOutOfBounds:2,moduleInit:2,strictFloats:!1,productionMode:!0},assumingES6:!1,linkerVersion:"0.6.29",globalThis:this};ba.Object.freeze(aaa);ba.Object.freeze(aaa.semantics); +var ca=ba.Math.imul||function(a,b){var c=a&65535,e=b&65535;return c*e+((a>>>16&65535)*e+c*(b>>>16&65535)<<16>>>0)|0},da=ba.Math.fround||function(a){return+a},ea=ba.Math.clz32||function(a){if(0===a)return 32;var b=1;0===(a&4294901760)&&(a<<=16,b+=16);0===(a&4278190080)&&(a<<=8,b+=8);0===(a&4026531840)&&(a<<=4,b+=4);0===(a&3221225472)&&(a<<=2,b+=2);return b+(a>>31)},baa=0,caa=ba.WeakMap?new ba.WeakMap:null; +function fa(a){return function(b,c){return!(!b||!b.$classData||b.$classData.RN!==c||b.$classData.QN!==a)}}function daa(a){for(var b in a)return b}function ha(a,b){return new a.A9(b)}function ja(a,b){return eaa(a,b,0)}function eaa(a,b,c){var e=new a.A9(b[c]);if(ca?-2147483648:a|0}function Ba(a,b,c,e,f){a=a.n;c=c.n;if(a!==c||e>24===a&&1/a!==1/-0} +function haa(a){return"number"===typeof a&&a<<16>>16===a&&1/a!==1/-0}function Ca(a){return"number"===typeof a&&(a|0)===a&&1/a!==1/-0}function na(a){return"number"===typeof a}function Da(a){return null===a?Ea().dl:a}function Fa(){this.b2=this.A9=void 0;this.QN=this.$S=this.ge=null;this.RN=0;this.M3=null;this.Q_="";this.Xx=this.t_=this.u_=void 0;this.name="";this.isRawJSType=this.isArrayClass=this.isInterface=this.isPrimitive=!1;this.isInstance=void 0} +function Ga(a,b,c){var e=new Fa;e.ge={};e.$S=null;e.M3=a;e.Q_=b;e.Xx=function(){return!1};e.name=c;e.isPrimitive=!0;e.isInstance=function(){return!1};return e}function r(a,b,c,e,f,g,h,k){var l=new Fa,m=daa(a);h=h||function(p){return!!(p&&p.$classData&&p.$classData.ge[m])};k=k||function(p,t){return!!(p&&p.$classData&&p.$classData.RN===t&&p.$classData.QN.ge[m])};l.b2=g;l.ge=e;l.Q_="L"+c+";";l.Xx=k;l.name=c;l.isInterface=b;l.isRawJSType=!!f;l.isInstance=h;return l} +function taa(a){function b(k){if("number"===typeof k){this.n=Array(k);for(var l=0;l=za(c);throw Gi(new Hi,"Unknown numeric comparison "+a,e,g,f,!1);}throw Gi(new Hi,"Cannot compare non numeric or missing values",e,g,f,!1);} +function dda(a,b,c){c.j=b.j;b.Y().vb.U(w(function(e,f){return function(g){if(null!==g){var h=g.ma();g=g.ya();var k=Ih().xd;if(null===h?null!==k:!h.h(k))if(k=Vb().Ia(Ti(f.Y(),h)),k instanceof z)g=$ca(e,h,g.r,k.i.r),Vd(f,h,g);else{if(y()!==k)throw(new x).d(k);Ui(f.Y(),h,g.r,g.x)}}else throw(new x).d(g);}}(a,c)));return c} +function bda(a,b,c){if(b.Da()&&c.Da()){var e=b.kc();if(e.b())g=!1;else{g=e.c();var f=c.kc();if(f.b())g=!1;else{f=f.c();f=la(f);g=la(g);var g=f!==g}}if(g)throw a=b.ga(),a=la(a),c=c.ga(),c=la(c),b=(new z).d(ic(qf().ch.r)),g=e.b()?y():e.c().Ib(),e=e.b()?y():Ab(e.c().fa(),q(jd)),Gi(new Hi,"Values in subtype enumeration are from different class '"+a+"' of the super type enumeration '"+c+"'",b,g,e,!1);K();e=(new z).d(b);null!==e.i&&0===e.i.Oe(1)&&e.i.lb(0)instanceof Vi&&(e=new eda,g=K(),e=c.ec(e,g.u),b.U(w(function(h, +k,l){return function(m){var p=B(m.aa,Wi().vf).A;if(!k.Ha(p.b()?null:p.c())){p=w(function(){return function(v){return B(v.aa,Wi().vf)}}(h));var t=K();throw Gi(new Hi,"Values in subtype enumeration ("+l.ka(p,t.u).Kg(",")+") not found in the supertype enumeration ("+k.Kg(",")+")",(new z).d(ic(qf().ch.r)),yb(m),Ab(m.Xa,q(jd)),!1);}}}(a,e,b))))}} +function Xi(a,b,c,e,f){b.U(w(function(g,h,k,l){return function(m){if(!h.Ha(m)){var p=Vb().Ia(Ti(k.Y(),m)),t=Vb().Ia(Ti(l.Y(),m)),v=!1,A=null;if(p instanceof z){v=!0;A=p;var D=A.i;if(t.b())return Rg(k,m,D.r,D.x)}if(y()===p&&t.na())return p=Yi(O(),t.c().x),g.pn&&fda(p,l),Ui(k.Y(),m,t.c().r,p);if(v&&(v=A.i,t.na()))return p=Yi(O(),v.x),A=v.r,t=t.c().r,t=$ca(g,m,A,t),v=v.r,(null===t?null!==v:!t.h(v))&&g.pn&&fda(p,l),t=Db(t,p),Ui(k.Y(),m,t,p)}}}(a,f,c,e)))} +function Fi(a,b,c){if(b instanceof jh&&Vb().Ia(b.r).na()&&c instanceof jh&&Vb().Ia(c.r).na()){var e=Si(b),f=Si(c);if("max"===a)return za(e)<=za(f)?c:b;if("min"===a)return za(e)>=za(f)?c:b;throw Gi(new Hi,"Unknown numeric comparison "+a,y(),y(),y(),!1);}throw Gi(new Hi,"Cannot compare non numeric or missing values",y(),y(),y(),!1);} +function Ii(a,b,c,e,f){if(a instanceof jh&&Vb().Ia(a.r).na()&&b instanceof jh&&Vb().Ia(b.r).na())return a=a.t(),b=b.t(),a===b;throw Gi(new Hi,"Cannot compare non numeric or missing values",c,e,f,!1);}function ada(a){return a instanceof jh&&Vb().Ia(a.r).na()&&a instanceof jh&&Vb().Ia(a.r).na()?(new z).d(a.t()):y()}function fda(a,b){wh(a,q(Zi))||a.Lb((new $i).e(b.j))} +function cda(a,b,c,e){if(c instanceof jh&&Vb().Ia(c.r).na()&&e instanceof jh&&Vb().Ia(e.r).na())return c=aj(c),e=aj(e),c===a&&e===b;throw Gi(new Hi,"Cannot compare non boolean or missing values",y(),y(),y(),!1);}function bj(a,b){var c=a.xf.Wg.Wg.Ja(b.j);return c instanceof z?c.i:a.Oba(b)}function gda(a){var b=zc(),c=F().Ta;a.K_(rb(new sb,b,G(c,"isAbstract"),tb(new ub,vb().Ta,"isAbstract","Defines a model as abstract",H())))} +function hda(a){var b=(new xc).yd(cj()),c=F().Ta;a.Z8(rb(new sb,b,G(c,"header"),tb(new ub,vb().Ta,"header","Parameter passed as a header to an operation for communication models",H())));b=(new xc).yd(cj());c=F().Ta;a.$8(rb(new sb,b,G(c,"parameter"),tb(new ub,vb().Ta,"parameter","Parameters associated to the communication model",H())));b=qf();c=F().Ta;a.a9(rb(new sb,b,G(c,"queryString"),tb(new ub,vb().Ta,"query string","Query string for the communication model",H())));b=(new xc).yd(cj());c=F().Ta; +a.b9(rb(new sb,b,G(c,"uriParameter"),tb(new ub,vb().Ta,"uri parameter","",H())))}function ida(a){var b=(new xc).yd(dj()),c=F().Ta;a.rS(rb(new sb,b,G(c,"tag"),tb(new ub,vb().Ta,"tag","Additionally custom tagged information",H())))}function ej(a){var b=qb(),c=F().Jb;a.Cz(rb(new sb,b,G(c,"bindingVersion"),tb(new ub,vb().Jb,"bindingVersion","The version of this binding",H())))} +function jda(a,b){O();var c=(new P).a();c=(new ij).K((new S).a(),c);O();var e=(new P).a();c=Sd(c,b,e);e=a.j;b=(new je).e(b);b=c.pc(e+"/resourceType/"+jj(b.td));c=nc().Ni();ig(a,c,b);return b}function kda(a,b){O();var c=(new P).a();c=(new kj).K((new S).a(),c);O();var e=(new P).a();c=Sd(c,b,e);e=a.j;b=(new je).e(b);b=c.pc(e+"/trait/"+jj(b.td));c=nc().Ni();ig(a,c,b);return b} +function lj(a,b){var c=lda(mj());a=w(function(e,f){return function(g){return(new R).M(g,f)}}(a,b));b=K();return c.ka(a,b.u).Ch(Gb().si)} +function nj(a,b,c,e,f){b=ic(G(a.ey,b));a=J(K(),(new Ib).ha([a.ty]));oj();K();pj();var g=(new Lf).a().ua();oj();K();pj();var h=(new Lf).a().ua();oj();K();pj();var k=(new Lf).a().ua();oj();K();pj();var l=(new Lf).a().ua();oj();K();pj();var m=(new Lf).a().ua();oj();var p=y();oj();K();pj();var t=(new Lf).a().ua();oj();K();pj();var v=(new Lf).a();return qj(new rj,b,c,e,f,a,g,h,k,l,m,p,t,v.ua(),(oj(),y()),(oj(),y()),(oj(),y()))} +function sj(a,b,c){c=B(tj(b).g,wj().ej).Fb(w(function(e,f){return function(g){g=B(g.g,$d().R).A;return(g.b()?null:g.c())===f}}(a,c)));c.b()?a=y():(c=c.c(),b=mda(b,xj(c)),a=w(function(){return function(e){return ka(e)}}(a)),c=K(),a=(new z).d(b.ka(a,c.u)));return a.b()?H():a.c()}function nda(a,b){if(b instanceof z)return b.i;if(y()===b)throw mb(E(),(new nb).e("Missing mandatory property '"+a+"'"));throw(new x).d(b);} +function yj(a,b,c){a=B(tj(b).g,wj().ej).Fb(w(function(e,f){return function(g){g=B(g.g,$d().R).A;return(g.b()?null:g.c())===f}}(a,c)));a.b()?b=y():(a=a.c(),b=oda(b,xj(a)));if(b.b())return y();b=b.c();return(new z).d(ka(b))}function pda(a,b){var c=Mc(ua(),a,"\\.");c=zj((new Pc).fd(c));b=b.Ja(c);return b instanceof z?(b=b.i,a.split(c+".").join(b)):a} +function qda(a,b){var c=Rb(Sb(),H()),e=B(tj(b).g,wj().ej).Fb(w(function(){return function(f){f=B(f.g,$d().R).A;return"prefixes"===(f.b()?null:f.c())}}(a)));e.b()?e=y():(e=e.c(),e=(new z).d(xj(e)));e instanceof z&&rda(b,e.i).U(w(function(f,g){return function(h){var k=yj(f,h,"prefix");k=k.b()?"":k.c();h=yj(f,h,"uri");h=h.b()?"":h.c();return g.Ue(k,h)}}(a,c)));return c} +function sda(a,b,c,e){a=B(tj(b).g,wj().ej).Fb(w(function(f,g){return function(h){h=B(h.g,$d().R).A;return(h.b()?null:h.c())===g}}(a,c)));a.b()?e=y():(a=a.c(),b=rda(b,xj(a)),a=K(),e=(new z).d(b.ka(e,a.u)));return e.b()?H():e.c()}function tda(a,b){a.U1(!0);b.P(a);!a.BV&&a.AV&&(b=a.Fa,b.CK=b.CK.substring(2),uda(a.Fa))}function vda(a){if(a.BV){if(a.AV){var b=a.Fa;b.CK+=" ";uda(a.Fa)}a.V1(!1)}else b=(new Aj).d(a.Fa.Ps),a.Fa.Ww.yD(b.Rp,44),uda(a.Fa)}function Bj(a,b){return a===b||a.h(b)} +function Cj(a){a=a.ika().kc();return a.b()?wda(Dj(),T().nd):a.c()}function Ej(){}function u(){}u.prototype=Ej.prototype;Ej.prototype.a=function(){return this};Ej.prototype.h=function(a){return this===a};Ej.prototype.t=function(){var a=Fj(la(this)),b=(+(this.z()>>>0)).toString(16);return a+"@"+b};Ej.prototype.z=function(){return qaa(this)};Ej.prototype.toString=function(){return this.t()};function xda(a,b){if(a=a&&a.$classData){var c=a.RN||0;return!(cb||!a.QN.isPrimitive)}return!1} +var Ha=r({f:0},!1,"java.lang.Object",{f:1},void 0,void 0,function(a){return null!==a},xda);Ej.prototype.$classData=Ha;function Gj(a,b){b=(new Ld).kn(b);return yda(a,b)}function zda(a,b){b!==a&&b.wP(w(function(c){return function(e){return c.IW(e)}}(a)),Ada());return a}function yda(a,b){if(a.IW(b))return a;throw(new Hj).e("Promise already completed.");}function Ij(a,b){b=(new Kd).d(b);return yda(a,b)} +function Bda(a,b){if(b instanceof Jj){b=null===b?0:b.r;var c=Kj(Lj(),0);0<=a.gs(c)?(c=Kj(Lj(),65535),c=0>=a.gs(c)):c=!1;return c&&a.Xl.gH()===b}if(faa(b))return b|=0,c=Kj(Lj(),-128),0<=a.gs(c)?(c=Kj(Lj(),127),c=0>=a.gs(c)):c=!1,c&&a.oja()===b;if(haa(b))return b|=0,c=Kj(Lj(),-32768),0<=a.gs(c)?(c=Kj(Lj(),32767),c=0>=a.gs(c)):c=!1,c&&a.Upa()===b;if(Ca(b))return b|=0,c=Kj(Lj(),-2147483648),0<=a.gs(c)?(c=Kj(Lj(),2147483647),c=0>=a.gs(c)):c=!1,c&&a.Xl.gH()===b;if(b instanceof qa){c=Da(b);b=c.od;c=c.Ud; +a=a.Xl.rba();var e=a.Ud;return a.od===b&&e===c}return na(b)?(b=+b,a=a.Xl,a=Mj(Nj(),a),da(Oj(va(),a))===b):"number"===typeof b?(b=+b,a=a.Xl,Oj(va(),Mj(Nj(),a))===b):!1}function Cda(a,b){return 0<=a.oM(b)?ka(ya(a.hea(),a.oM(b),a.xT(b))):null}function Dda(a){var b=(new Pj).Kaa(a.oW);Eda(a.Fa.Rw,b);return b.t()}function Rj(a,b,c,e){return Sj(a).rm((new Tj).a(),b,c,e).Ef.qf} +function Fda(a,b,c,e,f){var g=(new Uj).eq(!0);Vj(b,c);a.U(w(function(h,k,l,m){return function(p){k.oa?k.oa=!1:Vj(l,m);return Wj(l,p)}}(a,g,b,e)));Vj(b,f);return b}function Sj(a){return Gda((new Xj).a(),a)}function Hda(a,b){b.U(w(function(c){return function(e){return c.tF(e)}}(a)));return a}function Ida(a,b){return b.Hd().Ql(a,Uc(function(){return function(c,e){return c.al(e)}}(a)))}function Yj(a){var b=ja(Ja(Ha),[a.n.length]);Ba(a,0,b,0,a.n.length);return b} +function Jda(a,b,c){if(32>c)return a.Fl().n[31&b];if(1024>c)return a.me().n[31&(b>>>5|0)].n[31&b];if(32768>c)return a.Te().n[31&(b>>>10|0)].n[31&(b>>>5|0)].n[31&b];if(1048576>c)return a.Eg().n[31&(b>>>15|0)].n[31&(b>>>10|0)].n[31&(b>>>5|0)].n[31&b];if(33554432>c)return a.Ej().n[31&(b>>>20|0)].n[31&(b>>>15|0)].n[31&(b>>>10|0)].n[31&(b>>>5|0)].n[31&b];if(1073741824>c)return a.js().n[31&(b>>>25|0)].n[31&(b>>>20|0)].n[31&(b>>>15|0)].n[31&(b>>>10|0)].n[31&(b>>>5|0)].n[31&b];throw(new Zj).a();} +function Kda(a,b,c,e){if(!(32>e))if(1024>e)1===a.Un()&&(a.Jg(ja(Ja(Ha),[32])),a.me().n[31&(b>>>5|0)]=a.Fl(),a.rw(1+a.Un()|0)),a.Zh(ja(Ja(Ha),[32]));else if(32768>e)2===a.Un()&&(a.ui(ja(Ja(Ha),[32])),a.Te().n[31&(b>>>10|0)]=a.me(),a.rw(1+a.Un()|0)),a.Jg(a.Te().n[31&(c>>>10|0)]),null===a.me()&&a.Jg(ja(Ja(Ha),[32])),a.Zh(ja(Ja(Ha),[32]));else if(1048576>e)3===a.Un()&&(a.Gl(ja(Ja(Ha),[32])),a.Eg().n[31&(b>>>15|0)]=a.Te(),a.rw(1+a.Un()|0)),a.ui(a.Eg().n[31&(c>>>15|0)]),null===a.Te()&&a.ui(ja(Ja(Ha),[32])), +a.Jg(a.Te().n[31&(c>>>10|0)]),null===a.me()&&a.Jg(ja(Ja(Ha),[32])),a.Zh(ja(Ja(Ha),[32]));else if(33554432>e)4===a.Un()&&(a.xr(ja(Ja(Ha),[32])),a.Ej().n[31&(b>>>20|0)]=a.Eg(),a.rw(1+a.Un()|0)),a.Gl(a.Ej().n[31&(c>>>20|0)]),null===a.Eg()&&a.Gl(ja(Ja(Ha),[32])),a.ui(a.Eg().n[31&(c>>>15|0)]),null===a.Te()&&a.ui(ja(Ja(Ha),[32])),a.Jg(a.Te().n[31&(c>>>10|0)]),null===a.me()&&a.Jg(ja(Ja(Ha),[32])),a.Zh(ja(Ja(Ha),[32]));else if(1073741824>e)5===a.Un()&&(a.rG(ja(Ja(Ha),[32])),a.js().n[31&(b>>>25|0)]=a.Ej(), +a.rw(1+a.Un()|0)),a.xr(a.js().n[31&(c>>>25|0)]),null===a.Ej()&&a.xr(ja(Ja(Ha),[32])),a.Gl(a.Ej().n[31&(c>>>20|0)]),null===a.Eg()&&a.Gl(ja(Ja(Ha),[32])),a.ui(a.Eg().n[31&(c>>>15|0)]),null===a.Te()&&a.ui(ja(Ja(Ha),[32])),a.Jg(a.Te().n[31&(c>>>10|0)]),null===a.me()&&a.Jg(ja(Ja(Ha),[32])),a.Zh(ja(Ja(Ha),[32]));else throw(new Zj).a();}function ak(a,b,c){var e=ja(Ja(Ha),[32]);Ba(a,b,e,c,32-(c>b?c:b)|0);return e} +function Lda(a,b,c){if(!(32>c))if(1024>c)a.Zh(a.me().n[31&(b>>>5|0)]);else if(32768>c)a.Jg(a.Te().n[31&(b>>>10|0)]),a.Zh(a.me().n[31&(b>>>5|0)]);else if(1048576>c)a.ui(a.Eg().n[31&(b>>>15|0)]),a.Jg(a.Te().n[31&(b>>>10|0)]),a.Zh(a.me().n[31&(b>>>5|0)]);else if(33554432>c)a.Gl(a.Ej().n[31&(b>>>20|0)]),a.ui(a.Eg().n[31&(b>>>15|0)]),a.Jg(a.Te().n[31&(b>>>10|0)]),a.Zh(a.me().n[31&(b>>>5|0)]);else if(1073741824>c)a.xr(a.js().n[31&(b>>>25|0)]),a.Gl(a.Ej().n[31&(b>>>20|0)]),a.ui(a.Eg().n[31&(b>>>15|0)]), +a.Jg(a.Te().n[31&(b>>>10|0)]),a.Zh(a.me().n[31&(b>>>5|0)]);else throw(new Zj).a();} +function Mda(a,b){var c=-1+a.Un()|0;switch(c){case 5:a.rG(Yj(a.js()));a.xr(Yj(a.Ej()));a.Gl(Yj(a.Eg()));a.ui(Yj(a.Te()));a.Jg(Yj(a.me()));a.js().n[31&(b>>>25|0)]=a.Ej();a.Ej().n[31&(b>>>20|0)]=a.Eg();a.Eg().n[31&(b>>>15|0)]=a.Te();a.Te().n[31&(b>>>10|0)]=a.me();a.me().n[31&(b>>>5|0)]=a.Fl();break;case 4:a.xr(Yj(a.Ej()));a.Gl(Yj(a.Eg()));a.ui(Yj(a.Te()));a.Jg(Yj(a.me()));a.Ej().n[31&(b>>>20|0)]=a.Eg();a.Eg().n[31&(b>>>15|0)]=a.Te();a.Te().n[31&(b>>>10|0)]=a.me();a.me().n[31&(b>>>5|0)]=a.Fl();break; +case 3:a.Gl(Yj(a.Eg()));a.ui(Yj(a.Te()));a.Jg(Yj(a.me()));a.Eg().n[31&(b>>>15|0)]=a.Te();a.Te().n[31&(b>>>10|0)]=a.me();a.me().n[31&(b>>>5|0)]=a.Fl();break;case 2:a.ui(Yj(a.Te()));a.Jg(Yj(a.me()));a.Te().n[31&(b>>>10|0)]=a.me();a.me().n[31&(b>>>5|0)]=a.Fl();break;case 1:a.Jg(Yj(a.me()));a.me().n[31&(b>>>5|0)]=a.Fl();break;case 0:break;default:throw(new x).d(c);}}function bk(a,b){var c=a.n[b];a.n[b]=null;return Yj(c)} +function ck(a,b,c){a.rw(c);c=-1+c|0;switch(c){case -1:break;case 0:a.Zh(b.Fl());break;case 1:a.Jg(b.me());a.Zh(b.Fl());break;case 2:a.ui(b.Te());a.Jg(b.me());a.Zh(b.Fl());break;case 3:a.Gl(b.Eg());a.ui(b.Te());a.Jg(b.me());a.Zh(b.Fl());break;case 4:a.xr(b.Ej());a.Gl(b.Eg());a.ui(b.Te());a.Jg(b.me());a.Zh(b.Fl());break;case 5:a.rG(b.js());a.xr(b.Ej());a.Gl(b.Eg());a.ui(b.Te());a.Jg(b.me());a.Zh(b.Fl());break;default:throw(new x).d(c);}}function Nda(a){return null===a?Oda():a} +function Pda(a){return a===Oda()?null:a}var Qda=r({O2:0},!0,"scala.collection.mutable.HashEntry",{O2:1});function dk(){this.Vp=this.ew=this.ct=null}dk.prototype=new u;dk.prototype.constructor=dk;dk.prototype.a=function(){Rda=this;this.ct=Tb();this.ew=Ub();this.Vp=hk();return this};Object.defineProperty(dk.prototype,"AMF",{get:function(){return this.Vp},configurable:!0});Object.defineProperty(dk.prototype,"OAS",{get:function(){return this.ew},configurable:!0}); +Object.defineProperty(dk.prototype,"RAML",{get:function(){return this.ct},configurable:!0});dk.prototype.$classData=r({hra:0},!1,"amf.MessageStyles$",{hra:1,f:1});var Rda=void 0;function ik(){Rda||(Rda=(new dk).a());return Rda}function jk(){this.BZ=this.nX=this.TF=this.UF=this.ct=this.Cp=this.QF=this.ew=this.Vp=this.Xpa=null;this.xa=!1}jk.prototype=new u;jk.prototype.constructor=jk; +jk.prototype.a=function(){Sda=this;this.Vp=kk();this.ew=lk();this.QF=mk();this.Cp=nk();this.ct=ok();this.UF=pk();this.TF=qk();Tda||(Tda=(new rk).a());this.nX=Tda;Uda||(Uda=(new sk).a());this.BZ=Uda;return this};function lda(a){if(!a.xa&&!a.xa){var b=K(),c=[kk(),lk(),mk(),nk(),ok(),qk(),pk()];a.Xpa=J(b,(new Ib).ha(c));a.xa=!0}return a.Xpa}Object.defineProperty(jk.prototype,"specProfiles",{get:function(){return lda(this)},configurable:!0}); +Object.defineProperty(jk.prototype,"PAYLOAD",{get:function(){return this.BZ},configurable:!0});Object.defineProperty(jk.prototype,"AML",{get:function(){return this.nX},configurable:!0});Object.defineProperty(jk.prototype,"RAML08",{get:function(){return this.TF},configurable:!0});Object.defineProperty(jk.prototype,"RAML10",{get:function(){return this.UF},configurable:!0});Object.defineProperty(jk.prototype,"RAML",{get:function(){return this.ct},configurable:!0}); +Object.defineProperty(jk.prototype,"OAS30",{get:function(){return this.Cp},configurable:!0});Object.defineProperty(jk.prototype,"OAS20",{get:function(){return this.QF},configurable:!0});Object.defineProperty(jk.prototype,"OAS",{get:function(){return this.ew},configurable:!0});Object.defineProperty(jk.prototype,"AMF",{get:function(){return this.Vp},configurable:!0});jk.prototype.$classData=r({ora:0},!1,"amf.ProfileNames$",{ora:1,f:1});var Sda=void 0; +function mj(){Sda||(Sda=(new jk).a());return Sda}function Vda(){this.l=this.fq=this.gk=null}Vda.prototype=new u;Vda.prototype.constructor=Vda;function tk(a,b,c){var e=new Vda;e.gk=b;e.fq=c;if(null===a)throw mb(E(),null);e.l=a;return e}function uk(a){var b=a.gk;a=a.fq;K();vk();for(var c=(new Ib).a(),e=0,f=b.length|0;e(-2147483648^g)?-1+(h-k|0)|0:h-k|0;h=(new qg).e(" ");c=zga(h,c);c=(new qg).e(c);f="| ["+(new qa).Sc(a,g)+" ms] "+f.oa;f=(new qg).e(f);a=Gb().uN;c=xq(c,f,a);c=J(K(),(new Ib).ha([c]));f=K();e=c.ia(e,f.u);c=K();return e.ia(b,c.u)}if("end"===g)return H();throw(new x).d(g);}if(y()===f)return H();throw(new x).d(f);}function Aga(a){yga(a,a.ZH,0,!1).U(w(function(){return function(b){er(fr().mv,b)}}(a)))} +function yq(a,b){var c=a.fc;if(!c.b()){c=c.c();var e=Bga(),f=e.od;e=e.Ud;zq().fc=(new z).d(Cga(c,b,(new qa).Sc(f,e)))}return a}function xga(a,b){a=a.fc;if(!a.b()){a.c();a=zq();var c=zq().YP,e=Bga();a.YP=c.cc((new R).M(b,(new qa).Sc(e.od,e.Ud)));a=zq();c=zq().ZH;b=J(K(),(new Ib).ha([b+"::SEP::end"]));e=K();a.ZH=c.ia(b,e.u)}} +function Dga(a){var b=a.xG,c=K();b.og(c.u).U(w(function(e){return function(f){if(null!==f){var g=f.ma(),h=f.Ki(),k=g.cF;f=k.od;k=k.Ud;f=(new gr).O$((new qa).Sc(f,k));k=fr().mv;var l=g.mK,m=l.od;l=l.Ud;var p=g.cF,t=p.Ud;p=m-p.od|0;er(k,"---- Run "+h+" ("+(new qa).Sc(p,(-2147483648^p)>(-2147483648^m)?-1+(l-t|0)|0:l-t|0)+" ms) ----\n");g.nH.U(w(function(v,A){return function(D){var C=fr().mv,I=D.nC,L=I.od;I=I.Ud;var Y=A.oa,ia=Y.Ud;Y=L-Y.od|0;er(C," ("+(new qa).Sc(Y,(-2147483648^Y)>(-2147483648^L)?-1+ +(I-ia|0)|0:I-ia|0)+" ms) "+D.XP);A.oa=D.nC}}(e,f)));h=fr().mv;k=g.mK;g=k.od;k=k.Ud;m=f.oa;f=m.Ud;m=g-m.od|0;er(h," ("+(new qa).Sc(m,(-2147483648^m)>(-2147483648^g)?-1+(k-f|0)|0:k-f|0)+" ms) Finished");er(fr().mv,"\n\n\n")}else throw(new x).d(f);}}(a)))}function wga(a,b){a=a.fc;if(!a.b()){a.c();a=zq();var c=zq().ZP,e=Bga();a.ZP=c.cc((new R).M(b,(new qa).Sc(e.od,e.Ud)));a=zq();c=zq().ZH;b=J(K(),(new Ib).ha([b+"::SEP::start"]));e=K();a.ZH=c.ia(b,e.u)}}dr.prototype.buildReport=function(){Dga(this)}; +dr.prototype.finish=function(){var a=this.fc;if(!a.b()){var b=a.c();a=zq();var c=zq().xG,e=K();b=[Ega(b)];e=J(e,(new Ib).ha(b));b=K();a.xG=c.ia(e,b.u)}this.fc=y();return this};dr.prototype.start=function(){var a=this.fc;if(!a.b()){var b=a.c();a=zq();var c=zq().xG,e=K();b=[Ega(b)];e=J(e,(new Ib).ha(b));b=K();a.xG=c.ia(e,b.u)}c=Bga();a=c.od;c=c.Ud;this.fc=(new z).d(Fga(new hr,(new qa).Sc(a,c),(new qa).Sc(a,c),H()));return this};dr.prototype.log=function(a){return yq(this,a)}; +dr.prototype.printStages=function(){Aga(this)};dr.prototype.withStage=function(a,b){return vga(this,a,b)};dr.prototype.endStage=function(a){xga(this,a)};dr.prototype.startStage=function(a){wga(this,a)};Object.defineProperty(dr.prototype,"stagesEndTime",{get:function(){return this.YP},set:function(a){this.YP=a},configurable:!0});Object.defineProperty(dr.prototype,"stagesStartTime",{get:function(){return this.ZP},set:function(a){this.ZP=a},configurable:!0}); +Object.defineProperty(dr.prototype,"stagesSeq",{get:function(){return this.ZH},set:function(a){this.ZH=a},configurable:!0});Object.defineProperty(dr.prototype,"current",{get:function(){return this.fc},set:function(a){this.fc=a},configurable:!0});Object.defineProperty(dr.prototype,"executions",{get:function(){return this.xG},set:function(a){this.xG=a},configurable:!0});dr.prototype.$classData=r({Sxa:0},!1,"amf.core.benchmark.ExecutionLog$",{Sxa:1,f:1});var uga=void 0; +function zq(){uga||(uga=(new dr).a());return uga}function kp(){this.Kx=!1;this.FS=null}kp.prototype=new u;kp.prototype.constructor=kp;kp.prototype.a=function(){this.Kx=!0;this.FS=y();return this};kp.prototype.U4=function(){this.Kx=!1;return this};kp.prototype.T4=function(){this.Kx=!0;return this};Object.defineProperty(kp.prototype,"definedBaseUrl",{get:function(){return this.FS},configurable:!0});Object.defineProperty(kp.prototype,"isAmfJsonLdSerilization",{get:function(){return this.Kx},configurable:!0}); +kp.prototype.withoutBaseUnitUrl=function(){this.FS=y();return this};kp.prototype.withBaseUnitUrl=function(a){this.FS=(new z).d(a);return this};Object.defineProperty(kp.prototype,"withAmfJsonLdSerialization",{get:function(){return this.T4()},configurable:!0});Object.defineProperty(kp.prototype,"withoutAmfJsonLdSerialization",{get:function(){return this.U4()},configurable:!0});kp.prototype.$classData=r({Uxa:0},!1,"amf.core.client.ParsingOptions",{Uxa:1,f:1});function ir(){}ir.prototype=new u; +ir.prototype.constructor=ir;ir.prototype.a=function(){return this};function jr(a,b,c){b.U(w(function(e,f){return function(g){g.Qa(f)}}(a,c)))}function kr(a,b,c){a:{for(a=b.hf.Dc;!a.b();){b=a.ga();if(Gga(c,b)){c=(new z).d(a.ga());break a}a=a.ta()}c=y()}c.b()?c=y():(c=c.c(),c=(new z).d(c));c.b()?c=y():(c=c.c(),c=(new z).d(c.yc.$d));return c.b()?ld():c.c()}function lr(a,b,c,e){a=mr(T(),nr(or(),c),e);pr(b.s,a)} +function qr(a,b,c){a=b.s;b=b.ca;var e=(new rr).e(b);T();var f=mh(T(),"@id");T();c=c.trim();c=mh(T(),c);sr(e,f,c);pr(a,mr(T(),tr(ur(),e.s,b),Q().sa))}function vr(a,b,c){b.U(w(function(e,f){return function(g){g.Ob(f)}}(a,c)))}ir.prototype.$classData=r({Vxa:0},!1,"amf.core.emitter.BaseEmitters.package$",{Vxa:1,f:1});var Hga=void 0;function wr(){Hga||(Hga=(new ir).a());return Hga}function xr(){}xr.prototype=new u;xr.prototype.constructor=xr;xr.prototype.a=function(){return this}; +function Iga(a,b,c,e,f){a=ih(new jh,e,(O(),(new P).a()));return $g(new ah,b,lh(c,kh(a,f)),y())}xr.prototype.$classData=r({dya:0},!1,"amf.core.emitter.BaseEmitters.package$RawValueEmitter$",{dya:1,f:1});var Jga=void 0;function Kga(){Jga||(Jga=(new xr).a());return Jga}function yr(a){return!!(a&&a.$classData&&a.$classData.ge.db)}function zr(a){return!!(a&&a.$classData&&a.$classData.ge.wh)} +function Df(){this.UW=this.VL=this.GN=this.pS=!1;this.L0=null;this.x_=this.D8=!1;this.Bc=null;this.iO=this.E8=!1}Df.prototype=new u;Df.prototype.constructor=Df;Df.prototype.a=function(){this.UW=this.VL=this.GN=this.pS=!1;this.L0=w(function(){return function(){return!1}}(this));this.D8=!0;this.x_=!1;this.Bc=Vea();this.iO=this.E8=!1;return this};function Lga(){var a=(new Df).a();a.UW=!0;return a}Df.prototype.$classData=r({hya:0},!1,"amf.core.emitter.RenderOptions",{hya:1,f:1});function Ar(){} +Ar.prototype=new u;Ar.prototype.constructor=Ar;Ar.prototype.a=function(){return this};function Bp(a,b){a=(new Df).a();a.pS=b.BW;a.D8=b.Kx;a.GN=b.ZS;var c=hfa(b.Bc);a.Bc=c;a.E8=b.QV;a.x_=b.OT;return a}Ar.prototype.$classData=r({iya:0},!1,"amf.core.emitter.RenderOptions$",{iya:1,f:1});var Mga=void 0;function Cp(){Mga||(Mga=(new Ar).a());return Mga}function Yf(){this.qS=!1;this.F8=null}Yf.prototype=new u;Yf.prototype.constructor=Yf;Yf.prototype.a=function(){this.qS=!0;this.F8=Vea();return this}; +function Nga(){var a=(new Yf).a();a.qS=!1;return a}Yf.prototype.$classData=r({jya:0},!1,"amf.core.emitter.ShapeRenderOptions",{jya:1,f:1});function Br(){}Br.prototype=new u;Br.prototype.constructor=Br;Br.prototype.a=function(){return this};Br.prototype.$classData=r({kya:0},!1,"amf.core.emitter.ShapeRenderOptions$",{kya:1,f:1});var Oga=void 0;function Cr(a){a.nc(tb(new ub,vb().qm,"","",H()))}function Dr(a){return!!(a&&a.$classData&&a.$classData.ge.hc)} +function Er(){this.ev=this.bv=this.Qi=this.Ul=this.Ua=null}Er.prototype=new u;Er.prototype.constructor=Er;Er.prototype.a=function(){Pga=this;this.Ua=Fr(new Gr,"shacl",F().Ua.he,"SHACL vocabulary","shacl.yaml");this.Ul=Fr(new Gr,"rdfs",F().Ul.he,"RDFS vocabulary","rdfs.yaml");this.Qi=Fr(new Gr,"rdf",F().Qi.he,"RDF vocabulary","rdf.yaml");this.bv=Fr(new Gr,"owl",F().bv.he,"OWL2 vocabulary","owl.yaml");this.ev=J(K(),(new Ib).ha([this.Ua,this.Ul,this.Qi,this.bv]));return this}; +Er.prototype.$classData=r({Wya:0},!1,"amf.core.metamodel.domain.ExternalModelVocabularies$",{Wya:1,f:1});var Pga=void 0;function ci(){Pga||(Pga=(new Er).a());return Pga}function Hr(){this.ev=this.dc=this.$c=this.Pg=this.Eb=this.Tb=this.Jb=this.Ta=this.hg=this.qm=null}Hr.prototype=new u;Hr.prototype.constructor=Hr; +Hr.prototype.a=function(){Qga=this;this.qm=Fr(new Gr,"parser",F().xF.he,"Internal namespace","");this.hg=Fr(new Gr,"doc",F().Zd.he,"Document Model vocabulary for AMF. The Document Model defines the basic modular units where domain descriptions can be encoded.","aml_doc.yaml");this.Ta=Fr(new Gr,"apiContract",F().Ta.he,"API contract vocabulary","api_contract.yaml");this.Jb=Fr(new Gr,"apiBinding",F().Ta.he,"API binding vocabulary","api_binding.yaml");this.Tb=Fr(new Gr,"core",F().Tb.he,"Core vocabulary with common classes and properties", +"core.yaml");this.Eb=Fr(new Gr,"shapes",F().Eb.he,"Vocabulary defining data shapes, used as an extension to SHACL","data_shapes.yaml");this.Pg=Fr(new Gr,"data",F().Pg.he,"Vocabulary defining a default set of classes to map data structures composed of recursive records of fields,\nlike the ones used in JSON or YAML into a RDF graph.\nThey can be validated using data shapes.","data_model.yaml");this.$c=Fr(new Gr,"meta",F().$c.he,"Vocabulary containing meta-definitions","aml_meta.yaml");this.dc=Fr(new Gr, +"security",F().dc.he,"Vocabulary for HTTP security information","security.yaml");this.ev=J(K(),(new Ib).ha([this.hg,this.Tb,this.Ta,this.Eb,this.Pg,this.dc,this.$c]));return this};Hr.prototype.$classData=r({aza:0},!1,"amf.core.metamodel.domain.ModelVocabularies$",{aza:1,f:1});var Qga=void 0;function vb(){Qga||(Qga=(new Hr).a());return Qga} +function Ir(){this.aB=this.zp=this.Yr=this.bB=this.MA=this.rx=this.Ly=this.NA=this.tj=this.hw=this.jo=this.Mi=this.TC=this.of=this.Nh=this.mr=this.Xo=this.hi=this.zj=null}Ir.prototype=new u;Ir.prototype.constructor=Ir; +Ir.prototype.a=function(){Rga=this;this.zj=F().Bj.he+"string";this.hi=F().Bj.he+"integer";this.Xo=F().Eb.he+"number";this.mr=F().Bj.he+"long";this.Nh=F().Bj.he+"double";this.of=F().Bj.he+"float";this.TC=F().Bj.he+"decimal";this.Mi=F().Bj.he+"boolean";this.jo=F().Bj.he+"date";this.hw=F().Bj.he+"time";this.tj=F().Bj.he+"dateTime";this.NA=F().Eb.he+"dateTimeOnly";F();this.Ly=F().Eb.he+"file";this.rx=F().Bj.he+"byte";this.MA=F().Bj.he+"base64Binary";this.bB=F().Eb.he+"password";this.Yr=F().Bj.he+"anyType"; +this.zp=F().Bj.he+"anyURI";F();this.aB=F().Bj.he+"nil";return this}; +function yca(a,b){return"string"===b?a.zj:"integer"===b?a.hi:"number"===b?a.Xo:"long"===b?a.mr:"double"===b?a.Nh:"float"===b?a.of:"decimal"===b?a.TC:"boolean"===b?a.Mi:"date"===b||"date-only"===b?a.jo:"time"===b||"time-only"===b?a.hw:"dateTime"===b||"datetime"===b?a.tj:"dateTimeOnly"===b||"datetime-only"===b?a.NA:"file"===b?a.Ly:"byte"===b?a.rx:"base64Binary"===b?a.MA:"password"===b?a.bB:"anyType"===b||"any"===b?a.Yr:"anyUri"===b||"uri"===b?a.zp:"nil"===b?a.aB:""+F().Bj.he+b} +Ir.prototype.$classData=r({sza:0},!1,"amf.core.model.DataType$",{sza:1,f:1});var Rga=void 0;function Uh(){Rga||(Rga=(new Ir).a());return Rga}function Lr(){this.ju=this.x=null}Lr.prototype=new u;Lr.prototype.constructor=Lr; +function Nr(a,b,c){Sga(c.x).U(w(function(e,f){return function(g){var h=(new R).M(f,g.r),k=e.x.Ja(g.ve());if(k instanceof z)return Or(k.i,h);if(y()===k){k=e.x;g=g.ve();h=[h];for(var l=(new Pr).a(),m=0,p=h.length|0;mg||0>(e.n.length-g|0))throw(new U).a();var h=f.ud,k=h+g|0;if(k>f.Ze)throw(new Lv).a();f.ud=k;Ba(f.bj,f.Mk+h|0,e,0,g);f=0;for(g=e.n.length;fh||122=e.n.length?-1:h)}f=1+f|0}a=(new Pj).e(a.Os);for(c=c.Dc;!c.b();){f=c.ga();e=a.s;f|=0;g=b;h=e.qf;if(0> +f||f>(h.length|0))throw(new Mv).ue(f);e.qf=""+h.substring(0,f)+g+h.substring(f);c=c.ta()}return a.t().toLowerCase()}function Mia(a,b,c){a=b.Fb(w(function(e,f){return function(g){return qja(f,g.OH,g.MH).na()}}(a,c)));if(a.b())return y();a=a.c();return qja(c,a.OH,a.MH)}Hu.prototype.e=function(a){this.Os=a;return this};Hu.prototype.$classData=r({aDa:0},!1,"amf.core.utils.InflectorBase$Inflector",{aDa:1,f:1});function Nv(){this.r=this.xb=null}Nv.prototype=new u;Nv.prototype.constructor=Nv; +Nv.prototype.PG=function(a){this.xb=a;this.r=y();return this};function Ov(a){var b=a.r,c=a.xb;b=b.b()?Hb(c):b.c();a.r=(new z).d(b);return a.r.c()}Nv.prototype.$classData=r({bDa:0},!1,"amf.core.utils.Lazy",{bDa:1,f:1});function Qv(){}Qv.prototype=new u;Qv.prototype.constructor=Qv;Qv.prototype.a=function(){return this}; +function uja(a){var b=vja,c=J(K(),H());for(;;){var e=wja(a,w(function(){return function(g){if(null!==g)return g.ya().b();throw(new x).d(g);}}(b)));if(null===e)throw(new x).d(e);a=e.ma();e=e.ya();if(a.b()){if(e.b())return ue(),(new ye).d(c);ue();b=c;c=pd(e);a=Xd();b=b.ia(c,a.u);return(new ve).d(b)}a=pd(a);e=(new Rv).dH(e,w(function(g,h){return function(k){return Ida(k,h)}}(b,a)));var f=Xd();c=c.ia(a,f.u);a=e}}Qv.prototype.$classData=r({cDa:0},!1,"amf.core.utils.TSort$",{cDa:1,f:1});var vja=void 0; +function Nd(){this.tm=0}Nd.prototype=new u;Nd.prototype.constructor=Nd;Nd.prototype.a=function(){this.tm=0;return this};Nd.prototype.jt=function(a){this.tm=1+this.tm|0;return a+"_"+this.tm};Nd.prototype.$classData=r({eDa:0},!1,"amf.core.utils.package$IdCounter",{eDa:1,f:1});function Sv(){}Sv.prototype=new u;Sv.prototype.constructor=Sv;Sv.prototype.a=function(){return this};function xja(a,b){a=b.trim();return 0<=(a.length|0)&&"\x3c"===a.substring(0,1)} +function $ba(a,b,c){return xja($f(),b)&&!c?"application/xml":yja($f(),b)&&!c?"application/json":"text/vnd.yaml"}function yja(a,b){a=b.trim();return 0<=(a.length|0)&&"{"===a.substring(0,1)?!0:0<=(b.length|0)&&"["===b.substring(0,1)}Sv.prototype.$classData=r({fDa:0},!1,"amf.core.utils.package$MediaTypeMatcher$",{fDa:1,f:1});var zja=void 0;function $f(){zja||(zja=(new Sv).a());return zja}function Tv(){this.td=null}Tv.prototype=new u;Tv.prototype.constructor=Tv;Tv.prototype.e=function(a){this.td=a;return this}; +Tv.prototype.$classData=r({iDa:0},!1,"amf.core.utils.package$RegexConverter",{iDa:1,f:1});function Uv(){this.fc=0}Uv.prototype=new u;Uv.prototype.constructor=Uv;Uv.prototype.a=function(){this.fc=-1;return this};Uv.prototype.$classData=r({jDa:0},!1,"amf.core.utils.package$SimpleCounter",{jDa:1,f:1});function Vv(){this.Sqa=null}Vv.prototype=new u;Vv.prototype.constructor=Vv;Vv.prototype.a=function(){Aja=this;var a=(new qg).e("\\{(.[^{]*)\\}"),b=H();this.Sqa=(new rg).vi(a.ja,b);return this}; +function Bja(a,b){return"'"+b+"' is not a valid template uri."}function Cja(a,b){a=(new qg).e(b);a:{var c=Wv(a);a=0;b:for(;;){b=!1;var e=null;if(H().h(c)){a=0===a;break a}if(c instanceof Vt){b=!0;e=c;var f=e.Wn;if(125===(null===f?0:f.r)&&1>a){a=!1;break a}}if(b){var g=e.Wn;f=e.Nf;if(125===(null===g?0:g.r)){a=-1+a|0;c=f;continue b}}if(b&&(g=e.Wn,f=e.Nf,123===(null===g?0:g.r))){a=1+a|0;c=f;continue b}if(b){c=e.Nf;continue b}throw(new x).d(c);}}return a} +function Dja(a,b){b=ai(a.Sqa,b);b=Xv(b);a=w(function(){return function(e){return e.split("{").join("").split("}").join("")}}(a));var c=K();return b.ka(a,c.u)}Vv.prototype.$classData=r({kDa:0},!1,"amf.core.utils.package$TemplateUri$",{kDa:1,f:1});var Aja=void 0;function Yv(){Aja||(Aja=(new Vv).a());return Aja}function Eja(){this.ev=this.G3=this.H3=this.c1=this.eK=null}Eja.prototype=new u;Eja.prototype.constructor=Eja; +function Fja(){var a=new Eja,b=Rb(Sb(),H()),c=Rb(Sb(),H()),e=Rb(Sb(),H()),f=Rb(Sb(),H()),g=Rb(Sb(),H());a.eK=b;a.c1=c;a.H3=e;a.G3=f;a.ev=g;return a} +function Gja(a,b){b.Bf.U(w(function(c){return function(e){a:{var f=c.ev.Ja(e.$);if(f instanceof z){var g=c.ev,h=e.$;f=f.i;var k=e.At,l=f.At,m=K();k=k.ia(l,m.u).fj();l=e.Hv;m=f.Hv;var p=K();l=l.ia(m,p.u).fj();m=e.Jv;f=f.Jv;p=K();f=m.ia(f,p.u).fj();e=qj(new rj,e.$,e.Ld,e.yv,e.vv,k,l,f,e.vy,e.Lx,e.xy,e.jy,e.my,e.QB,e.Iz,e.Bw,e.Cj);g.Ue(h,e)}else{if(y()===f){g=c.ev;h=Zv(g,e.$,e);null!==h&&(h.r=e);e=g;break a}throw(new x).d(f);}e=void 0}return e}}(a)));b.WT.U(w(function(c){return function(e){return Hja(c, +e,Yb().zx)}}(a)));b.ZW.U(w(function(c){return function(e){return Hja(c,e,Yb().dh)}}(a)));b.YW.U(w(function(c){return function(e){return Hja(c,e,Yb().qb)}}(a)));b.kT.U(w(function(c){return function(e){e=0<=(e.length|0)&&"http://"===e.substring(0,7)||0<=(e.length|0)&&"https://"===e.substring(0,8)||0<=(e.length|0)&&"file:/"===e.substring(0,6)?e:ic($v(F(),e.split(".").join(":")));return c.eK.rt(e)}}(a)));return a} +function Hja(a,b,c){b=0<=(b.length|0)&&"http://"===b.substring(0,7)||0<=(b.length|0)&&"https://"===b.substring(0,8)||0<=(b.length|0)&&"file:/"===b.substring(0,6)?b:ic($v(F(),b.split(".").join(":")));var e=a.ev.Ja(b);if(y()===e)throw mb(E(),(new nb).e("Cannot enable with "+c+" level unknown validation "+b));if(e instanceof z){e=e.i;a.c1.rt(b);a.H3.rt(b);a.G3.rt(b);if(Yb().zx===c)c=Zv(a.c1,b,e),null!==c&&(c.r=e);else if(Yb().dh===c)c=Zv(a.H3,b,e),null!==c&&(c.r=e);else if(Yb().qb===c)c=Zv(a.G3,b,e), +null!==c&&(c.r=e);else throw(new x).d(c);a=a.eK;b=Zv(a,b,e);null!==b&&(b.r=e);return a}throw(new x).d(e);}Eja.prototype.$classData=r({pDa:0},!1,"amf.core.validation.EffectiveValidations",{pDa:1,f:1});function aw(){this.qb=this.zx=this.dh=null}aw.prototype=new u;aw.prototype.constructor=aw;aw.prototype.a=function(){this.dh="Warning";this.zx="Info";this.qb="Violation";return this};function bba(a,b){return a.dh===b?a.dh:a.zx===b?a.zx:a.qb}aw.prototype.unapply=function(a){return bba(this,a)}; +Object.defineProperty(aw.prototype,"VIOLATION",{get:function(){return this.qb},configurable:!0});Object.defineProperty(aw.prototype,"INFO",{get:function(){return this.zx},configurable:!0});Object.defineProperty(aw.prototype,"WARNING",{get:function(){return this.dh},configurable:!0});aw.prototype.$classData=r({sDa:0},!1,"amf.core.validation.SeverityLevels$",{sDa:1,f:1});var Ija=void 0;function Yb(){Ija||(Ija=(new aw).a());return Ija}function bw(){}bw.prototype=new u;bw.prototype.constructor=bw; +bw.prototype.a=function(){return this};function Jja(a){Kja||(Kja=(new bw).a());var b="Conforms? "+a.$_()+"\n";var c=a.aM();b=b+("Number of results: "+Eq(c))+"\n";for(a=a.aM();!a.b();)c=a.ga(),b=b+("\n- Source: "+c.Ev())+"\n",b=b+(" Path: "+c.TB())+"\n",b=b+(" Focus node: "+c.rO())+"\n",b=b+(" Constraint: "+c.d3())+"\n",b=b+(" Message: "+c.xL())+"\n",b=b+(" Severity: "+c.Y2())+"\n",a=a.ta();return b}bw.prototype.$classData=r({zDa:0},!1,"amf.core.validation.core.ValidationReport$",{zDa:1,f:1}); +var Kja=void 0;function cw(){this.fX=this.Mv=this.Nv=this.Dz=this.px=this.Ov=this.IA=null}cw.prototype=new u;cw.prototype.constructor=cw;cw.prototype.a=function(){Lja=this;var a=F().Bj;this.IA=G(a,"string");a=F().Bj;this.Ov=G(a,"integer");a=F().Bj;this.px=G(a,"float");a=F().Eb;this.Dz=G(a,"number");F();a=F().Bj;this.Nv=G(a,"double");a=F().Bj;this.Mv=G(a,"boolean");a=F().Bj;this.fX=G(a,"nil");F();F();F();return this}; +cw.prototype.$classData=r({FDa:0},!1,"amf.core.vocabulary.Namespace$XsdTypes$",{FDa:1,f:1});var Lja=void 0;function dw(){Lja||(Lja=(new cw).a());return Lja}function ew(){this.wc=this.he=this.KE=null;this.uw=this.zr=!1;this.WJ=0;this.Q=this.Ph=null}ew.prototype=new u;ew.prototype.constructor=ew;function Mja(){}Mja.prototype=ew.prototype;ew.prototype.ima=function(a,b,c){this.KE=a;this.he=b;this.wc=c;this.uw=this.zr=!1;this.WJ=1;this.Ph=(new fw).a();this.Q=(new fw).a();(new Nd).a();return this}; +function Nja(a,b){a=a.Ph;var c=new Oja;c.AK=b;b=Pja();b=re(b);return xs(a,c,b).Da()}function Qja(a,b){a.wc.GN&&b.kg("@context",w(function(c){return function(e){e.Gi(w(function(f){return function(g){Rja(g,"@base",f.he);f.KE.U(w(function(h,k){return function(l){if(null!==l){var m=l.ma();l=l.ya();Rja(k,m,l)}else throw(new x).d(l);}}(f,g)))}}(c)))}}(a)))} +function gw(a,b){if(a.wc.GN)a:{var c=F();a=a.KE;c=c.yu.mb();b:{for(;c.Ya();){var e=c.$a(),f=e;if(null===f)throw(new x).d(f);f=f.ya().he;if(0===(b.indexOf(f)|0)){e=(new z).d(e);break b}}e=y()}if(e instanceof z&&(c=e.i,null!==c)){e=c.ma();c=c.ya();a.Ue(e,c.he);a=(new qg).e(e);b=b.split(c.he).join(":");b=(new qg).e(b);c=Gb().uN;b=xq(a,b,c);break a}if(y()!==e)throw(new x).d(e);}return b}ew.prototype.PD=function(a){return this.wc.GN&&-1!==(a.indexOf(this.he)|0)?a.split(this.he).join(""):a}; +ew.prototype.$classData=r({Uga:0},!1,"amf.plugins.document.graph.emitter.EmissionContext",{Uga:1,f:1});function hw(){}hw.prototype=new u;hw.prototype.constructor=hw;hw.prototype.a=function(){return this};hw.prototype.$classData=r({RDa:0},!1,"amf.plugins.document.graph.emitter.EmissionContext$",{RDa:1,f:1});var Sja=void 0;function iw(){}iw.prototype=new u;iw.prototype.constructor=iw;iw.prototype.a=function(){return this}; +iw.prototype.$classData=r({UDa:0},!1,"amf.plugins.document.graph.emitter.FlattenedEmissionContext$",{UDa:1,f:1});var Tja=void 0;function jw(){}jw.prototype=new u;jw.prototype.constructor=jw;jw.prototype.a=function(){return this};jw.prototype.jO=function(a,b,c){Tja||(Tja=(new iw).a());var e=new kw,f=Rb(Ut(),H()),g=a.j;e.o9=g;ew.prototype.ima.call(e,f,g,c);(new Uja).Daa(b,c,e).hW(a);return!0};jw.prototype.$classData=r({WDa:0},!1,"amf.plugins.document.graph.emitter.FlattenedJsonLdEmitter$",{WDa:1,f:1}); +var Vja=void 0;function oga(){Vja||(Vja=(new jw).a());return Vja}function lw(){}lw.prototype=new u;lw.prototype.constructor=lw;lw.prototype.a=function(){return this};lw.prototype.jO=function(a,b,c){Sja||(Sja=(new hw).a());var e=(new ew).ima(Rb(Ut(),H()),a.j,c);(new Wja).Daa(b,c,e).hW(a);return!0};lw.prototype.$classData=r({iEa:0},!1,"amf.plugins.document.graph.emitter.JsonLdEmitter$",{iEa:1,f:1});var Xja=void 0;function pga(){Xja||(Xja=(new lw).a());return Xja}function mw(){this.DG=null} +mw.prototype=new u;mw.prototype.constructor=mw;function nw(){}nw.prototype=mw.prototype;mw.prototype.DK=function(a){this.DG=a;return this};function ow(){}ow.prototype=new u;ow.prototype.constructor=ow;ow.prototype.a=function(){return this};function Yja(){Zja();K();pj();var a=(new Lf).a();return(new pw).aaa($ja(new qw,a.ua()))} +ow.prototype.OS=function(a){a=kc(a.Xd.Fd);var b=qc(),c=rw().sc;a=jc(a,sw(c,b));a=a.b()?y():a.c().kc();if(a instanceof z&&(a=a.i,null!==a)){b=w(function(){return function(g){var h=F().Zd;return ic(G(h,g))}}(this));c=J(K(),(new Ib).ha(["encodes","declares","references"]));var e=K();c=c.ka(b,e.u);e=J(K(),(new Ib).ha(["Document","Fragment","Module","Unit"]));var f=K();b=e.ka(b,f.u);e=w(function(){return function(g){return aka(F(),g)}}(this));f=K();e=c.ka(e,f.u);f=K();c=c.ia(e,f.u);e=w(function(){return function(g){return aka(F(), +g)}}(this));f=K();e=b.ka(e,f.u);f=K();b=b.ia(e,f.u);if(c.Od(w(function(g,h){return function(k){return ac((new M).W(h),k).na()}}(this,a))))return!0;a=ac((new M).W(a),"@type");if(!a.b())return a=a.c().i,c=tw(),e=cc().bi,a=N(a,c,e).Cm,c=w(function(){return function(g){var h=bc(),k=cc().bi;return N(g,h,k).oq}}(this)),e=rw(),a=a.ka(c,e.sc),b.gp(a).Da()}return!1};ow.prototype.$classData=r({mEa:0},!1,"amf.plugins.document.graph.parser.ExpandedGraphParser$",{mEa:1,f:1});var bka=void 0; +function Zja(){bka||(bka=(new ow).a());return bka}function uw(){}uw.prototype=new u;uw.prototype.constructor=uw;uw.prototype.a=function(){return this};uw.prototype.OS=function(a){a=a.Xd.Fd.re();return a instanceof vw?ac((new M).W(a),"@graph").na():!1};function cka(){dka();K();pj();var a=(new Lf).a();return(new ww).aaa($ja(new qw,a.ua()))}uw.prototype.$classData=r({rEa:0},!1,"amf.plugins.document.graph.parser.FlattenedGraphParser$",{rEa:1,f:1});var eka=void 0; +function dka(){eka||(eka=(new uw).a());return eka}function xw(){}xw.prototype=new u;xw.prototype.constructor=xw;xw.prototype.qj=function(a){var b=F().ez.he;return 0<=(a.length|0)&&a.substring(0,b.length|0)===b?(b=1+(a.indexOf("#")|0)|0,(new z).d(a.substring(b))):y()};xw.prototype.$classData=r({yEa:0},!1,"amf.plugins.document.graph.parser.GraphParserHelpers$AnnotationName$",{yEa:1,f:1});function yw(){this.u5=this.w5=this.v5=this.u8=null}yw.prototype=new u;yw.prototype.constructor=yw; +yw.prototype.a=function(){this.u8="%Vocabulary1.0";this.v5="%Dialect1.0";this.w5="%Library/Dialect1.0";this.u5="%NodeMapping/Dialect1.0";return this};yw.prototype.$classData=r({GEa:0},!1,"amf.plugins.document.vocabularies.ExtensionHeader$",{GEa:1,f:1});var fka=void 0;function zw(){fka||(fka=(new yw).a());return fka}function Aw(){this.ev=this.gga=this.ct=null}Aw.prototype=new u;Aw.prototype.constructor=Aw; +Aw.prototype.a=function(){gka=this;this.ct="RamlStyle";this.gga="JsonSchemaStyle";this.ev=J(K(),(new Ib).ha([this.ct,this.gga]));return this};Aw.prototype.$classData=r({MEa:0},!1,"amf.plugins.document.vocabularies.ReferenceStyles$",{MEa:1,f:1});var gka=void 0;function Yc(){this.tm=0}Yc.prototype=new u;Yc.prototype.constructor=Yc;Yc.prototype.a=function(){this.tm=0;return this};Yc.prototype.jt=function(a){this.tm=1+this.tm|0;return a+"_"+this.tm}; +Yc.prototype.$classData=r({WEa:0},!1,"amf.plugins.document.vocabularies.emitters.common.IdCounter",{WEa:1,f:1}); +function Bw(a,b){if(Vb().Ia(b).b())return y();var c=uba(a,b);if(c instanceof z&&(c=c.i,null!==c&&(c=c.ya(),null!==c))){var e=a.pb.j;if(0<=(b.length|0)&&b.substring(0,e.length|0)===e)return a=B(c.Y(),c.R).A,(new z).d(a.b()?null:a.c());var f=pd(a.Xb);e=wd(new xd,vd());for(f=f.th.Er();f.Ya();){var g=f.$a();-1!==(b.indexOf(g)|0)!==!1&&Ad(e,g)}b=e.eb;e=ii().u;b=qt(b,e);e=mc();b=Cw(Dw(b,e));b=Wt(b);b.b()?a=y():(b=b.c(),a=a.Xb.P(b).ma(),b=B(c.Y(),c.R).A,a=(new z).d(a+"."+(b.b()?null:b.c())));return a.b()? +(a=B(c.Y(),c.R).A,(new z).d(a.b()?null:a.c())):a}c=a.pb.j;if(0<=(b.length|0)&&b.substring(0,c.length|0)===c)return a=a.pb.j,a=Mc(ua(),b,a),a=Oc((new Pc).fd(a)),(new z).d(a.split("/declarations/").join(""));c=pd(a.Xb).th.Er();a:{for(;c.Ya();)if(e=c.$a(),-1!==(b.indexOf(e)|0)){c=(new z).d(e);break a}c=y()}if(c.b())return y();c=c.c();a=a.Xb.P(c).ma();c=Mc(ua(),b,c);c=Oc((new Pc).fd(c));c=-1!==(c.indexOf("/declarations/")|0)?c.split("/declarations/").join(""):c;0<=(c.length|0)&&"#"===c.substring(0,1)? +(c=(new qg).e(c),b=c.ja.length|0,a=a+"."+gh(hh(),c.ja,1,b)):a=a+"."+c;return(new z).d(a)}function Ew(){this.oX=this.HX=null}Ew.prototype=new u;Ew.prototype.constructor=Ew;Ew.prototype.a=function(){hka=this;var a=qb(),b=F().$c;this.HX=rb(new sb,a,G(b,"declarationName"),tb(new ub,vb().qm,"","",H()));a=zc();b=F().$c;this.oX=rb(new sb,a,G(b,"abstract"),tb(new ub,vb().qm,"","",H()));return this}; +Ew.prototype.$classData=r({tGa:0},!1,"amf.plugins.document.vocabularies.metamodel.domain.DialectDomainElementModel$",{tGa:1,f:1});var hka=void 0;function Fw(){hka||(hka=(new Ew).a());return hka}function ika(a){return B(a.Y(),a.at)}function jka(a,b){if(a.Ts.Ha(b))eb(a,a.at,b);else throw mb(E(),(new nb).e("Unknown merging policy: '"+b+"'"));}function kka(){}kka.prototype=new u;kka.prototype.constructor=kka;function Gw(){}Gw.prototype=kka.prototype;function Hw(){this.Cw=this.m=this.kf=null} +Hw.prototype=new u;Hw.prototype.constructor=Hw;Hw.prototype.GG=function(){var a=this.kf,b=qc();a=Iw(a,b);a instanceof ye&&lka(this,a.i)}; +function mka(a,b,c,e,f){if(!f.b()){var g=f.c();a.Cw.Ue(g+"/"+b,c)}g=(new qg).e(e);b=tc(g)?e+"/"+b:b;a.Cw.Ue(b,c);e=c.hb().gb;Q().sa===e?(e=qc(),e=N(c,e,a.m),g=ac((new M).W(e),"id"),g=g.b()?ac((new M).W(e),"$id"):g,g.b()?g=y():(g=Kc(g.c().i),g.b()?g=y():(g=g.c(),g=(new z).d(g.va))),g.b()?f=y():(g=g.c(),f=(new z).d(0<=(g.length|0)&&"#"===g.substring(0,1)?""+(f.b()?"":f.c())+g:g)),f.b()||(g=f.c(),a.Cw.Ue(g,c)),nka(a,b,f,e)):Q().cd===e&&(e=tw(),c=N(c,e,a.m),oka(a,b,f,c))} +function oka(a,b,c,e){e=e.Cm;var f=rw();e.og(f.sc).U(w(function(g,h,k){return function(l){if(null!==l){var m=l.ma();l=l.Ki();mka(g,""+l,m,h,k)}else throw(new x).d(l);}}(a,b,c)))}Hw.prototype.pv=function(a,b){this.kf=a;this.m=b;this.Cw=(new wu).a();this.GG();return this}; +function lka(a,b){var c=ac((new M).W(b),"id");c=c.b()?ac((new M).W(b),"$id"):c;c.b()?c=y():(c=Kc(c.c().i),c.b()?c=y():(c=c.c(),c=(new z).d(c.va)));if(!c.b()){var e=c.c();a.Cw.Ue(e,(T(),T(),mr(T(),b,Q().sa)))}a.Cw.Ue("/",(T(),T(),mr(T(),b,Q().sa)));b.sb.Cb(w(function(){return function(f){f=Kc(f.i);f.b()?f=!1:(f=f.c(),f="id"===f.va||"$id"===f.va);return!f}}(a))).U(w(function(f,g){return function(h){var k=h.Aa,l=bc();mka(f,N(k,l,f.m).va,h.i,"",g)}}(a,c)))} +function nka(a,b,c,e){e.sb.Cb(w(function(){return function(f){f=Kc(f.i);f.b()?f=!1:(f=f.c(),f="id"===f.va||"$id"===f.va);return!f}}(a))).U(w(function(f,g,h){return function(k){var l=k.Aa,m=bc();mka(f,N(l,m,f.m).va,k.i,g,h)}}(a,b,c)))}Hw.prototype.$classData=r({qJa:0},!1,"amf.plugins.document.webapi.contexts.JsonSchemaAstIndex",{qJa:1,f:1});function pka(a){return Vw(function(b){return function(c,e,f){return qka(c,e,f,b.N)}}(a))} +function rka(a){return Vw(function(b){return function(c,e,f){var g=b.N,h=new Ww;h.FA=c;h.Gb=e;h.Ka=f;h.sd=g;Xw.prototype.gma.call(h,c,g);return h}}(a))}function ska(a){return Uc(function(b){return function(c,e){var f=b.N,g=new Yw;g.$w=c;g.Ka=e;g.sd=f;return g}}(a))}function Zw(){}Zw.prototype=new u;Zw.prototype.constructor=Zw;Zw.prototype.a=function(){return this}; +function Yg(a,b,c,e,f){var g=c.r.r.fa(),h=(new tka).a();g=g.hf;var k=Ef().u;h=xs(g,h,k);h.Da()?(g=f.Gg(),k=Pb(),g=null!==g&&g===k):g=!1;return g?(a=w(function(){return function(l){return l.cp}}(a)),g=K(),uka(new $w,b,c,h.ka(a,g.u),e,f)):$g(new ah,b,c,e)}Zw.prototype.$classData=r({QJa:0},!1,"amf.plugins.document.webapi.contexts.RamlScalarEmitter$",{QJa:1,f:1});var vka=void 0;function Zg(){vka||(vka=(new Zw).a());return vka}function ax(){this.wc=this.oy=this.Bc=null;this.zr=!1}ax.prototype=new u; +ax.prototype.constructor=ax;function wka(){}wka.prototype=ax.prototype;function xka(a,b){b=Ab(b.fa(),q(bx));if(b instanceof z)return b=b.i,cx(new dx,"type",a,Q().Na,b.yc.$d);if(y()===b)return cx(new dx,"type",a,Q().Na,ld());throw(new x).d(b);}ax.prototype.Ti=function(a,b,c){this.Bc=a;this.oy=b;this.wc=c;this.zr=!1;return this};ax.prototype.Xba=function(){return this.wc};ax.prototype.hj=function(){return this.Bc};function ex(a,b,c){a.oy.yoa(c,b)} +function yka(a,b){var c=cs(b.Y(),Ih().xd);if(y()===c){if("union"===a&&B(b.aa,xn().Le).Da())return y();b=Ab(b.fa(),q(bx));if(b instanceof z)return b=b.i,(new z).d(cx(new dx,"type",a,Q().Na,b.yc.$d))}return y()}function hca(a,b){return a.zr?b.Cb(w(function(){return function(c){return!Ab(c.fa(),q(zka)).na()}}(a))):b} +function Aka(a,b,c){b=Za(b);return b instanceof z?c.Fb(w(function(e,f){return function(g){return ev(g)?g.qe().j===f:Zc(g)&&g.tk().Od(w(function(h,k){return function(l){return l.j===k}}(e,f)))}}(a,b.i.j))):y()}function gx(){this.r=this.la=null}gx.prototype=new u;gx.prototype.constructor=gx;function hx(){}hx.prototype=gx.prototype;gx.prototype.Hc=function(a,b){this.la=a;this.r=b;return this};function ix(){this.Uba=this.h3=this.F0=this.VD=null}ix.prototype=new u;ix.prototype.constructor=ix; +ix.prototype.a=function(){Bka=this;this.VD=jx((new je).e("fragmentType"));this.F0=jx((new je).e("extensionType"));this.h3="swagger";this.Uba="openapi";return this}; +ix.prototype.hG=function(a){a=a.$g;if(a instanceof Dc){a=a.Xd;var b=qc();a=kx(a).Qp(b);if(a instanceof ye){a=a.i;b=ac((new M).W(a),this.VD);b=b.b()?ac((new M).W(a),lx().F0):b;b=b.b()?ac((new M).W(a),lx().h3):b;a=b.b()?ac((new M).W(a),lx().Uba):b;if(a.b())return y();a=a.c();lx();a=jc(kc(a.i),Dd());a=a.b()?"":a.c();b=mx().r;b=(new qg).e(b);var c=H();b=(new rg).vi(b.ja,c);Cka().r===a?a=(new z).d(Cka()):(b=yt(b,a),b.b()?b=!1:null!==b.c()?(b=b.c(),b=0===Tu(b,0)):b=!1,a=b?(new z).d(mx()):Dka().r===a?(new z).d(Dka()): +Eka().r===a?(new z).d(Eka()):Fka().r===a?(new z).d(Fka()):Gka().r===a?(new z).d(Gka()):Hka().r===a?(new z).d(Hka()):Ika().r===a?(new z).d(Ika()):Jka().r===a?(new z).d(Jka()):Kka().r===a?(new z).d(Kka()):Lka().r===a?(new z).d(Lka()):y());return a}if(a instanceof ve)return y();throw(new x).d(a);}return y()};ix.prototype.$classData=r({uKa:0},!1,"amf.plugins.document.webapi.parser.OasHeader$",{uKa:1,f:1});var Bka=void 0;function lx(){Bka||(Bka=(new ix).a());return Bka}function nx(){this.UU=null} +nx.prototype=new u;nx.prototype.constructor=nx;nx.prototype.a=function(){Mka=this;var a="time-only date-only date-time date-time-only password byte binary int32 int64 long float".split(" ");if(0===(a.length|0))a=vd();else{for(var b=wd(new xd,vd()),c=0,e=a.length|0;c=Jd(c,e,f).jb()?(b=b.aa.vb,c=mz(),c=Ua(c),e=Id().u,b=Jd(b,c,e),c=w(function(){return function(g){return g.Lc}}(a)),e=Xd(),b.ka(c,e.u).oh(w(function(){return function(g){var h=Fg().R;if(null===g?null===h:g.h(h))return!0;h=Fg().af;return null===g?null===h:g.h(h)}}(a)))):!1} +function Hma(a,b){var c=(new Ej).a();try{var e=B(b.aa,xn().Le),f=w(function(k,l){return function(m){if(m instanceof Mh&&Gma(Ima(),m)){ola();hz();var p=B(m.aa,Fg().af).A;return mla(0,Cma(0,p.b()?null:p.c()),ni(m).A).ma()}if(null!==m&&Za(m).na()&&B(m.Y(),db().ed).A.na())return m=B(m.Y(),db().ed).A,m.b()?null:m.c();if(m instanceof Th){p=m.aa.vb;var t=mz();t=Ua(t);var v=Id().u;if(Jd(p,t,v).b())return"nil"}if(m instanceof th&&(p=m.aa.vb,t=mz(),t=Ua(t),v=Id().u,Jd(p,t,v).b()))return"array";if(m instanceof +Hh&&(p=m.aa.vb,t=mz(),t=Ua(t),v=Id().u,Jd(p,t,v).b()))return"object";if(m instanceof vh&&(m=m.Y().vb,p=mz(),p=Ua(p),t=Id().u,Jd(m,p,t).b()))return"any";throw(new nz).M(l,y());}}(a,c)),g=K(),h=e.ka(f,g.u);return(new z).d(h.Kg(" | "))}catch(k){if(k instanceof nz){a=k;if(a.Aa===c)return a.Dt();throw a;}throw k;}}lz.prototype.$classData=r({qQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlUnionEmitterHelper$",{qQa:1,f:1});var Jma=void 0; +function Ima(){Jma||(Jma=(new lz).a());return Jma}function oz(){}oz.prototype=new u;oz.prototype.constructor=oz;oz.prototype.a=function(){return this};function Kma(a,b,c){O();var e=(new P).a();e=(new mf).K((new S).a(),e);a=pz(qz(e,"uses",a,b.Q,c),b.da);return(new R).M(a,Ab(e.x,q(Rc)))}oz.prototype.$classData=r({xQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.ReferencesParserAnnotations$",{xQa:1,f:1});var Lma=void 0;function rz(){}rz.prototype=new u;rz.prototype.constructor=rz; +rz.prototype.a=function(){return this};function Bca(a,b,c,e){var f=e.Gg();if(Cia(f))return a=b.Aa,f=bc(),Mma(new sz,b,N(a,f,e).va,b.i,c,tz(uz(),e));if(wia(f))return(new vz).QO(b.i,w(function(h,k,l,m){return function(p){var t=k.Aa,v=bc();t=N(t,v,l).va;v=Od(O(),k);Db(p,v);return m.ug(p,t)}}(a,b,e,c)),wz(uz(),e));a=sg().l_;f="Unsupported vendor "+f+" in security scheme parsers";var g=y();ec(e,a,"",g,f,b.da);a=b.Aa;f=bc();return Mma(new sz,b,N(a,f,e).va,b.i,c,tz(uz(),e))} +rz.prototype.$classData=r({BQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.SecuritySchemeParser$",{BQa:1,f:1});var Nma=void 0;function Cca(){Nma||(Nma=(new rz).a());return Nma}function xz(){}xz.prototype=new u;xz.prototype.constructor=xz;xz.prototype.a=function(){return this};xz.prototype.$classData=r({SQa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.LicenseParser$",{SQa:1,f:1});var Oma=void 0;function Pma(){Oma||(Oma=(new xz).a())} +function yz(){this.ad=this.Fe=null;this.rma=this.OU=!1;this.yr=this.LL=null}yz.prototype=new u;yz.prototype.constructor=yz;function Qma(a,b,c){a.Fe=b;a.ad=c;c=(new zz).ln(b).pk();if(c.b())c=!1;else{c=c.c();if(Za(c).na()){var e=J(K(),H());e=wh(Az(c,e).fa(),q(Rma))}else e=!1;c=e?!0:wh(c.x,q(Rma))}a.OU=c;a.rma=b.wma()&&!a.OU;a.LL=(new Bz).ln(b).pk();if(b instanceof ve)b=b.i;else if(b instanceof ye)b=b.i;else throw(new x).d(b);a.yr=b;return a} +yz.prototype.$classData=r({BRa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.OasParameter",{BRa:1,f:1});function Cz(){}Cz.prototype=new u;Cz.prototype.constructor=Cz;Cz.prototype.a=function(){return this};function Sma(a,b,c){return Qma(new yz,(ue(),(new ye).d(b)),c)}function Dz(a,b,c){return Qma(new yz,(ue(),(new ve).d(b)),c)}Cz.prototype.$classData=r({CRa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.OasParameter$",{CRa:1,f:1});var Tma=void 0; +function Ez(){Tma||(Tma=(new Cz).a());return Tma}function Fz(){this.N=this.p=null}Fz.prototype=new u;Fz.prototype.constructor=Fz;function Uma(){}Uma.prototype=Fz.prototype;Fz.prototype.EO=function(a,b,c,e,f){this.p=c;this.N=f};Fz.prototype.SN=function(a,b,c){b.Da()&&Dg(c,(new Gz).eA(a,b,this.p,this.N))};function Hz(){}Hz.prototype=new u;Hz.prototype.constructor=Hz;Hz.prototype.a=function(){return this}; +Hz.prototype.$classData=r({eSa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.OrganizationParser$",{eSa:1,f:1});var Vma=void 0;function Wma(){Vma||(Vma=(new Hz).a())}function Iz(){}Iz.prototype=new u;Iz.prototype.constructor=Iz;Iz.prototype.a=function(){return this};function Jz(a,b){if(a=!(Za(b).na()&&wh(b.fa(),q(cv))))a=B(b.Y(),qf().xd),K(),a=(new z).d(a),null!==a.i&&0===a.i.Oe(1)?(a=a.i.lb(0),a=Za(a).na()||wh(a.fa(),q(cv))):a=!1,a=!a;a&&(a=(new Kz).a(),Cb(b,a))} +Iz.prototype.$classData=r({lSa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.PayloadParserHelper$",{lSa:1,f:1});var Xma=void 0;function Lz(){Xma||(Xma=(new Iz).a());return Xma}function Mz(){}Mz.prototype=new u;Mz.prototype.constructor=Mz;Mz.prototype.a=function(){return this};Mz.prototype.NL=function(a,b,c,e){a=Yma().NL(a,b,c,e);b=cj().We;return eb(a,b,"header")};Mz.prototype.$classData=r({XSa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.RamlHeaderParser$",{XSa:1,f:1});var Zma=void 0; +function $ma(){Zma||(Zma=(new Mz).a());return Zma}function Nz(){}Nz.prototype=new u;Nz.prototype.constructor=Nz;Nz.prototype.a=function(){return this};Nz.prototype.NL=function(a,b,c,e){var f=qc();c=N(c,f,e).sb.ga();return oy(e.$h.a2(),c,a,b).SB()};Nz.prototype.$classData=r({dTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.RamlParameterParser$",{dTa:1,f:1});var ana=void 0;function Yma(){ana||(ana=(new Nz).a());return ana}function Oz(){this.m=this.xb=this.tb=null}Oz.prototype=new u; +Oz.prototype.constructor=Oz;function bna(){}bna.prototype=Oz.prototype;Oz.prototype.jn=function(a,b,c,e){this.tb=a;this.xb=b;this.m=e;return this};Oz.prototype.ly=function(){var a=this.xb;T();var b=this.tb.Aa,c=this.m,e=Dd();a=a.P((new z).d(N(b,e,c)));b=Od(O(),this.tb);return Db(a,b)};function Pz(){}Pz.prototype=new u;Pz.prototype.constructor=Pz;Pz.prototype.a=function(){return this};Pz.prototype.NL=function(a,b,c,e){a=Yma().NL(a,b,c,e);b=cj().We;return eb(a,b,"query")}; +Pz.prototype.$classData=r({kTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.RamlQueryParameterParser$",{kTa:1,f:1});var cna=void 0;function Qz(){}Qz.prototype=new u;Qz.prototype.constructor=Qz;Qz.prototype.a=function(){return this};function dna(a,b,c,e){return(new Rz).Faa(b,c,wz(uz(),e))}Qz.prototype.$classData=r({KTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.TagsParser$",{KTa:1,f:1});var ena=void 0;function fna(){ena||(ena=(new Qz).a());return ena} +function Sz(){this.l=this.xb=this.tb=null}Sz.prototype=new u;Sz.prototype.constructor=Sz;function gna(){}gna.prototype=Sz.prototype; +Sz.prototype.g2=function(){var a=this.xb.P(ka((new Qg).Vb(this.tb.Aa,this.l.Mb()).nf().r)),b=Od(O(),this.tb);a=Db(a,b);b=this.tb.i;var c=qc();b=N(b,c,this.l.Mb());c=ac((new M).W(b),"operationId");if(!c.b()){var e=c.c(),f=e.i.t();if(!this.l.Mb().Jna.iz(f)){c=this.l.Mb();var g=sg().A5,h=a.j;f="Duplicated operation id '"+f+"'";e=e.i;var k=y();ec(c,g,h,k,f,e.da)}}c=(new M).W(b);g=this.l;h=Pl().R;Gg(c,"operationId",Hg(Ig(g,h,this.l.Mb()),a));c=(new M).W(b);g=this.l;h=Pl().Va;Gg(c,"description",Hg(Ig(g, +h,this.l.Mb()),a));c=(new M).W(b);g=this.l;h=Pl().uh;Gg(c,"deprecated",Hg(Ig(g,h,this.l.Mb()),a));c=(new M).W(b);g=this.l;h=Pl().ck;Gg(c,"summary",Hg(Ig(g,h,this.l.Mb()),a));c=(new M).W(b);g=this.l;h=Pl().Sf;Gg(c,"externalDocs",Gy(Hg(Ig(g,h,this.l.Mb()),a),w(function(l,m){return function(p){return jma(kma(),p,m.j,l.l.Mb())}}(this,a))));c=ac((new M).W(b),"tags");c.b()||(c=c.c(),g=c.i,h=tw(),h=hna(new Tz,N(g,h,this.l.Mb()),a.j,this.l.Mb()).Vg(),g=Pl().Xm,h=Zr(new $r,h,Od(O(),c.i)),c=Od(O(),c),Rg(a, +g,h,c));c=(new M).W(b);g=jx((new je).e("is"));c=ac(c,g);c.b()||(c=c.c(),g=c.i,h=lc(),g=N(g,h,this.l.Mb()),h=w(function(l,m){return function(p){return ina(jna(new Uz,p,w(function(t,v){return function(A){return kda(v,A)}}(l,m)),Uc(function(t,v){return function(A,D){return kna(t.l.Mb().Qh,v,A,D)}}(l,p)),l.l.Mb()))}}(this,a)),f=K(),g=g.ka(h,f.u),g.Da()&&(h=nc().Ni(),c=Od(O(),c),bs(a,h,g,c)));c=ac((new M).W(b),"security");c.b()||(c=c.c(),g=(new Nd).a(),h=c.i,f=lc(),h=N(h,f,this.l.Mb()),g=w(function(l, +m,p){return function(t){return lna(new Vz,t,w(function(v,A){return function(D){return A.mI(D)}}(l,m)),p,l.l.Mb()).Cc()}}(this,a,g)),f=K(),g=h.ka(g,f.u),h=new mna,f=K(),h=g.ec(h,f.u),g=Pl().dc,h=Zr(new $r,h,Od(O(),c.i)),c=Od(O(),c),Rg(a,g,h,c));c=this.l.Mb().Nl;g=nna();if(null!==c&&c===g&&(c=(new Wz).gE(this.l,b,w(function(l,m){return function(p){ona(m,p)}}(this,a)),this.l.Mb()).Cc(),!c.b())){g=c.c();c=Pl().dB;ii();g=[g];h=-1+(g.length|0)|0;for(f=H();0<=h;)f=ji(g[h],f),h=-1+h|0;g=f;h=(O(),(new P).a()).Lb((new Xz).a()); +(new z).d(bs(a,c,g,h))}c=ac((new M).W(b),"responses");c.b()||(c=c.c(),g=J(Ef(),H()),h=c.i,f=qc(),N(h,f,this.l.Mb()).sb.Cb(w(function(l){return function(m){var p=Px();m=m.Aa;var t=bc();return!Nla(p,N(m,t,l.l.Mb()).va)}}(this))).U(w(function(l,m,p){return function(t){var v=(new Qg).Vb(t.Aa,l.l.Mb()).Zf(),A=t.i,D=qc();return Dg(m,(new Yz).Hw(N(A,D,l.l.Mb()),w(function(C,I,L,Y){return function(ia){var pa=Dm().R;pa=Vd(ia,pa,I);var La=L.j;J(K(),H());pa=Ai(pa,La);La=B(ia.g,Dm().R).A;La=La.b()?null:La.c(); +var ob=Dm().In;eb(pa,ob,La);ia.x.Sp(Od(O(),Y))}}(l,v,p,t)),l.l.Mb()).EH())}}(this,g,a))),h=Pl().Al,g=Zr(new $r,g,Od(O(),c.i)),c=Od(O(),c),Rg(a,h,g,c));pna(Ry(new Sy,a,b,H(),this.l.Mb()),"responses");Ry(new Sy,a,b,H(),this.l.Mb()).hd();Zz(this.l.Mb(),a.j,b,"operation");this.$na(a,b);return a};Sz.prototype.JO=function(a,b,c){this.tb=b;this.xb=c;if(null===a)throw mb(E(),null);this.l=a;return this};function $z(){}$z.prototype=new u;$z.prototype.constructor=$z;$z.prototype.a=function(){return this}; +function qna(a){"OAuth 2.0"===a?(rna||(rna=(new aA).a()),a=rna):"Basic Authentication"===a?(sna||(sna=(new bA).a()),a=sna):"Api Key"===a?(tna||(tna=(new cA).a()),a=tna):"http"===a?(una||(una=(new dA).a()),a=una):"openIdConnect"===a?(vna||(vna=(new eA).a()),a=vna):a=(new fA).UO(a,!1);return a}$z.prototype.$classData=r({VUa:0},!1,"amf.plugins.document.webapi.parser.spec.oas.OasSecuritySchemeTypeMapping$",{VUa:1,f:1});var wna=void 0;function gA(){}gA.prototype=new u;gA.prototype.constructor=gA; +gA.prototype.a=function(){return this};function xna(a){return a instanceof Jx?a:rla(tla(),a)}function tz(a,b){return(new hA).il(b.qh,b.Df,b,(new z).d(xna(b.Dl())),(new z).d(b.lj),b.Hp(),iA().ho)}function yna(a,b){return(new jA).Wx(b.qh,b.Df,b,(new z).d(zna(0,b.Dl())),(new z).d(b.lj),b.Hp())} +function zna(a,b){b instanceof kA||(qla||(qla=(new Hx).a()),a=Ana(new kA,Rb(Gb().ab,H()),b.bG(),b.wG(),b.xB()),a.iA=b.iA,a.Sz=b.Sz,a.Oo=b.Oo,a.Fz=b.Fz,a.Ko=b.Ko,a.Cs=b.Cs,a.Es=b.Es,a.Ro=b.Ro,a.Pp=b.Pp,a.Np=b.Np,b=a);return b}function wz(a,b){a=b.Gg();return Xq().Cp===a?(new lA).Wx(b.qh,b.Df,b,(new z).d(zna(0,b.Dl())),(new z).d(b.lj),b.Hp()):(new mA).Wx(b.qh,b.Df,b,(new z).d(zna(0,b.Dl())),(new z).d(b.lj),b.Hp())} +function Bna(a,b,c){return(new jA).Wx(a,b,c,(new z).d(zna(0,c.Dl())),(new z).d(c.lj),c.Hp())}gA.prototype.$classData=r({oVa:0},!1,"amf.plugins.document.webapi.parser.spec.package$",{oVa:1,f:1});var Cna=void 0;function uz(){Cna||(Cna=(new gA).a());return Cna}function nA(){this.lda=this.gca=this.Qba=this.T1=this.S1=null}nA.prototype=new u;nA.prototype.constructor=nA; +nA.prototype.a=function(){this.S1="#/definitions/";this.T1="#/components/schemas/";this.Qba="#/components/";this.gca="#/parameters/";this.lda="#/responses/";return this};function Dna(a,b,c){c=c.Gg();var e=Xq().Cp;if(c===e)return oA(a,b,"responses");b=(new qg).e(b);return Wp(b,a.lda)}function Ena(a,b,c){return c.zf instanceof pA?qA(a,b,"parameters"):""+a.gca+b}function qA(a,b,c){return""+a.Qba+c+"/"+b} +function Fna(a,b,c){if(c instanceof z&&(c=c.i,Xq().Cp===c))return c=a.T1,0<=(b.length|0)&&b.substring(0,c.length|0)===c?b:""+a.T1+b;c=a.S1;return 0<=(b.length|0)&&b.substring(0,c.length|0)===c?b:""+a.S1+b}function oA(a,b,c){b=(new qg).e(b);return Wp(b,""+a.Qba+c+"/")}nA.prototype.$classData=r({pVa:0},!1,"amf.plugins.document.webapi.parser.spec.package$OasDefinitions$",{pVa:1,f:1});var Gna=void 0;function rA(){Gna||(Gna=(new nA).a());return Gna}function sA(){this.N=this.vg=null}sA.prototype=new u; +sA.prototype.constructor=sA;function Hna(a,b,c){a.vg=b;a.N=c;return a} +sA.prototype.fK=function(){var a=tA(uA(),Ob(),this.vg.qe().fa()),b=this.vg;if(b instanceof vl){var c=new vA;c.jv=b;c.p=a;if(null===this)throw mb(E(),null);c.l=this;c.Xg=Ska();var e=c}else if(b instanceof ql){c=new wA;c.hs=b;c.p=a;if(null===this)throw mb(E(),null);c.l=this;c.Xg=Tka();e=c}else if(b instanceof xl){c=new xA;c.Kd=b;c.p=a;if(null===this)throw mb(E(),null);c.l=this;c.Xg=tx();e=c}else if(b instanceof zl){c=this.N.Bc;var f=new yA;f.vg=b;f.p=a;f.Bc=c;if(null===this)throw mb(E(),null);f.l=this; +f.Xg=Uka();e=f}else if(b instanceof Dl){c=this.N.Bc;f=new zA;f.vg=b;f.p=a;f.Bc=c;if(null===this)throw mb(E(),null);f.l=this;f.Xg=Vka();e=f}else if(b instanceof ol){c=new MA;c.Ri=b;c.p=a;if(null===this)throw mb(E(),null);c.l=this;c.Xg=Wka();e=c}else{if(!(b instanceof Bl))throw(new Lu).e("Unsupported fragment type: "+this.vg);c=new NA;c.Qf=b;c.p=a;if(null===this)throw mb(E(),null);c.l=this;c.Xg=Xka();e=c}b=hd(this.vg.Y(),Bq().ae);if(b.b())var g=y();else b=b.c(),g=(new z).d($g(new ah,"usage",b,y())); +b=J(K(),(new Ib).ha([Ina(this.vg,a)]));c=OA();f=(new PA).e(c.pi);var h=(new qg).e(c.mi);tc(h)&&QA(f,c.mi);QA(f,e.Xg.Id);h=f.s;var k=f.ca,l=(new rr).e(k),m=wr();e=e.jK(ar(this.vg.Y(),Gk().xc));g=g.ua();var p=K();e=e.ia(g,p.u);g=K();jr(m,a.zb(e.ia(b,g.u)),l);pr(h,mr(T(),tr(ur(),l.s,k),Q().sa));return(new RA).Ac(SA(zs(),c.pi),f.s)};sA.prototype.$classData=r({IVa:0},!1,"amf.plugins.document.webapi.parser.spec.raml.RamlFragmentEmitter",{IVa:1,f:1});function TA(){this.N=null}TA.prototype=new u; +TA.prototype.constructor=TA;function Jna(){}Jna.prototype=TA.prototype;TA.prototype.DO=function(a,b,c){this.N=c;return this}; +function Kna(a){var b=["title","content"];if(0===(b.length|0))b=vd();else{for(var c=wd(new xd,vd()),e=0,f=b.length|0;e>24&&0===(1&a.xa)<<24>>24&&(a.wc=ba.JSON.parse('{"schemaId":"auto", "unknownFormats": "ignore", "allErrors": true, "validateSchema": false, "multipleOfPrecision": 6}'),a.xa=(1|a.xa)<<24>>24);return a.wc}function hpa(){if(void 0===ba.Ajv)throw mb(E(),(new nb).e("Cannot find global Ajv object"));return ba.Ajv}tC.prototype.t$=function(){var a=(new (hpa())(0===(2&this.xa)<<24>>24?ipa(this):this.s$)).addMetaSchema(jpa());return kpa(a)}; +function kpa(a){return a.addFormat("RFC2616","^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([0-9]{4}) ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60) (GMT)$").addFormat("rfc2616","^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([0-9]{4}) ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60) (GMT)$").addFormat("date-time-only","^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?$").addFormat("date", +"^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$")}function ipa(a){0===(2&a.xa)<<24>>24&&(a.s$=ba.JSON.parse('{"schemaId":"auto", "unknownFormats": "ignore", "allErrors": false, "validateSchema": false, "multipleOfPrecision": 6}'),a.xa=(2|a.xa)<<24>>24);return a.s$}tC.prototype.$classData=r({YXa:0},!1,"amf.plugins.document.webapi.validation.remote.AjvValidator$",{YXa:1,f:1});var lpa=void 0;function mpa(){lpa||(lpa=(new tC).a());return lpa}function uC(){this.Id=this.gh=null;this.xa=!1} +uC.prototype=new u;uC.prototype.constructor=uC; +uC.prototype.a=function(){this.Id='{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string","format":"uri"},"$schema":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}';return this}; +function jpa(){npa||(npa=(new uC).a());var a=npa;a.xa||a.xa||(a.gh=ba.JSON.parse(a.Id),a.xa=!0);return a.gh}uC.prototype.$classData=r({$Xa:0},!1,"amf.plugins.document.webapi.validation.remote.Draft4MetaSchema$",{$Xa:1,f:1});var npa=void 0;function vC(){this.Gka=this.uo=null;this.xa=0}vC.prototype=new u;vC.prototype.constructor=vC;vC.prototype.a=function(){return this};vC.prototype.t$=function(){0===(2&this.xa)<<24>>24&&0===(2&this.xa)<<24>>24&&(this.Gka=mpa().t$(),this.xa=(2|this.xa)<<24>>24);return this.Gka}; +vC.prototype.$classData=r({dYa:0},!1,"amf.plugins.document.webapi.validation.remote.LazyAjv$",{dYa:1,f:1});var opa=void 0;function ppa(){opa||(opa=(new vC).a());return opa}function qpa(a,b){return aq(new bq,!b.Od(w(function(){return function(c){return c.zm===Yb().qb}}(a))),"http://test.com/payload#validations",a.RV,b)}function wC(){}wC.prototype=new u;wC.prototype.constructor=wC;wC.prototype.a=function(){return this}; +function rpa(a,b){return b instanceof Vh?B(b.aa,xn().Le).Od(w(function(){return function(c){return spa(tpa(),c)}}(a))):!1}function spa(a,b){if(b instanceof Mh){a=B(b.aa,Fg().af).A;if(a.b())return!1;a=a.c();b=Uh().zj;return a===b}return!1}wC.prototype.$classData=r({fYa:0},!1,"amf.plugins.document.webapi.validation.remote.ScalarPayloadForParam$",{fYa:1,f:1});var upa=void 0;function tpa(){upa||(upa=(new wC).a());return upa} +function xC(){this.$ca=this.TW=this.cp=this.eca=this.nL=this.H9=this.Xda=this.Qf=this.Aea=this.kda=this.Kd=this.pa=this.le=this.jk=this.lp=this.Kl=this.hu=this.jv=this.Uea=null}xC.prototype=new u;xC.prototype.constructor=xC; +xC.prototype.a=function(){vpa=this;var a=F().Ta;this.Uea=ic(G(a,"WebAPI"));a=F().Ta;this.jv=ic(G(a,"DocumentationItem"));a=F().Ta;this.hu=ic(G(a,"EndPoint"));a=F().Ta;this.Kl=ic(G(a,"Operation"));a=F().Ta;this.lp=ic(G(a,"Response"));a=F().Ta;this.jk=ic(G(a,"Request"));a=F().Ta;this.le=ic(G(a,"Payload"));a=F().Ua;this.pa=ic(G(a,"Shape"));a=F().Ta;this.Kd=ic(G(a,"Example"));a=F().Ta;this.kda=ic(G(a,"ResourceType"));a=F().Ta;this.Aea=ic(G(a,"Trait"));a=F().Ta;this.Qf=ic(G(a,"SecurityScheme"));a=F().Ta; +this.Xda=ic(G(a,"SecuritySettings"));a=F().Zd;this.H9=ic(G(a,"CustomDomainProperty"));a=F().Zd;this.nL=ic(G(a,"Module"));a=F().Zd;this.eca=ic(G(a,"AbstractDocument"));a=F().Zd;this.cp=ic(G(a,"PartialDocument"));a=(new R).M(this.Uea,"API");var b=(new R).M(this.jv,"DocumentationItem"),c=(new R).M(this.hu,"Resource"),e=(new R).M(this.Kl,"Method"),f=(new R).M(this.lp,"Response"),g=(new R).M(this.jk,"RequestBody"),h=(new R).M(this.le,"ResponseBody"),k=(new R).M(this.pa,"TypeDeclaration"),l=(new R).M(this.Kd, +"Example"),m=(new R).M(this.kda,"ResourceType"),p=(new R).M(this.Aea,"Trait"),t=(new R).M(this.Qf,"SecurityScheme"),v=(new R).M(this.Xda,"SecuritySchemeSettings"),A=(new R).M(this.H9,"AnnotationType"),D=(new R).M(this.nL,"Library"),C=(new R).M(this.eca,"Overlay");a=[a,b,c,e,f,g,h,k,l,m,p,t,v,A,D,C,(new R).M(this.cp,"Extension")];b=UA(new VA,nu());c=0;for(e=a.length|0;cc.w)throw(new U).e("0");L=g.length|0; +p=c.w+L|0;uD(c,p);Ba(c.L,0,c.L,L,c.w);L=c.L;var ia=L.n.length,pa=Y=0,La=g.length|0;ia=Laf.w)throw(new U).e("0"); +pa=t.length|0;ia=f.w+pa|0;uD(f,ia);Ba(f.L,0,f.L,pa,f.w);pa=f.L;var La=pa.n.length,ob=0,zb=0,Zb=t.length|0;La=Zb=FD(rd,zd.ja,10)||DD(e,f,h,g.j);break a}}}if(ob){var sd= +zb.i;if(null!==sd&&sd.Ag instanceof jh){var le=h.kl.c(),Vc=(new qg).e(le);1>=FD(ED(),Vc.ja,10)||DD(e,f,h,g.j);break a}}if(ob){var Sc=zb.i;if(null!==Sc&&lb(Sc.Ag)){var Qc=h.kl.c(),$c=(new qg).e(Qc);1>=FD(ED(),$c.ja,10)||DD(e,f,h,g.j);break a}}h.kl.Ha("0")||DD(e,f,h,g.j);void 0}}if(h.gq instanceof z){var Wc=CD(h.Jj,g);if(Wc instanceof z){var Qe=Wc.i;if(null!==Qe){var Qd=Qe.Ih;if(Qe.Ag instanceof jh&&Qd instanceof z){var me=Qd.i;if(sp(me)){var of=h.gq.c(),Le=(new qg).e(of);FD(ED(),Le.ja,10)>(me.length| +0)||DD(e,f,h,g.j)}}}}}if(h.Lp instanceof z){var Ve=!1,he=null,Wf=CD(h.Jj,g);a:{if(Wf instanceof z){Ve=!0;he=Wf;var vf=he.i;if(null!==vf){var He=vf.Ih;if(vf.Ag instanceof jh&&He instanceof z){var Ff=He.i;if(sp(Ff)){var wf=h.Lp.c(),Re=(new qg).e(wf);FD(ED(),Re.ja,10)<=(Ff.length|0)||DD(e,f,h,g.j);break a}}}}if(Ve){var we=he.i;if(null!==we){var ne=we.Ih;if(we.Ag instanceof jh&&ne instanceof z){var Me=ne.i;if(Vb().Ia(Me).b()){var Se=h.Lp.c(),xf=(new qg).e(Se);0>=FD(ED(),xf.ja,10)||DD(e,f,h,g.j)}}}}}}var ie= +h.hn;if(!H().h(ie)){K();var gf=(new z).d(ie);if(null!==gf.i&&0===gf.i.Oe(1))era(e,f,h,g);else if(ie instanceof fra)era(e,f,h,g);else throw(new x).d(ie);}if(h.yk instanceof z){var pf=!1,hf=null,Gf=CD(h.Jj,g);a:{if(Gf instanceof z){pf=!0;hf=Gf;var yf=hf.i;if(null!==yf){var oe=yf.Ih;if(yf.Ag instanceof jh&&oe instanceof z){var lg=oe.i;if(lg instanceof qa){var bh=Da(lg),Qh=bh.od,af=bh.Ud;if(-1!==(h.yk.c().indexOf(".")|0)){var Pf=h.yk.c(),oh=(new qg).e(Pf);Oj(va(),oh.ja)>SD(Ea(),Qh,af)||DD(e,f,h,g.j)}else{var ch= +h.yk.c(),Ie=(new qg).e(ch),ug=TD(UD(),Ie.ja,10),Sg=ug.od,Tg=ug.Ud;(Tg===af?(-2147483648^Sg)>(-2147483648^Qh):Tg>af)||DD(e,f,h,g.j)}break a}}}}if(pf){var zh=hf.i;if(null!==zh){var Rh=zh.Ih;if(zh.Ag instanceof jh&&Rh instanceof z){var vg=Rh.i;if(Ca(vg)){if(-1!==(h.yk.c().indexOf(".")|0)){var dh=h.yk.c(),Jg=(new qg).e(dh);Oj(va(),Jg.ja)>(vg|0)||DD(e,f,h,g.j)}else{var Ah=h.yk.c(),Bh=(new qg).e(Ah);FD(ED(),Bh.ja,10)>(vg|0)||DD(e,f,h,g.j)}break a}}}}if(pf){var cg=hf.i;if(null!==cg){var Qf=cg.Ih;if(cg.Ag instanceof +jh&&Qf instanceof z){var Kg=Qf.i;if(na(Kg)){var Ne=+Kg;if(-1!==(h.yk.c().indexOf(".")|0)){var Xf=h.yk.c(),di=(new qg).e(Xf);Oj(va(),di.ja)>Ne||DD(e,f,h,g.j)}else{var dg=h.yk.c(),Hf=(new qg).e(dg).ja;da(Oj(va(),Hf))>Ne||DD(e,f,h,g.j)}break a}}}}if(pf){var wg=hf.i;if(null!==wg){var Lg=wg.Ih;if(wg.Ag instanceof jh&&Lg instanceof z){var jf=Lg.i;if("number"===typeof jf){var mg=+jf;if(-1!==(h.yk.c().indexOf(".")|0)){var Mg=h.yk.c(),Ng=(new qg).e(Mg);Oj(va(),Ng.ja)>mg||DD(e,f,h,g.j)}else{var eg=h.yk.c(), +Oe=(new qg).e(eg).ja;da(Oj(va(),Oe))>mg||DD(e,f,h,g.j)}}}}}}}if(h.Ak instanceof z){var ng=!1,fg=null,Ug=CD(h.Jj,g);a:{if(Ug instanceof z){ng=!0;fg=Ug;var xg=fg.i;if(null!==xg){var gg=xg.Ih;if(xg.Ag instanceof jh&&gg instanceof z){var fe=gg.i;if(fe instanceof qa){var ge=Da(fe),ph=ge.od,hg=ge.Ud;if(-1!==(h.Ak.c().indexOf(".")|0)){var Jh=h.Ak.c(),fj=(new qg).e(Jh);Oj(va(),fj.ja)=SD(Ea(),ti,Og)||DD(e,f,h,g.j)}else{var zf=h.zk.c(),Sf=(new qg).e(zf),eh=TD(UD(),Sf.ja,10),Fh=eh.od,fi=eh.Ud;(fi===Og?(-2147483648^Fh)>=(-2147483648^ti):fi>Og)||DD(e,f,h,g.j)}break a}}}}if(gk){var hn=$k.i;if(null!== +hn){var mm=hn.Ih;if(hn.Ag instanceof jh&&mm instanceof z){var nm=mm.i;if(Ca(nm)){if(-1!==(h.zk.c().indexOf(".")|0)){var kd=h.zk.c(),Pi=(new qg).e(kd);Oj(va(),Pi.ja)>=(nm|0)||DD(e,f,h,g.j)}else{var sh=h.zk.c(),Pg=(new qg).e(sh);FD(ED(),Pg.ja,10)>=(nm|0)||DD(e,f,h,g.j)}break a}}}}if(gk){var Xc=$k.i;if(null!==Xc){var xe=Xc.Ih;if(Xc.Ag instanceof jh&&xe instanceof z){var Nc=xe.i;if(na(Nc)){var om=+Nc;if(-1!==(h.zk.c().indexOf(".")|0)){var Dn=h.zk.c(),gi=(new qg).e(Dn);Oj(va(),gi.ja)>=om||DD(e,f,h,g.j)}else{var Te= +h.zk.c(),pm=(new qg).e(Te).ja;da(Oj(va(),pm))>=om||DD(e,f,h,g.j)}break a}}}}if(gk){var jn=$k.i;if(null!==jn){var Oq=jn.Ih;if(jn.Ag instanceof jh&&Oq instanceof z){var En=Oq.i;if("number"===typeof En){var $n=+En;if(-1!==(h.zk.c().indexOf(".")|0)){var Rp=h.zk.c(),ao=(new qg).e(Rp);Oj(va(),ao.ja)>=$n||DD(e,f,h,g.j)}else{var Xt=h.zk.c(),Fs=(new qg).e(Xt).ja;da(Oj(va(),Fs))>=$n||DD(e,f,h,g.j)}}}}}}}if(h.Bk instanceof z){var Sp=!1,bo=null,Gs=CD(h.Jj,g);a:{if(Gs instanceof z){Sp=!0;bo=Gs;var Fn=bo.i;if(null!== +Fn){var Pq=Fn.Ih;if(Fn.Ag instanceof jh&&Pq instanceof z){var Jr=Pq.i;if(Jr instanceof qa){var Hs=Da(Jr),Is=Hs.od,Kr=Hs.Ud;if(-1!==(h.Bk.c().indexOf(".")|0)){var Js=h.Bk.c(),Ks=(new qg).e(Js);Oj(va(),Ks.ja)<=SD(Ea(),Is,Kr)||DD(e,f,h,g.j)}else{var ov=h.Bk.c(),pv=(new qg).e(ov),Ls=TD(UD(),pv.ja,10),qv=Ls.od,rv=Ls.Ud;(rv===Kr?(-2147483648^qv)<=(-2147483648^Is):rvA.w)throw(new U).e("0");var C=D.length|0,I=A.w+C|0;uD(A,I);Ba(A.L,0,A.L,C,A.w);for(var L=A.L,Y=L.n.length,ia=0,pa=0,La=D.length|0,ob=LaSe.w)throw(new U).e("0");var ie=xf.length| +0,gf=Se.w+ie|0;uD(Se,gf);Ba(Se.L,0,Se.L,ie,Se.w);for(var pf=Se.L,hf=pf.n.length,Gf=0,yf=0,oe=xf.length|0,lg=oeIe.w)throw(new U).e("0");var Sg=ug.length|0,Tg=Ie.w+Sg|0;uD(Ie,Tg);Ba(Ie.L,0,Ie.L,Sg,Ie.w);for(var zh=Ie.L,Rh=zh.n.length,vg=0, +dh=0,Jg=ug.length|0,Ah=JgNc.w)throw(new U).e("0");var jn=pm.length|0,Oq=Nc.w+jn|0;uD(Nc,Oq);Ba(Nc.L,0,Nc.L,jn,Nc.w);jn=Nc.L;var En=jn.n.length,$n=0,Rp=0,ao=pm.length|0;En=aoOe.w)throw(new U).e("0");var fg=ng.length|0,Ug=Oe.w+fg|0;uD(Oe, +Ug);Ba(Oe.L,0,Oe.L,fg,Oe.w);for(var xg=Oe.L,gg=xg.n.length,fe=0,ge=0,ph=ng.length|0,hg=phyg.w)throw(new U).e("0");var og=qh.length|0,rh=yg.w+og|0;uD(yg,rh);Ba(yg.L,0,yg.L,og,yg.w);for(var Ch=yg.L,Vg=Ch.n.length,Wg=0,Rf=0,Sh=qh.length|0,zg=Shri.w)throw(new U).e("0");var $k=gk.length|0,lm=ri.w+$k|0;uD(ri,lm); +Ba(ri.L,0,ri.L,$k,ri.w);for(var si=ri.L,bf=si.n.length,ei=0,vj=0,ti=gk.length|0,Og=tizf.w)throw(new U).e("0");var eh=Sf.length|0,Fh=zf.w+eh|0;uD(zf,Fh);Ba(zf.L,0,zf.L,eh,zf.w);for(var fi=zf.L,hn=fi.n.length,mm=0,nm=0,kd=Sf.length|0,Pi=kdLa.w)throw(new U).e("0");var zb=ob.length|0,Zb=La.w+zb| +0;uD(La,Zb);Ba(La.L,0,La.L,zb,La.w);for(var Cc=La.L,vc=Cc.n.length,id=0,yd=0,zd=ob.length|0,rd=zdLe.w)throw(new U).e("0");var he=Ve.length|0,Wf=Le.w+he|0;uD(Le,Wf);Ba(Le.L,0,Le.L,he,Le.w);for(var vf=Le.L,He=vf.n.length,Ff=0,wf=0,Re=Ve.length|0,we=Relg.w)throw(new U).e("0");var Qh=bh.length|0,af=lg.w+Qh|0;uD(lg,af);Ba(lg.L,0,lg.L,Qh,lg.w);for(var Pf=lg.L,oh=Pf.n.length,ch=0,Ie=0,ug=bh.length|0,Sg=ugcg.w)throw(new U).e("0");var Kg=Qf.length|0,Ne=cg.w+Kg|0;uD(cg,Ne);Ba(cg.L,0,cg.L,Kg,cg.w);for(var Xf=cg.L,di=Xf.n.length,dg=0,Hf=0,wg=Qf.length|0,Lg=wgfe.w)throw(new U).e("0");var ph=ge.length|0,hg=fe.w+ph|0;uD(fe,hg);Ba(fe.L,0,fe.L,ph,fe.w);for(var Jh=fe.L,fj=Jh.n.length,yg=0,qh=0,og=ge.length|0,rh=ogMi.w)throw(new U).e("0");var Ni=uj.length|0,fk=Mi.w+Ni|0;uD(Mi,fk);Ba(Mi.L,0,Mi.L,Ni,Mi.w);for(var Ck=Mi.L,Dk=Ck.n.length,hj=0,ri=0,gk=uj.length|0,$k=gkbf.w)throw(new U).e("0");var vj=ei.length|0,ti=bf.w+vj|0;uD(bf,ti);Ba(bf.L,0,bf.L,vj,bf.w);for(var Og=bf.L,Oi=Og.n.length,pg=0,zf=0,Sf=ei.length|0,eh=Sfpm.w)throw(new U).e("0");var Oq=jn.length|0,En=pm.w+Oq|0;uD(pm,En);Ba(pm.L,0,pm.L,Oq,pm.w);for(var $n=pm.L,Rp=$n.n.length,ao=0,Xt=0,Fs=jn.length|0,Sp=FsFn.w)throw(new U).e("0");var Jr=Pq.length|0,Hs=Fn.w+Jr|0;uD(Fn,Hs);Ba(Fn.L,0,Fn.L,Jr,Fn.w);for(var Is=Fn.L,Kr=Is.n.length,Js=0,Ks=0,ov=Pq.length|0,pv=ovdp.w)throw(new U).e("0");var ui=bu.length|0,Os=dp.w+ui|0;uD(dp,Os);Ba(dp.L,0,dp.L,ui,dp.w);for(var Ps=dp.L,cu=Ps.n.length,Qs=0,du=0,vv=bu.length|0,wv=vvRq.w)throw(new U).e("0"); +var Lw=Kw.length|0,eu=Rq.w+Lw|0;uD(Rq,eu);Ba(Rq.L,0,Rq.L,Lw,Rq.w);for(var yv=Rq.L,qy=yv.n.length,zv=0,Mw=0,ry=Kw.length|0,Tp=ryUp.w)throw(new U).e("0"); +var Vp=kn.length|0,sy=Up.w+Vp|0;uD(Up,sy);Ba(Up.L,0,Up.L,Vp,Up.w);for(var BA=Up.L,GD=BA.n.length,Av=0,Tw=0,HD=kn.length|0,ID=HDXg.w)throw(new U).e("0");Mr=ep.length|0;ty=Xg.w+Mr|0;uD(Xg,ty);Ba(Xg.L,0,Xg.L,Mr,Xg.w);Mr=Xg.L;var hu=Mr.n.length,FA=Ts=0,Uw=ep.length|0;hu=UwVs.w)throw(new U).e("0");var KA=JA.length|0,wy=Vs.w+KA|0;uD(Vs,wy);Ba(Vs.L,0,Vs.L,KA,Vs.w);for(var xy=Vs.L,PD=xy.n.length,Bv=0,LA=0,QD=JA.length|0,RD=QDc.w)throw(new U).e("0");e=f.length|0;g=c.w+e|0;uD(c,g);Ba(c.L,0,c.L,e,c.w);e=c.L;var l=e.n.length;k=h=0;var m=f.length|0;l=mc.w)throw(new U).e("0");e=f.length|0;g=c.w+e|0;uD(c,g);Ba(c.L,0,c.L,e,c.w);e=c.L;l=e.n.length;k=h=0;m=f.length|0;l=mc.w)throw(new U).e("0");e=f.length|0;g=c.w+e|0;uD(c,g);Ba(c.L,0,c.L,e,c.w);e=c.L;l=e.n.length;k=h=0;m=f.length|0;l=mc.w)throw(new U).e("0");e=f.length|0;g=c.w+e|0;uD(c,g);Ba(c.L,0,c.L,e,c.w);e=c.L;l=e.n.length; +k=h=0;m=f.length|0;l=me.w)throw(new U).e("0");g=a.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=a.length|0;k=msd.w)throw(new U).e("0");var Vc=le.length|0,Sc=sd.w+Vc|0;uD(sd,Sc);Ba(sd.L,0,sd.L,Vc,sd.w);for(var Qc=sd.L,$c=Qc.n.length,Wc=0,Qe=0,Qd=le.length|0,me=Qd<$c?Qd:$c,of=Qc.n.length,Le=mene.w)throw(new U).e("0");var Se=Me.length|0,xf=ne.w+Se|0;uD(ne,xf);Ba(ne.L,0,ne.L,Se,ne.w);for(var ie=ne.L,gf=ie.n.length,pf=0,hf=0,Gf=Me.length|0,yf=Gfaf.w)throw(new U).e("0");var oh=Pf.length|0,ch=af.w+oh|0;uD(af,ch);Ba(af.L,0,af.L, +oh,af.w);for(var Ie=af.L,ug=Ie.n.length,Sg=0,Tg=0,zh=Pf.length|0,Rh=zhJg.w)throw(new U).e("0");var Bh=Ah.length|0,cg=Jg.w+Bh|0;uD(Jg,cg);Ba(Jg.L,0,Jg.L,Bh,Jg.w);for(var Qf=Jg.L,Kg=Qf.n.length,Ne=0,Xf=0,di=Ah.length|0,dg=dieg.w)throw(new U).e("0");var ng=Oe.length|0,fg=eg.w+ng|0;uD(eg,fg);Ba(eg.L,0,eg.L,ng,eg.w);for(var Ug=eg.L,xg=Ug.n.length,gg=0,fe=0,ge=Oe.length|0,ph=gerh.w)throw(new U).e("0");var Vg=Ch.length|0,Wg=rh.w+Vg|0;uD(rh,Wg);Ba(rh.L,0,rh.L,Vg,rh.w);for(var Rf=rh.L,Sh=Rf.n.length,zg=0,Ji=0,Kh=Ch.length|0,Lh=KhI.w)throw(new U).e("0");var Y=L.length|0,ia=I.w+Y|0;uD(I,ia);Ba(I.L,0,I.L,Y,I.w); +for(var pa=I.L,La=pa.n.length,ob=0,zb=0,Zb=L.length|0,Cc=ZbVc.w)throw(new U).e("0");var Qc=Sc.length|0,$c=Vc.w+Qc|0;uD(Vc,$c);Ba(Vc.L,0,Vc.L,Qc,Vc.w);for(var Wc=Vc.L,Qe=Wc.n.length,Qd=0,me=0, +of=Sc.length|0,Le=ofwe.w)throw(new U).e("0");var Me=ne.length|0,Se=we.w+Me|0;uD(we,Se);Ba(we.L,0,we.L,Me,we.w);for(var xf= +we.L,ie=xf.n.length,gf=0,pf=0,hf=ne.length|0,Gf=hfPf.w)throw(new U).e("0");var ch=oh.length|0,Ie=Pf.w+ch|0;uD(Pf,Ie);Ba(Pf.L,0,Pf.L,ch,Pf.w);for(var ug=Pf.L,Sg=ug.n.length,Tg=0,zh=0,Rh=oh.length|0,vg=RhNg.w)throw(new U).e("0");var Oe=eg.length|0,ng=Ng.w+Oe|0;uD(Ng,ng);Ba(Ng.L,0,Ng.L,Oe,Ng.w);for(var fg=Ng.L,Ug=fg.n.length,xg=0,gg=0,fe=eg.length| +0,ge=feRf.w)throw(new U).e("0");var zg=Sh.length|0,Ji=Rf.w+zg|0;uD(Rf,Ji);Ba(Rf.L,0,Rf.L,zg,Rf.w);for(var Kh=Rf.L,Lh=Kh.n.length,Ki=0,gj=0,Rl=Sh.length|0,ek=RlLi.w)throw(new U).e("0");var uj=Mi.length|0,Ni=Li.w+uj|0;uD(Li,Ni);Ba(Li.L,0,Li.L,uj,Li.w);for(var fk=Li.L,Ck=fk.n.length,Dk=0,hj=0,ri=Mi.length|0,gk=riei.w)throw(new U).e("0");var ti=vj.length|0,Og=ei.w+ti|0;uD(ei,Og);Ba(ei.L,0,ei.L,ti,ei.w);for(var Oi=ei.L,pg=Oi.n.length,zf=0,Sf=0,eh=vj.length|0,Fh=ehC&&I.P(y()),(new z).d(void 0)))}}(this))),e=(new R).M("minMaxItemsValidation",Uc(function(){return function(C, +I){var L=cs(C.Y(),uh().Bq);L.b()||(L=L.c(),C=cs(C.Y(),uh().pr),C.b()||(C=C.c(),L=L.t(),L=(new qg).e(L),L=Oj(va(),L.ja),C=C.t(),C=(new qg).e(C),C=Oj(va(),C.ja),L>C&&I.P(y()),(new z).d(void 0)))}}(this))),f=(new R).M("minMaxPropertiesValidation",Uc(function(){return function(C,I){var L=cs(C.Y(),Ih().dw);L.b()||(L=L.c(),C=cs(C.Y(),Ih().cw),C.b()||(C=C.c(),L=L.t(),L=(new qg).e(L),L=Oj(va(),L.ja),C=C.t(),C=(new qg).e(C),C=Oj(va(),C.ja),L>C&&I.P(y()),(new z).d(void 0)))}}(this))),g=(new R).M("minMaxLengthValidation", +Uc(function(){return function(C,I){var L=cs(C.Y(),Fg().Cq);L.b()||(L=L.c(),C=cs(C.Y(),Fg().Aq),C.b()||(C=C.c(),L=(new qg).e(ka(L.r)),L=Oj(va(),L.ja),C=(new qg).e(ka(C.r)),C=Oj(va(),C.ja),L>C&&I.P(y()),(new z).d(void 0)))}}(this))),h=(new R).M("xmlWrappedScalar",Uc(function(C){return function(I,L){if(I instanceof Mh&&(I=cs(I.aa,Ag().Ln),I instanceof z)){I=I.i.Y().vb;var Y=mz();Y=Ua(Y);var ia=Id().u;I=Jd(I,Y,ia).Fb(w(function(){return function(pa){return Ed(ua(),ic(pa.Lc.r),"xmlWrapped")}}(C)));I.b()|| +aj(I.c().r.r)&&L.P(y())}}}(this))),k=(new R).M("xmlNonScalarAttribute",Uc(function(){return function(C,I){var L=C.Y(),Y=Ag().Ln;L=L.vb.Ja(Y);if(L instanceof z){if(L=L.i.r,Rk(L)&&(L=cs(L.Y(),rn().yF),!L.b())){L=aj(L.c());a:{for(C=C.bc().Kb();!C.b();){if("ScalarShape"===C.ga().$){C=!0;break a}C=C.ta()}C=!1}L&&!C&&I.P(y())}}else if(y()!==L)throw(new x).d(L);}}(this))),l=(new R).M("patternValidation",Uc(function(){return function(C,I){C=cs(C.Y(),Fg().zl);if(!C.b()){C=C.c();try{var L=uf(),Y=C.t(),ia=(new Tv).e(Y), +pa=Bx(ua(),ia.td,"\\[\\^\\]","[\\\\S\\\\s]");Hv(L,pa,0)}catch(La){if(null!==Ph(E(),La))I.P(y());else throw La;}}}}(this))),m=(new R).M("nonEmptyListOfProtocols",Uc(function(){return function(C,I){C=C.Y();var L=Qm().Gh;C=C.vb.Ja(L);C.b()?C=y():(C=C.c(),C=(new z).d(C.r));C.b()||(C=C.c(),C instanceof $r&&C.wb.b()&&I.P((new z).d((new R).M((O(),(new P).a()),Qm().Gh))))}}(this))),p=(new R).M("exampleMutuallyExclusiveFields",Uc(function(){return function(C,I){var L=C.Y(),Y=ag().mo;L=L.vb.Ja(Y);L.b()||(L.c(), +C=C.Y(),L=ag().DR,C=C.vb.Ja(L),C.b()||(C.c(),I.P(y()),(new z).d(void 0)))}}(this))),t=(new R).M("requiredOpenIdConnectUrl",Uc(function(){return function(C,I){C=C.Y();var L=Xh().Oh;C=C.vb.Ja(L);C.b()?C=y():(C=C.c(),C=(new z).d(C.r));C.b()||(C=C.c(),C instanceof uE&&(C=C.g,L=vE().Pf,C.vb.Ha(L)||I.P(y())))}}(this))),v=(new R).M("requiredFlowsInOAuth2",Uc(function(){return function(C,I){C=C.Y();var L=Xh().Oh;C=C.vb.Ja(L);C.b()?C=y():(C=C.c(),C=(new z).d(C.r));C.b()||(C=C.c(),C instanceof wE&&(C=C.g,L= +xE().Ap,C.vb.Ha(L)||I.P(y())))}}(this))),A=(new R).M("validCallbackExpression",Uc(function(){return function(C,I){C=C.Y();var L=am().Ky;C=C.vb.Ja(L);C.b()?C=y():(C=C.c(),C=(new z).d(C.r));Ura();C.b()||(C=C.c(),C instanceof jh&&(Vra(),C=C.t(),Dca(C)||I.P((new z).d((new R).M((O(),(new P).a()),am().Ky)))))}}(this))),D=(new R).M("validLinkRequestBody",Uc(function(){return function(C,I){C=C.Y();var L=An().VF;C=C.vb.Ja(L);C.b()?C=y():(C=C.c(),C=(new z).d(C.r));Ura();C.b()||(C=C.c(),C instanceof jh&&(Vra(), +C=C.t(),Dca(C)||I.P((new z).d((new R).M((O(),(new P).a()),An().VF)))))}}(this)));a=[a,b,c,e,f,g,h,k,l,m,p,t,v,A,D,(new R).M("validLinkParameterExpressions",Uc(function(C){return function(I,L){I=cs(I.Y(),An().kD);I.b()||I.c().wb.U(w(function(Y,ia){return function(pa){if(pa instanceof Hn){pa=pa.g;var La=Gn().jD;pa=pa.vb.Ja(La);pa.b()?pa=y():(pa=pa.c(),pa=(new z).d(pa.r));Ura();pa.b()||(pa=pa.c(),pa instanceof jh&&(Vra(),pa=pa.t(),Dca(pa)||ia.P((new z).d((new R).M((O(),(new P).a()),An().kD)))))}}}(C, +L)))}}(this)))];b=UA(new VA,nu());c=0;for(e=a.length|0;c>5;var e=31&c;c=(b.ci+a|0)+(0===e?0:1)|0;var f=ja(Ja(Qa),[c]),g=b.cg;if(0===e)Ba(g,0,f,a,f.n.length-a|0);else{var h=32-e|0;f.n[-1+f.n.length|0]=0;for(var k=-1+f.n.length|0;k>a;){var l=k;f.n[l]=f.n[l]|g.n[-1+(k-a|0)|0]>>>h|0;f.n[-1+k|0]=g.n[-1+(k-a|0)|0]<>5;var e=31&c;if(a>=b.ci)return 0>b.ri?BE().A7:BE().zN;c=b.ci-a|0;for(var f=ja(Ja(Qa),[1+c|0]),g=c,h=b.cg,k=0;k>>e|0|h.n[1+(k+a|0)|0]<>>e|0}if(0>b.ri){for(g=0;gb.ri&&Zra(b)===(-1+b.ci|0)&&(c=-1+c|0);return a=a-ea(c)|0}yE.prototype.$classData=r({B2a:0},!1,"java.math.BitLevel$",{B2a:1,f:1});var $ra=void 0;function CE(){$ra||($ra=(new yE).a());return $ra}function DE(){this.Mfa=this.Sfa=null}DE.prototype=new u;DE.prototype.constructor=DE; +DE.prototype.a=function(){asa=this;this.Sfa=ha(Ja(Qa),[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);this.Mfa=ha(Ja(Qa),[-2147483648,1162261467,1073741824,1220703125,362797056,1977326743,1073741824,387420489,1E9,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,128E7,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729E6,887503681,1073741824,1291467969,1544804416,1838265625,60466176]); +return this}; +function Mj(a,b){a=b.ri;var c=b.ci,e=b.cg;if(0===a)return"0";if(1===c)return b=(+(e.n[0]>>>0)).toString(10),0>a?"-"+b:b;b="";var f=ja(Ja(Qa),[c]);Ba(e,0,f,0,c);do{var g=0;for(e=-1+c|0;0<=e;){var h=g;g=f.n[e];var k=bsa(Ea(),g,h,1E9,0);f.n[e]=k;h=k>>31;var l=65535&k;k=k>>>16|0;var m=ca(51712,l);l=ca(15258,l);var p=ca(51712,k);m=m+((l+p|0)<<16)|0;ca(1E9,h);ca(15258,k);g=g-m|0;e=-1+e|0}e=""+g;for(b="000000000".substring(e.length|0)+e+b;0!==c&&0===f.n[-1+c|0];)c=-1+c|0}while(0!==c);f=0;for(c=b.length| +0;;)if(fa?"-"+b:b}DE.prototype.$classData=r({C2a:0},!1,"java.math.Conversion$",{C2a:1,f:1});var asa=void 0;function Nj(){asa||(asa=(new DE).a());return asa}function EE(){}EE.prototype=new u;EE.prototype.constructor=EE;EE.prototype.a=function(){return this}; +function csa(a,b,c,e){for(var f=ja(Ja(Qa),[b]),g=0,h=0;g(-2147483648^k)?-1:0;var m=h;h=m>>31;m=l+m|0;l=(-2147483648^m)<(-2147483648^l)?1+(k+h|0)|0:k+h|0;f.n[g]=m;h=l;g=1+g|0}for(;g>31,l=c+l|0,c=(-2147483648^l)<(-2147483648^c)?1+e|0:e,f.n[g]=l,h=c,g=1+g|0;return f}function dsa(a,b,c,e){for(a=-1+e|0;0<=a&&b.n[a]===c.n[a];)a=-1+a|0;return 0>a?0:(-2147483648^b.n[a])<(-2147483648^c.n[a])?-1:1} +function esa(a,b,c,e){var f=ja(Ja(Qa),[1+b|0]),g=1,h=a.n[0],k=h+c.n[0]|0;f.n[0]=k;h=(-2147483648^k)<(-2147483648^h)?1:0;if(b>=e){for(;ga?(a=b=c-b|0,c=(-2147483648^b)>(-2147483648^c)?-1:0):(a=c=b-c|0,c=(-2147483648^c)>(-2147483648^b)?-1:0);return GE(e,(new qa).Sc(a,c))}if(a===e)e=f>=g?esa(b.cg,f,c.cg,g):esa(c.cg,g,b.cg,f);else{var h=f!==g?f>g?1:-1:dsa(0,b.cg,c.cg,f);if(0===h)return BE().zN; +1===h?e=csa(b.cg,f,c.cg,g):(c=csa(c.cg,g,b.cg,f),a=e,e=c)}a=zE(a|0,e.n.length,e);AE(a);return a} +function gsa(a,b,c){var e=b.ri;a=c.ri;var f=b.ci,g=c.ci;if(0===a)return b;if(0===e)return 0===c.ri?c:zE(-c.ri|0,c.ci,c.cg);if(2===(f+g|0))return b=b.cg.n[0],f=0,c=c.cg.n[0],g=0,0>e&&(e=b,b=-e|0,f=0!==e?~f:-f|0),0>a&&(a=c,e=g,c=-a|0,g=0!==a?~e:-e|0),a=BE(),e=b,b=f,f=g,c=e-c|0,GE(a,(new qa).Sc(c,(-2147483648^c)>(-2147483648^e)?-1+(b-f|0)|0:b-f|0));var h=f!==g?f>g?1:-1:dsa(HE(),b.cg,c.cg,f);if(e===a&&0===h)return BE().zN;-1===h?(c=e===a?csa(c.cg,g,b.cg,f):esa(c.cg,g,b.cg,f),a=-a|0):e===a?(c=csa(b.cg, +f,c.cg,g),a=e):(c=esa(b.cg,f,c.cg,g),a=e);a=zE(a|0,c.n.length,c);AE(a);return a}EE.prototype.$classData=r({D2a:0},!1,"java.math.Elementary$",{D2a:1,f:1});var hsa=void 0;function HE(){hsa||(hsa=(new EE).a());return hsa}function IE(){this.sR=this.wX=null}IE.prototype=new u;IE.prototype.constructor=IE; +IE.prototype.a=function(){isa=this;jsa(10,10);jsa(14,5);this.wX=ja(Ja(ksa),[32]);this.sR=ja(Ja(ksa),[32]);var a;var b=1;for(var c=a=0;32>c;){var e=c;if(18>=e){JE().sR.n[e]=GE(BE(),(new qa).Sc(b,a));var f=JE().wX,g=BE(),h=b,k=a;f.n[e]=GE(g,(new qa).Sc(0===(32&e)?h<>>1|0)>>>(31-e|0)|0|k<>>16|0;e=ca(5,65535&e);f=ca(5,b);b=e+(f<<16)|0;e=(e>>>16|0)+f|0;a=ca(5,a)+(e>>>16|0)|0}else JE().sR.n[e]=lsa(JE().sR.n[-1+e|0],JE().sR.n[1]),JE().wX.n[e]=lsa(JE().wX.n[-1+e|0],BE().e8); +c=1+c|0}return this};function jsa(a,b){var c=[];if(0b.ci)var e=c,f=b;else e=b,f=c;var g=e,h=f;if(63>h.ci){var k=g.ci,l=h.ci,m=k+l|0,p=g.ri!==h.ri?-1:1;if(2===m){var t=g.cg.n[0],v=h.cg.n[0],A=65535&t,D=t>>>16|0,C=65535&v,I=v>>>16|0,L=ca(A,C),Y=ca(D,C),ia=ca(A,I),pa=L+((Y+ia|0)<<16)|0,La=(L>>>16|0)+ia|0,ob=(ca(D,I)+(La>>>16|0)|0)+(((65535&La)+Y|0)>>>16|0)|0;var zb=0===ob?(new FE).Sc(p,pa):zE(p,2,ha(Ja(Qa),[pa,ob]))}else{var Zb=g.cg,Cc=h.cg,vc=ja(Ja(Qa),[m]);if(0!==k&&0!==l)if(1===k)vc.n[l]=nsa(0,vc,Cc,l,Zb.n[0]);else if(1=== +l)vc.n[k]=nsa(0,vc,Zb,k,Cc.n[0]);else if(Zb===Cc&&k===l){for(var id,yd=0;yd>>16|0,Qe=65535&Vc,Qd=Vc>>>16|0,me=ca($c,Qe),of=ca(Wc,Qe),Le=ca($c,Qd),Ve=me+((of+Le|0)<<16)|0,he=(me>>>16|0)+Le|0,Wf=(ca(Wc,Qd)+(he>>>16|0)|0)+(((65535&he)+of|0)>>>16|0)|0,vf=Ve+Sc|0,He=(-2147483648^vf)<(-2147483648^Ve)?1+Wf|0:Wf,Ff=vf+Qc|0,wf=(-2147483648^Ff)<(-2147483648^vf)?1+He|0:He;vc.n[zd+ +sd|0]=Ff;id=wf;rd=1+rd|0}vc.n[zd+k|0]=id;yd=1+yd|0}CE();for(var Re=k<<1,we,ne=we=0;ne>>31|0;ne=1+ne|0}0!==we&&(vc.n[Re]=we);for(var xf=id=0,ie=0;xf>>16|0,lg=65535&pf,bh=pf>>>16|0,Qh=ca(yf,lg),af=ca(oe,lg),Pf=ca(yf,bh),oh=Qh+((af+Pf|0)<<16)|0,ch=(Qh>>>16|0)+Pf|0,Ie=(ca(oe,bh)+(ch>>>16|0)|0)+(((65535&ch)+af|0)>>>16|0)|0,ug=oh+hf|0,Sg=(-2147483648^ug)<(-2147483648^oh)?1+Ie|0:Ie,Tg= +ug+Gf|0,zh=(-2147483648^Tg)<(-2147483648^ug)?1+Sg|0:Sg;vc.n[ie]=Tg;ie=1+ie|0;var Rh=zh+vc.n[ie]|0,vg=(-2147483648^Rh)<(-2147483648^zh)?1:0;vc.n[ie]=Rh;id=vg;xf=1+xf|0;ie=1+ie|0}}else for(var dh=0;dh>>16|0,Hf=65535&Kg,wg=Kg>>>16|0,Lg=ca(di,Hf),jf=ca(dg,Hf),mg=ca(di,wg),Mg=Lg+((jf+mg|0)<<16)|0,Ng=(Lg>>>16|0)+mg|0,eg=(ca(dg,wg)+(Ng>>>16|0)|0)+(((65535&Ng)+jf|0)>>>16|0)|0,Oe= +Mg+Ne|0,ng=(-2147483648^Oe)<(-2147483648^Mg)?1+eg|0:eg,fg=Oe+Xf|0,Ug=(-2147483648^fg)<(-2147483648^Oe)?1+ng|0:ng;vc.n[Jg+Qf|0]=fg;Ah=Ug;cg=1+cg|0}vc.n[Jg+l|0]=Ah;dh=1+dh|0}var xg=zE(p,m,vc);AE(xg);zb=xg}return zb}var gg=(-2&g.ci)<<4,fe=osa(g,gg),ge=osa(h,gg),ph=psa(fe,gg),hg=gsa(HE(),g,ph),Jh=psa(ge,gg),fj=gsa(HE(),h,Jh),yg=msa(a,fe,ge),qh=msa(a,hg,fj),og=msa(a,gsa(HE(),fe,hg),gsa(HE(),fj,ge)),rh=og,Ch=yg,Vg=fsa(HE(),rh,Ch);og=fsa(HE(),Vg,qh);og=psa(og,gg);var Wg=yg=psa(yg,gg<<1),Rf=og,Sh=fsa(HE(), +Wg,Rf);return fsa(HE(),Sh,qh)}function nsa(a,b,c,e,f){var g;for(a=g=0;a>>16|0;var m=65535&f,p=f>>>16|0,t=ca(l,m);m=ca(k,m);var v=ca(l,p);l=t+((m+v|0)<<16)|0;t=(t>>>16|0)+v|0;k=(ca(k,p)+(t>>>16|0)|0)+(((65535&t)+m|0)>>>16|0)|0;g=l+g|0;k=(-2147483648^g)<(-2147483648^l)?1+k|0:k;b.n[h]=g;g=k;a=1+a|0}return g}IE.prototype.$classData=r({E2a:0},!1,"java.math.Multiplication$",{E2a:1,f:1});var isa=void 0;function JE(){isa||(isa=(new IE).a());return isa} +function KE(){this.uF=this.ud=this.Ze=this.By=0}KE.prototype=new u;KE.prototype.constructor=KE;function qsa(){}d=qsa.prototype=KE.prototype;d.qg=function(a){if(0>a||a>this.Ze)throw(new Zj).a();this.ud=a;this.uF>a&&(this.uF=-1)};d.t=function(){return Fj(la(this))+"[pos\x3d"+this.ud+" lim\x3d"+this.Ze+" cap\x3d"+this.By+"]"};d.qO=function(){this.uF=-1;this.Ze=this.ud;this.ud=0};d.wja=function(){this.uF=-1;this.ud=0;this.Ze=this.By}; +d.J1=function(a){if(0>a||a>this.By)throw(new Zj).a();this.Ze=a;this.ud>a&&(this.ud=a,this.uF>a&&(this.uF=-1))};d.ue=function(a){this.Ze=this.By=a;this.ud=0;this.uF=-1;return this};function LE(){}LE.prototype=new u;LE.prototype.constructor=LE;LE.prototype.a=function(){return this}; +function rsa(a){ssa||(ssa=(new LE).a());a=ja(Ja(Oa),[a]);var b=a.n.length;tsa||(tsa=(new ME).a());var c=a.n.length;if(0>c||(0+c|0)>a.n.length)throw(new U).a();var e=0+b|0;if(0>b||e>c)throw(new U).a();b=new usa;b.Ss=!1;NE.prototype.V6a.call(b,c,a);KE.prototype.qg.call(b,0);KE.prototype.J1.call(b,e);return b}LE.prototype.$classData=r({K2a:0},!1,"java.nio.ByteBuffer$",{K2a:1,f:1});var ssa=void 0;function OE(){}OE.prototype=new u;OE.prototype.constructor=OE;OE.prototype.a=function(){return this}; +function vsa(a,b,c){wsa||(wsa=(new PE).a());a=wa(b);c=c-0|0;if(0>a||(0+a|0)>wa(b))throw(new U).a();var e=0+c|0;if(0>c||e>a)throw(new U).a();return xsa(a,b,0,0,e)}OE.prototype.$classData=r({M2a:0},!1,"java.nio.CharBuffer$",{M2a:1,f:1});var ysa=void 0;function zsa(){ysa||(ysa=(new OE).a());return ysa}function ME(){}ME.prototype=new u;ME.prototype.constructor=ME;ME.prototype.a=function(){return this};ME.prototype.$classData=r({O2a:0},!1,"java.nio.HeapByteBuffer$",{O2a:1,f:1});var tsa=void 0; +function PE(){}PE.prototype=new u;PE.prototype.constructor=PE;PE.prototype.a=function(){return this};PE.prototype.$classData=r({S2a:0},!1,"java.nio.StringCharBuffer$",{S2a:1,f:1});var wsa=void 0;function QE(){this.KI=this.II=this.JI=null;this.gx=0}QE.prototype=new u;QE.prototype.constructor=QE;function Asa(){}Asa.prototype=QE.prototype; +function Bsa(a,b,c,e){if(4===a.gx||!e&&3===a.gx)throw(new Hj).a();a.gx=e?3:2;for(;;){try{var f=Csa(b,c)}catch(k){if(k instanceof RE)throw Dsa(k);if(k instanceof Lv)throw Dsa(k);throw k;}if(0===f.tu){var g=b.Ze-b.ud|0;if(e&&0g)throw(new Lu).a();KE.prototype.qg.call(b,h+g|0)}else{if(TE().xJ===h)break;if(TE().T5===h){h=b.ud;g=g.iL;if(0>g)throw(new Lu).a();KE.prototype.qg.call(b,h+g|0)}else throw(new x).d(h);}}}QE.prototype.Baa=function(){this.JI="\ufffd";this.II=TE().xJ;this.KI=TE().xJ;this.gx=1};function UE(){this.xfa=0;this.KI=this.II=this.JI=null;this.gx=0}UE.prototype=new u;UE.prototype.constructor=UE;function Gsa(){}Gsa.prototype=UE.prototype; +function Hsa(a){if(0===a.By)return rsa(1);var b=rsa(a.By<<1);KE.prototype.qO.call(a);if(a===b)throw(new Zj).a();if(b.Ss)throw(new VE).a();var c=a.Ze,e=a.ud,f=c-e|0,g=b.ud,h=g+f|0;if(h>b.Ze)throw(new RE).a();b.ud=h;KE.prototype.qg.call(a,c);h=a.bj;if(null!==h)Ba(h,a.Mk+e|0,b.bj,b.Mk+g|0,f);else for(;e!==c;)b.bj.n[b.Mk+g|0]=a.bj.n[a.Mk+e|0]|0,e=1+e|0,g=1+g|0;return b}UE.prototype.Baa=function(a,b){UE.prototype.o7a.call(this,b)}; +UE.prototype.o7a=function(a){var b=ha(Ja(Oa),[63]);this.xfa=a;this.JI=b;this.II=TE().xJ;this.KI=TE().xJ;this.gx=0};function WE(){this.iL=this.tu=0}WE.prototype=new u;WE.prototype.constructor=WE;WE.prototype.Sc=function(a,b){this.tu=a;this.iL=b;return this};function Isa(a){var b=a.tu;switch(b){case 1:throw(new RE).a();case 0:throw(new Lv).a();case 2:throw(new XE).ue(a.iL);case 3:throw(new YE).ue(a.iL);default:throw(new x).d(b);}} +WE.prototype.$classData=r({V2a:0},!1,"java.nio.charset.CoderResult",{V2a:1,f:1});function ZE(){this.Fea=this.cba=this.jL=this.QU=this.us=this.$t=this.bt=null}ZE.prototype=new u;ZE.prototype.constructor=ZE;ZE.prototype.a=function(){Jsa=this;this.bt=(new WE).Sc(1,-1);this.$t=(new WE).Sc(0,-1);this.us=(new WE).Sc(2,1);this.QU=(new WE).Sc(2,2);this.jL=(new WE).Sc(2,3);this.cba=(new WE).Sc(2,4);this.Fea=[];(new WE).Sc(3,1);(new WE).Sc(3,2);(new WE).Sc(3,3);(new WE).Sc(3,4);return this}; +function Esa(a,b){a=a.Fea[b];void 0===a&&(a=(new WE).Sc(2,b),SE().Fea[b]=a);return a}ZE.prototype.$classData=r({W2a:0},!1,"java.nio.charset.CoderResult$",{W2a:1,f:1});var Jsa=void 0;function SE(){Jsa||(Jsa=(new ZE).a());return Jsa}function $E(){this.$=null}$E.prototype=new u;$E.prototype.constructor=$E;$E.prototype.t=function(){return this.$};$E.prototype.e=function(a){this.$=a;return this};$E.prototype.$classData=r({X2a:0},!1,"java.nio.charset.CodingErrorAction",{X2a:1,f:1}); +function aF(){this.xJ=this.wJ=this.T5=null}aF.prototype=new u;aF.prototype.constructor=aF;aF.prototype.a=function(){Ksa=this;this.T5=(new $E).e("IGNORE");this.wJ=(new $E).e("REPLACE");this.xJ=(new $E).e("REPORT");return this};aF.prototype.$classData=r({Y2a:0},!1,"java.nio.charset.CodingErrorAction$",{Y2a:1,f:1});var Ksa=void 0;function TE(){Ksa||(Ksa=(new aF).a());return Ksa}function bF(){}bF.prototype=new u;bF.prototype.constructor=bF;bF.prototype.a=function(){return this}; +function Lsa(a,b,c,e){a=(new Ej).a();try{var f=0;f=0;var g=-1+e|0;if(!(c>=e))for(;;){var h=c;if(h<(b.length|0))var k=Ku(),l=65535&(b.charCodeAt(h)|0),m=Msa(k,l,16);else m=-1;if(-1===m){var p=b.length|0;throw(new nz).M(a,b.substring(h,e=b))throw(new Zj).a();var t=65536<=b&&1114111>=b?ha(Ja(Na),[65535&(-64+(b>>10)|55296),65535&(56320|1023&b)]):ha(Ja(Na),[65535&b]);return Nsa(0,t,0,t.n.length)}catch(v){if(v instanceof nz){t=v; +if(t.Aa===a)return t.Dt();throw t;}throw v;}}bF.prototype.$classData=r({d3a:0},!1,"org.mulesoft.common.core.package$",{d3a:1,f:1});var Osa=void 0;function Psa(){Osa||(Osa=(new bF).a());return Osa}function cF(){}cF.prototype=new u;cF.prototype.constructor=cF;cF.prototype.a=function(){return this};function Qsa(a,b){return(+(b>>>0)).toString(16).toUpperCase()}cF.prototype.$classData=r({e3a:0},!1,"org.mulesoft.common.core.package$Chars$",{e3a:1,f:1});var Rsa=void 0; +function Ssa(){Rsa||(Rsa=(new cF).a());return Rsa}function dF(){}dF.prototype=new u;dF.prototype.constructor=dF;dF.prototype.a=function(){return this};function Tsa(a,b){if(null===b)return!0;if(null===b)throw(new sf).a();return""===b} +function eF(a,b){a:{fF();if(null!==b){a=0;for(var c=b.length|0;ae||127<=e||92===e||34===e)break a;a=1+a|0}}a=-1}if(-1===a)return b;c=(new Tj).ue((b.length|0)<<1);for(gF(c,b.substring(0,a));a<(b.length|0);){e=65535&(b.charCodeAt(a)|0);if(32>e)switch(hF(c,92),e){case 8:hF(c,98);break;case 10:hF(c,110);break;case 9:hF(c,116);break;case 12:hF(c,102);break;case 13:hF(c,114);break;case 0:hF(c,48);break;default:gF(c,"u00"+(15e? +(34!==e&&92!==e||hF(c,92),hF(c,e)):(gF(c,"\\u"),4095>=e&&(255=a)jF(c.Ef,f);else{f=65535&(b.charCodeAt(e)|0);e=1+e|0;switch(f){case 85:e=8+e|0;f=Lsa(Psa(),b,-8+e|0,e);break;case 117:e=4+e|0;f=Lsa(Psa(),b,-4+e|0,e);break;case 120:e=2+e|0;f=Lsa(Psa(),b,-2+e|0,e);break;case 116:f="\t";break;case 114:f="\r";break;case 110:f="\n";break;case 102:f="\f";break;case 97:f=gc(7);break;case 98:f="\b";break;case 118:f= +"\x0B";break;case 101:f=gc(27);break;case 48:f=gc(0);break;case 78:f="\u0085";break;case 95:f="\u00a0";break;case 76:f="\u2028";break;case 80:f="\u2029";break;default:f=ba.String.fromCharCode(f)}Wj(c,f)}}return c.Ef.qf}dF.prototype.$classData=r({f3a:0},!1,"org.mulesoft.common.core.package$Strings$",{f3a:1,f:1});var Vsa=void 0;function fF(){Vsa||(Vsa=(new dF).a());return Vsa}function Aj(){this.Rp=null}Aj.prototype=new u;Aj.prototype.constructor=Aj;Aj.prototype.d=function(a){this.Rp=a;return this}; +Aj.prototype.$classData=r({m3a:0},!1,"org.mulesoft.common.io.Output$OutputOps",{m3a:1,f:1});function kF(){}kF.prototype=new u;kF.prototype.constructor=kF;kF.prototype.a=function(){return this};kF.prototype.$classData=r({r3a:0},!1,"org.mulesoft.common.parse.ParseError$",{r3a:1,f:1});var Wsa=void 0;function lF(){}lF.prototype=new u;lF.prototype.constructor=lF;lF.prototype.a=function(){return this}; +function Xsa(a,b){a=Ea();Ysa();var c=b.Bt;c=c.b()?mF().v8:c.c();var e=c.AL/1E6|0,f=b.Et;if(y()===f)b=new ba.Date(b.JA,-1+b.mA|0,b.Oz,c.FG,c.qH,c.WH,e);else if(f instanceof z)f=f.i|0,b=+ba.Date.UTC(b.JA,-1+b.mA|0,b.Oz,c.FG,c.qH,c.WH,e)+ca(1E3,f),b=new ba.Date(b);else throw(new x).d(f);b=+b.getTime();b=Zsa(a,b);(new nF).O$((new qa).Sc(b,a.Wj))}lF.prototype.$classData=r({y3a:0},!1,"org.mulesoft.common.time.package$DateTimes$",{y3a:1,f:1});var $sa=void 0; +function Ysa(){$sa||($sa=(new lF).a());return $sa}function oF(){}oF.prototype=new u;oF.prototype.constructor=oF;oF.prototype.a=function(){return this};function ata(a,b,c){a=wa(b);return(new pF).Laa(b,0,2147483647>a?a:2147483647,c)}oF.prototype.$classData=r({C3a:0},!1,"org.mulesoft.lexer.CharSequenceLexerInput$",{C3a:1,f:1});var bta=void 0;function cta(){bta||(bta=(new oF).a());return bta}function qF(){this.Xs=0}qF.prototype=new u;qF.prototype.constructor=qF;qF.prototype.a=function(){this.Xs=-1;return this}; +qF.prototype.$classData=r({H3a:0},!1,"org.mulesoft.lexer.LexerInput$",{H3a:1,f:1});var dta=void 0;function rF(){dta||(dta=(new qF).a());return dta}function sF(){this.dl=null}sF.prototype=new u;sF.prototype.constructor=sF;sF.prototype.a=function(){eta=this;this.dl=(new tF).Fi(0,0,0);return this};function uF(a,b,c,e){return 0===b&&0===c&&0===e?a.dl:(new tF).Fi(b,c,e)}sF.prototype.$classData=r({J3a:0},!1,"org.mulesoft.lexer.Position$",{J3a:1,f:1});var eta=void 0; +function vF(){eta||(eta=(new sF).a());return eta}function wF(){this.ag=null;this.zn=this.AB=0}wF.prototype=new u;wF.prototype.constructor=wF;wF.prototype.a=function(){this.ag=(new Xj).ue(1E4);this.zn=this.AB=0;return this};function fta(a){a.AB=1+a.AB|0;return xF(a.ag,-1+a.AB|0)}wF.prototype.b=function(){return this.zn<=this.AB};function gta(a,b){if(a.ag.w<=a.zn)pr(a.ag,b);else{var c=a.ag,e=a.zn;if(e>=c.w)throw(new U).e(""+e);c.L.n[e]=b}a.zn=1+a.zn|0} +wF.prototype.jb=function(){return this.zn-this.AB|0};wF.prototype.$classData=r({K3a:0},!1,"org.mulesoft.lexer.Queue",{K3a:1,f:1});function yF(){this.oia=this.$=null}yF.prototype=new u;yF.prototype.constructor=yF;function hta(){}hta.prototype=yF.prototype;yF.prototype.Hc=function(a,b){this.$=a;this.oia=b;return this};yF.prototype.t=function(){return this.$};function zF(){}zF.prototype=new u;zF.prototype.constructor=zF;zF.prototype.a=function(){return this}; +function ita(a,b,c){var e=new ba.XMLHttpRequest,f=(new AF).a();e.onreadystatechange=function(g,h){return function(){jta();if(4===(g.readyState|0))if(200<=(g.status|0)&&300>(g.status|0)||304===(g.status|0))var k=Ij(h,g);else k=new BF,k.L3=g,CF.prototype.Ge.call(k,null,null),k=Gj(h,k);else k=void 0;return k}}(e,f);e.open("GET",b);e.responseType="";e.timeout=0;e.withCredentials=!1;c.U(w(function(g,h){return function(k){h.setRequestHeader(k.ma(),k.ya())}}(a,e)));e.send();return f} +zF.prototype.$classData=r({O3a:0},!1,"org.scalajs.dom.ext.Ajax$",{O3a:1,f:1});var kta=void 0;function jta(){kta||(kta=(new zF).a());return kta}function lta(){}lta.prototype=new u;lta.prototype.constructor=lta;function mta(){}mta.prototype=lta.prototype;function nta(){}nta.prototype=new u;nta.prototype.constructor=nta;function ota(){}ota.prototype=nta.prototype;function Rja(a,b,c){a.y0(b,DF(new EF,FF(),c))}function pta(){}pta.prototype=new u;pta.prototype.constructor=pta;function qta(){} +qta.prototype=pta.prototype;pta.prototype.fo=function(a){this.jX(DF(new EF,FF(),a))};function GF(){}GF.prototype=new u;GF.prototype.constructor=GF;GF.prototype.a=function(){return this};function HF(a,b,c){ue();return(new ve).d(rta(new IF,b,oq(function(e,f){return function(){return f}}(a,c))))}GF.prototype.$classData=r({f4a:0},!1,"org.yaml.convert.YRead$",{f4a:1,f:1});var sta=void 0;function JF(){sta||(sta=(new GF).a());return sta}function KF(){}KF.prototype=new u;KF.prototype.constructor=KF; +KF.prototype.a=function(){return this};function tta(a,b){return 48<=b&&57>=b}KF.prototype.$classData=r({y4a:0},!1,"org.yaml.lexer.JsonLexer$",{y4a:1,f:1});var uta=void 0;function LF(){uta||(uta=(new KF).a());return uta}function MF(){}MF.prototype=new u;MF.prototype.constructor=MF;MF.prototype.a=function(){return this};function vta(a,b){return-1!==wta(ua(),"-?:,[]{}#\x26*!|\x3e'\"%@ `",b)}function xta(a,b){return 91===b||93===b||123===b||125===b||44===b}function yta(a,b){return 32===b||9===b} +function NF(a,b){return 10===b||13===b||b===rF().Xs}function zta(a,b){return 10===b||13===b}function Ata(a,b){return 48<=b&&57>=b||65<=b&&90>=b||97<=b&&122>=b||45===b}function OF(a,b){return 32=b||133===b||160<=b&&55295>=b||57344<=b&&65533>=b||65536<=b&&1114111>=b} +function Bta(a,b){switch(b){case 48:return 0;case 97:return 7;case 98:return 11;case 116:case 9:return 9;case 110:return 10;case 118:return 11;case 102:return 12;case 114:return 13;case 101:return 27;case 32:return 32;case 34:return 34;case 47:return 47;case 92:return 92;case 78:return 133;case 95:return 160;case 76:return 8232;case 80:return 8233;case 120:return 120;case 117:return 117;case 85:return 85;default:return-1}} +function Cta(a,b){return 9===b||32<=b&&126>=b||133===b||160<=b&&55295>=b||57344<=b&&65533>=b||65536<=b&&1114111>=b}MF.prototype.$classData=r({z4a:0},!1,"org.yaml.lexer.YamlCharRules$",{z4a:1,f:1});var Dta=void 0;function PF(){Dta||(Dta=(new MF).a());return Dta}function Eta(){}Eta.prototype=new u;Eta.prototype.constructor=Eta;function QF(){}QF.prototype=Eta.prototype;function RF(){}RF.prototype=new u;RF.prototype.constructor=RF;RF.prototype.a=function(){return this}; +function Fta(a,b){return(new SF).YG(ata(cta(),b,""),vF().dl)}RF.prototype.$classData=r({B4a:0},!1,"org.yaml.lexer.YamlLexer$",{B4a:1,f:1});var Gta=void 0;function Hta(){Gta||(Gta=(new RF).a());return Gta} +function TF(){this.Vv=this.BR=this.AR=this.rR=this.fB=this.Nfa=this.as=this.bs=this.Ws=this.Tv=this.wx=this.PC=this.ZC=this.zF=this.E5=this.o5=this.Wfa=this.Lfa=this.YI=this.SM=this.Uu=this.Tu=this.YY=this.nJ=this.Ufa=this.Tfa=this.GF=this.Ai=this.I5=this.s5=this.WX=this.vX=this.XM=this.TM=this.H5=this.r5=this.G5=this.q5=this.$y=this.F5=this.p5=this.Lna=null}TF.prototype=new u;TF.prototype.constructor=TF; +TF.prototype.a=function(){Ita=this;this.Lna=(new wu).a();this.p5=(new UF).Hc("BeginAnchor","A");this.F5=(new UF).Hc("EndAnchor","a");this.$y=(new UF).Hc("LineBreak","b");this.q5=(new UF).Hc("BeginComment","C");this.G5=(new UF).Hc("EndComment","c");this.r5=(new UF).Hc("BeginDirective","D");this.H5=(new UF).Hc("EndDirective","d");this.TM=(new UF).Hc("BeginEscape","E");this.XM=(new UF).Hc("EndScape","e");this.vX=(new UF).Hc("BeginTag","G");this.WX=(new UF).Hc("EndTag","g");this.s5=(new UF).Hc("BeginHandle", +"H");this.I5=(new UF).Hc("EndHandle","h");this.Ai=(new UF).Hc("Indicator","I");this.GF=(new UF).Hc("Indent","i");this.Tfa=(new UF).Hc("DirectivesEnd","K");this.Ufa=(new UF).Hc("DocumentEnd","k");this.nJ=(new UF).Hc("LineFeed","L");this.YY=(new UF).Hc("LineFold","l");this.Tu=(new UF).Hc("BeginNode","N");this.Uu=(new UF).Hc("EndNode","n");this.SM=(new UF).Hc("BeginDocument","O");this.YI=(new UF).Hc("EndDocument","o");this.Lfa=(new UF).Hc("BeginProperties","P");this.Wfa=(new UF).Hc("EndProperties","p"); +this.o5=(new UF).Hc("BeginAlias","R");this.E5=(new UF).Hc("EndAlias","r");this.zF=(new UF).Hc("BeginSequence","Q");this.ZC=(new UF).Hc("EndSequence","q");this.PC=(new UF).Hc("BeginMapping","M");this.wx=(new UF).Hc("EndMapping","m");this.Tv=(new UF).Hc("BeginScalar","S");this.Ws=(new UF).Hc("EndScalar","s");this.bs=(new UF).Hc("Text","T");this.as=(new UF).Hc("MetaText","t");this.Nfa=(new UF).Hc("Bom","U");this.fB=(new UF).Hc("WhiteSpace","w");this.rR=(new UF).Hc("BeginPair","X");this.AR=(new UF).Hc("EndPair", +"x");this.BR=(new UF).Hc("EndStream","");(new UF).Hc("BeginStream","");this.Vv=(new UF).Hc("Error","!");(new UF).Hc("UnParsed","-");return this};TF.prototype.$classData=r({D4a:0},!1,"org.yaml.lexer.YamlToken$",{D4a:1,f:1});var Ita=void 0;function VF(){Ita||(Ita=(new TF).a());return Ita}function WF(){this.bi=null}WF.prototype=new u;WF.prototype.constructor=WF;WF.prototype.a=function(){Jta=this;cc();this.bi=(new XF).DK(w(function(){return function(a){throw(new YF).o1(a);}}(this)));cc();return this}; +WF.prototype.$classData=r({H4a:0},!1,"org.yaml.model.IllegalTypeHandler$",{H4a:1,f:1});var Jta=void 0;function cc(){Jta||(Jta=(new WF).a());return Jta}function ZF(){this.mca=null}ZF.prototype=new u;ZF.prototype.constructor=ZF;ZF.prototype.a=function(){Kta=this;this.mca=Lta(Mta(),Uc(function(){return function(a,b){throw mb(E(),(new kf).aH(b.tt+" at "+a.Rf+": "+de(ee(),a.rf,a.If,a.Yf,a.bg),b));}}(this)));(new $F).d(function(){return function(){}}(this));return this}; +function Lta(a,b){return(new aG).d(function(c,e){return function(f,g){e.ug(f,g)}}(a,b))}ZF.prototype.$classData=r({M4a:0},!1,"org.yaml.model.ParseErrorHandler$",{M4a:1,f:1});var Kta=void 0;function Mta(){Kta||(Kta=(new ZF).a());return Kta}function Nta(a,b){var c=gc(a.wT);b=eF(fF(),b);return""+c+b+gc(a.wT)}function Ota(a){return!!(a&&a.$classData&&a.$classData.ge.Vha)}function bG(){}bG.prototype=new u;bG.prototype.constructor=bG;bG.prototype.a=function(){return this}; +function Pta(a,b){'"'===b?a=cG():"'"===b?a=Qta():"|"===b?a=Rta():"\x3e"===b?(Sta||(Sta=(new dG).a()),a=Sta):a=""===b?eG():Tta();return a}bG.prototype.$classData=r({R4a:0},!1,"org.yaml.model.ScalarMark$",{R4a:1,f:1});var Uta=void 0;function Vta(){Uta||(Uta=(new bG).a());return Uta}function fG(){}fG.prototype=new u;fG.prototype.constructor=fG;fG.prototype.a=function(){return this};function Wta(a,b){return Xta(Yta(""),b)}function OA(){Dj();return(new rD).Hc("","")} +function wda(a,b){return Xta(Yta(b.da.Rf),b)}function Yta(a){Dj();return(new rD).Hc("",a)}fG.prototype.$classData=r({Z4a:0},!1,"org.yaml.model.YDocument$",{Z4a:1,f:1});var Zta=void 0;function Dj(){Zta||(Zta=(new fG).a());return Zta}function gG(){this.s=null}gG.prototype=new u;gG.prototype.constructor=gG;function $ta(){}$ta.prototype=gG.prototype;gG.prototype.a=function(){this.s=(new Xj).a();return this}; +function QA(a,b){b=Mc(ua(),b,"\n");for(var c=0,e=b.n.length;c>24&&0===(2&l.xa)<<24>>24&&(l.bra=Lj(),l.xa=(2|l.xa)<<24>>24);var m=Bua(new eH,(new FE).e(this.Id)).Xl,p=Oj(va(),Mj(Nj(),m));(new ye).d(p);return}if(k instanceof nb){ue();var t=Cua(this.Bn,this.Id,k);(new ve).d(t);return}throw Se;}}var v=yt(IG().Mna,a);if(v.b())D=!1;else if(null!==v.c())var A=v.c(),D=0===Tu(A,1);else D=!1;if(D){var C=v.c(),I=Uu(C,0);if(cH(this,Q().cj)){this.Bn=Q().cj;ue();var L=TD(UD(),I,16);(new ye).d((new qa).Sc(L.od,L.Ud));return}}var Y=yt(IG().Ona, +a);if(Y.b())pa=!1;else if(null!==Y.c())var ia=Y.c(),pa=0===Tu(ia,1);else pa=!1;if(pa){var La=Y.c(),ob=Uu(La,0);if(cH(this,Q().cj)){this.Bn=Q().cj;ue();var zb=TD(UD(),ob,8);(new ye).d((new qa).Sc(zb.od,zb.Ud));return}}var Zb=yt(IG().aca,a);if(Zb.b())id=!1;else{if(null!==Zb.c())var Cc=Zb.c(),vc=0===Tu(Cc,0);else vc=!1;var id=vc?cH(this,Q().of):!1}if(id){this.Bn=Q().of;ue();var yd=(new qg).e(this.Id),zd=Oj(va(),yd.ja);(new ye).d(zd)}else{var rd=yt(IG().Nna,a);if(rd.b())le=!1;else if(null!==rd.c())var sd= +rd.c(),le=0===Tu(sd,1);else le=!1;if(le){var Vc=rd.c(),Sc=Uu(Vc,0);if(cH(this,Q().of)){this.Bn=Q().of;ue();(new ye).d("-"===Sc?-Infinity:Infinity);return}}if(".nan"!==a&&".NaN"!==a&&".NAN"!==a||!cH(this,Q().of)){var Qc=mF().qj(a);if(!Qc.b()){var $c=Qc.c();if(cH(this,Q().cs)){this.Bn=Q().cs;ue();(new ye).d($c);return}}var Wc=this.Bn,Qe=Q().Hq;if(Wc===Qe)this.Bn=Q().Na,ue(),(new ye).d(this.Id);else{var Qd=this.Bn,me=Q().nd;if(Qd===me)var of=!0;else{var Le=this.Bn,Ve=Q().ti;of=Le===Ve}if(of)var he=!0; +else{var Wf=this.Bn,vf=Q().cj;he=Wf===vf}if(he)var He=!0;else{var Ff=this.Bn,wf=Q().of;He=Ff===wf}if(He)var Re=!0;else{var we=this.Bn,ne=Q().cs;Re=we===ne}if(Re){ue();var Me=Cua(this.Bn,this.Id,null);(new ve).d(Me)}else ue(),(new ye).d(this.Id)}}else this.Bn=Q().of,ue(),(new ye).d(NaN)}}else this.Bn=Q().ti,ue(),(new ye).d(!1);else this.Bn=Q().ti,ue(),(new ye).d(!0);else this.Bn=Q().nd,ue(),(new ye).d(null)}catch(Se){if(a=Ph(E(),Se),a instanceof nb)ue(),a=Cua(this.Bn,this.Id,a),(new ve).d(a);else throw Se; +}};function cH(a,b){var c=a.Bn,e=Q().Hq;return c===e?!0:a.Bn===b}bH.prototype.$classData=r({S5a:0},!1,"org.yaml.parser.ScalarParser",{S5a:1,f:1});function fH(){this.Ofa=this.K7=this.Nna=this.aca=this.Mna=this.Ona=this.bca=null}fH.prototype=new u;fH.prototype.constructor=fH; +fH.prototype.a=function(){Dua=this;var a=(new qg).e("[-+]?\\d+"),b=H();this.bca=(new rg).vi(a.ja,b);a=(new qg).e("0o([0-7]+)");b=H();this.Ona=(new rg).vi(a.ja,b);a=(new qg).e("0x([0-9a-fA-F]+)");b=H();this.Mna=(new rg).vi(a.ja,b);a=(new qg).e("-?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][-+]?\\d+)?");b=H();this.aca=(new rg).vi(a.ja,b);a=(new qg).e("([-+])?(?:\\.inf|\\.Inf|\\.INF)");b=H();this.Nna=(new rg).vi(a.ja,b);a=["","null","Null","NULL","~"];if(0===(a.length|0))a=vd();else{b=wd(new xd,vd());for(var c= +0,e=a.length|0;c=l||133===l||160<=l&&55295>=l||57344<=l&&65533>=l||65536<=l&&1114111>=l)Xua(k)?h=!0:f=!1;else return cG()}while(Yua(k)); +if(e){if(h)return cG();b.QL()&&g?(b=(new qg).e(a),b=Oc(b),b=32!==(null===b?0:b.r)):b=!1;return b?c?(IG(),c=new bH,b=Q().Hq,c.Id=a,c.Bn=b,c.R8a(),a=c.Bn,b=Q().Na,a===b?a=!0:(a=c.Bn,c=Q().cs,a=a===c),a?eG():cG()):eG():cG()}return f?cG():Rta()}CH.prototype.$classData=r({o6a:0},!1,"org.yaml.render.ScalarRender$",{o6a:1,f:1});var Zua=void 0;function DH(){this.Id=null;this.iI=this.fc=this.tm=0}DH.prototype=new u;DH.prototype.constructor=DH; +function $ua(a){return a.tm===a.iI?0:65535&(a.Id.charCodeAt(1+a.tm|0)|0)}function ava(a){return 0===a.tm?0:65535&(a.Id.charCodeAt(-1+a.tm|0)|0)}DH.prototype.e=function(a){this.Id=a;this.tm=0;var b=(new qg).e(a);b=zj(b);this.fc=null===b?0:b.r;this.iI=-1+(a.length|0)|0;return this}; +function Xua(a){if(0===a.tm)switch(a.fc){case 63:case 58:case 45:var b=$ua(a);return bva(Ku(),b)?!0:92===$ua(a);default:return vta(PF(),a.fc)}else switch(a.fc){case 35:return b=ava(a),bva(Ku(),b)?!0:92===ava(a);case 58:return a.tm===a.iI?b=!0:(b=$ua(a),b=bva(Ku(),b)),b?!0:92===$ua(a);default:return!1}}function Yua(a){if(a.tm===a.iI)return!1;a.tm=1+a.tm|0;a.fc=65535&(a.Id.charCodeAt(a.tm)|0);return!0}DH.prototype.$classData=r({p6a:0},!1,"org.yaml.render.ScalarRender$ScalarIterator",{p6a:1,f:1}); +function cva(){this.FM=null;this.D0=!1;this.ag=this.lO=null;this.Vz=0;this.w0=this.V0=!1}cva.prototype=new u;cva.prototype.constructor=cva;function EH(a,b){Vj(a.ag,b);return a}function dva(a){if(tc(a.ag)){var b=(new Aj).d(a.FM);a.lO.hv(b.Rp,a.ag.Ef.qf);FH(a.ag.Ef,0)}} +function GH(a,b,c){eva(a,b);if(b instanceof kG)fva(a,b.xE,b.eI);else if(b instanceof aH)b.eI.U(w(function(e){return function(f){EH(e,f.Id)}}(a)));else if(b instanceof RA)gva(a,b.Xf);else if(b instanceof HH)hva(a,b);else if(b instanceof Sx)iva(a,b);else if(b instanceof vw)jva(a,b);else if(b instanceof Es)kva(a,b.Xf,y());else if(b instanceof xt)lva(a,b,c.Ha(Q().Na));else if(b instanceof OG)mva(a,b);else if(b instanceof IH)nva(a,b);else if(b instanceof Cs)ova(a,b);else throw(new x).d(b);return a} +function pva(a,b){var c=tc(b);c&&b.U(w(function(e){return function(f){EH(e,f.Id)}}(a)));return c} +function qva(a,b){var c=b.Aa,e=c.re();if(e instanceof xt){mva(a,c.hb());var f=c.sS;f.b()||(f=f.c(),GH(a,f,y()));if(-1!==(e.va.indexOf("\n")|0))f=gc(34),fF(),EH(a,""+f+eF(0,e.va)+gc(34));else{f=c.hb().gb;var g=Q().Na;f=f===g?rva(c.hb()):!1;lva(a,e,f)}EH(a,": ")}else e=EH(a,"?"),f=y(),EH(sva(JH(GH(e,c,f))),": ");e=b.i;b=b.Xf.gl(w(function(h,k){return function(l){return l!==k}}(a,c))).ta().gl(w(function(){return function(h){return h instanceof aH?(h=h.eI.kc(),h.b()?!1:":"===h.c().Id):!1}}(a))).Pm(w(function(h, +k){return function(l){return l!==k}}(a,e)));if(null===b)throw(new x).d(b);c=b.ma();b=b.ya().ta();AH(a);c.U(w(function(h){return function(k){return sva(GH(h,k,y()))}}(a)));yH(a);c=e.hb().gb;f=Q().nd;c!==f?c=!0:(c=e.t(),c=(new qg).e(c),c=tc(c));c&&GH(a,e,y());tc(b)&&(GH(a,b.ga(),y()),AH(a),b.ta().U(w(function(h){return function(k){var l=sva(h),m=y();return GH(l,k,m)}}(a))),yH(a))}function mva(a,b){pva(a,b.eI)||rva(b)||EH(a,b.va+" ")} +function kva(a,b,c){b.U(w(function(e,f){return function(g){return GH(e,g,f)}}(a,c)))}function iva(a,b){tva(a,b)||(b.Cm.b()?EH(a,"[]"):(AH(a),b.Xf.U(w(function(c){return function(e){if(e instanceof Cs){var f=EH(sva(JH(c)),"- "),g=y();return GH(f,e,g)}if(e instanceof kG)return GH(c,e,y())}}(a))),yH(a)))}function gva(a,b){kva(a,b,y());JH(a);a.w0=!0}function hva(a,b){tva(a,b)||JH(EH(a,b.t()));a.V0=!0}function tva(a,b){b=b.Xf;var c=tc(b)&&b.ga()instanceof aH;c&&kva(a,b,y());return c} +function eva(a,b){if(a.w0&&(a.w0=!1,EH(a,"...\n"),b instanceof RA)){b=b.aQ;var c=Q().nd;b===c&&EH(a,"---\n")}}function uva(a,b){b.U(w(function(c){return function(e){return GH(c,e,y())}}(a)));dva(a)}function ova(a,b){if(a.D0&&b instanceof KH||!tva(a,b))if(a.V0&&(EH(a,"---\n"),a.V0=!1),b instanceof LH)a.D0?GH(a,b.Gv,y()):EH(a,b.t()),void 0;else if(b instanceof uG&&a.D0&&b.Gv.na())GH(a,b.Gv.c(),y());else{var c=b.Xf;b=b.hb();var e=Q().Na.Vi;kva(a,c,b===e?(new z).d(Q().Na):y())}} +function nva(a,b){pva(a,b.eI)||EH(a,vva(MH(),b," "))}function JH(a){if(!XG(a.ag)){var b=-1+a.ag.Ef.Oa()|0;if(0<=b){var c=a.ag.Ef.Hz(b);c=wva(Ku(),c)}else c=!1;c&&FH(a.ag.Ef,b);jF(a.ag.Ef,10);dva(a)}return a}function sva(a){var b=a.Vz,c=-1+b|0;if(!(0>=b))for(b=0;;){jF(a.ag.Ef,32);if(b===c)break;b=1+b|0}return a} +function lva(a,b,c){if(!tva(a,b)){Zua||(Zua=(new CH).a());var e=b.va,f=b.oH,g=a.Vz;b=Jc(b.Xf,new xva);b=b.b()?"":b.c();c=Wua(e,f,c);if(eG()!==c)if(cG()===c)e=""+gc(34)+eF(fF(),e)+gc(34);else if(Qta()===c)e="'"+e.split("\n").join("\n\n")+"'";else if(Rta()===c){c=(new Tj).a();g=0>g?2:2+g|0;hF(c,124);f=e.length|0;var h=(new qg).e(e);h=zj(h);32===(null===h?0:h.r)&&gF(c,""+g);10!==(65535&(e.charCodeAt(-1+f|0)|0))?hF(c,45):1=g))for(k=0;;){hF(c,32);if(k===h)break;k=1+k|0}gF(c,f)}f=1+b|0}while(-1!==b);e=c}else throw(new x).d(c);EH(a,ka(e))}}function jva(a,b){tva(a,b)||(b.sb.b()?EH(a,"{}"):(AH(a),b.sb.U(w(function(c){return function(e){qva(sva(JH(c)),e)}}(a))),yH(a)))}function fva(a,b,c){pva(a,c)||(tc(a.ag)?(c=Oc(a.ag),c=null===c?0:c.r,c=!wva(Ku(),c)):c=!1,c&&EH(a," "),JH(EH(a,"#"+b)))} +cva.prototype.$classData=r({q6a:0},!1,"org.yaml.render.YamlRender",{q6a:1,f:1});function NH(){}NH.prototype=new u;NH.prototype.constructor=NH;NH.prototype.a=function(){return this};function Nca(a,b){a=(new Wq).a();var c=cfa(),e=K();zva(a,J(e,(new Ib).ha([b])),c);return a.t()}function zva(a,b,c){var e=new cva;e.FM=a;e.D0=!1;e.lO=c;e.ag=(new Tj).a();e.Vz=-2;e.V0=!1;e.w0=!1;uva(e,b)}NH.prototype.$classData=r({r6a:0},!1,"org.yaml.render.YamlRender$",{r6a:1,f:1});var Ava=void 0; +function Oca(){Ava||(Ava=(new NH).a());return Ava}function OH(){}OH.prototype=new u;OH.prototype.constructor=OH;d=OH.prototype;d.a=function(){return this};d.XD=function(a){var b=PH();a=QH(RH(),oq(function(e,f){return function(){var g=PH(),h=Fp((new SH).a(),f,(new xp).a()),k=PH().Lf();return il(jl(g,h,k))}}(this,a)));var c=PH().Lf();return ll(b,a,c).Ra()};d.yC=function(a){return this.QE(a)};d.zC=function(a){return this.mF(a)}; +d.QE=function(a){var b=PH(),c=PH();a=QH(RH(),oq(function(f,g){return function(){return nq(hp(),oq(function(h,k){return function(){PH();var l=Mp((new TH).a(),k,Pp().ux);PH().$e();return l.Be()}}(f,g)),ml())}}(this,a)));var e=PH().$e();return UH(b,ll(c,a,e).Ra())};d.vC=function(a){return this.JE(a)};d.rC=function(a,b){return this.WD(a,b)}; +d.IE=function(a,b){var c=PH(),e=PH();a=QH(RH(),oq(function(f,g,h){return function(){var k=PH(),l=jp((new VH).a(),h,g),m=PH().$e();return il(jl(k,l,m))}}(this,a,b)));b=PH().$e();return UH(c,ll(e,a,b).Ra())};d.wC=function(a,b){return this.IE(a,b)};d.WD=function(a,b){var c=PH();a=QH(RH(),oq(function(e,f,g){return function(){var h=PH(),k=Gp((new SH).a(),f,g,(new xp).a()),l=PH().Yo();return il(jl(h,k,l))}}(this,a,b)));b=PH().Yo();return ll(c,a,b).Ra()};d.sC=function(a){return this.XD(a)}; +d.mF=function(a){var b=PH();a=QH(RH(),oq(function(e,f){return function(){var g=PH();No();var h=mj().Vp,k=ik().Vp,l=lp(pp());h=gq(iq(),f,h,k,l,!1);k=PH().no();return il(jl(g,h,k))}}(this,a)));var c=PH().no();return ll(b,a,c).Ra()};d.JE=function(a){var b=PH(),c=PH();a=QH(RH(),oq(function(f,g){return function(){if(WH(RH(),g)){var h=PH(),k=rp((new VH).a(),g),l=PH().$e();return il(jl(h,k,l))}h=PH();k=qp((new VH).a(),g);l=PH().$e();return il(jl(h,k,l))}}(this,a)));var e=PH().$e();return UH(b,ll(c,a,e).Ra())}; +OH.prototype.resolve=function(a){return this.yC(a)};OH.prototype.validate=function(a){return this.zC(a)};OH.prototype.generateString=function(a){return this.sC(a)};OH.prototype.generateFile=function(a,b){return this.rC(a,b)};OH.prototype.parse=function(a){for(var b=arguments.length|0,c=1,e=[];c>>1|0,g=b.n[f];if(ce.ap(g,a.n[-1+(b+f|0)|0])){for(var h=b,k=-1+(b+f|0)|0;1<(k-h|0);){var l=(h+k|0)>>>1|0;0>e.ap(g,a.n[l])?k=l:h=l}h=h+(0>e.ap(g,a.n[h])?0:1)|0;for(k=b+f|0;k>h;)a.n[k]=a.n[-1+k|0],k=-1+k|0;a.n[h]=g}f=1+f|0}}}function Wva(a,b){a=b.n.length;for(var c=0;c!==a;)b.n[c]=0,c=1+c|0} +function Xva(a,b,c){if(b===c)return!0;if(null===b||null===c)return!1;a=b.n.length;if(c.n.length!==a)return!1;for(var e=0;e!==a;){if(!Va(Wa(),gc(b.n[e]),gc(c.n[e])))return!1;e=1+e|0}return!0}function Yva(a,b,c){if(b===c)return!0;if(null===b||null===c)return!1;a=b.n.length;if(c.n.length!==a)return!1;for(var e=0;e!==a;){if(!Va(Wa(),b.n[e],c.n[e]))return!1;e=1+e|0}return!0}function Zva(a,b,c){var e=new zI;e.Aja=c;c=b.n.length;16=f||g.wE(b.n[l],b.n[m]))?(c.n[a]=b.n[l],l=1+l|0):(c.n[a]=b.n[m],m=1+m|0),a=1+a|0;Ba(c,e,b,e,h)}else Vva(b,e,f,g)}yI.prototype.$classData=r({e8a:0},!1,"java.util.Arrays$",{e8a:1,f:1});var awa=void 0;function AI(){awa||(awa=(new yI).a());return awa}function BI(){this.Fma=null}BI.prototype=new u;BI.prototype.constructor=BI; +BI.prototype.a=function(){bwa=this;this.Fma=new ba.RegExp("(?:(\\d+)\\$)?([-#+ 0,\\(\x3c]*)(\\d+)?(?:\\.(\\d+))?[%A-Za-z]","g");return this};BI.prototype.$classData=r({l8a:0},!1,"java.util.Formatter$",{l8a:1,f:1});var bwa=void 0;function cwa(){this.Ui=null}cwa.prototype=new u;cwa.prototype.constructor=cwa;function CI(a,b,c,e,f){e=dwa(a,c,e,f);if(null===e)throw(new x).d(e);a=e.Uo;c=e.Ag|0;e=e.Ih|0;f=K();return(new Hd).Dr(ewa(a.Vr(b,f.u)),c,e)} +function fwa(a,b){a=dwa(a,0,1,b).Uo;if(H().h(a))return gwa("");K();b=(new z).d(a);return null!==b.i&&0===b.i.Oe(1)?b.i.lb(0):hwa(DI(),a)} +function ewa(a){a:for(;;){var b=a,c=iwa(ue().dR,b);if(!c.b()){var e=c.c().ma();c=c.c().ya();e=jwa().kF(e);if(!e.b()&&(e=e.c(),c=iwa(ue().dR,c),!c.b())){var f=c.c().ma();c=c.c().ya();f=jwa().kF(f);if(!f.b()&&(f=f.c(),!kwa(lwa(),e)&&"|"!==e&&!kwa(lwa(),f)&&"|"!==f)){a=gwa(""+e+f);b=K();a=c.Vr(a,b.u);continue a}}}b=iwa(ue().dR,b);if(!b.b()&&(e=b.c().ma(),b=b.c().ya(),b=iwa(ue().dR,b),!b.b()&&(c=b.c().ma(),b=b.c().ya(),f=DI().kF(c),!f.b()&&(c=f.c().ma(),f=f.c().ya(),c instanceof EI&&(c=mwa(nwa(),c),!c.b()&& +(c=c.c(),f instanceof FI&&""===f.LH)))))){a=DI().kF(e);if(!a.b()&&(f=a.c().ma(),a=a.c().ya(),f instanceof EI)){e=f;e=(new EI).Hc(e.LB,""+e.$B+c);a=GI(e,a);e=K();a=b.Vr(a,e.u);continue a}a=DI().kF(e);if(!a.b()&&a.c().ma()instanceof HI){a=(new EI).Hc("",c);c=K();e=(new II).ts(J(c,(new Ib).ha([e])));a=GI(a,e);e=K();a=b.Vr(a,e.u);continue a}throw(new x).d(e);}return a}} +function dwa(a,b,c,e){if(b>=(e.length|0))return(new Hd).Dr(J(K(),H()),b,c);switch(65535&(e.charCodeAt(b)|0)){case 40:if((e.length|0)>=(3+b|0)&&63===(65535&(e.charCodeAt(1+b|0)|0))&&(61===(65535&(e.charCodeAt(2+b|0)|0))||33===(65535&(e.charCodeAt(2+b|0)|0)))){var f=dwa(a,3+b|0,c,e);if(null===f)throw(new x).d(f);var g=f.Uo;c=f.Ih|0;f=1+(f.Ag|0)|0;b=65535&(e.charCodeAt(2+b|0)|0);b=(new EI).Hc("(?"+gc(b),")");g=owa(pwa(),g);return CI(a,GI(b,g),f,c,e)}if((e.length|0)<(3+b|0)||63!==(65535&(e.charCodeAt(1+ +b|0)|0))||58!==(65535&(e.charCodeAt(2+b|0)|0))){f=dwa(a,1+b|0,1+c|0,e);if(null===f)throw(new x).d(f);g=f.Uo;b=f.Ih|0;f=1+(f.Ag|0)|0;c=(new HI).ue(c);g=owa(pwa(),g);return CI(a,qwa(GI(c,g)),f,b,e)}if((e.length|0)>=(3+b|0)&&63===(65535&(e.charCodeAt(1+b|0)|0))&&58===(65535&(e.charCodeAt(2+b|0)|0))){g=dwa(a,3+b|0,c,e);if(null===g)throw(new x).d(g);c=g.Uo;b=g.Ih|0;g=1+(g.Ag|0)|0;return CI(a,qwa(hwa(DI(),c)),g,b,e)}return rwa(a,e,b,c);case 41:return(new Hd).Dr(J(K(),H()),b,c);case 92:if((e.length|0)>= +(2+b|0)){g=65535&(e.charCodeAt(1+b|0)|0);if(48<=g&&57>=g)a:for(g=1+b|0;;)if(g<(e.length|0)?(f=65535&(e.charCodeAt(g)|0),f=48<=f&&57>=f):f=!1,f)g=1+g|0;else break a;else g=2+b|0;b=e.substring(b,g);return CI(a,gwa(b),g,c,e)}return rwa(a,e,b,c);case 43:case 42:case 63:return g=(e.length|0)>=(2+b|0)&&63===(65535&(e.charCodeAt(1+b|0)|0))?2+b|0:1+b|0,b=e.substring(b,g),b=(new EI).Hc("",b),f=(new FI).e(""),CI(a,GI(b,f),g,c,e);case 123:a:for(g=1+b|0;;){if((e.length|0)<=g)break a;if(125===(65535&(e.charCodeAt(g)| +0))){g=1+g|0;break a}g=1+g|0}b=e.substring(b,g);b=(new EI).Hc("",b);f=(new FI).e("");return CI(a,GI(b,f),g,c,e);case 91:a:for(g=1+b|0;;){if((e.length|0)<=g)break a;if(92===(65535&(e.charCodeAt(g)|0))&&1<(e.length|0))g=2+g|0;else{if(93===(65535&(e.charCodeAt(g)|0))){g=1+g|0;break a}g=1+g|0}}b=e.substring(b,g);return CI(a,gwa(b),g,c,e);default:return rwa(a,e,b,c)}} +function swa(a,b,c){var e=new cwa,f=fwa(e,c.rE.source),g=twa(c);uwa(f,1);var h=vwa(f),k=w(function(){return function(m){return(new JI).Sc(m.JM(),m.ya().R1)}}(e)),l=yC();l=zC(l);wwa(f,Jd(h,k,l));k=xwa(f);g=new ba.RegExp(k,g);g.lastIndex=b;k=g.exec(a);if(null===k)throw mb(E(),(new nb).e("[Internal error] Executed '"+g+"' on "+("'"+a+"' at position "+b)+", got an error.\n"+("Original pattern '"+c)+"' did match however."));ywa(f,w(function(m,p){return function(t){t=p[t|0];return void 0===t?null:t}}(e, +k)));zwa(f,b);a=w(function(){return function(m){return(new JI).Sc(m.JM(),m.ya().$d)}}(e));b=yC();b=zC(b);e.Ui=Jd(h,a,b);return e}function rwa(a,b,c,e){var f=65535&(b.charCodeAt(c)|0);return CI(a,gwa(""+gc(f)),1+c|0,e,b)}cwa.prototype.$classData=r({x8a:0},!1,"java.util.regex.GroupStartMap",{x8a:1,f:1});function KI(){}KI.prototype=new u;KI.prototype.constructor=KI;KI.prototype.a=function(){return this}; +function kwa(a,b){a=b.length|0;if(2>a||92!==(65535&(b.charCodeAt(0)|0)))return!1;for(var c=1;c!==a;){var e=65535&(b.charCodeAt(c)|0);if(!(48<=e&&57>=e))return!1;c=1+c|0}return!0}KI.prototype.$classData=r({y8a:0},!1,"java.util.regex.GroupStartMap$",{y8a:1,f:1});var Awa=void 0;function lwa(){Awa||(Awa=(new KI).a());return Awa}function LI(){}LI.prototype=new u;LI.prototype.constructor=LI;LI.prototype.a=function(){return this}; +function Bwa(a){var b=a.LH;return kwa(lwa(),b)?(a=ED(),b=b.substring(1),(new z).d(FD(a,b,10))):y()}LI.prototype.$classData=r({z8a:0},!1,"java.util.regex.GroupStartMap$BackReferenceLeaf$",{z8a:1,f:1});var Cwa=void 0;function MI(){}MI.prototype=new u;MI.prototype.constructor=MI;MI.prototype.a=function(){return this}; +function owa(a,b){var c=b.ua(),e=H(),f=H();a:for(;;){if(!H().h(c)){if(c instanceof Vt){var g=c.Wn;c=c.Nf;var h=g.iy,k=(new FI).e("|");if(null!==h&&h.h(k)){f=Cw(f);e=ji(f,e);f=H();continue a}f=ji(g,f);continue a}throw(new x).d(c);}c=Cw(f);e=Cw(ji(c,e));break}if(1===Eq(e))return(new II).ts(b);a=function(){return function(l){return hwa(DI(),l)}}(a);b=ii().u;if(b===ii().u)if(e===H())a=H();else{b=e.ga();c=b=ji(a(b),H());for(e=e.ta();e!==H();)f=e.ga(),f=ji(a(f),H()),c=c.Nf=f,e=e.ta();a=b}else{for(b=se(e, +b);!e.b();)c=e.ga(),b.jd(a(c)),e=e.ta();a=b.Rc()}return(new NI).ts(a)}MI.prototype.$classData=r({A8a:0},!1,"java.util.regex.GroupStartMap$CreateParentNode$",{A8a:1,f:1});var Dwa=void 0;function pwa(){Dwa||(Dwa=(new MI).a());return Dwa}function OI(){this.iy=this.GE=null;this.R1=0;this.vL=null;this.$d=0}OI.prototype=new u;OI.prototype.constructor=OI;function Ewa(a,b){var c=a.GE;b=c instanceof EI&&Fwa(Gwa(),c)?b:null===a.vL?-1:b-(a.vL.length|0)|0;a.$d=b;Hwa(a);return a.$d} +function xwa(a){var b=a.GE;if(b instanceof HI)b="(";else{if(!(b instanceof EI))throw(new x).d(b);b="((?:"+b.LB}var c=a.iy;if(c instanceof FI)c=c.LH;else if(c instanceof II){c=c.Xf;var e=w(function(){return function(g){return xwa(g)}}(a)),f=K();c="(?:"+c.ka(e,f.u).cm()+")"}else{if(!(c instanceof NI))throw(new x).d(c);c=c.Xf;e=w(function(){return function(g){return xwa(g)}}(a));f=K();c="(?:"+c.ka(e,f.u).Kg("|")+")"}a=a.GE;if(a instanceof HI)a=")";else{if(!(a instanceof EI))throw(new x).d(a);a=")"+a.$B+ +")"}return b+c+a}OI.prototype.t=function(){return"Node("+this.GE+", "+this.iy+")"};function wwa(a,b){var c=!1,e=null,f=a.iy;a:{if(f instanceof FI&&(c=!0,e=f,Cwa||(Cwa=(new LI).a()),e=Bwa(e),!e.b())){c=e.c()|0;b=b.Ja(c);a.iy=(new FI).e("\\"+(b.b()?0:b.c()));break a}if(!c)if(f instanceof II)f.Xf.U(w(function(g,h){return function(k){return wwa(k,h)}}(a,b)));else if(f instanceof NI)f.Xf.U(w(function(g,h){return function(k){return wwa(k,h)}}(a,b)));else throw(new x).d(f);}return a} +OI.prototype.xw=function(){return this.$d+(null===this.vL?0:this.vL.length|0)|0};function ywa(a,b){a.vL=b.P(a.R1);var c=a.iy;if(!(c instanceof FI))if(c instanceof II)c.Xf.U(w(function(e,f){return function(g){ywa(g,f)}}(a,b)));else if(c instanceof NI)c.Xf.U(w(function(e,f){return function(g){ywa(g,f)}}(a,b)));else throw(new x).d(c);} +function vwa(a){var b=a.GE;if(b instanceof HI){b=[(new R).M(b.RB,a)];for(var c=UA(new VA,nu()),e=0,f=b.length|0;e>>17|0);return a^b}; +LJ.prototype.Ga=function(a,b){a=this.mP(a,b);return-430675100+ca(5,a<<13|a>>>19|0)|0};function X(a){var b=MJ(),c=a.E();if(0===c)return a=a.H(),ta(ua(),a);for(var e=-889275714,f=0;f>>16|0));a=ca(-1028477387,a^(a>>>13|0));return a^(a>>>16|0)}; +function bya(a,b,c){var e=(new lC).ue(0);c=(new lC).ue(c);b.U(w(function(f,g,h){return function(k){g.oa=f.Ga(g.oa,NJ(OJ(),k));h.oa=1+h.oa|0}}(a,c,e)));return a.fe(c.oa,e.oa)}function PJ(){}PJ.prototype=new u;PJ.prototype.constructor=PJ;PJ.prototype.a=function(){return this};function cya(a,b){a=ca(-1640532531,b);ED();return ca(-1640532531,a<<24|16711680&a<<8|65280&(a>>>8|0)|a>>>24|0)}PJ.prototype.$classData=r({A$a:0},!1,"scala.util.hashing.package$",{A$a:1,f:1});var dya=void 0; +function eya(){dya||(dya=(new PJ).a());return dya}function qJ(){}qJ.prototype=new u;qJ.prototype.constructor=qJ;qJ.prototype.a=function(){return this};qJ.prototype.$classData=r({I$a:0},!1,"scala.collection.$colon$plus$",{I$a:1,f:1});var xxa=void 0;function pJ(){}pJ.prototype=new u;pJ.prototype.constructor=pJ;pJ.prototype.a=function(){return this};function iwa(a,b){if(b.b())return y();a=b.ga();b=b.ta();return(new z).d((new R).M(a,b))} +pJ.prototype.$classData=r({J$a:0},!1,"scala.collection.$plus$colon$",{J$a:1,f:1});var wxa=void 0;function QJ(){this.ce=null}QJ.prototype=new u;QJ.prototype.constructor=QJ;QJ.prototype.a=function(){fya=this;this.ce=(new RJ).a();return this};QJ.prototype.$classData=r({U$a:0},!1,"scala.collection.Iterator$",{U$a:1,f:1});var fya=void 0;function $B(){fya||(fya=(new QJ).a());return fya}function gya(){this.zn=this.AB=null}gya.prototype=new u;gya.prototype.constructor=gya; +gya.prototype.$classData=r({eab:0},!1,"scala.collection.Iterator$ConcatIteratorCell",{eab:1,f:1});function ZG(a,b,c){a.Pk(b,c,SJ(W(),b)-c|0)}function TJ(a,b){b=b.es();b.jh(a.Hd());return b.Rc()}function UJ(a,b,c,e){return a.rm((new Tj).a(),b,c,e).Ef.qf}function Tc(a,b,c){b=(new qd).d(b);a.U(w(function(e,f,g){return function(h){f.oa=g.ug(f.oa,h)}}(a,b,c)));return b.oa}function hya(a,b,c){a=iya(a);var e=b;for(b=a;!b.b();)a=e,e=b.ga(),e=c.ug(e,a),b=b.ta();return e} +function VJ(a){var b=(new lC).ue(0);a.U(w(function(c,e){return function(){e.oa=1+e.oa|0}}(a,b)));return b.oa} +function Jc(a,b){var c=(new Ej).a();try{if(a&&a.$classData&&a.$classData.ge.Ii)var e=a;else{if(!(a&&a.$classData&&a.$classData.ge.vd))return a.U(b.vA(w(function(h,k){return function(l){throw(new nz).M(k,(new z).d(l));}}(a,c)))),y();e=a.im()}for(var f=(new WJ).DU(a);e.Ya();){var g=b.Wa(e.$a(),f);if(g!==f)return(new z).d(g)}return y()}catch(h){if(h instanceof nz){a=h;if(a.Aa===c)return a.Dt();throw a;}throw h;}} +function XJ(a,b,c,e,f){var g=(new Uj).eq(!0);Vj(b,c);a.U(w(function(h,k,l,m){return function(p){if(k.oa)Wj(l,p),k.oa=!1;else return Vj(l,m),Wj(l,p)}}(a,g,b,e)));Vj(b,f);return b}function YJ(a,b){return a.Do()?(b=b.zs(a.jb()),a.so(b,0),b):a.Mj().Ol(b)}function tc(a){return!a.b()}function iya(a){var b=H();b=(new qd).d(b);a.U(w(function(c,e){return function(f){e.oa=ji(f,e.oa)}}(a,b)));return b.oa}function XB(){this.upa=null}XB.prototype=new u;XB.prototype.constructor=XB; +XB.prototype.DU=function(a){this.upa=a;return this};XB.prototype.$classData=r({Jab:0},!1,"scala.collection.TraversableOnce$FlattenOps",{Jab:1,f:1});function WB(){this.xqa=null}WB.prototype=new u;WB.prototype.constructor=WB;WB.prototype.DU=function(a){this.xqa=a;return this};WB.prototype.$classData=r({Lab:0},!1,"scala.collection.TraversableOnce$MonadOps",{Lab:1,f:1});function jya(){}jya.prototype=new u;jya.prototype.constructor=jya;function kya(){}kya.prototype=jya.prototype; +function Rb(a,b){return a.Qd().jh(b).Rc()}jya.prototype.Qd=function(){return UA(new VA,this.tG())};function lya(){}lya.prototype=new u;lya.prototype.constructor=lya;function mya(){}mya.prototype=lya.prototype;function J(a,b){if(b.b())return a.Rz();a=a.Qd();a.jh(b);return a.Rc()}lya.prototype.Rz=function(){return this.Qd().Rc()};function nya(a,b){var c=a.Di().Qd();a.Hd().U(w(function(e,f,g){return function(h){return f.jh(g.P(h).Hd())}}(a,c,b)));return c.Rc()} +function oya(a,b){a:for(;;){if(tc(b)){a.Kk(b.ga());b=b.ta();continue a}break}}function yi(a,b){b&&b.$classData&&b.$classData.ge.kW?oya(a,b):b.U(w(function(c){return function(e){return c.Kk(e)}}(a)));return a}function ZJ(){this.iI=this.gk=0}ZJ.prototype=new u;ZJ.prototype.constructor=ZJ;function pya(a){return a.iI-a.gk|0}ZJ.prototype.Sc=function(a,b){this.gk=a;this.iI=b;return this};ZJ.prototype.$classData=r({Wab:0},!1,"scala.collection.generic.SliceInterval",{Wab:1,f:1});function $J(){} +$J.prototype=new u;$J.prototype.constructor=$J;$J.prototype.a=function(){return this};function aK(a,b,c){a=0c?0:c;return e<=a||a>=(b.length|0)?"":b.substring(a,e>(b.length|0)?b.length|0:e)}fK.prototype.$classData=r({ucb:0},!1,"scala.collection.immutable.StringOps$",{ucb:1,f:1});var yya=void 0;function hh(){yya||(yya=(new fK).a());return yya}function gK(){}gK.prototype=new u;gK.prototype.constructor=gK;gK.prototype.a=function(){return this};gK.prototype.Qd=function(){var a=(new Tj).a();return zya(new Aya,a,w(function(){return function(b){return(new hK).e(b)}}(this)))}; +gK.prototype.$classData=r({Dcb:0},!1,"scala.collection.immutable.WrappedString$",{Dcb:1,f:1});var Bya=void 0;function iK(){}iK.prototype=new u;iK.prototype.constructor=iK;iK.prototype.a=function(){return this};iK.prototype.$classData=r({Ucb:0},!1,"scala.collection.mutable.ArrayOps$ofBoolean$",{Ucb:1,f:1});var Cya=void 0;function jK(){}jK.prototype=new u;jK.prototype.constructor=jK;jK.prototype.a=function(){return this}; +jK.prototype.$classData=r({Wcb:0},!1,"scala.collection.mutable.ArrayOps$ofByte$",{Wcb:1,f:1});var Dya=void 0;function kK(){}kK.prototype=new u;kK.prototype.constructor=kK;kK.prototype.a=function(){return this};kK.prototype.$classData=r({Ycb:0},!1,"scala.collection.mutable.ArrayOps$ofChar$",{Ycb:1,f:1});var Eya=void 0;function lK(){}lK.prototype=new u;lK.prototype.constructor=lK;lK.prototype.a=function(){return this}; +lK.prototype.$classData=r({$cb:0},!1,"scala.collection.mutable.ArrayOps$ofDouble$",{$cb:1,f:1});var Fya=void 0;function mK(){}mK.prototype=new u;mK.prototype.constructor=mK;mK.prototype.a=function(){return this};mK.prototype.$classData=r({bdb:0},!1,"scala.collection.mutable.ArrayOps$ofFloat$",{bdb:1,f:1});var Gya=void 0;function nK(){}nK.prototype=new u;nK.prototype.constructor=nK;nK.prototype.a=function(){return this}; +nK.prototype.$classData=r({ddb:0},!1,"scala.collection.mutable.ArrayOps$ofInt$",{ddb:1,f:1});var Hya=void 0;function oK(){}oK.prototype=new u;oK.prototype.constructor=oK;oK.prototype.a=function(){return this};oK.prototype.$classData=r({fdb:0},!1,"scala.collection.mutable.ArrayOps$ofLong$",{fdb:1,f:1});var Iya=void 0;function pK(){}pK.prototype=new u;pK.prototype.constructor=pK;pK.prototype.a=function(){return this}; +pK.prototype.$classData=r({hdb:0},!1,"scala.collection.mutable.ArrayOps$ofRef$",{hdb:1,f:1});var Jya=void 0;function qK(){}qK.prototype=new u;qK.prototype.constructor=qK;qK.prototype.a=function(){return this};qK.prototype.$classData=r({jdb:0},!1,"scala.collection.mutable.ArrayOps$ofShort$",{jdb:1,f:1});var Kya=void 0;function rK(){}rK.prototype=new u;rK.prototype.constructor=rK;rK.prototype.a=function(){return this}; +rK.prototype.$classData=r({ldb:0},!1,"scala.collection.mutable.ArrayOps$ofUnit$",{ldb:1,f:1});var Lya=void 0;function Mya(a){return sK(ED(),-1+a.ze.n.length|0)}function Nya(a,b){b=Nda(b);return Oya(a,b)} +function Oya(a,b){var c=sa(b);c=Pya(a,c);for(var e=a.ze.n[c];null!==e;){if(Va(Wa(),e,b))return!1;c=(1+c|0)%a.ze.n.length|0;e=a.ze.n[c]}a.ze.n[c]=b;a.yn=1+a.yn|0;null!==a.mp&&(b=c>>5,c=a.mp,c.n[b]=1+c.n[b]|0);if(a.yn>=a.CA)for(b=a.ze,a.ze=ja(Ja(Ha),[a.ze.n.length<<1]),a.yn=0,null!==a.mp&&(c=1+(a.ze.n.length>>5)|0,a.mp.n.length!==c?a.mp=ja(Ja(Qa),[c]):Wva(AI(),a.mp)),a.fC=Mya(a),a.CA=Qya().pV(a.Cy,a.ze.n.length),c=0;c>>c|0|b<<(-c|0))>>>(32-sK(ED(),a)|0)|0)&a} +function Rya(a,b){b=Nda(b);var c=sa(b);c=Pya(a,c);for(var e=a.ze.n[c];null!==e;){if(Va(Wa(),e,b)){b=c;for(c=(1+b|0)%a.ze.n.length|0;null!==a.ze.n[c];){e=sa(a.ze.n[c]);e=Pya(a,e);var f;if(f=e!==c)f=a.ze.n.length>>1,f=e<=b?(b-e|0)f;f&&(a.ze.n[b]=a.ze.n[c],b=c);c=(1+c|0)%a.ze.n.length|0}a.ze.n[b]=null;a.yn=-1+a.yn|0;null!==a.mp&&(a=a.mp,b>>=5,a.n[b]=-1+a.n[b]|0);break}c=(1+c|0)%a.ze.n.length|0;e=a.ze.n[c]}} +function Sya(a,b){b=Nda(b);var c=sa(b);c=Pya(a,c);for(var e=a.ze.n[c];null!==e&&!Va(Wa(),e,b);)c=(1+c|0)%a.ze.n.length|0,e=a.ze.n[c];return e}function tK(){}tK.prototype=new u;tK.prototype.constructor=tK;tK.prototype.a=function(){return this}; +tK.prototype.pV=function(a,b){if(!(500>a))throw(new uK).d("assertion failed: loadFactor too large; must be \x3c 0.5");var c=b>>31,e=a>>31,f=65535&b,g=b>>>16|0,h=65535&a,k=a>>>16|0,l=ca(f,h);h=ca(g,h);var m=ca(f,k);f=l+((h+m|0)<<16)|0;l=(l>>>16|0)+m|0;a=(((ca(b,e)+ca(c,a)|0)+ca(g,k)|0)+(l>>>16|0)|0)+(((65535&l)+h|0)>>>16|0)|0;return Tya(Ea(),f,a,1E3,0)};tK.prototype.$classData=r({odb:0},!1,"scala.collection.mutable.FlatHashTable$",{odb:1,f:1});var Uya=void 0; +function Qya(){Uya||(Uya=(new tK).a());return Uya}function vK(){}vK.prototype=new u;vK.prototype.constructor=vK;vK.prototype.a=function(){return this};vK.prototype.t=function(){return"NullSentinel"};vK.prototype.z=function(){return 0};vK.prototype.$classData=r({qdb:0},!1,"scala.collection.mutable.FlatHashTable$NullSentinel$",{qdb:1,f:1});var Vya=void 0;function Oda(){Vya||(Vya=(new vK).a());return Vya}function Wya(a){return sK(ED(),-1+a.ze.n.length|0)} +function Xya(a){for(var b=-1+a.ze.n.length|0;0<=b;)a.ze.n[b]=null,b=-1+b|0;a.qM(0);Yya(a,0)}function Zya(a,b,c){for(a=a.ze.n[c];;)if(null!==a?(c=a.uu(),c=!Va(Wa(),c,b)):c=!1,c)a=a.$a();else break;return a}function wK(a,b){var c=-1+a.ze.n.length|0,e=ea(c);a=a.fC;b=cya(eya(),b);return((b>>>a|0|b<<(-a|0))>>>e|0)&c}function $ya(a){a.d5(750);xK();var b=a.IU();a.j3(ja(Ja(Qda),[aza(0,b)]));a.qM(0);b=a.Cy;var c=xK();xK();a.p3(c.pV(b,aza(0,a.IU())));a.$2(null);a.Yda(Wya(a))} +function bza(a,b){var c=NJ(OJ(),b);c=wK(a,c);var e=a.ze.n[c];if(null!==e){var f=e.uu();if(Va(Wa(),f,b))return a.ze.n[c]=e.$a(),a.qM(-1+a.yn|0),cza(a,c),e.EL(null),e;for(f=e.$a();;){if(null!==f){var g=f.uu();g=!Va(Wa(),g,b)}else g=!1;if(g)e=f,f=f.$a();else break}if(null!==f)return e.EL(f.$a()),a.qM(-1+a.yn|0),cza(a,c),f.EL(null),f}return null}function pD(a){for(var b=-1+a.ze.n.length|0;null===a.ze.n[b]&&0a.CA){b=a.ze.n.length<<1;c=a.ze;a.j3(ja(Ja(Qda),[b]));Yya(a,a.ze.n.length);for(var e=-1+c.n.length|0;0<=e;){for(var f=c.n[e];null!==f;){var g=f.uu();g=NJ(OJ(),g);g=wK(a,g);var h=f.$a();f.EL(a.ze.n[g]);a.ze.n[g]=f;f=h;fza(a,g)}e=-1+e|0}a.p3(xK().pV(a.Cy,b))}}function cza(a,b){null!==a.mp&&(a=a.mp,b>>=5,a.n[b]=-1+a.n[b]|0)} +function Yya(a,b){null!==a.mp&&(b=1+(b>>5)|0,a.mp.n.length!==b?a.$2(ja(Ja(Qa),[b])):Wva(AI(),a.mp))}function fza(a,b){null!==a.mp&&(a=a.mp,b>>=5,a.n[b]=1+a.n[b]|0)}function yK(){}yK.prototype=new u;yK.prototype.constructor=yK;yK.prototype.a=function(){return this};function aza(a,b){return 1<<(-ea(-1+b|0)|0)} +yK.prototype.pV=function(a,b){var c=b>>31,e=a>>31,f=65535&b,g=b>>>16|0,h=65535&a,k=a>>>16|0,l=ca(f,h);h=ca(g,h);var m=ca(f,k);f=l+((h+m|0)<<16)|0;l=(l>>>16|0)+m|0;a=(((ca(b,e)+ca(c,a)|0)+ca(g,k)|0)+(l>>>16|0)|0)+(((65535&l)+h|0)>>>16|0)|0;return Tya(Ea(),f,a,1E3,0)};yK.prototype.$classData=r({zdb:0},!1,"scala.collection.mutable.HashTable$",{zdb:1,f:1});var gza=void 0;function xK(){gza||(gza=(new yK).a());return gza}function UI(){this.Vfa=null}UI.prototype=new u;UI.prototype.constructor=UI; +UI.prototype.a=function(){Swa=this;this.Vfa=(new VI).fd(ja(Ja(Ha),[0]));return this};UI.prototype.$classData=r({heb:0},!1,"scala.collection.mutable.WrappedArray$",{heb:1,f:1});var Swa=void 0;function dJ(){this.LE=null}dJ.prototype=new u;dJ.prototype.constructor=dJ;dJ.prototype.a=function(){$wa=this;hza||(hza=(new zK).a());iza||(iza=(new AK).a());this.LE=void 0===ba.Promise?(new BK).a():(new CK).a();return this}; +dJ.prototype.$classData=r({teb:0},!1,"scala.scalajs.concurrent.JSExecutionContext$",{teb:1,f:1});var $wa=void 0;function AK(){}AK.prototype=new u;AK.prototype.constructor=AK;AK.prototype.a=function(){return this};AK.prototype.$classData=r({ueb:0},!1,"scala.scalajs.concurrent.QueueExecutionContext$",{ueb:1,f:1});var iza=void 0;function DK(){}DK.prototype=new u;DK.prototype.constructor=DK;DK.prototype.a=function(){return this}; +function jza(a,b,c,e,f){e.wP(w(function(g,h,k){return function(l){if(l instanceof Kd)return h(l.i);if(l instanceof Ld)return l=l.uB,k(l instanceof EK?l.Px:l);throw(new x).d(l);}}(a,b,c)),f)}function FK(a,b){a=ml();return new ba.Promise(function(c,e){return function(f,g){jza(GK(),f,g,c,e)}}(b,a))}DK.prototype.$classData=r({yeb:0},!1,"scala.scalajs.js.JSConverters$JSRichFuture$",{yeb:1,f:1});var kza=void 0;function GK(){kza||(kza=(new DK).a());return kza}function HK(){}HK.prototype=new u; +HK.prototype.constructor=HK;HK.prototype.a=function(){return this};HK.prototype.$classData=r({zeb:0},!1,"scala.scalajs.js.JSConverters$JSRichGenMap$",{zeb:1,f:1});var lza=void 0;function mza(){lza||(lza=(new HK).a());return lza}function IK(){}IK.prototype=new u;IK.prototype.constructor=IK;IK.prototype.a=function(){return this};function nza(a,b){if(b instanceof Ib)return b.L;var c=[];b.U(w(function(e,f){return function(g){return f.push(g)|0}}(a,c)));return c} +IK.prototype.$classData=r({Aeb:0},!1,"scala.scalajs.js.JSConverters$JSRichGenTraversableOnce$",{Aeb:1,f:1});var oza=void 0;function JK(){}JK.prototype=new u;JK.prototype.constructor=JK;JK.prototype.a=function(){return this};function pza(a,b){a=(new AF).a();b.then(function(c){return function(e){qza();Ij(c,e)}}(a),function(c){return function(e){qza();e=e instanceof CF?e:(new EK).d(e);Gj(c,e)}}(a));return a}JK.prototype.$classData=r({Ceb:0},!1,"scala.scalajs.js.Thenable$ThenableOps$",{Ceb:1,f:1}); +var rza=void 0;function qza(){rza||(rza=(new JK).a());return rza}function KK(){this.aC=null}KK.prototype=new u;KK.prototype.constructor=KK;KK.prototype.a=function(){sza=this;this.aC=ba.Object.prototype.hasOwnProperty;return this};KK.prototype.$classData=r({Feb:0},!1,"scala.scalajs.js.WrappedDictionary$Cache$",{Feb:1,f:1});var sza=void 0;function LK(){sza||(sza=(new KK).a());return sza}function MK(){this.fM=!1;this.Mka=this.y1=this.CS=null;this.i9=!1;this.cna=this.Xka=0}MK.prototype=new u; +MK.prototype.constructor=MK;MK.prototype.a=function(){tza=this;this.CS=(this.fM=!!(ba.ArrayBuffer&&ba.Int32Array&&ba.Float32Array&&ba.Float64Array))?new ba.ArrayBuffer(8):null;this.y1=this.fM?new ba.Int32Array(this.CS,0,2):null;this.fM&&new ba.Float32Array(this.CS,0,2);this.Mka=this.fM?new ba.Float64Array(this.CS,0,1):null;if(this.fM)this.y1[0]=16909060,a=1===((new ba.Int8Array(this.CS,0,8))[0]|0);else var a=!0;this.Xka=(this.i9=a)?0:1;this.cna=this.i9?1:0;return this}; +function oaa(a,b){var c=b|0;if(c===b&&-Infinity!==1/b)return c;if(a.fM)a.Mka[0]=b,a=(new qa).Sc(a.y1[a.cna]|0,a.y1[a.Xka]|0);else{if(b!==b)a=!1,b=2047,c=+ba.Math.pow(2,51);else if(Infinity===b||-Infinity===b)a=0>b,b=2047,c=0;else if(0===b)a=-Infinity===1/b,c=b=0;else{var e=(a=0>b)?-b:b;if(e>=+ba.Math.pow(2,-1022)){b=+ba.Math.pow(2,52);c=+ba.Math.log(e)/.6931471805599453;c=+ba.Math.floor(c)|0;c=1023>c?c:1023;var f=+ba.Math.pow(2,c);f>e&&(c=-1+c|0,f/=2);f=e/f*b;e=+ba.Math.floor(f);f-=e;e=.5>f?e:.5< +f?1+e:0!==e%2?1+e:e;2<=e/b&&(c=1+c|0,e=1);1023e?c:.5f&&Jv(c);){if(0!==c.xw()){var g=c.Ms();e=b.substring(e,g);a.push(null===e?null:e);f=1+f|0}e=c.xw()}b=b.substring(e);a.push(null===b?null:b);b=ha(Ja(ma),a);for(a=b.n.length;0!==a&&""===b.n[-1+a|0];)a=-1+a|0;a!==b.n.length&&(c=ja(Ja(ma),[a]),Ba(b,0,c,0,a),b=c)}return b} +function uza(a,b,c,e){if(null===b)throw(new sf).a();a=Hv(uf(),c,0);return rja(Iv(a,b,b.length|0),e)}function qia(a,b,c){a=yva(c);return b.lastIndexOf(a)|0}function wta(a,b,c){a=yva(c);return b.indexOf(a)|0}function Nsa(a,b,c,e){a=c+e|0;if(0>c||ab.n.length)throw(new Mv).a();for(e="";c!==a;)e=""+e+ba.String.fromCharCode(b.n[c]),c=1+c|0;return e}function OK(a,b,c){a=b.toLowerCase();c=c.toLowerCase();return a===c?0:aa||1114111>10,56320|1023&a)}function ta(a,b){a=0;for(var c=1,e=-1+(b.length|0)|0;0<=e;)a=a+ca(65535&(b.charCodeAt(e)|0),c)|0,c=ca(31,c),e=-1+e|0;return a} +function PK(a,b){var c=(new QK).a();if(c.RU)throw(new RK).a();for(var e=0,f=0,g=a.length|0,h=0;h!==g;){var k=a.indexOf("%",h)|0;if(0>k){vza(c,a.substring(h));break}vza(c,a.substring(h,k));h=1+k|0;bwa||(bwa=(new BI).a());var l=bwa.Fma;l.lastIndex=h;k=l.exec(a);if(null===k||(k.index|0)!==h)throw c=h===g?"%":a.substring(h,1+h|0),(new SK).e(c);h=l.lastIndex|0;l=65535&(a.charCodeAt(-1+h|0)|0);for(var m,p=k[2],t=90>=l?256:0,v=p.length|0,A=0;A!==v;){m=65535&(p.charCodeAt(A)|0);switch(m){case 45:var D=1; +break;case 35:D=2;break;case 43:D=4;break;case 32:D=8;break;case 48:D=16;break;case 44:D=32;break;case 40:D=64;break;case 60:D=128;break;default:throw(new x).d(gc(m));}if(0!==(t&D))throw(new TK).e(ba.String.fromCharCode(m));t|=D;A=1+A|0}m=t;v=wza(k[3],-1);t=wza(k[4],-1);if(37===l||110===l)k=null;else{if(0!==(1&m)&&0>v)throw(new UK).e("%"+k[0]);0!==(128&m)?p=f:(p=wza(k[1],0),p=0===p?e=1+e|0:0>p?f:p);if(0>=p||p>b.n.length){c=ba.String.fromCharCode(l);if(0>("bBhHsHcCdoxXeEgGfn%".indexOf(c)|0))throw(new SK).e(c); +throw(new VK).e("%"+k[0]);}f=p;k=b.n[-1+p|0]}p=c;A=k;D=l;k=m;l=v;v=t;switch(D){case 98:case 66:0!==(126&k)&&WK(k,126,D);XK(p,k,l,v,!1===A||null===A?"false":"true");break;case 104:case 72:0!==(126&k)&&WK(k,126,D);t=null===A?"null":(+(sa(A)>>>0)).toString(16);XK(p,k,l,v,t);break;case 115:case 83:A&&A.$classData&&A.$classData.ge.Bhb?(0!==(124&k)&&WK(k,124,D),A.zhb(p,(0!==(1&k)?1:0)|(0!==(2&k)?4:0)|(0!==(256&k)?2:0),l,v)):(0!==(126&k)&&WK(k,126,D),XK(p,k,l,v,""+A));break;case 99:case 67:0!==(126&k)&& +WK(k,126,D);if(0<=v)throw(new YK).ue(v);if(A instanceof Jj)XK(p,k,l,-1,ba.String.fromCharCode(null===A?0:A.r));else if(Ca(A)){t=A|0;if(!(0<=t&&1114111>=t))throw(new ZK).ue(t);t=65536>t?ba.String.fromCharCode(t):ba.String.fromCharCode(-64+(t>>10)|55296,56320|1023&t);XK(p,k,l,-1,t)}else $K(p,A,k,l,v,D);break;case 100:0!==(2&k)&&WK(k,2,D);17!==(17&k)&&12!==(12&k)||aL(k);if(0<=v)throw(new YK).ue(v);Ca(A)?xza(p,k,l,""+(A|0)):A instanceof qa?(v=Da(A),t=v.od,v=v.Ud,xza(p,k,l,yza(Ea(),t,v))):$K(p,A,k,l,v, +D);break;case 111:0!==(108&k)&&WK(k,108,D);17===(17&k)&&aL(k);if(0<=v)throw(new YK).ue(v);t=0!==(2&k)?"0":"";Ca(A)?(v=(+((A|0)>>>0)).toString(8),zza(p,k,l,t,v)):A instanceof qa?(v=Da(A),A=v.od,m=v.Ud,UD(),v=1073741823&A,D=1073741823&((A>>>30|0)+(m<<2)|0),A=m>>>28|0,0!==A?(A=(+(A>>>0)).toString(8),m=(+(D>>>0)).toString(8),D="0000000000".substring(m.length|0),v=(+(v>>>0)).toString(8),v=A+(""+D+m)+(""+"0000000000".substring(v.length|0)+v)):0!==D?(A=(+(D>>>0)).toString(8),v=(+(v>>>0)).toString(8),v=A+ +(""+"0000000000".substring(v.length|0)+v)):v=(+(v>>>0)).toString(8),zza(p,k,l,t,v)):$K(p,A,k,l,v,D);break;case 120:case 88:0!==(108&k)&&WK(k,108,D);17===(17&k)&&aL(k);if(0<=v)throw(new YK).ue(v);t=0===(2&k)?"":0!==(256&k)?"0X":"0x";Ca(A)?(v=(+((A|0)>>>0)).toString(16),zza(p,k,l,t,bL(k,v))):A instanceof qa?(v=Da(A),A=v.od,m=v.Ud,UD(),v=k,0!==m?(m=(+(m>>>0)).toString(16),A=(+(A>>>0)).toString(16),A=m+(""+"00000000".substring(A.length|0)+A)):A=(+(A>>>0)).toString(16),zza(p,v,l,t,bL(k,A))):$K(p,A,k,l, +v,D);break;case 101:case 69:0!==(32&k)&&WK(k,32,D);17!==(17&k)&&12!==(12&k)||aL(k);"number"===typeof A?(t=+A,t!==t||Infinity===t||-Infinity===t?Aza(p,k,l,t):xza(p,k,l,Bza(t,0<=v?v:6,0!==(2&k)))):$K(p,A,k,l,v,D);break;case 103:case 71:0!==(2&k)&&WK(k,2,D);17!==(17&k)&&12!==(12&k)||aL(k);"number"===typeof A?(A=+A,A!==A||Infinity===A||-Infinity===A?Aza(p,k,l,A):(t=k,m=0<=v?v:6,k=0!==(2&k),v=+ba.Math.abs(A),m=0===m?1:m,1E-4<=v&&v<+ba.Math.pow(10,m)?(D=void 0!==ba.Math.log10?+ba.Math.log10(v):+ba.Math.log(v)/ +2.302585092994046,D=Aa(+ba.Math.ceil(D)),v=+ba.Math.pow(10,D)<=v?1+D|0:D,v=m-v|0,k=Cza(A,0l)throw(new UK).e("%-%");Eza(p,k,l,"%");break;case 110:if(0!==(255&k))throw(new cL).e(Dza(k)); +if(0<=v)throw(new YK).ue(v);if(0<=l)throw(new dL).ue(l);vza(p,"\n");break;default:throw(new SK).e(ba.String.fromCharCode(D));}}a=c.t();c.US();return a}function Bx(a,b,c,e){if(null===b)throw(new sf).a();a=Hv(uf(),c,0);b=Iv(a,b,b.length|0);Fza(b);for(a=(new Pj).a();Jv(b);)Kia(b,a,e);Eda(b,a);return a.t()}NK.prototype.$classData=r({Peb:0},!1,"scala.scalajs.runtime.RuntimeString$",{Peb:1,f:1});var Gza=void 0;function ua(){Gza||(Gza=(new NK).a());return Gza} +function eL(){this.vma=!1;this.Cja=this.Pja=this.Oja=null;this.xa=0}eL.prototype=new u;eL.prototype.constructor=eL;eL.prototype.a=function(){return this}; +function Hza(a){return(a.stack+"\n").replace(fL("^[\\s\\S]+?\\s+at\\s+")," at ").replace(gL("^\\s+(at eval )?at\\s+","gm"),"").replace(gL("^([^\\(]+?)([\\n])","gm"),"{anonymous}() ($1)$2").replace(gL("^Object.\x3canonymous\x3e\\s*\\(([^\\)]+)\\)","gm"),"{anonymous}() ($1)").replace(gL("^([^\\(]+|\\{anonymous\\}\\(\\)) \\((.+)\\)$","gm"),"$1@$2").split("\n").slice(0,-1)}function Iza(a){0===(8&a.xa)<<24>>24&&0===(8&a.xa)<<24>>24&&(a.Cja=ba.Object.keys(Jza(a)),a.xa=(8|a.xa)<<24>>24);return a.Cja} +function Kza(a){if(0===(2&a.xa)<<24>>24&&0===(2&a.xa)<<24>>24){for(var b={O:"java_lang_Object",T:"java_lang_String",V:"scala_Unit",Z:"scala_Boolean",C:"scala_Char",B:"scala_Byte",S:"scala_Short",I:"scala_Int",J:"scala_Long",F:"scala_Float",D:"scala_Double"},c=0;22>=c;)2<=c&&(b["T"+c]="scala_Tuple"+c),b["F"+c]="scala_Function"+c,c=1+c|0;a.Oja=b;a.xa=(2|a.xa)<<24>>24}return a.Oja} +function Qza(a,b){var c=fL("^(?:Object\\.|\\[object Object\\]\\.)?(?:ScalaJS\\.c\\.|\\$c_)([^\\.]+)(?:\\.prototype)?\\.([^\\.]+)$"),e=fL("^(?:Object\\.|\\[object Object\\]\\.)?(?:ScalaJS\\.(?:s|f)\\.|\\$(?:s|f)_)((?:_[^_]|[^_])+)__([^\\.]+)$"),f=fL("^(?:Object\\.|\\[object Object\\]\\.)?(?:ScalaJS\\.m\\.|\\$m_)([^\\.]+)$"),g=!1;c=c.exec(b);null===c&&(c=e.exec(b),null===c&&(c=f.exec(b),g=!0));if(null!==c){b=c[1];if(void 0===b)throw(new iL).e("undefined.get");b=36===(65535&(b.charCodeAt(0)|0))?b.substring(1): +b;e=Kza(a);if(LK().aC.call(e,b)){a=Kza(a);if(!LK().aC.call(a,b))throw(new iL).e("key not found: "+b);a=a[b]}else a:for(f=0;;)if(f<(Iza(a).length|0)){e=Iza(a)[f];if(0<=(b.length|0)&&b.substring(0,e.length|0)===e){a=Jza(a);if(!LK().aC.call(a,e))throw(new iL).e("key not found: "+e);a=""+a[e]+b.substring(e.length|0);break a}f=1+f|0}else{a=0<=(b.length|0)&&"L"===b.substring(0,1)?b.substring(1):b;break a}a=a.split("_").join(".").split("$und").join("_");if(g)g="\x3cclinit\x3e";else{g=c[2];if(void 0===g)throw(new iL).e("undefined.get"); +0<=(g.length|0)&&"init___"===g.substring(0,7)?g="\x3cinit\x3e":(c=g.indexOf("__")|0,g=0>c?g:g.substring(0,c))}return(new R).M(a,g)}return(new R).M("\x3cjscode\x3e",b)}function Rza(a){var b=gL("Line (\\d+).*script (?:in )?(\\S+)","i");a=a.message.split("\n");for(var c=[],e=2,f=a.length|0;e>24&&0===(4&a.xa)<<24>>24&&(a.Pja={sjsr_:"scala_scalajs_runtime_",sjs_:"scala_scalajs_",sci_:"scala_collection_immutable_",scm_:"scala_collection_mutable_",scg_:"scala_collection_generic_",sc_:"scala_collection_",sr_:"scala_runtime_",s_:"scala_",jl_:"java_lang_",ju_:"java_util_"},a.xa=(4|a.xa)<<24>>24);return a.Pja}eL.prototype.$classData=r({Qeb:0},!1,"scala.scalajs.runtime.StackTrace$",{Qeb:1,f:1});var Sza=void 0;function jL(){}jL.prototype=new u; +jL.prototype.constructor=jL;jL.prototype.a=function(){return this};function gL(a,b){Tza||(Tza=(new jL).a());return new ba.RegExp(a,b)}function fL(a){Tza||(Tza=(new jL).a());return new ba.RegExp(a)}jL.prototype.$classData=r({Reb:0},!1,"scala.scalajs.runtime.StackTrace$StringRE$",{Reb:1,f:1});var Tza=void 0;function kL(){}kL.prototype=new u;kL.prototype.constructor=kL;kL.prototype.a=function(){return this};function mb(a,b){return b instanceof EK?b.Px:b} +function Ph(a,b){return b instanceof CF?b:(new EK).d(b)}kL.prototype.$classData=r({Seb:0},!1,"scala.scalajs.runtime.package$",{Seb:1,f:1});var Uza=void 0;function E(){Uza||(Uza=(new kL).a());return Uza}function lL(){}lL.prototype=new u;lL.prototype.constructor=lL;lL.prototype.a=function(){return this}; +function Vza(a,b){if(b instanceof Jj)return a.r===b.r;if(Wza(b)){if("number"===typeof b)return+b===a.r;if(b instanceof qa){b=Da(b);var c=b.Ud;a=a.r;return b.od===a&&c===a>>31}return null===b?null===a:ra(b,a)}return null===a&&null===b} +function Va(a,b,c){if(b===c)c=!0;else if(Wza(b))a:if(Wza(c))c=Xza(b,c);else{if(c instanceof Jj){if("number"===typeof b){c=+b===c.r;break a}if(b instanceof qa){a=Da(b);b=a.Ud;c=c.r;c=a.od===c&&b===c>>31;break a}}c=null===b?null===c:ra(b,c)}else c=b instanceof Jj?Vza(b,c):null===b?null===c:ra(b,c);return c} +function Xza(a,b){if("number"===typeof a){a=+a;if("number"===typeof b)return a===+b;if(b instanceof qa){var c=Da(b);b=c.od;c=c.Ud;return a===SD(Ea(),b,c)}return b instanceof mL?b.h(a):!1}if(a instanceof qa){c=Da(a);a=c.od;c=c.Ud;if(b instanceof qa){b=Da(b);var e=b.Ud;return a===b.od&&c===e}return"number"===typeof b?(b=+b,SD(Ea(),a,c)===b):b instanceof mL?b.h((new qa).Sc(a,c)):!1}return null===a?null===b:ra(a,b)}lL.prototype.$classData=r({Veb:0},!1,"scala.runtime.BoxesRunTime$",{Veb:1,f:1}); +var Yza=void 0;function Wa(){Yza||(Yza=(new lL).a());return Yza}var Zza=r({afb:0},!1,"scala.runtime.Null$",{afb:1,f:1});function nL(){}nL.prototype=new u;nL.prototype.constructor=nL;nL.prototype.a=function(){return this};function SJ(a,b){if(xda(b,1)||yaa(b,1)||Baa(b,1)||zaa(b,1)||Aaa(b,1)||vaa(b,1)||waa(b,1)||xaa(b,1)||uaa(b,1)||$za(b))return b.n.length;if(null===b)throw(new sf).a();throw(new x).d(b);} +function aAa(a,b,c,e){if(xda(b,1))b.n[c]=e;else if(yaa(b,1))b.n[c]=e|0;else if(Baa(b,1))b.n[c]=+e;else if(zaa(b,1))b.n[c]=Da(e);else if(Aaa(b,1))b.n[c]=+e;else if(vaa(b,1))b.n[c]=null===e?0:e.r;else if(waa(b,1))b.n[c]=e|0;else if(xaa(b,1))b.n[c]=e|0;else if(uaa(b,1))b.n[c]=!!e;else if($za(b))b.n[c]=void 0;else{if(null===b)throw(new sf).a();throw(new x).d(b);}}function V(a,b){a=new oL;a.$qa=b;a.MS=0;a.zja=b.E();return UJ(a,b.H()+"(",",",")")} +function bAa(a,b,c){if(xda(b,1)||yaa(b,1)||Baa(b,1)||zaa(b,1)||Aaa(b,1))return b.n[c];if(vaa(b,1))return gc(b.n[c]);if(waa(b,1)||xaa(b,1)||uaa(b,1)||$za(b))return b.n[c];if(null===b)throw(new sf).a();throw(new x).d(b);}nL.prototype.$classData=r({cfb:0},!1,"scala.runtime.ScalaRunTime$",{cfb:1,f:1});var cAa=void 0;function W(){cAa||(cAa=(new nL).a());return cAa}function dAa(){}dAa.prototype=new u;dAa.prototype.constructor=dAa;d=dAa.prototype;d.a=function(){return this}; +d.mP=function(a,b){b=ca(-862048943,b);b=ca(461845907,b<<15|b>>>17|0);return a^b};function eAa(a,b){a=Aa(b);if(a===b)return a;var c=Ea();a=Zsa(c,b);c=c.Wj;return SD(Ea(),a,c)===b?a^c:oaa(paa(),b)}function NJ(a,b){return null===b?0:"number"===typeof b?eAa(0,+b):b instanceof qa?(a=Da(b),pL(0,(new qa).Sc(a.od,a.Ud))):sa(b)}d.Ga=function(a,b){a=this.mP(a,b);return-430675100+ca(5,a<<13|a>>>19|0)|0};function pL(a,b){a=b.od;b=b.Ud;return b===a>>31?a:a^b} +d.fe=function(a,b){a^=b;a=ca(-2048144789,a^(a>>>16|0));a=ca(-1028477387,a^(a>>>13|0));return a^(a>>>16|0)};d.$classData=r({efb:0},!1,"scala.runtime.Statics$",{efb:1,f:1});var fAa=void 0;function OJ(){fAa||(fAa=(new dAa).a());return fAa}function qL(){}qL.prototype=new u;qL.prototype.constructor=qL;qL.prototype.a=function(){return this};qL.prototype.un=function(){return kk()};qL.prototype.$classData=r({dra:0},!1,"amf.AMFStyle$",{dra:1,f:1,hga:1});var gAa=void 0; +function hk(){gAa||(gAa=(new qL).a());return gAa}function rL(){this.ea=null}rL.prototype=new u;rL.prototype.constructor=rL;rL.prototype.R3=function(a,b){return sfa(iq(),a,b)};rL.prototype.a=function(){hAa=this;this.ea=nv().ea;return this};rL.prototype.O3=function(a){return gp(bp()).b$(a)};rL.prototype.HU=function(){fea||(fea=(new Bk).a());fea.fda(this.ea);var a=ab(),b=Po().fp(),c=ab().Yo();return ll(a,b,c).Ra()};rL.prototype.registerPlugin=function(a){Oo(Po(),a)}; +rL.prototype.registerNamespace=function(a,b){return F().yu.Ue(a,(new sL).e(b)).na()};rL.prototype.emitShapesGraph=function(a){return this.O3(a)};rL.prototype.loadValidationProfile=function(a){for(var b=arguments.length|0,c=1,e=[];cMc(ua(),a,"\\.").n.length} +function uCa(a){a=a.td;try{ue();var b=ba.decodeURIComponent(a);var c=(new ye).d(b)}catch(e){if(null!==Ph(E(),e))ue(),c=(new ve).d(a);else throw e;}if(c instanceof ye||c instanceof ve)return c.i;throw(new x).d(c);} +function Iha(a){if(null===a.td)var b=!0;else{b=a.td;if(null===b)throw(new sf).a();b=""===b}if(b)return"";b=a.td;0<=(b.length|0)&&"http:"===b.substring(0,5)?b=!0:(b=a.td,b=0<=(b.length|0)&&"https:"===b.substring(0,6));b?b=!0:(b=a.td,b=0<=(b.length|0)&&"file:"===b.substring(0,5));if(b)return a.td;b=a.td;return 0<=(b.length|0)&&"/"===b.substring(0,1)?"file:/"+a.td:"file://"+a.td}function fh(a){return"(amf-"+a.td+")"} +je.prototype.Bu=function(){var a=this.td;if(null===a)throw(new sf).a();return""===a?y():Vb().Ia(this.td)};je.prototype.e=function(a){this.td=a;this.ea=nv().ea;return this};je.prototype.$classData=r({dDa:0},!1,"amf.core.utils.package$AmfStrings",{dDa:1,f:1,ib:1});function pI(){this.ea=null}pI.prototype=new u;pI.prototype.constructor=pI;pI.prototype.a=function(){Gva=this;this.ea=nv().ea;return this}; +function Hva(a){Dea||(Dea=(new nl).a());Dea.fda(a.ea);No();a=vCa();Oo(Po(),a);No();a=Cea();Oo(Po(),a);No();a=oAa();Oo(Po(),a);No();a=pAa();Oo(Po(),a);No();a=rAa();Oo(Po(),a);No();a=qAa();Oo(Po(),a);No();a=OL();Oo(Po(),a);No();a=wCa();Oo(Po(),a)}pI.prototype.register=function(){Hva(this)};pI.prototype.$classData=r({PDa:0},!1,"amf.plugins.document.WebApi$",{PDa:1,f:1,ib:1});var Gva=void 0;function kw(){ew.call(this);this.o9=null}kw.prototype=new Mja;kw.prototype.constructor=kw; +kw.prototype.PD=function(a){return this.wc.GN?a===this.o9?"./":a.split(this.o9).join(""):a};kw.prototype.$classData=r({TDa:0},!1,"amf.plugins.document.graph.emitter.FlattenedEmissionContext",{TDa:1,Uga:1,f:1});function Uja(){this.kf=this.Zw=this.pg=this.wc=this.s=null}Uja.prototype=new u;Uja.prototype.constructor=Uja;d=Uja.prototype; +d.hW=function(a){this.s.Tba(w(function(b,c){return function(e){e.kg("@graph",w(function(f,g){return function(h){h.Uk(w(function(k,l){return function(m){k.kf=m;var p=hd(l.Y(),Af().Ic);m=hd(l.Y(),Af().xc);p.b()?p=y():(p=p.c(),p=(new z).d(p.r.r.wb));p=p.b()?H():p.c();m.b()?m=y():(m=m.c(),m=(new z).d(m.r.r.wb));m=m.b()?H():m.c();yi(k.pg.Ph,p);yi(k.pg.Q,m);it(l.Y(),Af().Ic);it(l.Y(),Af().xc);for(xCa(k,l);!k.Zw.LE.b();)fta(k.Zw.LE).DG.P(k.kf);for(yCa(k,l);!k.Zw.LE.b();)m=fta(k.Zw.LE),k.pg.zr=m.qu,k.pg.uw= +m.ru,m.DG.P(k.kf)}}(f,g)))}}(b,c)));Qja(b.pg,e)}}(this,a)))};d.gO=function(a,b){a.Gi(w(function(c,e){return function(f){uN(c,f,e.j)}}(this,b)));vN(this.Zw,zCa(this,b))}; +d.E9=function(a,b,c,e){tc(e.ju)&&(b.VL?c.kg("smaps",w(function(f,g,h){return function(k){k.Gi(w(function(l,m,p){return function(t){wN(l,m,t,p.ju)}}(f,g,h)))}}(this,a,e))):c.kg(gw(this.pg,ic(nc().bb.r)),w(function(f,g,h){return function(k){k.Uk(w(function(l,m,p){return function(t){t.Gi(w(function(v,A,D){return function(C){uN(v,C,A);C=(new ACa).KK(v,A,D);C.kt=(new z).d(A);C.qu=v.pg.zr;C.ru=v.pg.uw;vN(v.Zw,C)}}(l,m,p)))}}(f,g,h)))}}(this,a,e))))}; +d.rT=function(a,b){var c=Za(b),e=Za(b);if(!e.b()){e=e.c();var f=db().pf;eb(b,f,e.j);it(b.Y(),db().te)}a.Gi(w(function(g,h){return function(k){uN(g,k,h.j);vN(g.Zw,zCa(g,h))}}(this,b)));c.b()||(a=c.c(),Ui(b.Y(),db().te,a,(O(),(new P).a())))}; +d.b0=function(a,b,c){this.wc.pS&&tc(b.x)?this.wc.VL?c.kg("smaps",w(function(e,f,g){return function(h){h.Gi(w(function(k,l,m){return function(p){wN(k,l,p,m.x);wN(k,l,p,m.ju)}}(e,f,g)))}}(this,a,b))):c.kg(gw(this.pg,ic(nc().bb.r)),w(function(e,f,g){return function(h){h.Uk(w(function(k,l,m){return function(p){p.Gi(w(function(t,v,A){return function(D){uN(t,D,v);D=(new BCa).KK(t,v,A);D.kt=(new z).d(v);D.qu=t.pg.zr;D.ru=t.pg.uw;vN(t.Zw,D)}}(k,l,m)))}}(e,f,g)))}}(this,a,b))):this.E9(a,this.wc,c,b)}; +function CCa(a,b,c){b.kg("@type",w(function(e,f){return function(g){g.Uk(w(function(h,k){return function(l){var m=k.Kb(),p=function(){return function(D){return ic(D)}}(h),t=ii().u;if(t===ii().u)if(m===H())p=H();else{t=m.ga();var v=t=ji(p(t),H());for(m=m.ta();m!==H();){var A=m.ga();A=ji(p(A),H());v=v.Nf=A;m=m.ta()}p=t}else{for(t=se(m,t);!m.b();)v=m.ga(),t.jd(p(v)),m=m.ta();p=t.Rc()}for(p=xN(p);!p.b();)m=p.ga(),m=gw(h.pg,m),l.fo(m),p=p.ta()}}(e,f)))}}(a,c)))} +d.Kw=function(a,b,c){c?this.sT(a,b):a.Uk(w(function(e,f){return function(g){e.sT(g,f)}}(this,b)))}; +d.GT=function(a,b,c){if(!this.pg.Ph.Ha(a)){DCa(this.pg.Ph,a);var e=B(a.Y(),qf().R).A;y()===e?(O(),e=(new P).a(),Sd(a,"inline-type",e),a.fa().Lb((new yN).a())):(e=e instanceof z&&"schema"===e.i?!0:e instanceof z&&"type"===e.i?!0:!1,e?a.fa().Lb((new yN).a()):wh(a.fa(),q(cv))||a.fa().Lb((new yN).a()))}e=B(a.Y(),qf().R).A;e=e.b()?null:e.c();if(a instanceof zi){var f=""+a.j+e;f=ta(ua(),f);var g=(new S).a();O();var h=(new P).a();g=(new zi).K(g,h);f=Rd(g,a.j+"/link-"+f);a=jb(f,a);f=db().ed;a=eb(a,f,e)}else a= +a.Ug(e,(O(),(new P).a()));this.vE(b,a,c)}; +d.v3=function(a,b,c,e,f){CCa(this,f,e,(new z).d(b));var g;if(RM(b)&&hd(b.Y(),Zf().xj).na()){var h=e.Ub();ii();for(g=(new Lf).a();!h.b();){var k=h.ga(),l=k,m=Zf().Rd;!1!==!(null===l?null===m:l.h(m))&&Dg(g,k);h=h.ta()}g=g.ua()}else g=e.Ub();AB(e)?(e=K(),h=[ny(),nC()],e=J(e,(new Ib).ha(h))):e=H();h=ii();e=g.ia(e,h.u);b instanceof Xk&&this.wc.UW&&(g=F().NM.he+"/properties",f.kg(g,w(function(p,t){return function(v){var A=Ac(),D=ih(new jh,ls(t).jb(),(new P).a());O();var C=(new P).a();D=kh(D,C);C=function(){return function(){}}(p); +if(yc().h(A))p.Kw(v,D.r.t(),!1),C(D);else if(zN().h(A))p.SE(v,D.r.t(),!1),C(D);else if(SM().h(A))p.Jf(v,D.r.t(),Uh().zp,!1),C(D);else if(qb().h(A)){A=D.r;var I=FF();p.ut(v,A,I);C(D)}else if(zc().h(A))A=D.r,I=AN(),p.ut(v,A,I),C(D);else if(Ac().h(A))A=D.r,I=BN(),p.ut(v,A,I),C(D);else if(hi().h(A))A=D.r,I=CN(),p.ut(v,A,I),C(D);else if(et().h(A))A=D.r,I=CN(),p.ut(v,A,I),C(D);else if(TM().h(A))p.Jf(v,D.r.r.t(),Uh().tj,!1),C(D);else if(ZL().h(A)){A=D.r.r;A=A instanceof DN?(new z).d(A):jH(mF(),ka(A)).pk(); +if(A instanceof z){var L=A.i;if(L.Bt.na()||L.Et.na())p.Jf(v,L.t(),Uh().tj,!1);else{A=L.JA;I=L.mA;L=L.Oz;var Y=(new qg).e("%04d-%02d-%02d");L=[A,I,L];ua();A=Y.ja;K();vk();I=[];Y=0;for(var ia=L.length|0;Ye}else e=!1;if(e){e=this.Lq;f=c.indexOf("|")|0;if(0Fo.w)throw(new U).e("0");dq=gB.length|0;hB=Fo.w+dq|0;uD(Fo,hB);Ba(Fo.L,0,Fo.L,dq,Fo.w);dq=Fo.L;var uu=dq.n.length;tu=fx=0;var iB=gB.length|0;uu=iBFo.w)throw(new U).e("0");dq=gB.length|0;hB=Fo.w+dq|0;uD(Fo,hB);Ba(Fo.L,0,Fo.L,dq,Fo.w);dq=Fo.L;uu=dq.n.length;tu=fx=0;iB=gB.length|0;uu=iBsm.w)throw(new U).e("0"); +Tr=jt.length|0;kt=sm.w+Tr|0;uD(sm,kt);Ba(sm.L,0,sm.L,Tr,sm.w);Tr=sm.L;su=Tr.n.length;mH=hL=0;Ln=jt.length|0;su=LnIf.w)throw(new U).e("0");np=Hk.length|0;mp=If.w+np|0;uD(If,mp);Ba(If.L,0,If.L,np,If.w);np=If.L;sm=np.n.length;jt=cq=0;kt=Hk.length|0;sm=ktIf.w)throw(new U).e("0");np=Hk.length|0;mp=If.w+np|0;uD(If,mp);Ba(If.L,0,If.L,np,If.w);np=If.L;var sm=np.n.length;cq=jt=0;var Tr=Hk.length|0;sm=Tre.w)throw(new U).e("0");var g=a.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=a.length|0;h=me.w)throw(new U).e("0");g=a.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;h=g.n.length;l=k=0;m=a.length|0;h=ma;)if(b.Ja(""+a).b()){e=!0;var f= +""+a,g=Dm().In;eb(c,g,f)}else a=1+a|0}}UQ.prototype.ye=function(a){try{for(var b=gC(),c=UB(),e=VB(a,b,c);e.Ya();){var f=e.iq();f instanceof Ql&&pHa(this,f)}}catch(g){if(null===Ph(E(),g))throw g;}return a};UQ.prototype.$classData=r({NWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.DefaultToNumericDefaultResponse",{NWa:1,ii:1,f:1});function VQ(){this.ob=null}VQ.prototype=new gv;VQ.prototype.constructor=VQ;VQ.prototype.Hb=function(a){fv.prototype.Hb.call(this,a);return this}; +VQ.prototype.ye=function(a){try{for(var b=gC(),c=UB(),e=VB(a,b,c);e.Ya();){var f=e.iq();if(f instanceof en){b=f;var g=ag().Fq;Bi(b,g,!1)}}}catch(h){if(null===Ph(E(),h))throw h;}return a};VQ.prototype.$classData=r({OWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.MakeExamplesOptional",{OWa:1,ii:1,f:1});function SQ(){this.ob=null;this.N_=0}SQ.prototype=new gv;SQ.prototype.constructor=SQ;SQ.prototype.Hb=function(a){fv.prototype.Hb.call(this,a);this.N_=0;return this}; +function qHa(a){if(Vb().Ia(B(a.g,Sk().Jc)).b()){O();var b=(new P).a(),c=(new S).a();b=(new vh).K(c,b);c=Sk().Jc;Vd(a,c,b)}return a} +SQ.prototype.ye=function(a){try{if(a instanceof mf)for(var b=gC(),c=UB(),e=VB(a,b,c);e.Ya();){var f=e.iq();if(f instanceof Td){b=f;var g=Vb().Ia(B(b.g,Ud().ig));if(g instanceof z)var h=qHa(g.i);else{if(y()!==g)throw(new x).d(g);this.N_=1+this.N_|0;O();var k=(new P).a(),l=(new Pd).K((new S).a(),k);MH();var m=Lc(a),p=Rd(l,""+m+("#genAnnotation"+this.N_)),t=B(b.g,Ud().R).A,v=t.b()?null:t.c();O();var A=(new P).a(),D=Sd(p,v,A);O();var C=(new P).a(),I=(new S).a(),L=(new vh).K(I,C),Y=Sk().Jc,ia=Vd(D,Y,L), +pa=Ud().ig;Vd(b,pa,ia);h=ia}if(!ar(a.Y(),Gk().Ic).Od(w(function(ob,zb){return function(Zb){return Zb.j===zb.j}}(this,h)))){var La=Af().Ic;ig(a,La,h)}}}}catch(ob){if(null===Ph(E(),ob))throw ob;}return a};SQ.prototype.$classData=r({PWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.MandatoryAnnotationType",{PWa:1,ii:1,f:1});function QQ(){this.ob=null;this.$P=0}QQ.prototype=new gv;QQ.prototype.constructor=QQ; +QQ.prototype.Hb=function(a){fv.prototype.Hb.call(this,a);this.$P=0;return this}; +function rHa(a,b){B(b.g,Qm().R).A.b()&&sHa(b);B(b.g,Qm().Uv).U(w(function(){return function(c){var e=B(c.g,li().Kn);if(oN(e))if(e=B(c.g,li().Pf).A,e instanceof z){e=e.i;var f=li().Kn;eb(c,f,e)}else e=li().Kn,eb(c,e,"generated");return it(c.g,li().Pf)}}(a)));ar(b.g,Qm().Xm).U(w(function(c){return function(e){if(Vb().Ia(ar(e.g,dj().Sf)).na()){var f=B(e.g,dj().R).A;f.b()?(c.$P=1+c.$P|0,f="Tag "+c.$P+" documentation"):f=f.c();e=ar(e.g,dj().Sf);var g=li().Kn;eb(e,g,f)}}}(a)))} +QQ.prototype.ye=function(a){if(a instanceof mf&&a.qe()instanceof Rm)try{rHa(this,a.qe())}catch(b){if(null===Ph(E(),b))throw b;}return a};function sHa(a){var b=B(a.g,Qm().R);oN(b)&&(O(),b=(new P).a(),Sd(a,"generated",b))}QQ.prototype.$classData=r({QWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.MandatoryDocumentationTitle",{QWa:1,ii:1,f:1});function ZQ(){this.ob=null}ZQ.prototype=new gv;ZQ.prototype.constructor=ZQ; +ZQ.prototype.Hb=function(a){fv.prototype.Hb.call(this,a);return this};function tHa(a,b){if(1===B(b.g,Jl().bk).jb()&&Vb().Ia(AD(B(b.g,Jl().bk).ga())).na()){var c=B(b.g,Jl().bk).ga(),e=B(AD(c).g,Am().Zo);e.Da()&&(it(AD(c).g,Am().Zo),a=w(function(){return function(f){var g=cj().yj;return Bi(f,g,!0)}}(a)),c=K(),e=e.ka(a,c.u),a=Jl().Wm,Zd(b,a,e))}}ZQ.prototype.ye=function(a){try{for(var b=gC(),c=UB(),e=VB(a,b,c);e.Ya();){var f=e.iq();f instanceof Kl&&tHa(this,f)}}catch(g){if(null===Ph(E(),g))throw g;}return a}; +ZQ.prototype.$classData=r({RWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.PushSingleOperationPathParams",{RWa:1,ii:1,f:1});function RQ(){this.ob=null}RQ.prototype=new gv;RQ.prototype.constructor=RQ;RQ.prototype.Hb=function(a){fv.prototype.Hb.call(this,a);return this};RQ.prototype.ye=function(a){return a};RQ.prototype.$classData=r({SWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.SanitizeCustomTypeNames",{SWa:1,ii:1,f:1}); +function lHa(){this.ob=null}lHa.prototype=new gv;lHa.prototype.constructor=lHa;d=lHa.prototype;d.Hb=function(a){fv.prototype.Hb.call(this,a);return this};d.N0=function(a,b){var c=B(b.g,aR().Ny).A;c=c.b()?null:c.c();if("query"===c){b=B(b.g,aR().R).A;b=a.K3(b.b()?"default":b.c());O();c=(new P).a();var e=(new S).a();c=(new vh).K(e,c);e=cj().Jc;Vd(b,e,c)}else"header"===c&&(b=B(b.g,aR().R).A,b=a.lI(b.b()?"default":b.c()),O(),c=(new P).a(),e=(new S).a(),c=(new vh).K(e,c),e=cj().Jc,Vd(b,e,c));it(a.g,Xh().Oh)}; +d.z$=function(a){a.tk().U(w(function(b){return function(c){c instanceof vm&&b.A$(c)}}(this)))};d.A$=function(a){var b=B(a.g,Xh().Oh);if(b instanceof wE){if(B(b.g,xE().Gy).b()){a=J(K(),(new Ib).ha(["implicit"]));var c=xE().Gy;Wr(b,c,a)}a=B(b.g,xE().Ap).kc();b=a.b()?oHa(b):a.c();B(b.g,Jm().vq).A.b()&&(a=Jm().vq,eb(b,a,""));B(b.g,Jm().km).A.b()&&(a=Jm().km,eb(b,a,""))}else b instanceof bR&&this.N0(a,b)};d.ye=function(a){if(Zc(a))try{this.z$(a)}catch(b){if(null===Ph(E(),b))throw b;}return a}; +d.$classData=r({TWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.SecuritySettingsMapper",{TWa:1,ii:1,f:1});function XQ(){this.ob=null}XQ.prototype=new gv;XQ.prototype.constructor=XQ;XQ.prototype.Hb=function(a){fv.prototype.Hb.call(this,a);return this}; +XQ.prototype.ye=function(a){try{for(var b=gC(),c=UB(),e=VB(a,b,c);e.Ya();){var f=e.iq();if(f instanceof Mh){b=f;var g=ni(b);if(!oN(g)){hz();var h=B(b.aa,Fg().af).A,k=Cma(0,h.b()?null:h.c()),l=We();if(null===k||k!==l)var m=Xe(),p=!(null!==k&&k===m);else p=!1;if(p)var t=Ye(),v=!(null!==k&&k===t);else v=!1;if(v){var A=Ue(),D=null!==k&&k===A?J(K(),(new Ib).ha(["rfc3339","rfc2616"])):J(K(),(new Ib).ha("int32 int64 int long float double int16 int8".split(" "))),C=ni(b).A;D.Ha(C.b()?null:C.c())||it(b.aa, +Fg().Fn)}else it(b.aa,Fg().Fn)}}}}catch(I){if(null===Ph(E(),I))throw I;}return a};XQ.prototype.$classData=r({UWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.ShapeFormatAdjuster",{UWa:1,ii:1,f:1});function $Q(){this.ob=null}$Q.prototype=new gv;$Q.prototype.constructor=$Q;$Q.prototype.Hb=function(a){fv.prototype.Hb.call(this,a);return this}; +$Q.prototype.ye=function(a){try{var b=J(Ef(),H()),c=(new qd).d(b);a.tk().U(w(function(D,C){return function(I){return Dg(C.oa,I)}}(this,c)));for(var e=(new lC).ue(1),f=gC(),g=UB(),h=VB(a,f,g);h.Ya();){var k=h.iq();if(k instanceof Vh){b=k;var l=B(b.aa,xn().Le),m=w(function(D,C,I){return function(L){a:{for(var Y=C.oa.Dc;!Y.b();){if(Y.ga().j===L.j){Y=(new z).d(Y.ga());break a}Y=Y.ta()}Y=y()}if(Y instanceof z&&(Y=Y.i,Y instanceof rf&&B(Y.Y(),qf().R).A.na()))return L=B(Y.Y(),qf().R).A,L.b()?null:L.c(); +if(B(L.Y(),qf().R).A.b()){Y="GenShape"+I.oa;I.oa=1+I.oa|0;O();var ia=(new P).a();Sd(L,Y,ia)}Dg(C.oa,L);return B(L.Y(),qf().R)}}(this,c,e)),p=K(),t=l.ka(m,p.u);b.Xa.Lb((new eB).e(t.Kg(" | ")))}}var v=c.oa,A=Af().Ic;Bf(a,A,v)}catch(D){if(null===Ph(E(),D))throw D;}return a};$Q.prototype.$classData=r({VWa:0},!1,"amf.plugins.document.webapi.resolution.pipelines.compatibility.raml.UnionsAsTypeExpressions",{VWa:1,ii:1,f:1});function cR(){qB.call(this);this.LP=null}cR.prototype=new Yna; +cR.prototype.constructor=cR;cR.prototype.rs=function(a,b,c){qB.prototype.rs.call(this,a,b,c);this.LP=zoa().Fqa;return this};cR.prototype.Spa=function(a,b,c,e,f){c.wb.U(w(function(g,h,k,l,m){return function(p){g.pn&&p.fa().Lb((new rB).Uq(h,k));return ig(l,m,p)}}(this,e,f,a,b)))};cR.prototype.Aw=function(){return this.ob};cR.prototype.$classData=r({lXa:0},!1,"amf.plugins.document.webapi.resolution.stages.ExtensionResolutionStage",{lXa:1,hXa:1,f:1});function IB(){}IB.prototype=new xoa; +IB.prototype.constructor=IB;IB.prototype.a=function(){return this};IB.prototype.C8=function(){return!0};IB.prototype.via=function(){return!0};IB.prototype.$classData=r({rXa:0},!1,"amf.plugins.document.webapi.resolution.stages.MergingRestrictions$$anon$1",{rXa:1,pXa:1,f:1});function JB(){this.lja=this.uia=this.w_=null}JB.prototype=new xoa;JB.prototype.constructor=JB; +JB.prototype.a=function(){var a=K();IAa||(IAa=(new fM).a());var b=IAa.R;HAa||(HAa=(new eM).a());var c=HAa.R;GAa||(GAa=(new dM).a());var e=GAa.Zc,f=qf().Zc;FAa||(FAa=(new cM).a());var g=FAa.Va;uHa||(uHa=(new dR).a());var h=uHa.Sf,k=dj().Sf,l=Qm().Uv,m=Bq().ae;vHa||(vHa=(new eR).a());b=[b,c,e,f,g,h,k,l,m,vHa.Ec,Yd(nc())];this.w_=J(a,(new Ib).ha(b));a=K();b=[Jl().Uf,Pl().pm,Dm().In,xm().Nd];this.uia=J(a,(new Ib).ha(b));a=K();b=[Qm().lh];this.lja=J(a,(new Ib).ha(b));return this};JB.prototype.C8=function(a){return this.w_.Ha(a)}; +JB.prototype.via=function(a){return a.ba instanceof zB?this.w_.Ha(a)||this.uia.Ha(a):this.w_.Ha(a)||!this.lja.Ha(a)};JB.prototype.$classData=r({sXa:0},!1,"amf.plugins.document.webapi.resolution.stages.MergingRestrictions$$anon$2",{sXa:1,pXa:1,f:1});function fR(){qB.call(this);this.LP=null}fR.prototype=new Yna;fR.prototype.constructor=fR;fR.prototype.rs=function(a,b,c){qB.prototype.rs.call(this,a,b,c);this.LP=zoa().Gna;return this}; +fR.prototype.Spa=function(a,b,c,e,f){c=c.wb;e=w(function(g,h,k){return function(l){g.pn&&l.fa().Lb((new rB).Uq(h,k));return l}}(this,e,f));f=K();c=c.ka(e,f.u);Zd(a,b,c)};fR.prototype.Aw=function(){return this.ob};fR.prototype.$classData=r({tXa:0},!1,"amf.plugins.document.webapi.resolution.stages.OverlayResolutionStage",{tXa:1,hXa:1,f:1});function gR(){}gR.prototype=new u;gR.prototype.constructor=gR;gR.prototype.a=function(){return this}; +function wHa(a,b,c,e){a=c.FV.c();var f=c.Ld,g=y(),h=y(),k=y(),l=y(),m=y(),p=y(),t=y(),v=y(),A=y(),D=y(),C=y(),I=y(),L=y(),Y=J(K(),H());K();pj();var ia=(new Lf).a();b=EO(a,b,f,g,h,k,l,m,p,t,v,A,D,C,I,L,Y,ia.ua(),y(),y());e=ic(e);if("http://www.w3.org/ns/shacl#minCount"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,c,b.Lp,b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#maxCount"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,c,b.kl,b.Lp, +b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#pattern"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,c,b.Gr,b.Kp,b.kl,b.Lp,b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#minExclusive"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,b.gq,c,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#maxExclusive"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr, +b.Kp,b.kl,b.Lp,b.gq,b.Ak,c,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#minInclusive"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,b.gq,b.Ak,b.yk,c,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#maxInclusive"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,b.gq,b.Ak,b.yk,b.Bk,c,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#minLength"===e)return c=(new z).d(c.r),EO(b.Jj,b.$, +b.Ld,b.hh,b.Gr,b.Kp,b.kl,c,b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#maxLength"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,c,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#in"===e)return Gb(),c=c.r,c=mD(0,Mc(ua(),c,"\\s*,\\s*")),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,b.fn,c,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#node"===e)return c=(new z).d(c.r), +EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,c,b.Dj,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#datatype"===e)return c=(new z).d(c.r),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,c,b.fn,b.hn,b.Cj,b.Mq);if("http://www.w3.org/ns/shacl#class"===e)return c=J(K(),(new Ib).ha([c.r])),EO(b.Jj,b.$,b.Ld,b.hh,b.Gr,b.Kp,b.kl,b.Lp,b.gq,b.Ak,b.yk,b.Bk,b.zk,b.hq,b.Ca,b.Dj,c,b.hn,b.Cj,b.Mq);throw mb(E(),(new nb).e("Unsupported constraint "+c.gu)); +} +function xHa(a,b){a=w(function(){return function(e){var f=e.Gea;if(f instanceof z)f=f.i.trim();else if(hR(),f=e.Gea,f instanceof z)f=f.i,f=ic($v(F(),f.trim()));else if(y()===f){f=Gca(e.fca,"domain");var g=Gca(e.FV,"property"),h=(new z).d(e.gu);h=Gca(h,"constraint");f=""+F().xF.he+f+"-"+g.trim()+"-"+h.trim()}else throw(new x).d(f);g=e.Ld;g=g.b()?"":g.c();h=(new z).d(e.toa);var k=(new z).d(e.Hna),l=K(),m=e.fca;m.b()?(m=F().Zd,m=ic(G(m,"DomainElement"))):m=m.c();l=J(l,(new Ib).ha([m]));oj();K();pj();m= +(new Lf).a().ua();oj();K();pj();var p=(new Lf).a().ua();oj();K();pj();var t=(new Lf).a().ua();oj();K();pj();var v=(new Lf).a().ua();oj();K();pj();var A=(new Lf).a().ua();oj();var D=y();oj();K();pj();var C=(new Lf).a().ua();oj();K();pj();var I=(new Lf).a().ua();oj();var L=y();oj();var Y=y();oj();var ia=y();g=qj(new rj,f,g,h,k,m,l,p,t,v,A,D,C,I,L,Y,ia);h=ic($v(F(),e.Yk.trim()));if("http://www.w3.org/ns/shacl#path"===h)return-1!==(e.gu.trim().indexOf("#")|0)?(h=e.gu.trim(),h=Mc(ua(),h,"#"),k=F(),l=zj((new Pc).fd(h)), +k=("http://a.ml/vocabularies/document"===l?(new z).d(k.Zd):"http://a.ml/vocabularies/apiContract"===l?(new z).d(k.Ta):"http://a.ml/vocabularies/apiBinding"===l?(new z).d(k.Jb):"http://a.ml/vocabularies/security"===l?(new z).d(k.dc):"http://a.ml/vocabularies/shapes"===l?(new z).d(k.Eb):"http://a.ml/vocabularies/data"===l?(new z).d(k.Pg):"http://a.ml/vocabularies/document-source-maps"===l?(new z).d(k.ez):"http://www.w3.org/ns/shacl"===l?(new z).d(k.Ua):"http://a.ml/vocabularies/core#"===l?(new z).d(k.Tb): +"http://www.w3.org/2001/XMLSchema"===l?(new z).d(k.Bj):"http://a.ml/vocabularies/shapes/anon"===l?(new z).d(k.Jfa):"http://www.w3.org/1999/02/22-rdf-syntax-ns"===l?(new z).d(k.Qi):""===l?(new z).d(k.nia):"http://a.ml/vocabularies/meta"===l?(new z).d(k.$c):"http://www.w3.org/2002/07/owl"===l?(new z).d(k.bv):"http://www.w3.org/2000/01/rdf-schema"===l?(new z).d(k.Ul):"http://a.ml/vocabularies/amf/parser"===l?(new z).d(k.xF):y()).c(),h=Oc((new Pc).fd(h)),h=G(k,h)):h=$v(F(),e.gu),null!==h&&(k=h.yu,l=F().Ua, +null===l?null===k:l.h(k))?(k=K(),e=[wHa(hR(),f+"/prop",e,h)],e=J(k,(new Ib).ha(e)),qj(new rj,g.$,g.Ld,g.yv,g.vv,g.At,g.Hv,g.Jv,g.vy,g.Lx,g.xy,g.jy,e,g.QB,g.Iz,g.Bw,g.Cj)):null!==h&&(f=h.yu,k=F().Eb,null===k?null===f:k.h(f))?(e=Vb().Ia(yHa(hR(),e,h)),qj(new rj,g.$,g.Ld,g.yv,g.vv,g.At,g.Hv,g.Jv,g.vy,g.Lx,g.xy,g.jy,g.my,g.QB,g.Iz,e,g.Cj)):g;if("http://www.w3.org/ns/shacl#targetObjectsOf"===h&&e.FV.na())return f=K(),h=[e.FV.c()],f=J(f,(new Ib).ha(h)),h=K(),e=[(new iR).Hc(e.gu,e.r)],e=J(h,(new Ib).ha(e)), +qj(new rj,g.$,g.Ld,g.yv,g.vv,g.At,g.Hv,f,g.vy,g.Lx,g.xy,g.jy,g.my,e,g.Iz,g.Bw,g.Cj);throw mb(E(),(new nb).e("Unknown validation target "+e.Yk));}}(a));var c=K();return b.ka(a,c.u)}function yHa(a,b,c){a=b.Ld;b=y();Koa||(Koa=(new cC).a());var e=Koa.TT.Ja(c.$);c=(new z).d(c.$);var f=J(K(),H()),g=J(K(),H());return zHa(a,e,f,b,g,c)} +function fpa(){var a=hR();Aoa||(Aoa=(new KB).a());var b=Aoa.X;a=w(function(e){return function(f){if(null!==f){var g=f.ma(),h=f.ya();f=xHa(hR(),h.Cb(w(function(){return function(C){return C.gC===Yb().qb}}(e))));var k=xHa(hR(),h.Cb(w(function(){return function(C){return C.gC===Yb().zx}}(e))));h=xHa(hR(),h.Cb(w(function(){return function(C){return C.gC===Yb().dh}}(e))));var l=FO().Bf;ii();for(var m=(new Lf).a();!l.b();){var p=l.ga(),t=p;jR(FO(),t.j,g)===Yb().qb!==!1&&Dg(m,p);l=l.ta()}l=m.ua();m=function(){return function(C){return C.$}}(e); +p=ii().u;if(p===ii().u)if(l===H())m=H();else{p=l.ga();t=p=ji(m(p),H());for(l=l.ta();l!==H();){var v=l.ga();v=ji(m(v),H());t=t.Nf=v;l=l.ta()}m=p}else{for(p=se(l,p);!l.b();)t=l.ga(),p.jd(m(t)),l=l.ta();m=p.Rc()}p=FO().Bf;ii();for(l=(new Lf).a();!p.b();)v=t=p.ga(),jR(FO(),v.j,g)===Yb().zx!==!1&&Dg(l,t),p=p.ta();p=l.ua();l=function(){return function(C){return C.$}}(e);t=ii().u;if(t===ii().u)if(p===H())p=H();else{t=p.ga();v=t=ji(l(t),H());for(p=p.ta();p!==H();){var A=p.ga();A=ji(l(A),H());v=v.Nf=A;p=p.ta()}p= +t}else{for(t=se(p,t);!p.b();)v=p.ga(),t.jd(l(v)),p=p.ta();p=t.Rc()}t=FO().Bf;ii();for(l=(new Lf).a();!t.b();)A=v=t.ga(),jR(FO(),A.j,g)===Yb().dh!==!1&&Dg(l,v),t=t.ta();t=l.ua();l=function(){return function(C){return C.$}}(e);v=ii().u;if(v===ii().u)if(t===H())t=H();else{v=t.ga();A=v=ji(l(v),H());for(t=t.ta();t!==H();){var D=t.ga();D=ji(l(D),H());A=A.Nf=D;t=t.ta()}t=v}else{for(v=se(t,v);!t.b();)A=t.ga(),v.jd(l(A)),t=t.ta();t=v.Rc()}l=kk();l=null!==g&&g.h(l)?y():(new z).d(kk());v=w(function(){return function(C){return C.$}}(e)); +A=K();v=k.ka(v,A.u);A=ii();p=p.ia(v,A.u);v=w(function(){return function(C){return C.$}}(e));A=K();v=h.ka(v,A.u);A=ii();t=t.ia(v,A.u);v=w(function(){return function(C){return C.$}}(e));A=K();v=f.ka(v,A.u);A=ii();m=m.ia(v,A.u);v=K();k=k.ia(h,v.u);h=K();f=k.ia(f,h.u);k=FO().Bf;h=K();f=f.ia(k,h.u);K();pj();k=(new Lf).a().ua();h=(new wu).a();return AEa(g,l,m,p,t,k,f,h)}throw(new x).d(f);}}(a));var c=Id().u;return Jd(b,a,c).ua()} +gR.prototype.$classData=r({zXa:0},!1,"amf.plugins.document.webapi.validation.DefaultAMFValidations$",{zXa:1,f:1,dhb:1});var AHa=void 0;function hR(){AHa||(AHa=(new gR).a());return AHa}function kR(){}kR.prototype=new u;kR.prototype.constructor=kR;kR.prototype.a=function(){return this}; +function Eca(a){return"$url"===a||"$method"===a||"$statusCode"===a||(0<=(a.length|0)&&"$request."===a.substring(0,9)?BHa(uza(ua(),a,"\\$request.","")):0<=(a.length|0)&&"$response."===a.substring(0,10)&&BHa(uza(ua(),a,"\\$response.","")))} +function BHa(a){var b;!(b=0<=(a.length|0)&&"header."===a.substring(0,7)||0<=(a.length|0)&&"query."===a.substring(0,6)||0<=(a.length|0)&&"path."===a.substring(0,5))&&(b=0<=(a.length|0)&&"body"===a.substring(0,4))&&(a=uza(ua(),a,"body",""),b=""===a||0<=(a.length|0)&&"#/"===a.substring(0,2));return b}kR.prototype.$classData=r({JXa:0},!1,"amf.plugins.document.webapi.validation.Oas3ExpressionValidator$",{JXa:1,f:1,chb:1});var CHa=void 0;function Vra(){CHa||(CHa=(new kR).a());return CHa} +function lR(){}lR.prototype=new u;lR.prototype.constructor=lR;lR.prototype.a=function(){return this};lR.prototype.m2=function(){return!1};function DHa(a,b){return!b.Od(w(function(){return function(c){return c.zm===Yb().qb}}(a)))}lR.prototype.RL=function(a){return DHa(this,a)};lR.prototype.$classData=r({ZXa:0},!1,"amf.plugins.document.webapi.validation.remote.BooleanValidationProcessor$",{ZXa:1,f:1,gYa:1});var EHa=void 0;function FHa(){EHa||(EHa=(new lR).a());return EHa} +function mR(){this.vo=this.pa=null;this.Xaa=!1;this.Qda=this.ns=null}mR.prototype=new u;mR.prototype.constructor=mR;function GHa(){}GHa.prototype=mR.prototype; +function HHa(a,b,c,e){if(Iva().CP.Ha(b))try{if(a.Xaa)var f=(new R).M(y(),y());else{if("application/json"===b)var g=a.Lea,h=wp(),k=!(null!==g&&g===h);else k=!1;if(k)var l=(new R).M((new z).d(IHa(c)),y());else{var m=new nR;if(null===a)throw mb(E(),null);m.l=a;m.Lz="";m.lj=1;m.TD=J(Ef(),H());var p=new Yp,t=H();K();pj();var v=(new Lf).a(),A=(new oR).il("",t,(new Aq).zo("",v.ua(),(new Mq).a(),Nq(),y()),y(),y(),y(),iA().ho);if("application/json"===b){TG();var D=new RG;LF();var C=(new SG).YG(ata(cta(),c, +""),vF().dl);var I=wua(D,C,m)}else{Rua();var L=Fta(Hta(),c);I=Pua(L,m)}var Y=Cj(I).Fd;Uf();if(JHa(Y)){vs();var ia=y(),pa=ts(0,c,ia,(O(),(new P).a()))}else pa=px(Y,(new ox).a(),y(),(new Nd).a(),A).Fr();var La=Tf(0,pa,b);var ob=mfa(p,La,m.TD.ua());if(tc(ob.ll))Cc=!1;else var zb=a.Lea,Zb=wp(),Cc=null!==zb&&zb===Zb;if(Cc){a:{var vc=tpa(),id=ob.vg,yd=a.pa;if(spa(0,yd)||rpa(vc,yd)){var zd=ar(id.g,sl().nb);if(zd instanceof Vi){var rd=B(zd.aa,Wi().af).A;if(rd.b())Vc=!1;else var sd=rd.c(),le=Uh().zj,Vc=sd=== +le;if(!Vc){Uf();vs();var Sc=B(zd.aa,Wi().vf).A,Qc=ts(0,Sc.b()?null:Sc.c(),(new z).d(Uh().zj),zd.Xa),$c=B(id.g,sl().Nd).A;var Wc=Tf(0,Qc,$c.b()?null:$c.c());break a}}}Wc=id}var Qe=mfa(new Yp,Wc,ob.ll)}else Qe=ob;l=tc(Qe.ll)?(new R).M(y(),(new z).d(Qe)):(new R).M(KHa(Qe.vg),(new z).d(Qe))}f=l}return LHa(a,f,e)}catch(Qd){if(Qd instanceof pR)return e.m2(Qd,y());throw Qd;}else return a=K(),b="Unsupported payload media type '"+b+"', only "+Iva().CP.t()+" supported",c=Yb().qb,f=y(),g=Ko().EF.j,h=y(),k=y(), +b=[Xb(b,c,"",f,g,h,k,null)],e.RL(J(a,(new Ib).ha(b)))}mR.prototype.xma=function(a,b){return nq(hp(),oq(function(c,e,f){return function(){return!!HHa(c,e,f,FHa())}}(this,a,b)),ml())};mR.prototype.D3=function(a,b){return nq(hp(),oq(function(c,e,f){return function(){var g=mj().Vp;return HHa(c,e,f,(new qR).f1(g))}}(this,a,b)),ml())};mR.prototype.Y6a=function(a){this.pa=a;this.vo=Yb().qb;this.Xaa=a instanceof Wh;this.ns=fp();this.Qda=Rb(Ut(),H())}; +mR.prototype.C3=function(a){return nq(hp(),oq(function(b,c){return function(){var e=mj().Vp;e=(new qR).f1(e);try{var f=b.Xaa?(new R).M(y(),y()):(new R).M(KHa(c),(new z).d(mfa(new Yp,c,H())));var g=LHa(b,f,e)}catch(h){if(h instanceof pR)g=e.m2(h,(new z).d(ar(c.g,sl().nb)));else throw h;}return g}}(this,a)),ml())}; +function LHa(a,b,c){if(null!==b){var e=b.ya();if(e instanceof z&&(e=e.i,tc(e.ll)))return c.RL(e.ll)}if(null!==b){e=b.ma();var f=b.ya();if(e instanceof z){b=e.i;f.b()?e=y():(e=f.c(),e=(new z).d(e.vg));try{if(a.pa instanceof vh){var g=a.pa,h=a.Qda.Ja(g.j);if(h instanceof z){var k=h.i;ue();var l=(new z).d(k);var m=(new ye).d(l)}else{O();var p=(new P).a(),t=(new ql).K((new S).a(),p);Ui(t.g,kea().nb,g,(O(),(new P).a()));var v=kq(),A=new Dc,D=new rR,C=(new gy).cU(Np(Op(),t),Nga());D.O0=t;sR.prototype.U$.call(D, +t,C);var I=uAa(v,$q(A,D.fK(),y()));if(I instanceof z){var L=IHa(ka(I.i));LK().aC.call(L,"x-amf-fragmentType")&&delete L["x-amf-fragmentType"];LK().aC.call(L,"example")&&delete L.example;LK().aC.call(L,"examples")&&delete L.examples;LK().aC.call(L,"x-amf-examples")&&delete L["x-amf-examples"];ue();var Y=(new z).d(L);var ia=(new ye).d(Y)}else if(y()===I){ue();var pa=y();ia=(new ye).d(pa)}else throw(new x).d(I);if(ia instanceof ye){var La=ia.i;if(!La.b()){var ob=La.c();a.Qda.Ue(g.j,ob)}ue();m=(new ye).d(La)}else if(ia instanceof +ve){var zb=ia.i;ue();m=(new ve).d(zb)}else throw(new x).d(ia);}}else{ue();var Zb=K(),Cc=a.vo,vc=(new z).d(a.pa.j),id=Ko().EF.j,yd=Ab(a.pa.fa(),q(jd)),zd=a.pa.Ib(),rd=[Xb("Cannot validate shape that is not an any shape",Cc,"",vc,id,yd,zd,null)],sd=c.RL(J(Zb,(new Ib).ha(rd)));m=(new ve).d(sd)}if(m instanceof ye){var le=m.i;if(le instanceof z){var Vc=le.i;a=e;var Sc=c===FHa();if(Sc)var Qc=ppa().t$();else{var $c=ppa();if(0===(1&$c.xa)<<24>>24&&0===(1&$c.xa)<<24>>24){var Wc=mpa(),Qe=(new (hpa())(gpa(Wc))).addMetaSchema(jpa()); +var Qd=kpa(Qe);$c.uo=Qd;$c.xa=(1|$c.xa)<<24>>24}Qc=$c.uo}try{var me=!!Qc.validate(Vc,b);if(Sc)var of=me;else{if(me)pf=H();else{var Le=Qc.errors;Vc=void 0===Le?[]:Le;Sc=[];me=0;for(var Ve=Vc.length|0;me>24&&0===(1&a.Ci)<<24>>24&&(a.uoa=tra(),a.Ci=(1|a.Ci)<<24>>24);return a.uoa}function pE(a,b,c,e){a.wH=a.wH.wp(b);b=Lb(a).namedNode(b);c=Lb(a).namedNode(c);e=Lb(a).namedNode(e);a.xs.add(b,c,e);return a} +Kb.prototype.lE=function(a){this.xs=a;At.prototype.a.call(this);this.wH=Rb(Gb().ab,H());return this};function bJa(){throw mb(E(),(new nb).e("Sync rdf serialization to writer not supported yet"));}function oE(a,b,c,e,f){a.wH=a.wH.wp(b);b=Lb(a).namedNode(b);c=Lb(a).namedNode(c);f instanceof z?(f=f.i,e=Lb(a).literal(e,f)):e=Lb(a).literal(e);a.xs.add(b,c,e);return a}Kb.prototype.$classData=r({Z1a:0},!1,"amf.plugins.features.validation.RdflibRdfModel",{Z1a:1,Rgb:1,f:1}); +function PR(){this.ea=this.Am=this.Bf=this.uo=this.ria=null;this.xa=0}PR.prototype=new u;PR.prototype.constructor=PR;PR.prototype.a=function(){cJa=this;this.ea=nv().ea;var a=this.ea.Bf,b=ii().u;this.Bf=qt(a,b);a=this.ea.Am;b=Gb().si;var c=UA(new VA,nu());a.U(w(function(e,f){return function(g){return f.jd(g)}}(a,c,b)));this.Am=c.eb;return this};function jR(a,b,c){return dJa(a).lu(b,oq(function(){return function(){return eJa()}}(a))).lu(c,oq(function(){return function(){return Yb().qb}}(a)))} +function eJa(){var a=FO();0===(2&a.xa)<<24>>24&&0===(2&a.xa)<<24>>24&&(a.uo=fJa(a),a.xa=(2|a.xa)<<24>>24);return a.uo}function dJa(a){if(0===(1&a.xa)<<24>>24&&0===(1&a.xa)<<24>>24){for(var b=a.Am,c=a.Bf;!c.b();){var e=c.ga();if(!b.Ha(e.j)){e=e.j;var f=eJa();b=b.cc((new R).M(e,f))}c=c.ta()}a.ria=b;a.xa=(1|a.xa)<<24>>24}return a.ria}function fJa(a){var b=Yb().qb,c=lda(mj());a=w(function(e,f){return function(g){return(new R).M(g,f)}}(a,b));b=K();return c.ka(a,b.u).Ch(Gb().si)} +PR.prototype.$classData=r({b2a:0},!1,"amf.plugins.features.validation.Validations$",{b2a:1,f:1,ib:1});var cJa=void 0;function FO(){cJa||(cJa=(new PR).a());return cJa}function QR(){}QR.prototype=new u;QR.prototype.constructor=QR;QR.prototype.a=function(){return this};function gJa(a,b){return zHa(yj(a,b,"message"),yj(a,b,"code"),sj(a,b,"libraries"),yj(a,b,"functionName"),J(K(),H()),y())} +QR.prototype.$classData=r({i2a:0},!1,"amf.plugins.features.validation.model.ParsedFunctionConstraint$",{i2a:1,f:1,v7:1});var hJa=void 0;function iJa(){hJa||(hJa=(new QR).a());return hJa}function RR(){}RR.prototype=new u;RR.prototype.constructor=RR;RR.prototype.a=function(){return this};RR.prototype.$classData=r({j2a:0},!1,"amf.plugins.features.validation.model.ParsedPropertyConstraint$",{j2a:1,f:1,v7:1});var jJa=void 0;function SR(){}SR.prototype=new u;SR.prototype.constructor=SR;SR.prototype.a=function(){return this}; +function kJa(a){var b=lJa,c=qda(b,a);WC();var e=yj(b,a,"profile");e=VC(0,nda("profile in validation profile",e));var f=yj(b,a,"extends");f.b()?f=y():(f=f.c(),f=(new z).d(VC(WC(),f)));var g=sj(b,a,"violation"),h=sj(b,a,"info"),k=sj(b,a,"warning"),l=sj(b,a,"disabled");return AEa(e,f,g,h,k,l,sda(b,a,"validations",w(function(m,p){return function(t){return mJa(nJa(),t,p)}}(b,c))),c)}SR.prototype.$classData=r({k2a:0},!1,"amf.plugins.features.validation.model.ParsedValidationProfile$",{k2a:1,f:1,v7:1}); +var lJa=void 0;function TR(){}TR.prototype=new u;TR.prototype.constructor=TR;TR.prototype.a=function(){return this}; +function mJa(a,b,c){var e=yj(a,b,"name");e=nda("name in validation specification",e);var f=yj(a,b,"message");f=nda("message in validation specification",f);var g=sj(a,b,"targetClass"),h=w(function(I,L){return function(Y){nJa();return pda(Y,L)}}(a,c)),k=K();g=g.ka(h,k.u);c=sda(a,b,"propertyConstraints",w(function(I,L){return function(Y){jJa||(jJa=(new RR).a());var ia=jJa;var pa=yj(ia,Y,"name");pa=nda("ramlID in property constraint",pa);pa=pda(pa,L);var La=yj(ia,Y,"name");La=nda("name in property constraint", +La);var ob=yj(ia,Y,"message"),zb=yj(ia,Y,"pattern"),Zb=yj(ia,Y,"maxCount"),Cc=yj(ia,Y,"minCount"),vc=yj(ia,Y,"maxLength"),id=yj(ia,Y,"minLength"),yd=yj(ia,Y,"maxExclusive"),zd=yj(ia,Y,"minExclusive"),rd=yj(ia,Y,"maxInclusive"),sd=yj(ia,Y,"minInclusive");Y=sj(ia,Y,"in");ia=y();var le=y(),Vc=y(),Sc=y(),Qc=J(K(),H()),$c=y(),Wc=y();return EO(pa,La,ob,zb,ia,Zb,Cc,id,vc,zd,yd,sd,rd,le,Vc,Sc,Qc,Y,$c,Wc)}}(a,c)));a=B(tj(b).g,wj().ej).Fb(w(function(I,L){return function(Y){Y=B(Y.g,$d().R).A;return(Y.b()?null: +Y.c())===L}}(a,"functionConstraint")));a.b()?b=y():(a=a.c(),b=oJa(b,xj(a)),b.b()?b=y():(b=b.c(),b=(new z).d(gJa(iJa(),b))));oj();a=y();oj();h=y();oj();K();pj();k=(new Lf).a().ua();oj();K();pj();var l=(new Lf).a().ua();oj();K();pj();var m=(new Lf).a().ua();oj();K();pj();var p=(new Lf).a().ua();oj();K();pj();var t=(new Lf).a().ua();oj();var v=y();oj();K();pj();var A=(new Lf).a().ua();oj();var D=y();oj();var C=y();return qj(new rj,e,f,a,h,k,g,l,m,p,t,v,c,A,D,b,C)} +TR.prototype.$classData=r({l2a:0},!1,"amf.plugins.features.validation.model.ParsedValidationSpecification$",{l2a:1,f:1,v7:1});var pJa=void 0;function nJa(){pJa||(pJa=(new TR).a());return pJa}function UR(){this.Bf=this.Am=this.O5=this.bN=this.Yfa=this.dN=this.KX=this.IR=this.D7=this.QI=this.U5=this.x5=this.gZ=this.B7=this.Xha=this.F7=this.H7=this.Cf=this.ey=this.ty=null;this.xa=!1}UR.prototype=new u;UR.prototype.constructor=UR; +UR.prototype.a=function(){qJa=this;this.ty=oj().Afa;this.ey=F().Ifa;var a=y(),b=y();this.Cf=nj(this,"dialect-error","Dialect error",a,b);a=y();b=y();this.H7=nj(this,"missing-vocabulary","Missing vocabulary",a,b);a=y();b=y();this.F7=nj(this,"missing-vocabulary-term","Missing vocabulary term",a,b);a=y();b=y();this.Xha=nj(this,"missing-property-vocabulary-term","Missing property vocabulary term",a,b);a=y();b=y();this.B7=nj(this,"missing-dialect-fragment","Missing dialect fragment",a,b);a=y();b=y();this.gZ= +nj(this,"missing-node-mapping-range-term","Missing property range term",a,b);a=y();b=y();this.x5=nj(this,"different-terms-in-mapkey","Different terms in map key",a,b);a=y();b=y();this.U5=nj(this,"inconsistent-property-range-value","Range value does not match the expected type",a,b);a=y();b=y();this.QI=nj(this,"closed-shape","Invalid property for node",a,b);a=y();b=y();this.D7=nj(this,"mandatory-property-shape","Missing mandatory property",a,b);a=y();b=y();this.IR=nj(this,"invalid-module-type","Invalid module type", +a,b);a=y();b=y();this.KX=nj(this,"dialect-ambiguous-range","Ambiguous entity range",a,b);a=y();b=y();this.dN=nj(this,"invalid-union-type","Union should be a sequence",a,b);a=y();b=y();this.Yfa=nj(this,"expected-vocabulary-module","Expected vocabulary module",a,b);a=y();b=y();this.bN=nj(this,"invalid-dialect-patch","Invalid dialect patch",a,b);a=y();b=y();this.O5=nj(this,"guid-scalar-non-unique","GUID scalar type declared without unique constraint",a,b);this.Am=Rb(Gb().ab,H());ii();a=[this.QI,this.KX, +this.U5,this.gZ,this.F7,this.x5,this.B7,this.D7,this.IR,this.H7,this.dN,this.bN,this.Cf,this.O5];b=-1+(a.length|0)|0;for(var c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;this.Bf=c;return this};UR.prototype.$classData=r({r2a:0},!1,"amf.validation.DialectValidations$",{r2a:1,f:1,ZR:1});var qJa=void 0;function Wd(){qJa||(qJa=(new UR).a());return qJa} +function VR(){this.Bf=this.Am=this.w6=this.d8=this.kia=this.lia=this.a8=this.Q7=this.E7=this.kY=this.fga=this.v6=this.pY=this.eZ=this.PZ=this.k_=this.HF=this.I7=this.h6=this.Y5=this.f6=this.sY=this.Oy=this.Z5=this.aN=this.vN=this.kS=this.yR=this.EZ=this.x6=this.i_=this.oY=this.g6=this.q_=this.cJ=this.m8=this.n8=this.B5=this.p8=this.hZ=this.jS=this.xN=this.uZ=this.wZ=this.C5=this.QX=this.vZ=this.tZ=this.U7=this.J5=this.ZM=this.N5=this.M5=this.l8=this.vR=this.PX=this.VM=this.k6=this.k8=this.GR=this.rZ= +this.l_=this.jY=this.nY=this.iY=this.uY=this.l6=this.q6=this.u6=this.W5=this.X5=this.p6=this.o6=this.bJ=this.e6=this.j8=this.n6=this.cga=this.tY=this.i6=this.m6=this.WZ=this.TZ=this.A5=this.OX=this.HR=this.ega=this.dga=this.t6=this.r6=this.$7=this.qY=this.V5=this.s6=this.y5=this.X7=this.R7=this.S7=this.HJ=this.a6=this.$5=this.d6=this.rY=this.mY=this.$X=this.ey=this.ty=null;this.xa=!1}VR.prototype=new u;VR.prototype.constructor=VR; +VR.prototype.a=function(){rJa=this;this.ty=oj().P7;this.ey=F().xF;var a=y(),b=y();this.$X=nj(this,"exclusive-link-target-error","operationRef and operationId are mutually exclusive in a OAS 3.0.0 Link Object",a,b);var c=y(),e=y();this.mY=nj(this,"invalid-json-schema-type","Invalid json schema definition type",c,e);var f=y(),g=y();this.rY=nj(this,"invalid-shape-format","Invalid shape format",f,g);var h=y(),k=y();this.d6=nj(this,"invalid-datetime-format","Invalid format value for datetime",h,k);var l= +y(),m=y();this.$5=nj(this,"invalid-base-path","Invalid base path",l,m);var p=y(),t=y();this.a6=nj(this,"invalid-base-uri-parameters-type","Invalid baseUriParameters type",p,t);var v=y(),A=y();this.HJ=nj(this,"unused-base-uri-parameter","Unused base uri parameter",v,A);var D=y(),C=y();this.S7=nj(this,"parameters-without-base-uri","'baseUri' not defined and 'baseUriParameters' defined.",D,C);var I=y(),L=y();this.R7=nj(this,"parameter-name-required","Parameter name is required",I,L);var Y=y(),ia=y(); +this.X7=nj(this,"content-required","Request body content is required",Y,ia);var pa=y(),La=y();this.y5=nj(this,"discriminator-name-required","Discriminator property name is required",pa,La);var ob=y(),zb=y();this.s6=nj(this,"invalid-server-path","Invalid server path",ob,zb);var Zb=y(),Cc=y();this.V5=nj(this,"invalid-abstract-declaration-parameter-in-type","Trait/Resource Type parameter in type",Zb,Cc);var vc=y(),id=y();this.qY=nj(this,"invalid-secured-by-type","Invalid 'securedBy' type",vc,id);var yd= +y(),zd=y();this.$7=nj(this,"scope-names-must-be-empty","Scope names must be an empty array",yd,zd);var rd=y(),sd=y();this.r6=nj(this,"invalid-security-scheme-described-by-type","Invalid 'describedBy' type, map expected",rd,sd);var le=y(),Vc=y();this.t6=nj(this,"invalid-tag-type","Tag values must be of type string",le,Vc);var Sc=y(),Qc=y();nj(this,"invalid-security-scheme-object","Invalid security scheme",Sc,Qc);var $c=y(),Wc=y();this.dga=nj(this,"invalid-security-requirement-object","Invalid security requirement object", +$c,Wc);var Qe=y(),Qd=y();this.ega=nj(this,"invalid-security-requirements-sequence","'security' must be an array of security requirements object",Qe,Qd);var me=y(),of=y();this.HR=nj(this,"invalid-endpoint-path","Invalid endpoint path (invalid template uri)",me,of);var Le=y(),Ve=y();this.OX=nj(this,"duplicated-endpoint-path","Duplicated endpoint path",Le,Ve);var he=y(),Wf=y();this.A5=nj(this,"duplicated-operation-id","Duplicated operation id",he,Wf);var vf=y(),He=y();this.TZ=nj(this,"schema-deprecated", +"'schema' keyword it's deprecated for 1.0 version, should use 'type' instead",vf,He);var Ff=y(),wf=y();this.WZ=nj(this,"schemas-deprecated","'schemas' keyword it's deprecated for 1.0 version, should use 'types' instead",Ff,wf);var Re=y(),we=y();this.m6=nj(this,"invalid-operation-type","Invalid operation type",Re,we);var ne=y(),Me=y();this.i6=nj(this,"invalid-external-type-type","Invalid external type type",ne,Me);var Se=y(),xf=y();this.tY=nj(this,"invalid-xml-schema-type","Invalid xml schema type", +Se,xf);var ie=y(),gf=y();this.cga=nj(this,"invalid-json-schema-expression","Invalid json schema expression",ie,gf);var pf=y(),hf=y();this.n6=nj(this,"invalid-property-type","Invalid property key type. Should be string",pf,hf);var Gf=y(),yf=y();this.j8=nj(this,"unable-to-parse-array","Unable to parse array definition",Gf,yf);var oe=y(),lg=y();this.e6=nj(this,"invalid-decimal-point","Invalid decimal point",oe,lg);var bh=y(),Qh=y();this.bJ=nj(this,"invalid-type-definition","Invalid type definition", +bh,Qh);var af=y(),Pf=y();this.o6=nj(this,"invalid-required-array-for-schema-version","Required arrays of properties not supported in JSON Schema below version draft-4",af,Pf);var oh=y(),ch=y();this.p6=nj(this,"invalid-required-boolean-for-schema-version","Required property boolean value is only supported in JSON Schema draft-3",oh,ch);var Ie=y(),ug=y();this.X5=nj(this,"invalid-additional-properties-type","additionalProperties should be a boolean or a map",Ie,ug);var Sg=y(),Tg=y();this.W5=nj(this, +"invalid-additional-items-type","additionalItems should be a boolean or a map",Sg,Tg);var zh=y(),Rh=y();this.u6=nj(this,"invalid-tuple-type","Tuple should be a sequence",zh,Rh);var vg=y(),dh=y();this.q6=nj(this,"invalid-schema-type","Schema should be a string",vg,dh);var Jg=y(),Ah=y();this.l6=nj(this,"invalid-media-type-type","Media type should be a string",Jg,Ah);var Bh=y(),cg=y();this.uY=nj(this,"invalid-xone-type","Xone should be a sequence",Bh,cg);var Qf=y(),Kg=y();this.iY=nj(this,"invalid-and-type", +"And should be a sequence",Qf,Kg);var Ne=y(),Xf=y();this.nY=nj(this,"invalid-or-type","Or should be a sequence",Ne,Xf);var di=y(),dg=y();this.jY=nj(this,"invalid-disjoint-union-type","Invalid type for disjoint union",di,dg);var Hf=y(),wg=y();this.l_=nj(this,"unexpected-vendor","Unexpected vendor",Hf,wg);var Lg=y(),jf=y();this.rZ=nj(this,"null-abstract-declaration","Generating abstract declaration (resource type / trait) with null value",Lg,jf);var mg=y(),Mg=y();this.GR=nj(this,"invalid-abstract-declaration-type", +"Invalid type for declaration node",mg,Mg);var Ng=y(),eg=y();this.k8=nj(this,"unable-to-parse-shape-extensions","Unable to parse shape extensions",Ng,eg);var Oe=y(),ng=y();this.k6=nj(this,"invalid-json-schema-version","Invalid Json Schema version",Oe,ng);var fg=y(),Ug=y();this.VM=nj(this,"cross-security-warning","Using a security scheme type from raml in oas or from oas in raml",fg,Ug);var xg=y(),gg=y();this.PX=nj(this,"duplicated-operation-status-code","Status code for the provided operation response must not be duplicated", +xg,gg);var fe=y(),ge=y();this.vR=nj(this,"chained-reference-error","References cannot be chained",fe,ge);var ph=y(),hg=y();this.l8=nj(this,"unable-to-set-default-type","Unable to set default type",ph,hg);var Jh=y(),fj=y();this.M5=nj(this,"exclusive-schema-type","'schema' and 'type' properties are mutually exclusive",Jh,fj);var yg=y(),qh=y();this.N5=nj(this,"exclusive-schemas-type","'schemas' and 'types' properties are mutually exclusive",yg,qh);var og=y(),rh=y();this.ZM=nj(this,"exclusive-properties-error", +"Exclusive properties declared together",og,rh);var Ch=y(),Vg=y();this.J5=nj(this,"examples-must-be-map","Examples value should be a map",Ch,Vg);var Wg=y(),Rf=y();this.U7=nj(this,"path-template-unbalanced-parameters","Nested parameters are not allowed in path templates",Wg,Rf);var Sh=y(),zg=y();this.tZ=nj(this,"oas-not-body-and-form-data-parameters","Operation cannot have a body parameter and a formData parameter",Sh,zg);var Ji=y(),Kh=y();this.vZ=nj(this,"oas-invalid-body-parameter","Only one body parameter is allowed", +Ji,Kh);var Lh=y(),Ki=y();this.QX=nj(this,"duplicate-parameters","Sibling parameters must have unique 'name' and 'in' values",Lh,Ki);var gj=y(),Rl=y();this.C5=nj(this,"duplicate-tags","Sibling tags must have unique names",gj,Rl);var ek=y(),Dh=y();this.wZ=nj(this,"oas-invalid-parameter-binding","Parameter has invalid binding",ek,Dh);var Eh=y(),Li=y();this.uZ=nj(this,"oas-file-not-form-data-parameters","Parameters with type file must be in formData",Eh,Li);var Mi=y(),uj=y();this.xN=nj(this,"unsupported-example-media-type", +"Cannot validate example with unsupported media type",Mi,uj);var Ni=y(),fk=y();this.jS=nj(this,"unknown-security-scheme","Cannot find the security scheme",Ni,fk);var Ck=y(),Dk=y();this.hZ=nj(this,"missing-security-scheme-type","Missing security scheme type",Ck,Dk);var hj=y(),ri=y();this.p8=nj(this,"unknown-scope","Cannot find the scope in the security settings",hj,ri);var gk=y(),$k=y();this.B5=nj(this,"duplicated-property","Duplicated property in node",gk,$k);var lm=y(),si=y();this.n8=nj(this,"unexpected-raml-scalar-key", +"Unexpected key. Options are 'value' or annotations \\(.+\\)",lm,si);var bf=y(),ei=y();this.m8=nj(this,"unexpected-file-types-syntax","Unexpected 'fileTypes' syntax. Options are string or sequence",bf,ei);var vj=y(),ti=y();this.cJ=nj(this,"json-schema-inheritance","Inheriting from JSON Schema",vj,ti);var Og=y(),Oi=y();this.q_=nj(this,"xml-schema-inheritance","Inheriting from XML Schema",Og,Oi);var pg=y(),zf=y();this.g6=nj(this,"invalid-endpoint-type","Invalid endpoint type",pg,zf);var Sf=y(),eh=y(); +this.oY=nj(this,"invalid-parameter-type","Invalid parameter type",Sf,eh);var Fh=y(),fi=y();this.i_=nj(this,"unable-to-parse-shape","Unable to parse shape",Fh,fi);var hn=y(),mm=y();this.x6=nj(this,"json-schema-fragment-not-found","Json schema fragment not found",hn,mm);var nm=y(),kd=y();this.EZ=nj(this,"pattern-properties-on-closed-node","Closed node cannot define pattern properties",nm,kd);var Pi=y(),sh=y();this.yR=nj(this,"discriminator-on-extended-union","Property 'discriminator' not supported in a node extending a unionShape", +Pi,sh);var Pg=y(),Xc=y();this.kS=nj(this,"unresolved-parameter","Unresolved parameter",Pg,Xc);var xe=y(),Nc=y();this.vN=nj(this,"unable-to-parse-json-schema","Unable to parse json schema",xe,Nc);var om=y(),Dn=y();this.aN=nj(this,"invalid-annotation-type","Invalid annotation type",om,Dn);var gi=y(),Te=y();this.Z5=nj(this,"invalid-annotation-target","Annotation not allowed in used target",gi,Te);var pm=y(),jn=y();this.Oy=nj(this,"invalid-fragment-type","Invalid fragment type",pm,jn);var Oq=y(),En=y(); +this.sY=nj(this,"invalid-types-type","Invalid types type",Oq,En);var $n=y(),Rp=y();this.f6=nj(this,"invalid-documentation-type","Invalid documentation type",$n,Rp);var ao=y(),Xt=y();this.Y5=nj(this,"invalid-allowed-targets-type","Invalid allowedTargets type",ao,Xt);var Fs=y(),Sp=y();this.h6=nj(this,"invalid-extension-type","Invalid extension type",Fs,Sp);var bo=y(),Gs=y();this.I7=nj(this,"module-not-found","Module not found",bo,Gs);var Fn=y(),Pq=y();this.HF=nj(this,"invalid-type-expression","Invalid type expression", +Fn,Pq);var Jr=y(),Hs=y();this.k_=nj(this,"unexpected-reference","Unexpected reference",Jr,Hs);var Is=y(),Kr=y();this.PZ=nj(this,"read-only-property-marked-required","Read only property should not be marked as required by a schema",Is,Kr);var Js=y(),Ks=y();this.eZ=nj(this,"missing-discriminator-property","Type is missing property marked as discriminator",Js,Ks);var ov=y(),pv=y();this.pY=nj(this,"invalid-payload","Invalid payload",ov,pv);var Ls=y(),qv=y();this.v6=nj(this,"invalid-value-in-properties-facet", +"Properties facet must be a map of key and values",Ls,qv);var rv=y(),Yt=y();this.fga=nj(this,"invalid-user-defined-facet-name","User defined facets must not begin with open parenthesis",rv,Yt);var sv=y(),Qq=y();this.kY=nj(this,"invalid-field-name-in-components","Field name in components must match the following expression: ^[a-zA-Z0-9\\.\\-_]+$",sv,Qq);var tv=y(),Ms=y();this.E7=nj(this,"missing-user-defined-facet","Type is missing required user defined facet",tv,Ms);var Zt=y(),uv=y();this.Q7=nj(this, +"parameter-missing-schema-or-content","Parameter must define a 'schema' or 'content' field, but not both",Zt,uv);var cp=y(),Ns=y();this.a8=nj(this,"server-variable-missing-default","Server variable must define a 'default' field",cp,Ns);var $t=y(),au=y();this.lia=nj(this,"user-defined-facets-matches-built-in","User defined facet name matches built in facet of type",$t,au);var Qj=y(),Jw=y();nj(this,"invalid-endpoint-declaration","Invalid endpoint declaration",Qj,Jw);var dp=y(),bu=y();this.kia=nj(this, +"user-defined-facets-matches-ancestor","User defined facet name matches ancestor type facet",dp,bu);var ui=y(),Os=y();this.d8=nj(this,"slash-in-uri-parameter-value","Values of uri parameter must not contain '/' character",ui,Os);var Ps=y(),cu=y();this.w6=nj(this,"items-field-required","'items' field is required when type is array",Ps,cu);var Qs=Gb().ab,du=this.$X.j,vv=Yb().qb,wv=lj(this,vv),xv=(new R).M(du,wv),py=this.tZ.j,Rq=Gb().ab,Kw=lk(),Lw=Yb().qb,eu=(new R).M(Kw,Lw),yv=mk(),qy=Yb().qb,zv=[eu, +(new R).M(yv,qy)],Mw=Rb(Rq,(new Ib).ha(zv)),ry=(new R).M(py,Mw),Tp=this.vZ.j,Ss=Yb().qb,Nw=lj(this,Ss),fu=(new R).M(Tp,Nw),Ow=this.wZ.j,Pw=Yb().qb,Sq=lj(this,Pw),gu=(new R).M(Ow,Sq),Qw=this.uZ.j,Rw=Gb().ab,Sw=lk(),AA=Yb().qb,Up=(new R).M(Sw,AA),kn=mk(),Vp=Yb().qb,sy=[Up,(new R).M(kn,Vp)],BA=Rb(Rw,(new Ib).ha(sy)),GD=(new R).M(Qw,BA),Av=this.cJ.j,Tw=Yb().dh,HD=lj(this,Tw),ID=(new R).M(Av,HD),CA=this.EZ.j,DA=Gb().ab,JD=ok(),KD=Yb().qb,EA=(new R).M(JD,KD),yG=pk(),zG=Yb().qb,LD=(new R).M(yG,zG),GA=qk(), +AG=Yb().qb,uy=(new R).M(GA,AG),BG=lk(),MD=Yb().dh,ND=(new R).M(BG,MD),OD=mk(),Us=Yb().dh,vy=(new R).M(OD,Us),HA=nk(),IA=Yb().dh,Vs=(new R).M(HA,IA),JA=kk(),KA=Yb().dh,wy=[EA,LD,uy,ND,vy,Vs,(new R).M(JA,KA)],xy=Rb(DA,(new Ib).ha(wy)),PD=(new R).M(CA,xy),Bv=this.yR.j,LA=Gb().ab,QD=ok(),RD=Yb().qb,yy=(new R).M(QD,RD),CG=pk(),qm=Yb().qb,Lm=(new R).M(CG,qm),Xg=qk(),ln=Yb().qb,ep=(new R).M(Xg,ln),ty=lk(),Ts=Yb().dh,Mr=(new R).M(ty,Ts),hu=mk(),FA=Yb().dh,Uw=(new R).M(hu,FA),vG=nk(),wG=Yb().dh,xG=(new R).M(vG, +wG),rT=kk(),nH=Yb().dh,sT=[yy,Lm,ep,Mr,Uw,xG,(new R).M(rT,nH)],tT=Rb(LA,(new Ib).ha(sT)),uT=(new R).M(Bv,tT),Oy=this.rZ.j,Py=Yb().dh,Ur=lj(this,Py),jB=(new R).M(Oy,Ur),Vr=this.TZ.j,Pv=Yb().dh,op=lj(this,Pv),jE=(new R).M(Vr,op),kB=this.WZ.j,vT=Yb().dh,wma=lj(this,vT),kPa=(new R).M(kB,wma),lPa=this.HJ.j,Lza=Yb().dh,mPa=lj(this,Lza),Mza=(new R).M(lPa,mPa),nPa=this.rY.j,oPa=Yb().dh,pPa=lj(this,oPa),qPa=(new R).M(nPa,pPa),rPa=this.VM.j,sPa=Yb().dh,tPa=lj(this,sPa),uPa=(new R).M(rPa,tPa),vPa=this.PZ.j, +wPa=Yb().dh,xPa=lj(this,wPa),yPa=(new R).M(vPa,xPa),zPa=this.eZ.j,APa=Yb().qb,BPa=lj(this,APa),CPa=(new R).M(zPa,BPa),DPa=this.pY.j,EPa=Yb().qb,FPa=lj(this,EPa),GPa=[xv,ry,fu,gu,GD,ID,PD,uT,jB,jE,kPa,Mza,qPa,uPa,yPa,CPa,(new R).M(DPa,FPa)];this.Am=Rb(Qs,(new Ib).ha(GPa));ii();this.Bf=Wv((new Ib).ha([this.PX,this.vR,this.ZM,this.U7,this.jS,this.hZ,this.p8,this.cJ,this.q_,this.B5,this.J5,this.xN,this.vZ,this.QX,this.C5,this.EZ,this.yR,this.uZ,this.tZ,this.wZ,this.vN,this.n8,this.k8,this.GR,this.rZ, +this.l_,this.jY,this.nY,this.iY,this.uY,this.X5,this.W5,this.o6,this.p6,this.q6,this.l8,this.bJ,this.u6,this.j8,this.e6,this.n6,this.x6,this.cga,this.tY,this.i6,this.V5,this.M5,this.TZ,this.kS,this.R7,this.X7,this.y5,this.qY,this.$7,this.r6,this.HR,this.OX,this.A5,this.m6,this.s6,this.S7,this.HJ,this.a6,this.$5,this.oY,this.l6,this.k6,this.g6,this.i_,this.aN,this.Z5,this.Oy,this.sY,this.WZ,this.N5,this.f6,this.Y5,this.HF,this.h6,this.I7,this.k_,this.rY,this.m8,this.mY,this.VM,this.PZ,this.eZ,this.pY, +this.v6,this.fga,this.kY,this.E7,this.Q7,this.a8,this.d8,this.d6,this.w6,this.t6]));return this};VR.prototype.$classData=r({t2a:0},!1,"amf.validations.ParserSideValidations$",{t2a:1,f:1,ZR:1});var rJa=void 0;function sg(){rJa||(rJa=(new VR).a());return rJa}function WR(){this.Bf=this.Am=this.UZ=this.EF=this.lS=this.ey=this.ty=null;this.xa=!1}WR.prototype=new u;WR.prototype.constructor=WR; +WR.prototype.a=function(){sJa=this;this.ty=oj().Zha;this.ey=F().NM;var a=y(),b=y();this.lS=nj(this,"unsupported-example-media-type-warning","Cannot validate example with unsupported media type",a,b);a=y();b=y();this.EF=nj(this,"example-validation-error","Example does not validate type",a,b);a=y();b=y();this.UZ=nj(this,"schema-exception","Schema exception",a,b);a=this.lS.j;b=Yb().dh;b=lj(this,b);a=(new R).M(a,b);b=this.EF.j;var c=ok(),e=Yb().qb;c=(new R).M(c,e);e=pk();var f=Yb().qb;e=(new R).M(e,f); +f=qk();var g=Yb().qb;f=(new R).M(f,g);g=lk();var h=Yb().dh;g=(new R).M(g,h);h=mk();var k=Yb().dh;h=(new R).M(h,k);k=nk();var l=Yb().dh;k=(new R).M(k,l);l=kk();var m=Yb().qb;c=[c,e,f,g,h,k,(new R).M(l,m)];e=UA(new VA,nu());f=0;for(g=c.length|0;f>24&&0===(4&a.xa)<<24>>24){var c=(new aS).a(),e=TE().wJ;if(null===e)throw(new Zj).e("null CodingErrorAction");c.II=e;e=TE().wJ;if(null===e)throw(new Zj).e("null CodingErrorAction");c.KI=e;a.qja=c;a.xa=(4|a.xa)<<24>>24}a=a.qja;if(0===(b.Ze-b.ud|0))var f=rsa(0);else{a.gx=0;c=Aa(da(da(b.Ze-b.ud|0)*a.xfa));c=rsa(c);b:for(;;){c:{e=a;var g=b,h=c;if(3===e.gx)throw(new Hj).a();e.gx=2;for(;;){try{f=wJa(g,h)}catch(A){if(A instanceof RE)throw Dsa(A); +if(A instanceof Lv)throw Dsa(A);throw A;}if(0===f.tu){var k=g.Ze-g.ud|0;if(0m||0>(p.n.length-m|0))throw(new U).a();var t=l.ud,v=t+m|0;if(v>l.Ze)throw(new RE).a();l.ud=v; +Ba(p,0,l.bj,l.Mk+t|0,m);l=g.ud;k=k.iL;if(0>k)throw(new Lu).a();KE.prototype.qg.call(g,l+k|0)}else{if(TE().xJ===l){e=k;break c}if(TE().T5===l){l=g.ud;k=k.iL;if(0>k)throw(new Lu).a();KE.prototype.qg.call(g,l+k|0)}else throw(new x).d(l);}}}if(0!==e.tu){if(1===e.tu){c=Hsa(c);continue b}Isa(e);throw(new uK).d("should not get here");}if(b.ud!==b.Ze)throw(new uK).a();f=c;break}b:for(;;){c:switch(b=a,b.gx){case 2:c=SE().$t;0===c.tu&&(b.gx=3);b=c;break c;case 3:b=SE().$t;break c;default:throw(new Hj).a(); +}if(0!==b.tu){if(1===b.tu){f=Hsa(f);continue b}Isa(b);throw(new uK).d("should not get here");}break}KE.prototype.qO.call(f)}return f}d.z=function(){return NJ(OJ(),this.TJ)};function bS(){QE.call(this)}bS.prototype=new Asa;bS.prototype.constructor=bS;bS.prototype.a=function(){QE.prototype.Baa.call(this,Kv(),1);return this}; +function Csa(a,b){if(null===a.bj||a.Ss||null===b.bj||b.hH())for(;;){var c=a.ud;if(a.ud===a.Ze)return SE().$t;var e=xJa(a);if(0<=e){if(b.ud===b.Ze)return b=SE().bt,KE.prototype.qg.call(a,c),b;b.EP(65535&e)}else{var f=Kv().dba.n[127&e];if(-1===f)return b=SE().us,KE.prototype.qg.call(a,c),b;if(a.ud!==a.Ze){var g=xJa(a);if(128!==(192&g)){e=SE().us;var h=g=0}else 2===f?(e=(31&e)<<6|63&g,128>e?(e=SE().us,g=0):(g=65535&e,e=null),h=0):a.ud!==a.Ze?(h=xJa(a),128!==(192&h)?(e=SE().QU,h=g=0):3===f?(e=(15&e)<< +12|(63&g)<<6|63&h,2048>e?(e=SE().us,g=0):55296<=e&&57343>=e?(e=SE().jL,g=0):(g=65535&e,e=null),h=0):a.ud!==a.Ze?(f=xJa(a),128!==(192&f)?(e=SE().jL,h=g=0):(e=(7&e)<<18|(63&g)<<12|(63&h)<<6|63&f,65536>e||1114111>10),h=65535&(56320|1023&e),e=null))):(e=SE().$t,h=g=0)):(e=SE().$t,h=g=0)}else e=SE().$t,h=g=0;if(null!==e)return b=e,KE.prototype.qg.call(a,c),b;if(0===h){if(b.ud===b.Ze)return b=SE().bt,KE.prototype.qg.call(a,c),b;b.EP(g)}else{if(2>(b.Ze- +b.ud|0))return b=SE().bt,KE.prototype.qg.call(a,c),b;b.EP(g);b.EP(h)}}}else return yJa(a,b)} +function yJa(a,b){var c=a.bj;if(null===c)throw(new Lu).a();if(a.Ss)throw(new VE).a();var e=a.Mk;if(-1===e)throw(new Lu).a();if(a.Ss)throw(new VE).a();var f=a.ud+e|0,g=a.Ze+e|0,h=b.bj;if(null===h)throw(new Lu).a();if(b.hH())throw(new VE).a();var k=b.Mk;if(-1===k)throw(new Lu).a();if(b.hH())throw(new VE).a();var l=b.Ze+k|0,m=b.ud+k|0;for(;;){if(f===g)return c=SE().$t,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;var p=c.n[f];if(0<=p){if(m===l)return c=SE().bt,KE.prototype.qg.call(a, +f-e|0),KE.prototype.qg.call(b,m-k|0),c;h.n[m]=65535&p;m=1+m|0;f=1+f|0}else{var t=Kv().dba.n[127&p];if(-1===t)return c=SE().us,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;if((1+f|0)>=g){p=SE().$t;var v=0,A=0}else if(v=c.n[1+f|0],128!==(192&v))p=SE().us,A=v=0;else if(2===t)p=(31&p)<<6|63&v,128>p?(p=SE().us,v=0):(v=65535&p,p=null),A=0;else if((2+f|0)>=g)p=SE().$t,A=v=0;else if(A=c.n[2+f|0],128!==(192&A))p=SE().QU,A=v=0;else if(3===t)p=(15&p)<<12|(63&v)<<6|63&A,2048>p?(p=SE().us,v=0): +55296<=p&&57343>=p?(p=SE().jL,v=0):(v=65535&p,p=null),A=0;else if((3+f|0)>=g)p=SE().$t,A=v=0;else{var D=c.n[3+f|0];128!==(192&D)?(p=SE().jL,A=v=0):(p=(7&p)<<18|(63&v)<<12|(63&A)<<6|63&D,65536>p||1114111>10),A=65535&(56320|1023&p),p=null))}if(null!==p)return c=p,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;if(0===A){if(m===l)return c=SE().bt,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;h.n[m]=v;m=1+m|0;f=f+t|0}else{if((2+ +m|0)>l)return c=SE().bt,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;h.n[m]=v;h.n[1+m|0]=A;m=2+m|0;f=f+t|0}}}}bS.prototype.$classData=r({a3a:0},!1,"java.nio.charset.UTF_8$Decoder",{a3a:1,ohb:1,f:1});function aS(){UE.call(this)}aS.prototype=new Gsa;aS.prototype.constructor=aS;aS.prototype.a=function(){UE.prototype.Baa.call(this,Kv(),1.100000023841858);return this}; +function wJa(a,b){if(null===a.bj||a.hH()||null===b.bj||b.Ss)for(;;){if(a.ud===a.Ze)return SE().$t;var c=a.AO();if(128>c){if(b.ud===b.Ze)return b=SE().bt,KE.prototype.qg.call(a,-1+a.ud|0),b;cS(b,c<<24>>24)}else if(2048>c){if(2>(b.Ze-b.ud|0))return b=SE().bt,KE.prototype.qg.call(a,-1+a.ud|0),b;cS(b,(192|c>>6)<<24>>24);cS(b,(128|63&c)<<24>>24)}else if(Kv(),55296!==(63488&c)){if(3>(b.Ze-b.ud|0))return b=SE().bt,KE.prototype.qg.call(a,-1+a.ud|0),b;cS(b,(224|c>>12)<<24>>24);cS(b,(128|63&c>>6)<<24>>24); +cS(b,(128|63&c)<<24>>24)}else if(55296===(64512&c)){if(a.ud===a.Ze)return b=SE().$t,KE.prototype.qg.call(a,-1+a.ud|0),b;var e=a.AO();if(56320!==(64512&e))return b=SE().us,KE.prototype.qg.call(a,-2+a.ud|0),b;if(4>(b.Ze-b.ud|0))return b=SE().bt,KE.prototype.qg.call(a,-2+a.ud|0),b;c=65536+(((1023&c)<<10)+(1023&e)|0)|0;cS(b,(240|c>>18)<<24>>24);cS(b,(128|63&c>>12)<<24>>24);cS(b,(128|63&c>>6)<<24>>24);cS(b,(128|63&c)<<24>>24)}else return b=SE().us,KE.prototype.qg.call(a,-1+a.ud|0),b}else return zJa(a, +b)} +function zJa(a,b){var c=a.bj;if(null===c)throw(new Lu).a();if(a.hH())throw(new VE).a();var e=a.Mk;if(-1===e)throw(new Lu).a();if(a.hH())throw(new VE).a();var f=a.ud+e|0,g=a.Ze+e|0,h=b.bj;if(null===h)throw(new Lu).a();if(b.Ss)throw(new VE).a();var k=b.Mk;if(-1===k)throw(new Lu).a();if(b.Ss)throw(new VE).a();var l=b.Ze+k|0,m=b.ud+k|0;for(;;){if(f===g)return c=SE().$t,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;var p=c.n[f];if(128>p){if(m===l)return c=SE().bt,KE.prototype.qg.call(a,f- +e|0),KE.prototype.qg.call(b,m-k|0),c;h.n[m]=p<<24>>24;m=1+m|0;f=1+f|0}else if(2048>p){if((2+m|0)>l)return c=SE().bt,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;h.n[m]=(192|p>>6)<<24>>24;h.n[1+m|0]=(128|63&p)<<24>>24;m=2+m|0;f=1+f|0}else if(Kv(),55296!==(63488&p)){if((3+m|0)>l)return c=SE().bt,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;h.n[m]=(224|p>>12)<<24>>24;h.n[1+m|0]=(128|63&p>>6)<<24>>24;h.n[2+m|0]=(128|63&p)<<24>>24;m=3+m|0;f=1+f|0}else if(55296===(64512& +p)){if((1+f|0)===g)return c=SE().$t,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;var t=c.n[1+f|0];if(56320!==(64512&t))return c=SE().us,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;if((4+m|0)>l)return c=SE().bt,KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c;p=65536+(((1023&p)<<10)+(1023&t)|0)|0;h.n[m]=(240|p>>18)<<24>>24;h.n[1+m|0]=(128|63&p>>12)<<24>>24;h.n[2+m|0]=(128|63&p>>6)<<24>>24;h.n[3+m|0]=(128|63&p)<<24>>24;m=4+m|0;f=2+f|0}else return c=SE().us, +KE.prototype.qg.call(a,f-e|0),KE.prototype.qg.call(b,m-k|0),c}}aS.prototype.$classData=r({b3a:0},!1,"java.nio.charset.UTF_8$Encoder",{b3a:1,phb:1,f:1});function dS(){this.ah=null}dS.prototype=new u;dS.prototype.constructor=dS;function AJa(){}AJa.prototype=dS.prototype;dS.prototype.t=function(){return this.ah};dS.prototype.Caa=function(a,b){this.ah=b;0===(b.length|0)||(b.charCodeAt(0),a.W2());return this};function eS(){}eS.prototype=new u;eS.prototype.constructor=eS;function BJa(){}BJa.prototype=eS.prototype; +eS.prototype.R_=function(a){return null===a?null:(new fS).Caa(this,a)};eS.prototype.W2=function(){return 65535&(Daa.sep.charCodeAt(0)|0)};function gS(){}gS.prototype=new u;gS.prototype.constructor=gS;gS.prototype.a=function(){return this};gS.prototype.yD=function(a,b){jF(a.IS.s,b)};gS.prototype.hv=function(a,b){CJa(a.IS,b)};gS.prototype.$classData=r({n3a:0},!1,"org.mulesoft.common.io.Output$OutputWriter$",{n3a:1,f:1,l3a:1});var DJa=void 0;function cfa(){DJa||(DJa=(new gS).a());return DJa} +function Dp(){}Dp.prototype=new u;Dp.prototype.constructor=Dp;Dp.prototype.a=function(){return this};Dp.prototype.yD=function(a,b){this.hv(a,ba.String.fromCharCode(b))};Dp.prototype.hv=function(a,b){EJa(a,b)};Dp.prototype.$classData=r({o3a:0},!1,"org.mulesoft.common.io.Output$StringBufferWriter$",{o3a:1,f:1,l3a:1});var Xea=void 0;function hS(){this.Oj=this.Rf=this.tL=this.dQ=this.ioa=this.kb=null}hS.prototype=new u;hS.prototype.constructor=hS;function FJa(){}FJa.prototype=hS.prototype; +function GJa(a){var b=a.kb.Db;b=uF(vF(),b.cf,b.Dg,b.Ij);a=a.ioa;return b.Yx()?a:a.Yx()?b:uF(vF(),b.cf+a.cf|0,b.Dg+a.Dg|0,b.Ij+a.Ij|0)}function iS(a,b){var c=GJa(a),e=a.dQ,f=new jS,g=nha(a.Rf,a.tL.Ij,c.Ij,a.tL.cf,a.tL.Dg,c.cf,c.Dg);f.kx=b;f.yc=g;gta(e,f);a.tL=c;return!0}function kS(a){for(;a.dQ.b();)if(a.kb.Db.fc!==rF().Xs){var b=a.kb.Db.Ij;a.Kka(a.kb.Db.fc);b===a.kb.Db.Ij&&kS(a)}else a.noa();a.Oj=fta(a.dQ)} +hS.prototype.YG=function(a,b){this.kb=a;this.ioa=b;this.dQ=(new wF).a();this.tL=GJa(this);this.Rf=this.kb.Rf;this.mma();return this};function WG(a,b){return a.kb.bI(b.yc.Au,b.yc.pA)}function lS(a,b,c){return 0>=b||(mS(a.kb,b),iS(a,c))}function nS(a,b){return a.kb.Db.fc===b?(a=a.kb,oS(a.Db,a.jg,a.Sj),!0):!1} +function HJa(a,b){var c=b.length|0;if(0this.Sj||bb)return 0;for(;be)return 0;for(;c=b))for(b=0;;){oS(a.Db,a.jg,a.Sj);if(b===c)break;b=1+b|0}} +function sS(a,b){if(0===b)return a.Db.fc;var c=-1+(a.Db.As+b|0)|0;if(0>c||c>=a.Sj)return rF().Xs;var e=xa(a.jg,c);return 0>24&&0===(1&b.xa)<<24>>24){a:try{ba.Packages.org.mozilla.javascript.JavaScriptException;var e=!0}catch(v){e=Ph(E(),v);if(null!==e){if(e instanceof EK){e=!1;break a}throw mb(E(),e);}throw v;}b.vma=e;b.xa=(1|b.xa)<<24>>24}if(b.vma)e=c.stack,e=(void 0===e?"":e).replace(gL("^\\s+at\\s+","gm"),"").replace(gL("^(.+?)(?: \\((.+)\\))?$","gm"),"$2@$1").replace(gL("\\r\\n?","gm"),"\n").split("\n"); +else if(c.arguments&&c.stack)e=Hza(c);else if(c.stack&&c.sourceURL)e=c.stack.replace(gL("\\[native code\\]\\n","m"),"").replace(gL("^(?\x3d\\w+Error\\:).*$\\n","m"),"").replace(gL("^@","gm"),"{anonymous}()@").split("\n");else if(c.stack&&c.number)e=c.stack.replace(gL("^\\s*at\\s+(.*)$","gm"),"$1").replace(gL("^Anonymous function\\s+","gm"),"{anonymous}() ").replace(gL("^([^\\(]+|\\{anonymous\\}\\(\\))\\s+\\((.+)\\)$","gm"),"$1@$2").split("\n").slice(1);else if(c.stack&&c.fileName)e=c.stack.replace(gL("(?:\\n@:0)?\\s+$", +"m"),"").replace(gL("^(?:\\((\\S*)\\))?@","gm"),"{anonymous}($1)@").split("\n");else if(c.message&&c["opera#sourceloc"])if(c.stacktrace)if(-1c.stacktrace.split("\n").length)e=Rza(c);else{e=gL("Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$","i");c=c.stacktrace.split("\n");var f=[];for(var g=0,h=c.length|0;gc.stacktrace.indexOf("called from line")){e=fL("^(.*)@(.+):(\\d+)$");c=c.stacktrace.split("\n");f=[];g=0;for(h=c.length|0;g=h}else h=!1;if(h)f=1+f|0;else break}h=ED();g=c.substring(g,f);g=FD(h,g,10);SKa(b,QKa(a,g));break;case 92:f=1+f|0;f>24&&0===(2&a.xa)<<24>>24){var b=RKa(a.fV),c=0>b;if(c)var e=0;else{e=b>>31;var f=1+b|0;e=0===f?1+e|0:e;e=(0===e?-1<(-2147483648^f):0e&&dLa(Axa(),0,b,1,!0);if(!c)for(c=0;;){e=a.fV.xT(c);MS(f,e);if(c===b)break;c=1+c|0}b=lG(f);c=b.Oa();c=ja(Ja(Qa),[c]);ZG(b,c,0);a.vka=c;a.xa=(2|a.xa)<<24>>24}return a.vka}d.hea=function(){return this.sy};d.Ms=function(){return this.$d};d.xT=function(a){return bLa(this).n[a]}; +function aLa(a){if(0===(1&a.xa)<<24>>24&&0===(1&a.xa)<<24>>24){var b=RKa(a.fV),c=0>b;if(c)var e=0;else{e=b>>31;var f=1+b|0;e=0===f?1+e|0:e;e=(0===e?-1<(-2147483648^f):0e&&dLa(Axa(),0,b,1,!0);if(!c)for(c=0;;){e=a.fV.oM(c);MS(f,e);if(c===b)break;c=1+c|0}b=lG(f);c=b.Oa();c=ja(Ja(Qa),[c]);ZG(b,c,0);a.bqa=c;a.xa=(1|a.xa)<<24>>24}return a.bqa}d.$classData=r({E$a:0},!1,"scala.util.matching.Regex$Match",{E$a:1,f:1,F$a:1}); +function eLa(a,b){for(var c=!1;!c&&a.Ya();)c=!!b.P(a.$a());return c}function wT(a,b){for(var c=!0;c&&a.Ya();)c=!!b.P(a.$a());return c}function fLa(a,b,c){b=0c?-1:c<=b?0:c-b|0;if(0===c)a=$B().ce;else{var e=new xT;e.jQ=a;e.bC=c;e.dK=b;a=e}return a}function yT(a,b){for(;a.Ya();)b.P(a.$a())}function gLa(a,b){var c=new zT;c.fc=a;c.zn=null;c.XU=null;c.qG=!1;return c.DI(b)}function hLa(a,b){for(;a.Ya();){var c=a.$a();if(b.P(c))return(new z).d(c)}return y()} +function Xv(a){if(a.Ya()){var b=a.$a();return dK(b,oq(function(c){return function(){return c.Dd()}}(a)))}Pt();return AT()}function iLa(a,b,c,e){var f=c,g=SJ(W(),b)-c|0;for(c=c+(e=this.mea&&b<=this.i$&&a<=b))throw(new Zj).e("Invalid sub-sequence start: "+a+", end: "+b);return ya(this.f0,a,b)};d.t=function(){return ka(this.f0)};d.Oa=function(){return this.i$-this.mea|0};d.Hz=function(a){return xa(this.f0,a)};function KLa(a,b){var c=new sU;sU.prototype.Laa.call(c,b,0,wa(b),a);return c}d.$classData=r({sya:0},!1,"amf.core.lexer.CharSequenceStream",{sya:1,Ggb:1,f:1,eP:1}); +function tU(a){var b=zc(),c=F().Zd;a.Qn(rb(new sb,b,G(c,"root"),tb(new ub,vb().hg,"root","Indicates if the base unit represents the root of the document model obtained from parsing",H())));b=qb();c=F().Zd;a.Nn(rb(new sb,b,G(c,"location"),tb(new ub,vb().hg,"location","Location of the metadata document that generated this base unit",H())));b=(new xc).yd(Bq());c=F().Zd;a.Pn(rb(new sb,b,G(c,"references"),tb(new ub,vb().hg,"references","references across base units",H())));b=qb();c=F().Zd;c=G(c,"usage"); +var e=vb().hg,f=K(),g=F().Tb;a.Rn(rb(new sb,b,c,tb(new ub,e,"usage","Human readable description of the unit",J(f,(new Ib).ha([ic(G(g,"description"))])))));b=yc();c=F().$c;a.Mn(rb(new sb,b,G(c,"describedBy"),tb(new ub,vb().hg,"described by","Link to the AML dialect describing a particular subgraph of information",H())));b=qb();c=F().Zd;a.On(rb(new sb,b,G(c,"version"),tb(new ub,vb().hg,"version","Version of the current model",H())))}function OBa(a){return!!(a&&a.$classData&&a.$classData.ge.Hn)} +function LLa(){this.qa=this.ba=this.g=this.vf=this.ko=null}LLa.prototype=new u;LLa.prototype.constructor=LLa;d=LLa.prototype; +d.a=function(){MLa=this;Cr(this);var a=qb(),b=F().ez;this.ko=rb(new sb,a,G(b,"element"),tb(new ub,vb().hg,"element","Label indicating the type of source map information",H()));a=qb();b=F().ez;this.vf=rb(new sb,a,G(b,"value"),tb(new ub,vb().hg,"value","Value for the source map.",H()));this.g=H();ii();a=F().ez;a=[G(a,"SourceMap")];b=-1+(a.length|0)|0;for(var c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;this.ba=c;this.qa=tb(new ub,vb().hg,"Source Map","SourceMaps include tags with syntax specific information obtained when parsing a particular specification syntax like RAML or OpenAPI.\nIt can be used to re-generate the document from the RDF model with a similar syntax", +H());return this};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.Kb=function(){return this.ba};d.$classData=r({Rya:0},!1,"amf.core.metamodel.document.SourceMapModel$",{Rya:1,f:1,hc:1,Rb:1});var MLa=void 0;function oc(){MLa||(MLa=(new LLa).a());return MLa}function uU(a){var b=oc(),c=F().ez;a.Ed(rb(new sb,b,G(c,"sources"),tb(new ub,vb().hg,"source","Indicates that this parsing Unit has SourceMaps",H())))} +function vB(a){return!!(a&&a.$classData&&a.$classData.ge.pd)}function oN(a){a=a.A;if(a.b())return!0;a=a.c();if(null===a)throw(new sf).a();return""===a}function vU(){}vU.prototype=new u;vU.prototype.constructor=vU;vU.prototype.a=function(){return this};function Tf(a,b,c){a=(new tl).K((new S).a(),(O(),(new P).a()));a=Rd(a,"http://test.com/payload");var e=Jk().nb;a=Vd(a,e,b);b=Ab(b.fa(),q(Bb));b.b()||(b=b.c().da,e=Bq().uc,eb(a,e,b));return Qoa(a,c)} +vU.prototype.$classData=r({Dza:0},!1,"amf.core.model.document.PayloadFragment$",{Dza:1,f:1,q:1,o:1});var NLa=void 0;function Uf(){NLa||(NLa=(new vU).a());return NLa}function OLa(a){return!!(a&&a.$classData&&a.$classData.ge.Fga)}function yh(a){var b=B(a.Y(),Zf().uc);return b.A.na()?b.A:yb(a)}function RM(a){return!!(a&&a.$classData&&a.$classData.ge.Zv)}function Sd(a,b,c){var e=a.Zg();return Vd(a,e,ih(new jh,b,c))}function qD(a){return!!(a&&a.$classData&&a.$classData.ge.xh)}function wU(){} +wU.prototype=new u;wU.prototype.constructor=wU;wU.prototype.a=function(){return this};function PLa(a,b){a=Od(O(),b);return(new Pd).K((new S).a(),a)}wU.prototype.$classData=r({cAa:0},!1,"amf.core.model.domain.extensions.CustomDomainProperty$",{cAa:1,f:1,q:1,o:1});var QLa=void 0;function RLa(){QLa||(QLa=(new wU).a());return QLa}function xU(){}xU.prototype=new u;xU.prototype.constructor=xU;xU.prototype.a=function(){return this}; +xU.prototype.$classData=r({hAa:0},!1,"amf.core.model.domain.extensions.ShapeExtension$",{hAa:1,f:1,q:1,o:1});var SLa=void 0;function yU(){}yU.prototype=new u;yU.prototype.constructor=yU;yU.prototype.a=function(){return this};yU.prototype.$classData=r({lAa:0},!1,"amf.core.model.domain.templates.VariableValue$",{lAa:1,f:1,q:1,o:1});var TLa=void 0;function zU(){}zU.prototype=new u;zU.prototype.constructor=zU;zU.prototype.a=function(){return this}; +function AU(a,b){a=(new qg).e("\\[\\(([0-9]*),([0-9]*)\\)-\\(([0-9]*),([0-9]*)\\)\\]");var c=H();a=yt((new rg).vi(a.ja,c),b);a.b()?c=!1:null!==a.c()?(c=a.c(),c=0===Tu(c,4)):c=!1;if(c){b=a.c();c=Uu(b,0);b=a.c();var e=Uu(b,1);b=a.c();b=Uu(b,2);a=a.c();a=Uu(a,3);c=(new qg).e(c);c=FD(ED(),c.ja,10);e=(new qg).e(e);e=FD(ED(),e.ja,10);b=(new qg).e(b);b=FD(ED(),b.ja,10);a=(new qg).e(a);a=FD(ED(),a.ja,10);return(new BU).fU((new CU).Sc(c,e),(new CU).Sc(b,a))}throw(new x).d(b);} +function ce(a,b){return(new BU).fU((new CU).Sc(b.rf,b.If),(new CU).Sc(b.Yf,b.bg))}zU.prototype.$classData=r({PAa:0},!1,"amf.core.parser.Range$",{PAa:1,f:1,q:1,o:1});var ULa=void 0;function ae(){ULa||(ULa=(new zU).a());return ULa}function DU(){}DU.prototype=new u;DU.prototype.constructor=DU;DU.prototype.a=function(){return this};DU.prototype.$classData=r({TAa:0},!1,"amf.core.parser.Reference$",{TAa:1,f:1,q:1,o:1});var VLa=void 0; +function EU(a,b,c,e,f,g,h,k){var l=bp(),m=a.lj;a=k.b()?(new z).d(a.Lz):k;WLa(gp(l),h,b,c,e,f,g,m,a)}function XLa(){CF.call(this)}XLa.prototype=new hT;XLa.prototype.constructor=XLa;function YLa(){}YLa.prototype=XLa.prototype;function ZLa(){this.$=null}ZLa.prototype=new u;ZLa.prototype.constructor=ZLa;d=ZLa.prototype;d.a=function(){$La=this;via(this);return this};d.t=function(){return this.$.trim()};d.ve=function(){return this.$};d.N8=function(a){this.$=a};d.wM=function(){return""}; +d.$classData=r({PBa:0},!1,"amf.core.remote.Oas$",{PBa:1,f:1,b7:1,cD:1});var $La=void 0;function Au(){$La||($La=(new ZLa).a());return $La}function aMa(){this.$=null}aMa.prototype=new u;aMa.prototype.constructor=aMa;d=aMa.prototype;d.a=function(){bMa=this;via(this);return this};d.t=function(){return this.$.trim()};d.ve=function(){return this.$};d.N8=function(a){this.$=a};d.wM=function(){return"2.0"};d.$classData=r({QBa:0},!1,"amf.core.remote.Oas20$",{QBa:1,f:1,b7:1,cD:1});var bMa=void 0; +function Bu(){bMa||(bMa=(new aMa).a());return bMa}function cMa(){this.$=null}cMa.prototype=new u;cMa.prototype.constructor=cMa;d=cMa.prototype;d.a=function(){dMa=this;via(this);return this};d.t=function(){return this.$.trim()};d.ve=function(){return this.$};d.N8=function(a){this.$=a};d.wM=function(){return"3.0"};d.$classData=r({RBa:0},!1,"amf.core.remote.Oas30$",{RBa:1,f:1,b7:1,cD:1});var dMa=void 0;function Cu(){dMa||(dMa=(new cMa).a());return dMa}function eMa(){this.$=null}eMa.prototype=new u; +eMa.prototype.constructor=eMa;d=eMa.prototype;d.a=function(){fMa=this;Bia(this);return this};d.O8=function(a){this.$=a};d.t=function(){return this.$.trim()};d.ve=function(){return this.$};d.wM=function(){return""};d.$classData=r({WBa:0},!1,"amf.core.remote.Raml$",{WBa:1,f:1,c7:1,cD:1});var fMa=void 0;function Ob(){fMa||(fMa=(new eMa).a());return fMa}function gMa(){this.$=null}gMa.prototype=new u;gMa.prototype.constructor=gMa;d=gMa.prototype;d.a=function(){hMa=this;Bia(this);return this}; +d.O8=function(a){this.$=a};d.t=function(){return this.$.trim()};d.ve=function(){return this.$};d.wM=function(){return"0.8"};d.$classData=r({XBa:0},!1,"amf.core.remote.Raml08$",{XBa:1,f:1,c7:1,cD:1});var hMa=void 0;function Qb(){hMa||(hMa=(new gMa).a());return hMa}function iMa(){this.$=null}iMa.prototype=new u;iMa.prototype.constructor=iMa;d=iMa.prototype;d.a=function(){jMa=this;Bia(this);return this};d.O8=function(a){this.$=a};d.t=function(){return this.$.trim()};d.ve=function(){return this.$}; +d.wM=function(){return"1.0"};d.$classData=r({YBa:0},!1,"amf.core.remote.Raml10$",{YBa:1,f:1,c7:1,cD:1});var jMa=void 0;function Pb(){jMa||(jMa=(new iMa).a());return jMa}function EB(){this.ob=null;this.Sk=!1;this.ED=this.wu=null}EB.prototype=new gv;EB.prototype.constructor=EB;function kMa(){}kMa.prototype=EB.prototype;function lMa(a,b){O();var c=(new P).a();c=(new mf).K((new S).a(),c);c=Rd(c,"http://resolutionstage.com/test#");var e=Af().Ic;Bf(c,e,b);return ar(a.ye(c).Y(),Gk().Ic)}d=EB.prototype; +d.mt=function(a,b){this.Sk=a;fv.prototype.Hb.call(this,b);this.wu=y();this.ED=Rb(Ut(),H());return this};d.Aw=function(){return this.ob};d.Ija=function(){return Uc(function(){return function(a){return a}}(this))};d.ye=function(a){this.wu=(new z).d((new dv).EK(a));var b=hCa(),c=iCa();return a.Qm(gCa(b,c),Uc(function(e){return function(f){var g=new mN,h=e.Sk,k=e.wu,l=e.Aw(),m=e.Ija();g.ED=e.ED;g.Sk=h;g.wu=k;g.vG=l;g.Hja=m;return g.wqa(f)}}(this)),this.Aw())}; +function wqa(a,b){O();var c=(new P).a();c=(new mf).K((new S).a(),c);c=Rd(c,"http://resolutionstage.com/test#");if(null!==b.j)Ui(c.Y(),Gk().nb,b,(O(),(new P).a()));else{var e=Jk().nb;Vd(c,e,b)}return a.ye(c).qe()}d.$classData=r({Pga:0},!1,"amf.core.resolution.stages.ReferenceResolutionStage",{Pga:1,ii:1,f:1,Qga:1});function FU(){this.En=null}FU.prototype=new u;FU.prototype.constructor=FU;FU.prototype.a=function(){mMa=this;this.En=(new GU).Hc("","");return this}; +function wha(a,b){fF();var c=(null===b?"":b).trim();c=(new qg).e(c);if(tc(c))switch(a=qia(ua(),b,46),a){case -1:return(new GU).Hc("",b);default:return c=b.substring(0,a),(new GU).Hc(c,b.substring(1+a|0))}else return a.En}FU.prototype.$classData=r({hDa:0},!1,"amf.core.utils.package$QName$",{hDa:1,f:1,q:1,o:1});var mMa=void 0;function xha(){mMa||(mMa=(new FU).a());return mMa}function HU(){}HU.prototype=new u;HU.prototype.constructor=HU;HU.prototype.a=function(){return this}; +function nMa(a,b,c){return aq(new bq,!c.Od(w(function(){return function(e){return e.zm===Yb().qb}}(a))),"",b,c)}HU.prototype.$classData=r({mDa:0},!1,"amf.core.validation.AMFValidationReport$",{mDa:1,f:1,q:1,o:1});var oMa=void 0;function pMa(){oMa||(oMa=(new HU).a());return oMa}function Wb(){}Wb.prototype=new u;Wb.prototype.constructor=Wb;Wb.prototype.a=function(){return this}; +function aba(a,b,c){if(Vb().Ia(c.TB()).na()&&""!==c.TB()){var e=!1,f=null,g=b.Y().vb,h=mz();h=Ua(h);var k=Id().u;a=Jd(g,h,k).Fb(w(function(l,m){return function(p){return ic(p.Lc.r)===m.TB()}}(a,c)));a:{if(a instanceof z&&(e=!0,f=a,a=f.i,wh(a.r.r.fa(),q(jd)))){e=a.r.r.fa();break a}if(e&&(a=f.i,wh(a.r.x,q(jd)))){e=a.r.x;break a}e?(e=f.i.r.r,e=e instanceof $r&&e.wb.Da()?e.wb.ga().fa():b.fa()):e=b.fa()}}else e=b.fa();b=Ab(e,q(jd));e=Ab(e,q(Bb));e.b()?e=y():(e=e.c(),e=(new z).d(e.da));return(new R).M(b, +e)}Wb.prototype.$classData=r({oDa:0},!1,"amf.core.validation.AMFValidationResult$",{oDa:1,f:1,q:1,o:1});var Zaa=void 0;function IU(){this.bia=this.aia=this.Zha=this.P7=this.Afa=this.Qfa=null}IU.prototype=new u;IU.prototype.constructor=IU; +IU.prototype.a=function(){qMa=this;var a=F().Eb;this.Qfa=ic(G(a,"CoreShape"));a=F().Eb;this.Afa=ic(G(a,"AmlShape"));a=F().Eb;this.P7=ic(G(a,"ParserShape"));a=F().Eb;this.Zha=ic(G(a,"PayloadShape"));a=F().Eb;this.aia=ic(G(a,"RenderShape"));a=F().Eb;this.bia=ic(G(a,"ResolutionShape"));return this};IU.prototype.$classData=r({CDa:0},!1,"amf.core.validation.core.ValidationSpecification$",{CDa:1,f:1,q:1,o:1});var qMa=void 0;function oj(){qMa||(qMa=(new IU).a());return qMa} +function JU(){this.yu=this.i5=this.NM=this.j5=this.xF=this.Ifa=this.h5=this.Ul=this.bv=this.$c=this.nia=this.Qi=this.Jfa=this.Bj=this.Tb=this.Ua=this.ez=this.Pg=this.Eb=this.dc=this.Jb=this.Ta=this.Zd=null}JU.prototype=new u;JU.prototype.constructor=JU; +JU.prototype.a=function(){rMa=this;this.Zd=(new sL).e("http://a.ml/vocabularies/document#");this.Ta=(new sL).e("http://a.ml/vocabularies/apiContract#");this.Jb=(new sL).e("http://a.ml/vocabularies/apiBinding#");this.dc=(new sL).e("http://a.ml/vocabularies/security#");this.Eb=(new sL).e("http://a.ml/vocabularies/shapes#");this.Pg=(new sL).e("http://a.ml/vocabularies/data#");this.ez=(new sL).e("http://a.ml/vocabularies/document-source-maps#");this.Ua=(new sL).e("http://www.w3.org/ns/shacl#");this.Tb= +(new sL).e("http://a.ml/vocabularies/core#");this.Bj=(new sL).e("http://www.w3.org/2001/XMLSchema#");this.Jfa=(new sL).e("http://a.ml/vocabularies/shapes/anon#");this.Qi=(new sL).e("http://www.w3.org/1999/02/22-rdf-syntax-ns#");this.nia=(new sL).e("");this.$c=(new sL).e("http://a.ml/vocabularies/meta#");this.bv=(new sL).e("http://www.w3.org/2002/07/owl#");this.Ul=(new sL).e("http://www.w3.org/2000/01/rdf-schema#");this.h5=(new sL).e("http://a.ml/vocabularies/amf/core#");this.Ifa=(new sL).e("http://a.ml/vocabularies/amf/aml#"); +this.xF=(new sL).e("http://a.ml/vocabularies/amf/parser#");this.j5=(new sL).e("http://a.ml/vocabularies/amf/resolution#");this.NM=(new sL).e("http://a.ml/vocabularies/amf/validation#");this.i5=(new sL).e("http://a.ml/vocabularies/amf/render#");var a=(new R).M("rdf",this.Qi),b=(new R).M("sh",this.Ua),c=(new R).M("shacl",this.Ua),e=(new R).M("security",this.dc),f=(new R).M("core",this.Tb),g=(new R).M("raml-doc",this.Zd),h=(new R).M("doc",this.Zd),k=(new R).M("xsd",this.Bj),l=(new R).M("amf-parser", +this.xF),m=(new R).M("amf-core",this.h5),p=(new R).M("apiContract",this.Ta),t=(new R).M("apiBinding",this.Jb),v=(new R).M("amf-resolution",this.j5),A=(new R).M("amf-validation",this.NM),D=(new R).M("amf-render",this.i5),C=(new R).M("raml-shapes",this.Eb),I=(new R).M("data",this.Pg),L=(new R).M("sourcemaps",this.ez),Y=(new R).M("meta",this.$c),ia=(new R).M("owl",this.bv);a=[a,b,c,e,f,g,h,k,l,m,p,t,v,A,D,C,I,L,Y,ia,(new R).M("rdfs",this.Ul)];b=(new wu).a();c=0;for(e=a.length|0;ce.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m=b.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length, +k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=mg.w)throw(new U).e("0");k=f.length|0;a=g.w+k|0;uD(g,a);Ba(g.L,0,g.L,k,g.w);k=g.L;l=k.n.length;h=c=0;var m=f.length|0;l=ma.w)throw(new U).e("0");g=c.length|0;f=a.w+g|0;uD(a,f);Ba(a.L,0, +a.L,g,a.w);g=a.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m=c.length|0;l=mc.w)throw(new U).e("0");f=e.length| +0;g=c.w+f|0;uD(c,g);Ba(c.L,0,c.L,f,c.w);f=c.L;var h=f.n.length,k=0,l=0,m=e.length|0;h=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=mc.w)throw(new U).e("0"); +f=e.length|0;g=c.w+f|0;uD(c,g);Ba(c.L,0,c.L,f,c.w);f=c.L;var h=f.n.length,k=0,l=0,m=e.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m=c.length|0;l=me.w)throw(new U).e("0");var f=b.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=mb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;var k=g.n.length,l=h=0,m=e.length|0;k=mb.w)throw(new U).e("0");var f=c.length|0,g=b.w+f|0;uD(b,g);Ba(b.L,0,b.L,f,b.w);f=b.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");var f=b.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");var f=b.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=mb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;l=g.n.length;k=h=0;m=e.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L; +l=g.n.length;k=h=0;m=b.length|0;l=myd.w)throw(new U).e("0");var rd=zd.length|0,sd=yd.w+rd|0;uD(yd,sd);Ba(yd.L,0,yd.L,rd,yd.w);for(var le=yd.L,Vc=le.n.length,Sc=0,Qc=0,$c=zd.length|0,Wc=$cRe.w)throw(new U).e("0");var ne=we.length|0,Me=Re.w+ne|0;uD(Re,Me);Ba(Re.L,0,Re.L,ne,Re.w);for(var Se=Re.L,xf=Se.n.length,ie=0,gf=0,pf=we.length|0,hf=pfoe.w)throw(new U).e("0");var bh=lg.length|0,Qh=oe.w+bh|0;uD(oe,Qh); +Ba(oe.L,0,oe.L,bh,oe.w);for(var af=oe.L,Pf=af.n.length,oh=0,ch=0,Ie=lg.length|0,ug=Iejf.w)throw(new U).e("0");var Mg=mg.length|0,Ng=jf.w+Mg|0;uD(jf,Ng);Ba(jf.L,0,jf.L,Mg,jf.w);for(var eg=jf.L,Oe=eg.n.length,ng=0,fg=0,Ug=mg.length|0,xg=UgVg.w)throw(new U).e("0");var Rf=Wg.length|0,Sh=Vg.w+Rf|0;uD(Vg,Sh);Ba(Vg.L,0,Vg.L,Rf,Vg.w);for(var zg=Vg.L,Ji=zg.n.length,Kh=0,Lh=0,Ki=Wg.length|0,gj=KiDh.w)throw(new U).e("0");var Li=Eh.length|0,Mi=Dh.w+Li|0;uD(Dh,Mi);Ba(Dh.L,0,Dh.L,Li,Dh.w);for(var uj=Dh.L,Ni=uj.n.length, +fk=0,Ck=0,Dk=Eh.length|0,hj=Dkzf.w)throw(new U).e("0");var eh=Sf.length|0,Fh=zf.w+eh|0;uD(zf,Fh);Ba(zf.L,0,zf.L,eh,zf.w);for(var fi=zf.L,hn= +fi.n.length,mm=0,nm=0,kd=Sf.length|0,Pi=kdia.w)throw(new U).e("0");var La=pa.length|0,ob=ia.w+La|0;uD(ia,ob);Ba(ia.L,0,ia.L,La,ia.w);for(var zb= +ia.L,Zb=zb.n.length,Cc=0,vc=0,id=pa.length|0,yd=idpg.w)throw(new U).e("0");Sf=Oi.length|0;zf=pg.w+Sf|0;uD(pg,zf);Ba(pg.L,0,pg.L,Sf,pg.w);Sf=pg.L;var Fh=Sf.n.length;eh=bf=0;var fi=Oi.length|0;Fh=fime.w)throw(new U).e("0");var Le=of.length|0,Ve=me.w+Le|0;uD(me,Ve);Ba(me.L,0,me.L,Le,me.w);for(var he=me.L,Wf=he.n.length,vf=0,He=0,Ff=of.length|0,wf=Ffie.w)throw(new U).e("0"); +var pf=gf.length|0,hf=ie.w+pf|0;uD(ie,hf);Ba(ie.L,0,ie.L,pf,ie.w);for(var Gf=ie.L,yf=Gf.n.length,oe=0,lg=0,bh=gf.length|0,Qh=bhNe.w)throw(new U).e("0");var di=Xf.length|0,dg=Ne.w+di|0;uD(Ne,dg);Ba(Ne.L,0,Ne.L,di,Ne.w);for(var Hf=Ne.L,wg=Hf.n.length,Lg=0,jf=0,mg=Xf.length|0,Mg=mgpg.w)throw(new U).e("0");Sf=Oi.length|0;zf=pg.w+Sf|0;uD(pg,zf);Ba(pg.L,0,pg.L,Sf,pg.w);Sf=pg.L;var Fh=Sf.n.length;eh=bf=0;var fi=Oi.length|0;Fh=fiog.w)throw(new U).e("0");var Ch=rh.length|0,Vg=og.w+Ch|0;uD(og,Vg);Ba(og.L,0,og.L,Ch,og.w);for(var Wg=og.L,Rf=Wg.n.length,Sh=0,zg=0,Ji=rh.length|0,Kh=JiEh.w)throw(new U).e("0");var Mi=Li.length|0,uj= +Eh.w+Mi|0;uD(Eh,uj);Ba(Eh.L,0,Eh.L,Mi,Eh.w);for(var Ni=Eh.L,fk=Ni.n.length,Ck=0,Dk=0,hj=Li.length|0,ri=hjb;){var c=b;c=GE(BE(),(new qa).Sc(0===(32&c)?1<b.Ud)return-1!==b.od||-1!==b.Ud?(a=b.od,b=b.Ud,ISa(new FE,-1,(new qa).Sc(-a|0,0!==a?~b:-b|0))):a.A7;var c=b.Ud;return(0===c?-2147483638>=(-2147483648^b.od):0>c)?a.dia.n[b.od]:ISa(new FE,1,b)}KZ.prototype.$classData=r({A2a:0},!1,"java.math.BigInteger$",{A2a:1,f:1,q:1,o:1});var HSa=void 0;function BE(){HSa||(HSa=(new KZ).a());return HSa}function LZ(){this.L$=this.hja=this.doa=this.WV=this.Cma=this.Saa=this.Raa=null}LZ.prototype=new u;LZ.prototype.constructor=LZ; +LZ.prototype.a=function(){JSa=this;var a=this.Raa="(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";this.Saa="(?:(?:[0-9a-f]{1,4}:){7}[0-9a-f]{1,4}|(?:[0-9a-f]{1,4}:){1,7}:|(?:[0-9a-f]{1,4}:){1,6}(?::[0-9a-f]{1,4})|(?:[0-9a-f]{1,4}:){1,5}(?::[0-9a-f]{1,4}){1,2}|(?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}){1,3}|(?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,4}|(?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,5}|(?:[0-9a-f]{1,4}:)(?::[0-9a-f]{1,4}){1,6}|:(?:(?::[0-9a-f]{1,4}){1,7}|:)|(?:[0-9a-f]{1,4}:){6}"+ +a+"|(?:[0-9a-f]{1,4}:){1,5}:"+a+"|(?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}):"+a+"|(?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,2}:"+a+"|(?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,3}:"+a+"|(?:[0-9a-f]{1,4}:)(?::[0-9a-f]{1,4}){1,4}:"+a+"|::(?:[0-9a-f]{1,4}:){1,5}"+a+")(?:%[0-9a-z]+)?";new ba.RegExp("^"+this.Saa+"$","i");a="//("+("(?:(?:((?:[a-z0-9-_.!~*'();:\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)@)?"+("((?:(?:[a-z0-9]|[a-z0-9][a-z0-9-]*[a-z0-9])\\.)*(?:[a-z]|[a-z][a-z0-9-]*[a-z0-9])\\.?|"+ +this.Raa+"|"+("\\[(?:"+this.Saa+")\\]")+")(?::([0-9]*))?")+")?|(?:[a-z0-9-_.!~*'()$,;:@\x26\x3d+]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])+")+")(/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*(?:/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*)*)?"; +this.Cma=new ba.RegExp("^(?:"+("([a-z][a-z0-9+-.]*):(?:("+("(?:"+a+"|(/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*(?:/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*)*))(?:\\?((?:[;/?:@\x26\x3d+$,\\[\\]a-z0-9-_.!~*'()]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*))?")+ +")|((?:[a-z0-9-_.!~*'();?:@\x26\x3d+$,]|%[a-f0-9]{2})(?:[;/?:@\x26\x3d+$,\\[\\]a-z0-9-_.!~*'()]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*))")+"|"+("((?:"+a+"|(/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*(?:/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*)*)|((?:[a-z0-9-_.!~*'();@\x26\x3d+$,]|%[a-f0-9]{2})*(?:/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*(?:/(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*(?:;(?:[a-z0-9-_.!~*'():@\x26\x3d+$,]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*)*)*)?))(?:\\?((?:[;/?:@\x26\x3d+$,\\[\\]a-z0-9-_.!~*'()]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*))?)")+ +")(?:#((?:[;/?:@\x26\x3d+$,\\[\\]a-z0-9-_.!~*'()]|%[a-f0-9]{2}|[^\x00-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029])*))?$","i");this.WV=function(b){$M();b=tja(Kv(),b);for(var c="";b.ud!==b.Ze;){var e=255&xJa(b),f=(+(e>>>0)).toString(16);c=c+(15>=e?"%0":"%")+f.toUpperCase()}return c};new ba.RegExp('[\x00- "#/\x3c\x3e?@\\[-\\^`{-}\u007f-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029]|%(?![0-9a-f]{2})',"ig");this.doa=new ba.RegExp('[\x00- "#\x3c\x3e?\\[-\\^`{-}\u007f-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029]|%(?![0-9a-f]{2})', +"ig");this.hja=new ba.RegExp('[\x00- "#/\x3c\x3e?\\^`{-}\u007f-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029]|%(?![0-9a-f]{2})',"ig");this.L$=new ba.RegExp('[\x00- "#\x3c\x3e@\\^`{-}\u007f-\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\u2028\u2029]|%(?![0-9a-f]{2})',"ig");new ba.RegExp("[^\x00-\u007f]+","g");return this}; +function YBa(a,b,c,e,f,g){var h="";null!==b&&(h=""+h+b+":");null!==c&&(h=h+"//"+c.replace(a.hja,a.WV));null!==e&&(h=""+h+e.replace(a.doa,a.WV));null!==f&&(h=h+"?"+f.replace(a.L$,a.WV));null!==g&&(h=h+"#"+g.replace(a.L$,a.WV));return h} +function MZ(a,b){if(void 0!==b){a=0;for(var c="";a<(b.length|0);)if(37===(65535&(b.charCodeAt(a)|0))){if((2+a|0)>=(b.length|0))throw(new uK).d("Invalid escape in URI");var e=b.substring(a,3+a|0);c=""+c+e.toUpperCase();a=3+a|0}else c=""+c+b.substring(a,1+a|0),a=1+a|0;return c}} +function XBa(a,b){a:{for(a=0;a!==(b.length|0);){if(37===(65535&(b.charCodeAt(a)|0))){a=!1;break a}a=1+a|0}a=!0}if(a)return b;b=vsa(zsa(),b,b.length|0);zsa();a=b.By;a=ja(Ja(Na),[a]);var c=a.n.length,e=a.n.length;if(0>e||e>a.n.length)throw(new U).a();if(0>c||c>e)throw(new U).a();a=KSa(e,a,0,0,c,!1);c=rsa(64);var f=!1;e=(Kv(),(new bS).a());var g=TE().wJ;if(null===g)throw(new Zj).e("null CodingErrorAction");e.II=g;g=TE().wJ;if(null===g)throw(new Zj).e("null CodingErrorAction");for(e.KI=g;b.ud!==b.Ze;)switch(g= +b.AO(),g){case 37:if(c.ud===c.Ze){KE.prototype.qO.call(c);Bsa(e,c,a,!1);f=c;if(f.Ss)throw(new VE).a();g=f.Ze-f.ud|0;Ba(f.bj,f.Mk+f.ud|0,f.bj,f.Mk,g);f.uF=-1;KE.prototype.J1.call(f,f.By);KE.prototype.qg.call(f,g)}f=b.AO();f=ba.String.fromCharCode(f);g=b.AO();f=""+f+ba.String.fromCharCode(g);f=FD(ED(),f,16);cS(c,f<<24>>24);f=!0;break;default:f&&(KE.prototype.qO.call(c),Bsa(e,c,a,!0),e.gx=1,KE.prototype.wja.call(c),f=!1),a.EP(g)}f&&(KE.prototype.qO.call(c),Bsa(e,c,a,!0),e.gx=1,KE.prototype.wja.call(c)); +KE.prototype.qO.call(a);return a.t()}LZ.prototype.$classData=r({G2a:0},!1,"java.net.URI$",{G2a:1,f:1,q:1,o:1});var JSa=void 0;function $M(){JSa||(JSa=(new LZ).a());return JSa}function NE(){KE.call(this);this.bj=null;this.Mk=0}NE.prototype=new qsa;NE.prototype.constructor=NE;function LSa(){}LSa.prototype=NE.prototype;NE.prototype.h=function(a){return a instanceof NE?0===MSa(this,a):!1};NE.prototype.V6a=function(a,b){this.bj=b;this.Mk=0;KE.prototype.ue.call(this,a)}; +NE.prototype.tr=function(a){return MSa(this,a)};function MSa(a,b){if(a===b)return 0;for(var c=a.ud,e=a.Ze-c|0,f=b.ud,g=b.Ze-f|0,h=eI||24L||60I?-L|0:L)|0)}var Y=SSa(p,t,v,A,D,C);return(new ye).d(Y)}catch(ia){p=Ph(E(),ia);if(null!==p){if(p instanceof RZ)return p=p.yP,ue(),(new ve).d(p);throw mb(E(),p);}throw ia;}}Wsa||(Wsa=(new kF).a());ue();p=(new VSa).Hc(b,"");return(new ve).d(p)} +function WSa(a,b){if(0===b)return"Z";a=b/3600|0;var c=(b/60|0)%60|0;b=0c?-c|0:c;c=(new qg).e(":%02d");var f=[e];ua();c=c.ja;K();vk();e=[];for(var g=0,h=f.length|0;ga?-a|0:a;a=(new qg).e("%s%02d%s");c=[b,e,c];ua();b=a.ja;K();vk();a=[];e=0;for(f=c.length|0;e=b&&0>=c&&1>=e&&0>=f?a.dl:1>=b&&0>=c&&2147483647===e&&2147483647===b?a.Hfa:(new SZ).CO(b,c,e,f)} +ZSa.prototype.$classData=r({F3a:0},!1,"org.mulesoft.lexer.InputRange$",{F3a:1,f:1,q:1,o:1});var $Sa=void 0;function ee(){$Sa||($Sa=(new ZSa).a());return $Sa}function tF(){this.Ij=this.Dg=this.cf=0}tF.prototype=new u;tF.prototype.constructor=tF;d=tF.prototype;d.h=function(a){return a instanceof tF?this.cf===a.cf&&this.Dg===a.Dg&&this.Ij===a.Ij:!1};d.Fi=function(a,b,c){this.cf=a;this.Dg=b;this.Ij=c;return this};d.Yx=function(){return 0===this.cf&&0===this.Dg&&0===this.Ij}; +d.t=function(){return(0>=this.cf&&0>=this.Dg?"":"("+this.cf+", "+this.Dg+")")+"@"+this.Ij};d.tr=function(a){return aTa(this,a)};d.gs=function(a){return aTa(this,a)};d.z=function(){return this.cf+ca(31,this.Dg+ca(31,this.Ij)|0)|0};function aTa(a,b){if(a.Ij!==b.Ij)return a=a.Ij,b=b.Ij,a===b?0:a=(-2147483648^b):0>c))return ue(),(new ye).d(b)}return HF(JF(),a,"Out of range")};UZ.prototype.$classData=r({k4a:0},!1,"org.yaml.convert.YRead$IntYRead$",{k4a:1,$R:1,f:1,az:1});var rTa=void 0;function TAa(){rTa||(rTa=(new UZ).a());return rTa}function sTa(){AS.call(this)}sTa.prototype=new BS;sTa.prototype.constructor=sTa; +sTa.prototype.a=function(){AS.prototype.RO.call(this,Q().cj,Ea().dl);return this};sTa.prototype.$classData=r({l4a:0},!1,"org.yaml.convert.YRead$LongYRead$",{l4a:1,$R:1,f:1,az:1});var tTa=void 0;function oTa(){tTa||(tTa=(new sTa).a());return tTa}function uTa(){AS.call(this)}uTa.prototype=new BS;uTa.prototype.constructor=uTa;uTa.prototype.a=function(){AS.prototype.RO.call(this,Q().Na,"");return this};uTa.prototype.$classData=r({n4a:0},!1,"org.yaml.convert.YRead$StringYRead$",{n4a:1,$R:1,f:1,az:1}); +var vTa=void 0;function Dd(){vTa||(vTa=(new uTa).a());return vTa}function SG(){hS.call(this)}SG.prototype=new FJa;SG.prototype.constructor=SG;d=SG.prototype;d.mma=function(){iS(this,VF().SM);kS(this)};d.noa=function(){iS(this,VF().YI)};d.YG=function(a,b){hS.prototype.YG.call(this,a,b);return this};function wTa(a,b){for(;;)if(b.Ha(65535&a.kb.Db.fc)?0:VZ(a.kb.Db)){var c=a.kb;oS(c.Db,c.jg,c.Sj)}else break;iS(a,VF().Vv)} +d.Kka=function(a){switch(a){case 91:tS(this,VF().zF);break;case 123:tS(this,VF().PC);break;case 93:tS(this,VF().ZC);break;case 125:tS(this,VF().wx);break;case 58:tS(this,VF().Ai);break;case 44:tS(this,VF().Ai);break;case 34:a=!1;iS(this,VF().Tv);for(tS(this,VF().Ai);;)if(34!==this.kb.Db.fc&&this.kb.Db.fc!==rF().Xs)if(92===this.kb.Db.fc){a&&(iS(this,VF().bs),a=!1);iS(this,VF().TM);tS(this,VF().Ai);var b=65535&this.kb.Db.fc;85===sja(Ku(),b)&&mS(this.kb,4);tS(this,VF().as);iS(this,VF().XM)}else a=!0, +b=this.kb,oS(b.Db,b.jg,b.Sj);else break;a&&iS(this,VF().bs);tS(this,VF().Ai);iS(this,VF().Ws);break;case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:iS(this,VF().Tv);nS(this,45);a=!0;if(!nS(this,48))for(b=this.kb,oS(b.Db,b.jg,b.Sj),b=this.kb;;){var c=b.Db.fc;if(tta(LF(),c))oS(b.Db,b.jg,b.Sj);else break}else if(tta(LF(),this.kb.Db.fc)){a=!1;b=[44,93,125,34,91,123,58];if(0===(b.length|0))b=vd();else{c=wd(new xd,vd());for(var e=0,f=b.length|0;eb&&63===sS(a.kb,c)||TTa(a)?c-b|0:0}function HUa(a,b){var c=vS(a.Co,2147483647);return 45!==sS(a.kb,c)||OF(PF(),sS(a.kb,1+c|0))?0:c-b|0} +function hUa(a,b,c){var e=WZ(a);if(iS(a,VF().Tu)&&IUa(a,b,c)&&iS(a,VF().Uu)){var f=WZ(a),g=(b_(a,b,c),cUa(a,b,c));g||ZZ(a,f);f=g?!0:f_(a)}else f=!1;f||ZZ(a,e);f||dUa(a,b,c)?a=!0:(e=WZ(a),zTa(a,b,c)?(f=WZ(a),b_(a,b,c),(b=eUa(a,b,c))||ZZ(a,f),b=b?!0:f_(a)):b=!1,b||ZZ(a,e),a=b);return a} +function UTa(a,b,c){var e=HUa(a,b)+b|0;if(0=b||b===vS(a.Co,b)&&lS(a,b,VF().GF)} +function iUa(a,b,c,e){if(a.kb.Db.fc===e){var f=!1;iS(a,VF().Tv);tS(a,VF().Ai);for(var g=!1;!g;){var h=a.kb.Db.fc;if(34===h&&34===e)g=!0;else if(39===h&&39===e)39!==sS(a.kb,1)?g=!0:(f&&(iS(a,VF().bs),f=!1),iS(a,VF().TM),tS(a,VF().Ai),tS(a,VF().as),iS(a,VF().XM));else if(13===h||10===h)if(h=g_(),null===c||c!==h?(h=d_(),h=!(null!==c&&c===h)):h=!1,h){f&&(iS(a,VF().bs),f=!1);h=WZ(a);var k=YZ(a,VF().$y)&&$Z(a,b,c);k||ZZ(a,h);k||tS(a,VF().YY);c_(a,b);lS(a,uS(a.Co,0),VF().fB)}else f=!1,iS(a,VF().Vv),g=!0; +else if(92===h&&34===e){f&&(iS(a,VF().bs),f=!1);iS(a,VF().TM);tS(a,VF().Ai);if(h=10===a.kb.Db.fc)YZ(a,VF().$y);else switch(Bta(PF(),a.kb.Db.fc)){case -1:tS(a,VF().Vv);break;case 120:LUa(a,2);break;case 117:LUa(a,4);break;case 85:LUa(a,8);break;default:tS(a,VF().as)}iS(a,VF().XM);h&&lS(a,uS(a.Co,0),VF().fB)}else 32===h||9===h?(h=uS(a.Co,0),zta(PF(),sS(a.kb,h))?(f&&(iS(a,VF().bs),f=!1),lS(a,h,VF().fB)):(f=!0,mS(a.kb,h))):rF().Xs===h?(iS(a,VF().Vv),g=!0):(f=!0,h=a.kb,oS(h.Db,h.jg,h.Sj))}f&&iS(a,VF().bs); +tS(a,VF().Ai);return iS(a,VF().Ws)}return!1}function MUa(a){return OF(PF(),a)&&!xta(PF(),a)}function b_(a,b,c){if(d_()===c||g_()===c)return XZ(a);c=WZ(a);(b=h_(a)&&ITa(a,b,!0,!1))||ZZ(a,c);return b?!0:XZ(a)}function KUa(a){return 42===a.kb.Db.fc&&MUa(sS(a.kb,1))&&iS(a,VF().o5)&&tS(a,VF().Ai)&&NUa(a)?iS(a,VF().E5):!1} +function ETa(a){if(33===a.kb.Db.fc&&iS(a,VF().vX)){if(32===sS(a.kb,1)&&e_(a,33))var b=!0;else{b=WZ(a);if(e_(a,33)&&e_(a,60)){var c=function(g){return function(){return nUa(g)}}(a),e=WZ(a),f=!!c();if(f)for(;e=WZ(a),VZ(a.kb.Db)&&c(););ZZ(a,e);c=f}else c=!1;(c=c&&iS(a,VF().as)?e_(a,62):!1)||ZZ(a,b);b=c}if(b)b=!0;else{b=WZ(a);if(kUa(a)){c=WZ(a);if(oUa(a)){for(;oUa(a););e=iS(a,VF().as)}else e=!1;e||ZZ(a,c);c=e?!0:iS(a,VF().Vv)}else c=!1;c||ZZ(a,b);b=c}}else b=!1;return b?iS(a,VF().WX):!1} +function eUa(a,b,c){if(e_(a,58)){var e=WZ(a);b_(a,b,c);iS(a,VF().Tu);(b=fUa(a,b,c)&&iS(a,VF().Uu))||ZZ(a,e);return b?!0:f_(a)}return!1}function h_(a){if(0===a.kb.Db.Dg||OUa(a)){for(var b=WZ(a);;)if(VZ(a.kb.Db)&&CTa(a))b=WZ(a);else break;ZZ(a,b);return!0}return!1}function XTa(a,b){if(e_(a,58)){if(sUa(a,b,VTa()))return!0;if(f_(a)){b=WZ(a);var c=h_(a);c||ZZ(a,b);if(c)return!0;b=WZ(a);(c=FUa(a)&&h_(a))||ZZ(a,b);return c}}return!1} +function vUa(a,b){if(KTa(a)){for(var c=WZ(a);;)if(VZ(a.kb.Db)&&$Z(a,b,a_()))c=WZ(a);else break;ZZ(a,c);c=WZ(a);var e;if(CUa(a,b)){for(e=WZ(a);;)if(VZ(a.kb.Db)&&QTa(a,b,a_())&&CUa(a,b))e=WZ(a);else break;ZZ(a,e);e=!0}else e=!1;e||ZZ(a,c);if(e)return!0;c=WZ(a);if(GUa(a,b)){for(e=WZ(a);;){if(VZ(a.kb.Db)){if(YZ(a,VF().nJ)){for(var f=WZ(a);;)if(VZ(a.kb.Db)&&$Z(a,b,a_()))f=WZ(a);else break;ZZ(a,f);f=!0}else f=!1;f=f?GUa(a,b):!1}else f=!1;if(f)e=WZ(a);else break}ZZ(a,e);b=!0}else b=!1;b||ZZ(a,c);return b}return!1} +function f_(a){iS(a,VF().Tu);JTa(a);return iS(a,VF().Uu)}function nUa(a){if(0<=a.kb.Db.fc&&(-1!==wta(ua(),"#;/?:@\x26\x3d+$,_.!~*'()[]",a.kb.Db.fc)||Ata(PF(),a.kb.Db.fc)))return a=a.kb,oS(a.Db,a.jg,a.Sj),!0;if(37===a.kb.Db.fc){var b=sS(a.kb,1);b=48<=b&&57>=b||65<=b&&70>=b||97<=b&&102>=b}else b=!1;b?(b=sS(a.kb,2),b=48<=b&&57>=b||65<=b&&70>=b||97<=b&&102>=b):b=!1;return b?(mS(a.kb,3),!0):!1} +function PUa(a,b){if(0===a.kb.Db.Dg){var c=HUa(a,b);if(0=e&&48!==e?(tS(a,VF().Ai),-48+e|0):-1;32===c&&(c=QUa(a));OUa(a)||(FUa(a),rUa(a));if(-1===f){e=WZ(a);for(f=WZ(a);;)if(VZ(a.kb.Db)&&$Z(a,b,a_()))f=WZ(a);else break;ZZ(a,f);b=vS(a.Co,2147483647)-b|0;f=1>b?1:b;ZZ(a,e)}a=new RUa;a.FI=f;a.$4=c;R.prototype.M.call(a,null,null);return a} +function qUa(a){if(MTa(a)){var b=WZ(a);lS(a,3,VF().Tfa);var c=WZ(a),e=sUa(a,-1,a_());e||ZZ(a,c);e?c=!0:(c=WZ(a),(e=f_(a)&&h_(a))||ZZ(a,c),c=e);c||ZZ(a,b);return c}return!1}function fUa(a,b,c){if(KUa(a))var e=!0;else{e=WZ(a);var f;(f=ZTa(a,b,c)||xUa(a,b,c))||ZZ(a,e);e=f}if(e)return!0;if(DTa(a,b,c)){e=WZ(a);if(f=b_(a,b,c))f=ZTa(a,b,c)||xUa(a,b,c);(b=f)||ZZ(a,e);return b?!0:JTa(a)}return!1}function CTa(a){return XZ(a)&&(rUa(a)||BTa(a))}function JUa(a,b){return e_(a,45)&&UTa(a,b,a_())} +function LTa(a){return 46===a.kb.Db.fc&&46===sS(a.kb,1)?46===sS(a.kb,2):!1}function ZZ(a,b){var c=a.dQ;c.zn=c.AB+(b.Uo|0)|0;a.tL=b.Ag;a.Co.Db=b.Ih} +function TTa(a){var b=(new lC).ue(0),c=0;c=sS(a.kb,b.oa);var e=PTa(c);e.na()&&(b.oa=1+b.oa|0);for(;;){c=sS(a.kb,b.oa);var f=e;if(f instanceof z&&c===(f.i|0))39===c&&39===sS(a.kb,1+b.oa|0)?b.oa=1+b.oa|0:34===c&&92===sS(a.kb,-1+b.oa|0)||(e=y());else if(y()===f?(PF(),f=function(g,h){return function(){return sS(g.kb,1+h.oa|0)}}(a,b),58===c?yta(0,f()|0)?f=!0:(f=f()|0,f=NF(0,f)):f=!1):f=!1,f)return!0;b.oa=1+b.oa|0;if(NF(PF(),c))break}return!1} +function NUa(a){for(var b=a.kb;;)if(MUa(b.Db.fc))oS(b.Db,b.jg,b.Sj);else break;return iS(a,VF().as)}function LUa(a,b){if(tS(a,VF().Ai)){for(var c=0;;){var e=sS(a.kb,c);if(48<=e&&57>=e||65<=e&&70>=e||97<=e&&102>=e)c=1+c|0;else break}lS(a,b,c>=b?VF().as:VF().Vv)}}function RTa(a,b,c){var e=WZ(a);if(YZ(a,VF().$y)){b=function(g,h,k){return function(){return $Z(g,h,k)}}(a,b,c);c=WZ(a);var f=!!b();if(f)for(;c=WZ(a),VZ(a.kb.Db)&&b(););ZZ(a,c);b=f}else b=!1;b||ZZ(a,e);return b} +function oUa(a){return 124===a.kb.Db.fc||xta(PF(),a.kb.Db.fc)?!1:nUa(a)}function mUa(a){if(IJa(a,"YAML")){iS(a,VF().as);if(XZ(a)){var b=a.kb.Db.fc;b=!(48<=b&&57>=b)}else b=!0;if(b)return!1;for(b=a.kb;;){var c=b.Db.fc;if(48<=c&&57>=c)oS(b.Db,b.jg,b.Sj);else break}46!==a.kb.Db.fc?b=!0:(b=sS(a.kb,1),b=!(48<=b&&57>=b));if(b)return!1;b=a.kb;oS(b.Db,b.jg,b.Sj);for(b=a.kb;;)if(c=b.Db.fc,48<=c&&57>=c)oS(b.Db,b.jg,b.Sj);else break;return iS(a,VF().as)}return!1} +function FTa(a){return 38===a.kb.Db.fc&&MUa(sS(a.kb,1))&&iS(a,VF().p5)&&tS(a,VF().Ai)&&NUa(a)?iS(a,VF().F5):!1}SF.prototype.$classData=r({A4a:0},!1,"org.yaml.lexer.YamlLexer",{A4a:1,A3a:1,f:1,G3a:1});function i_(){this.wT=0}i_.prototype=new u;i_.prototype.constructor=i_;i_.prototype.a=function(){this.wT=34;return this};i_.prototype.pH=function(a){return Nta(this,a)};i_.prototype.QL=function(){return!1};i_.prototype.$classData=r({E4a:0},!1,"org.yaml.model.DoubleQuoteMark$",{E4a:1,f:1,Vha:1,bS:1}); +var SUa=void 0;function cG(){SUa||(SUa=(new i_).a());return SUa}function j_(){this.wT=0}j_.prototype=new u;j_.prototype.constructor=j_;j_.prototype.a=function(){this.wT=39;return this};j_.prototype.pH=function(a){return Nta(this,a)};j_.prototype.QL=function(){return!1};j_.prototype.$classData=r({S4a:0},!1,"org.yaml.model.SingleQuoteMark$",{S4a:1,f:1,Vha:1,bS:1});var TUa=void 0;function Qta(){TUa||(TUa=(new j_).a());return TUa}function IH(){KS.call(this);this.rH=null}IH.prototype=new iKa; +IH.prototype.constructor=IH;IH.prototype.t=function(){return"\x26"+this.rH};IH.prototype.TO=function(a,b,c){this.rH=a;KS.prototype.Ac.call(this,b,c);return this};IH.prototype.$classData=r({V4a:0},!1,"org.yaml.model.YAnchor",{V4a:1,z7:1,$s:1,f:1});function rr(){this.ca=this.s=null}rr.prototype=new $ta;rr.prototype.constructor=rr;function UUa(a,b,c){sr(a,kua(T(),b,a.ca),c)}function sr(a,b,c){pr(a.s,pG(wD(),b,c))}rr.prototype.e=function(a){this.ca=a;gG.prototype.a.call(this);return this}; +rr.prototype.$classData=r({c5a:0},!1,"org.yaml.model.YDocument$EntryBuilder",{c5a:1,b5a:1,f:1,Qoa:1});function VUa(){}VUa.prototype=new u;VUa.prototype.constructor=VUa;VUa.prototype.a=function(){return this};function WUa(a,b){return(new sM).o1(rta(new IF,a,b))}VUa.prototype.$classData=r({i5a:0},!1,"org.yaml.model.YFail$",{i5a:1,f:1,q:1,o:1});var XUa=void 0;function YUa(){KS.call(this)}YUa.prototype=new iKa;YUa.prototype.constructor=YUa;function ZUa(){}ZUa.prototype=YUa.prototype; +function OG(){KS.call(this);this.Zma=this.gb=this.va=null}OG.prototype=new iKa;OG.prototype.constructor=OG;OG.prototype.b=function(){var a=this.gb,b=Q().En;return a===b};function rva(a){if(a.gb.iqa){var b=a.gb.Vi;return null!==b&&b===a}return!1}function Iua(a,b){return vua(new OG,a.va,b,a.Zma,a.eI)}OG.prototype.t=function(){return this.va};function vua(a,b,c,e,f){a.va=b;a.gb=c;a.Zma=e;KS.prototype.Ac.call(a,e,f);return a} +OG.prototype.$classData=r({G5a:0},!1,"org.yaml.model.YTag",{G5a:1,z7:1,$s:1,f:1});function k_(){EG.call(this)}k_.prototype=new FG;k_.prototype.constructor=k_;function $Ua(){}$Ua.prototype=k_.prototype;k_.prototype.Ac=function(a,b){EG.prototype.Ac.call(this,a,b);return this};var hua=r({bZ:0},!1,"org.yaml.model.YValue",{bZ:1,$s:1,f:1,$A:1});k_.prototype.$classData=hua;function aVa(){this.nd=null}aVa.prototype=new u;aVa.prototype.constructor=aVa; +aVa.prototype.a=function(){bVa=this;var a=Q().nd;this.nd=hH(a.Vi,null);return this};aVa.prototype.$classData=r({R5a:0},!1,"org.yaml.parser.ParserResult$",{R5a:1,f:1,q:1,o:1});var bVa=void 0;function gH(){bVa||(bVa=(new aVa).a());return bVa}var maa=r({C7a:0},!1,"java.lang.Boolean",{C7a:1,f:1,o:1,ym:1},void 0,void 0,function(a){return"boolean"===typeof a});function Jj(){this.r=0}Jj.prototype=new u;Jj.prototype.constructor=Jj;Jj.prototype.h=function(a){return a instanceof Jj?this.r===a.r:!1}; +Jj.prototype.tr=function(a){return this.r-a.r|0};Jj.prototype.t=function(){return ba.String.fromCharCode(this.r)};function gc(a){var b=new Jj;b.r=a;return b}Jj.prototype.z=function(){return this.r};var ixa=r({E7a:0},!1,"java.lang.Character",{E7a:1,f:1,o:1,ym:1});Jj.prototype.$classData=ixa;function cVa(){this.xna=this.tja=this.sja=this.Bma=null;this.xa=0}cVa.prototype=new u;cVa.prototype.constructor=cVa;cVa.prototype.a=function(){return this}; +function dVa(a,b){AI();if(0===(2&a.xa)<<24>>24&&0===(2&a.xa)<<24>>24){for(var c=ha(Ja(Qa),[257,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,3,2,1,1,1,2,1,3,2,4,1,2,1,3,3,2,1,2,1,1,1,1,1,2,1,1,2,1,1,2,1,3,1,1,1,2,2,1,1,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,2,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,2,1,2,2,1,1,4,1,1,1,1,1,1,1,1,69,1,27,18,4,12,14,5,7,1,1,1,17,112,1,1,1,1,1,1,1,1,2,1,3,1,5,2,1,1,3,1,1,1,2,1,17,1,9,35,1,2,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,2,2,51,48,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,38,2,1,6,1,39,1,1,1,4,1,1,45,1,1,1,2,1,2,1,1,8,27,5,3,2,11,5,1,3,2,1,2,2,11,1,2,2,32,1,10,21,10,4,2,1,99,1,1,7,1,1,6,2,2,1,4,2,10,3,2,1,14,1,1,1,1,30,27,2,89,11,1,14,10,33,9,2,1,3,1,5,22,4,1,9,1,3,1,5,2,15,1,25,3,2,1,65,1,1,11,55,27,1,3,1,54,1,1,1,1,3,8,4,1,2,1,7,10,2,2,10,1,1,6,1,7, +1,1,2,1,8,2,2,2,22,1,7,1,1,3,4,2,1,1,3,4,2,2,2,2,1,1,8,1,4,2,1,3,2,2,10,2,2,6,1,1,5,2,1,1,6,4,2,2,22,1,7,1,2,1,2,1,2,2,1,1,3,2,4,2,2,3,3,1,7,4,1,1,7,10,2,3,1,11,2,1,1,9,1,3,1,22,1,7,1,2,1,5,2,1,1,3,5,1,2,1,1,2,1,2,1,15,2,2,2,10,1,1,15,1,2,1,8,2,2,2,22,1,7,1,2,1,5,2,1,1,1,1,1,4,2,2,2,2,1,8,1,1,4,2,1,3,2,2,10,1,1,6,10,1,1,1,6,3,3,1,4,3,2,1,1,1,2,3,2,3,3,3,12,4,2,1,2,3,3,1,3,1,2,1,6,1,14,10,3,6,1,1,6,3,1,8,1,3,1,23,1,10,1,5,3,1,3,4,1,3,1,4,7,2,1,2,6,2,2,2,10,8,7,1,2,2,1,8,1,3,1,23,1,10,1,5,2,1,1,1,1, +5,1,1,2,1,2,2,7,2,7,1,1,2,2,2,10,1,2,15,2,1,8,1,3,1,41,2,1,3,4,1,3,1,3,1,1,8,1,8,2,2,2,10,6,3,1,6,2,2,1,18,3,24,1,9,1,1,2,7,3,1,4,3,3,1,1,1,8,18,2,1,12,48,1,2,7,4,1,6,1,8,1,10,2,37,2,1,1,2,2,1,1,2,1,6,4,1,7,1,3,1,1,1,1,2,2,1,4,1,2,6,1,2,1,2,5,1,1,1,6,2,10,2,4,32,1,3,15,1,1,3,2,6,10,10,1,1,1,1,1,1,1,1,1,1,2,8,1,36,4,14,1,5,1,2,5,11,1,36,1,8,1,6,1,2,5,4,2,37,43,2,4,1,6,1,2,2,2,1,10,6,6,2,2,4,3,1,3,2,7,3,4,13,1,2,2,6,1,1,1,10,3,1,2,38,1,1,5,1,2,43,1,1,332,1,4,2,7,1,1,1,4,2,41,1,4,2,33,1,4,2,7,1,1,1, +4,2,15,1,57,1,4,2,67,2,3,9,20,3,16,10,6,85,11,1,620,2,17,1,26,1,1,3,75,3,3,15,13,1,4,3,11,18,3,2,9,18,2,12,13,1,3,1,2,12,52,2,1,7,8,1,2,11,3,1,3,1,1,1,2,10,6,10,6,6,1,4,3,1,1,10,6,35,1,52,8,41,1,1,5,70,10,29,3,3,4,2,3,4,2,1,6,3,4,1,3,2,10,30,2,5,11,44,4,17,7,2,6,10,1,3,34,23,2,3,2,2,53,1,1,1,7,1,1,1,1,2,8,6,10,2,1,10,6,10,6,7,1,6,82,4,1,47,1,1,5,1,1,5,1,2,7,4,10,7,10,9,9,3,2,1,30,1,4,2,2,1,1,2,2,10,44,1,1,2,3,1,1,3,2,8,4,36,8,8,2,2,3,5,10,3,3,10,30,6,2,64,8,8,3,1,13,1,7,4,1,4,2,1,2,9,44,63,13,1,34, +37,39,21,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,9,8,6,2,6,2,8,8,8,8,6,2,6,2,8,1,1,1,1,1,1,1,1,8,8,14,2,8,8,8,8,8,8,5,1,2,4,1,1,1,3,3,1,2,4,1,3,4,2,2,4,1,3,8,5,3,2,3,1,2,4,1,2,1,11,5,6,2,1,1,1,2,1,1,1,8,1,1,5,1,9,1,1,4,2,3,1,1,1,11,1,1,1,10,1,5,5,6,1,1,2,6,3,1,1,1,10,3,1,1,1,13,3,32,16,13,4,1,3,12,15,2,1,4,1,2,1,3,2,3,1,1,1,2,1,5,6,1,1,1,1,1,1,4,1,1,4,1,4,1,2,2,2,5,1,4,1,1,2,1,1,16,35,1,1,4,1,6,5,5,2,4,1,2,1,2,1,7,1,31,2,2,1,1,1,31,268,8,4,20,2,7,1,1,81,1,30,25,40,6,18,12,39,25,11,21,60,78,22,183,1,9,1,54,8,111,1,144,1,103,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,30,44,5,1,1,31,1,1,1,1,1,1,1,1,1,1,16,256,131,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,63,1,1,1,1,32,1,1,258,48,21,2,6,3,10,166,47,1,47,1,1,1,3,2,1,1,1,1,1,1,4,1,1,2,1,6,2,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,6,1,1,1,1,3,1,1,5,4,1,2,38,1,1,5,1,2,56,7,1,1,14,1,23,9,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,32,2,1,1,1,1,3,1,1,1,1,1,9,1, +2,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,5,1,10,2,68,26,1,89,12,214,26,12,4,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,9,4,2,1,5,2,3,1,1,1,2,1,86,2,2,2,2,1,1,90,1,3,1,5,41,3,94,1,2,4,10,27,5,36,12,16,31,1,10,30,8,1,15,32,10,39,15,320,6582,10,64,20941,51,21,1,1143,3,55,9,40,6,2,268,1,3,16,10,2,20,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,10,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,1,70,10,2,6,8,23,9,2,1,1,1,1,1,1,1,1,1,1, +1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,77,2,1,7,1,3,1,4,1,23,2,2,1,4,4,6,2,1,1,6,52,4,8,2,50,16,1,9,2,10,6,18,6,3,1,4,10,28,8,2,23,11,2,11,1,29,3,3,1,47,1,2,4,2,1,4,13,1,1,10,4,2,32,41,6,2,2,2,2,9,3,1,8,1,1,2,10,2,4,16,1,6,3,1,1,4,48,1,1,3,2,2,5,2,1,1,1,24,2,1,2,11,1,2,2,2,1,2,1,1,10,6,2,6,2,6,9,7,1,7,145,35,2,1,2,1,2,1,1,1,2,10, +6,11172,12,23,4,49,4,2048,6400,366,2,106,38,7,12,5,5,1,1,10,1,13,1,5,1,1,1,2,1,2,1,108,16,17,363,1,1,16,64,2,54,40,12,1,1,2,16,7,1,1,1,6,7,9,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,4,3,3,1,4,1,1,1,1,1,1,1,3,1,1,3,1,1,1,2,4,5,1,135,2,1,1,3,1,3,1,1,1,1,1,1,2,10,2,3,2,26,1,1,1,1,1,1,26,1,1,1,1,1,1,1,1,1,2,10,1,45,2,31,3,6,2,6,2,6,2,3,3,2,1,1,1,2,1,1,4,2,10,3,2,2,12,1,26,1,19,1,2,1,15,2,14,34,123,5,3,4,45,3,9,53,4,17,1,5,12,52,45,1,130,29,3,49,47,31,1,4,12,17,1,8,1,53,30,1,1,36,4,8,1,5,42,40,40,78, +2,10,854,6,2,1,1,44,1,2,3,1,2,23,1,1,8,160,22,6,3,1,26,5,1,64,56,6,2,64,1,3,1,2,5,4,4,1,3,1,27,4,3,4,1,8,8,9,7,29,2,1,128,54,3,7,22,2,8,19,5,8,128,73,535,31,385,1,1,1,53,15,7,4,20,10,16,2,1,45,3,4,2,2,2,1,4,14,25,7,10,6,3,36,5,1,8,1,10,4,60,2,1,48,3,9,2,4,4,7,10,1190,43,1,1,1,2,6,1,1,8,10,2358,879,145,99,13,4,2956,1071,13265,569,1223,69,11,1,46,16,4,13,16480,2,8190,246,10,39,2,60,2,3,3,6,8,8,2,7,30,4,48,34,66,3,1,186,87,9,18,142,26,26,26,7,1,18,26,26,1,1,2,2,1,2,2,2,4,1,8,4,1,1,1,7,1,11,26,26,2,1, +4,2,8,1,7,1,26,2,1,4,1,5,1,1,3,7,1,26,26,26,26,26,26,26,26,26,26,26,26,28,2,25,1,25,1,6,25,1,25,1,6,25,1,25,1,6,25,1,25,1,6,25,1,25,1,6,1,1,2,50,5632,4,1,27,1,2,1,1,2,1,1,10,1,4,1,1,1,1,6,1,4,1,1,1,1,1,1,3,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,2,4,1,7,1,4,1,4,1,1,1,10,1,17,5,3,1,5,1,17,52,2,270,44,4,100,12,15,2,14,2,15,1,15,32,11,5,31,1,60,4,43,75,29,13,43,5,9,7,2,174,33,15,6,1,70,3,20,12,37,1,5,21,17,15,63,1,1,1,182,1,4,3,62,2,4,12,24,147,70,4,11,48,70,58,116,2188,42711,41,4149,11,222,16354,542,722403, +1,30,96,128,240,65040,65534,2,65534]),e=c.n[0],f=1,g=c.n.length;f!==g;)e=e+c.n[f]|0,c.n[f]=e,f=1+f|0;a.sja=c;a.xa=(2|a.xa)<<24>>24}b=1+Tva(0,a.sja,b)|0;0===(4&a.xa)<<24>>24&&0===(4&a.xa)<<24>>24&&(a.tja=ha(Ja(Qa),[1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,1,2,5,1,3,2,1,3,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,2,4,27,4,27,4,27,4,27,4,27,6,1,2,1,2,4,27,1,2,0,4,2,24,0,27,1,24,1,0,1,0,1,2,1,0,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,25,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,2,1,2,1,2,28,6,7,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,0,1,0,4,24,0,2,0,24,20,0,26,0,6,20,6,24,6,24,6,24,6,0,5,0,5,24,0,16,0,25,24,26,24,28,6,24,0,24,5,4,5,6,9,24,5,6,5,24,5,6,16,28,6,4,6,28,6,5,9,5,28,5,24,0,16,5,6,5,6,0, +5,6,5,0,9,5,6,4,28,24,4,0,5,6,4,6,4,6,4,6,0,24,0,5,6,0,24,0,5,0,5,0,6,0,6,8,5,6,8,6,5,8,6,8,6,8,5,6,5,6,24,9,24,4,5,0,5,0,6,8,0,5,0,5,0,5,0,5,0,5,0,5,0,6,5,8,6,0,8,0,8,6,5,0,8,0,5,0,5,6,0,9,5,26,11,28,26,0,6,8,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,6,0,8,6,0,6,0,6,0,6,0,5,0,5,0,9,6,5,6,0,6,8,0,5,0,5,0,5,0,5,0,5,0,5,0,6,5,8,6,0,6,8,0,8,6,0,5,0,5,6,0,9,24,26,0,6,8,0,5,0,5,0,5,0,5,0,5,0,5,0,6,5,8,6,8,6,0,8,0,8,6,0,6,8,0,5,0,5,6,0,9,28,5,11,0,6,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,8,6,8,0,8,0,8,6,0,5,0,8,0, +9,11,28,26,28,0,8,0,5,0,5,0,5,0,5,0,5,0,5,6,8,0,6,0,6,0,6,0,5,0,5,6,0,9,0,11,28,0,8,0,5,0,5,0,5,0,5,0,5,0,6,5,8,6,8,0,6,8,0,8,6,0,8,0,5,0,5,6,0,9,0,5,0,8,0,5,0,5,0,5,0,5,8,6,0,8,0,8,6,5,0,8,0,5,6,0,9,11,0,28,5,0,8,0,5,0,5,0,5,0,5,0,5,0,6,0,8,6,0,6,0,8,0,8,24,0,5,6,5,6,0,26,5,4,6,24,9,24,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,6,5,6,0,6,5,0,5,0,4,0,6,0,9,0,5,0,5,28,24,28,24,28,6,28,9,11,28,6,28,6,28,6,21,22,21,22,8,5,0,5,0,6,8,6,24,6,5,6,0,6,0,28,6,28,0,28,24,28,24,0,5,8,6,8,6,8,6,8,6,5,9, +24,5,8,6,5,6,5,8,5,8,5,6,5,6,8,6,8,6,5,8,9,8,6,28,1,0,1,0,1,0,5,24,4,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,6,24,11,0,5,28,0,5,0,20,5,24,5,12,5,21,22,0,5,24,10,0,5,0,5,6,0,5,6,24,0,5,6,0,5,0,5,0,6,0,5,6,8,6,8,6,8,6,24,4,24,26,5,6,0,9,0,11,0,24,20,24,6,12,0,9,0,5,4,5,0,5,6,5,0,5,0,5,0,6,8,6,8,0,8,6,8,6,0,28,0,24,9,5,0,5,0,5,0,8,5,8,0,9,11,0,28,5,6,8,0,24,5,8,6,8,6,0,6,8,6,8,6,8,6,0,6,9,0,9,0,24,4,24,0,6,8,5,6,8,6,8,6,8,6,8,5,0,9,24,28,6,28,0,6,8,5,8,6,8,6,8,6,8,5,9,5,6,8,6, +8,6,8,6,8,0,24,5,8,6,8,6,0,24,9,0,5,9,5,4,24,0,24,0,6,24,6,8,6,5,6,5,8,6,5,0,2,4,2,4,2,4,6,0,6,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, +2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,0,1,0,2,1,2,1,2,0,1,0,2,0,1,0,1,0,1,0,1,2,1,2,0,2,3,2,3,2,3,2,0,2,1,3,27,2,27,2,0,2,1,3,27,2,0,2,1,0,27,2,1,27,0,2,0,2,1,3,27,0,12,16,20,24,29,30,21,29,30,21,29,24,13,14,16,12,24,29,30,24,23,24,25,21,22,24,25,24,23,24,12,16,0,16,11,4,0,11,25,21,22,4,11,25,21,22,0,4,0,26,0,6,7,6,7,6,0,28,1,28,1,28,2,1,2,1,2,28,1,28,25,1,28,1,28,1,28,1,28,1,28,2,1,2,5,2,28,2,1,25,1,2,28,25,28,2,28,11,10,1,2,10,11,0,25,28,25, +28,25,28,25,28,25,28,25,28,25,28,25,28,25,28,25,28,25,28,25,28,21,22,28,25,28,25,28,25,28,0,28,0,28,0,11,28,11,28,25,28,25,28,25,28,25,28,0,28,21,22,21,22,21,22,21,22,21,22,21,22,21,22,11,28,25,21,22,25,21,22,21,22,21,22,21,22,21,22,25,28,25,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,25,21,22,21,22,25,21,22,25,28,25,28,25,0,28,0,1,0,2,0,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,4,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, +2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,28,1,2,1,2,6,1,2,0,24,11,24,2,0,2,0,2,0,5,0,4,24,0,6,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,6,24,29,30,29,30,24,29,30,24,29,30,24,20,24,20,24,29,30,24,29,30,21,22,21,22,21,22,21,22,24,4,24,20,0,28,0,28,0,28,0,28,0,12,24,28,4,5,10,21,22,21,22,21,22,21,22,21,22,28,21,22,21,22,21,22,21,22,20,21,22,28,10,6,8,20,4,28,10,4,5,24,28,0,5,0,6,27,4,5,20,5,24,4,5,0,5,0,5,0,28,11,28,5,0,28,0,5,28,0,11,28,11,28,11,28,11, +28,11,28,5,0,28,5,0,5,4,5,0,28,0,5,4,24,5,4,24,5,9,5,0,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,6,7,24,6,24,4,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,0,6,5,10,6,24,0,27,4,27,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,4,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,4,27,1,2,1,2,0,1,2,1,2,0,1,2,1,2,1,2,1,2,1,2,1,0,4,2,5,6,5,6,5,6,5,8,6,8,28,0,11,28, +26,28,0,5,24,0,8,5,8,6,0,24,9,0,6,5,24,5,0,9,5,6,24,5,6,8,0,24,5,0,6,8,5,6,8,6,8,6,8,24,0,4,9,0,24,0,5,6,8,6,8,6,0,5,6,5,6,8,0,9,0,24,5,4,5,28,5,8,0,5,6,5,6,5,6,5,6,5,6,5,0,5,4,24,5,8,6,8,24,5,4,8,6,0,5,0,5,0,5,0,5,0,5,0,5,8,6,8,6,8,24,8,6,0,9,0,5,0,5,0,5,0,19,18,5,0,5,0,2,0,2,0,5,6,5,25,5,0,5,0,5,0,5,0,5,0,5,27,0,5,21,22,0,5,0,5,0,5,26,28,0,6,24,21,22,24,0,6,0,24,20,23,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,24,21,22,24,23,24,0,24,20,21,22,21,22,21,22,24,25,20,25,0,24,26,24,0,5,0,5,0,16, +0,24,26,24,21,22,24,25,24,20,24,9,24,25,24,1,21,24,22,27,23,27,2,21,25,22,25,21,22,24,21,22,24,5,4,5,4,5,0,5,0,5,0,5,0,5,0,26,25,27,28,26,0,28,25,28,0,16,28,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,24,0,11,0,28,10,11,28,11,0,28,0,28,6,0,5,0,5,0,5,0,11,0,5,10,5,10,0,5,0,24,5,0,5,24,10,0,1,2,5,0,9,0,5,0,5,0,5,0,5,0,5,0,5,0,24,11,0,5,11,0,24,5,0,24,0,5,0,5,0,5,6,0,6,0,6,5,0,5,0,5,0,6,0,6,11,0,24,0,5,11,24,0,5,0,24,5,0,11,5,0,11,0,5,0,11,0,8,6,8,5,6,24,0,11,9,0,6,8,5,8,6,8,6,24,16,24,0,5,0,9,0,6,5,6,8,6,0,9,24, +0,6,8,5,8,6,8,5,24,0,9,0,5,6,8,6,8,6,8,6,0,9,0,5,0,10,0,24,0,5,0,5,0,5,0,5,8,0,6,4,0,5,0,28,0,28,0,28,8,6,28,8,16,6,28,6,28,6,28,0,28,6,28,0,28,0,11,0,1,2,1,2,0,2,1,2,1,0,1,0,1,0,1,0,1,0,1,2,0,2,0,2,0,2,1,2,1,0,1,0,1,0,1,0,2,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1,2,1,2,1,2,0,1,25,2,25,2,1,25,2,25,2,1,25,2,25,2,1,25,2,25,2,1,25,2,25,2,1,2,0,9,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,25,0,28,0,28,0,28,0,28,0,28, +0,28,0,11,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,5,0,5,0,5,0,5,0,16,0,16,0,6,0,18,0,18,0]),a.xa=(4|a.xa)<<24>>24);return a.tja.n[0>b?-b|0:b]}function eVa(a,b){return 0>b?0:256>b?fVa(a).n[b]:dVa(a,b)}function wva(a,b){return 256>b?9===b||10===b||11===b||12===b||13===b||28<=b&&31>=b||160!==b&&gVa(fVa(a).n[b]):8199!==b&&8239!==b&&gVa(dVa(a,b))} +function fVa(a){0===(1&a.xa)<<24>>24&&0===(1&a.xa)<<24>>24&&(a.Bma=ha(Ja(Qa),[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,12,24,24,24,26,24,24,24,21,22,24,25,24,20,24,24,9,9,9,9,9,9,9,9,9,9,24,24,25,25,25,24,24,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,24,22,27,23,27,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,21,25,22,25,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,12,24, +26,26,26,26,28,24,27,28,5,29,25,16,28,27,28,25,11,11,27,2,24,24,27,11,5,30,11,11,11,24,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,25,2,2,2,2,2,2,2,2]),a.xa=(1|a.xa)<<24>>24);return a.Bma} +function Msa(a,b,c){if(256>b)a=48<=b&&57>=b?-48+b|0:65<=b&&90>=b?-55+b|0:97<=b&&122>=b?-87+b|0:-1;else if(65313<=b&&65338>=b)a=-65303+b|0;else if(65345<=b&&65370>=b)a=-65335+b|0;else{var e=Tva(AI(),hVa(a),b);e=0>e?-2-e|0:e;0>e?a=-1:(a=b-hVa(a).n[e]|0,a=9>24&&0===(16&a.xa)<<24>>24&&(a.xna=ha(Ja(Qa),[1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43600,44016,65296,66720,69734,69872,69942,70096,71360,120782,120792,120802,120812,120822]),a.xa=(16|a.xa)<<24>>24);return a.xna}function sja(a,b){return 65535&(ba.String.fromCharCode(b).toUpperCase().charCodeAt(0)|0)} +function gVa(a){return 12===a||13===a||14===a}cVa.prototype.$classData=r({F7a:0},!1,"java.lang.Character$",{F7a:1,f:1,q:1,o:1});var iVa=void 0;function Ku(){iVa||(iVa=(new cVa).a());return iVa}function l_(){this.kka=this.lka=null;this.xa=0}l_.prototype=new u;l_.prototype.constructor=l_;l_.prototype.a=function(){return this};l_.prototype.nO=function(a){throw(new dH).e('For input string: "'+a+'"');}; +function saa(a,b,c){return b!==b?c!==c?0:1:c!==c?-1:b===c?0===b?(a=1/b,a===1/c?0:0>a?-1:1):0:b>24&&0===(1&a.xa)<<24>>24&&(a.lka=new ba.RegExp("^[\\x00-\\x20]*([+-]?(?:NaN|Infinity|(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?)[fFdD]?)[\\x00-\\x20]*$"),a.xa=(1|a.xa)<<24>>24);var c=a.lka.exec(b);if(null!==c)return c=c[1],+ba.parseFloat(void 0===c?void 0:c);0===(2&a.xa)<<24>>24&&0===(2&a.xa)<<24>>24&&(a.kka=new ba.RegExp("^[\\x00-\\x20]*([+-]?)0[xX]([0-9A-Fa-f]*)\\.?([0-9A-Fa-f]*)[pP]([+-]?\\d+)[fFdD]?[\\x00-\\x20]*$"),a.xa=(2|a.xa)<<24>>24);var e=a.kka.exec(b); +if(null!==e){c=e[1];var f=e[2],g=e[3];e=e[4];""===f&&""===g&&a.nO(b);b=""+f+g;a=-((g.length|0)<<2)|0;for(g=0;;)if(g!==(b.length|0)&&48===(65535&(b.charCodeAt(g)|0)))g=1+g|0;else break;g=b.substring(g);""===g?c="-"===c?-0:0:(b=(f=15<(g.length|0))?g.substring(0,15):g,g=a+(f?(-15+(g.length|0)|0)<<2:0)|0,a=+ba.parseInt(b,16),e=+ba.parseInt(e,10),b=Aa(e)+g|0,g=b/3|0,e=+ba.Math.pow(2,g),b=+ba.Math.pow(2,b-(g<<1)|0),e=a*e*e*b,c="-"===c?-e:e)}else c=a.nO(b);return c} +l_.prototype.$classData=r({I7a:0},!1,"java.lang.Double$",{I7a:1,f:1,q:1,o:1});var jVa=void 0;function va(){jVa||(jVa=(new l_).a());return jVa}function iJ(){CF.call(this)}iJ.prototype=new hT;iJ.prototype.constructor=iJ;function kVa(){}kVa.prototype=iJ.prototype;iJ.prototype.kn=function(a){var b=null===a?null:a.t();CF.prototype.Ge.call(this,b,a);return this};function nb(){CF.call(this)}nb.prototype=new hT;nb.prototype.constructor=nb;function m_(){}m_.prototype=nb.prototype; +nb.prototype.e=function(a){CF.prototype.Ge.call(this,a,null);return this};nb.prototype.aH=function(a,b){CF.prototype.Ge.call(this,a,b);return this};nb.prototype.$classData=r({wg:0},!1,"java.lang.Exception",{wg:1,bf:1,f:1,o:1});function n_(){}n_.prototype=new u;n_.prototype.constructor=n_;n_.prototype.a=function(){return this};n_.prototype.nO=function(a){throw(new dH).e('For input string: "'+a+'"');}; +function FD(a,b,c){var e=null===b?0:b.length|0;(0===e||2>c||36=(b.length|0)&&a.nO(b);for(var k=0;f!==e;){var l=Msa(Ku(),65535&(b.charCodeAt(f)|0),c);k=k*c+l;(-1===l||k>h)&&a.nO(b);f=1+f|0}return g?-k|0:k|0}function sK(a,b){a=b-(1431655765&b>>1)|0;a=(858993459&a)+(858993459&a>>2)|0;return ca(16843009,252645135&(a+(a>>4)|0))>>24}n_.prototype.$classData=r({L7a:0},!1,"java.lang.Integer$",{L7a:1,f:1,q:1,o:1}); +var lVa=void 0;function ED(){lVa||(lVa=(new n_).a());return lVa}function mVa(){this.iia=null;this.xa=!1}mVa.prototype=new u;mVa.prototype.constructor=mVa;mVa.prototype.a=function(){return this}; +function TD(a,b,c){""===b&&o_(b);var e=0,f=!1;switch(65535&(b.charCodeAt(0)|0)){case 43:e=1;break;case 45:e=1,f=!0}var g=e;e=b.length|0;if(g>=e||2>c||36k;)h.push(null),k=1+k|0;for(;36>=k;){for(var l=2147483647/k|0,m=k,p=1;m<=l;)m=ca(m,k),p=1+p|0;var t=m,v=t>>31;m=Ea();l=bsa(m,-1,-1,t,v);var A=m.Wj;m=new Kva;t=(new qa).Sc(t,v);l=(new qa).Sc(l,A);m.uja=p;m.soa=t;m.Rna=l;h.push(m);k=1+k|0}a.iia=h;a.xa=!0}h=a.iia[c];for(k=h.uja;;){if(a=gp?48===p:0<=Tva(AI(),hVa(a),p);if(a)g=1+g|0;else break}(e-g|0)>ca(3,k)&&o_(b);p=g+(1+((-1+(e-g|0)|0)%k|0)|0)|0;l=nVa(g,p,b,c);if(p===e)e=(new qa).Sc(l,0);else{a=h.soa;g=a.od;a=a.Ud;k=p+k|0;m=65535&l;t=l>>>16|0;var D=65535&g;v=g>>>16|0;A=ca(m,D);D=ca(t,D);var C=ca(m,v);m=A+((D+C|0)<<16)|0;A=(A>>>16|0)+C|0;l=((ca(l,a)+ca(t,v)|0)+(A>>>16|0)|0)+(((65535&A)+D|0)>>>16|0)|0;p=nVa(p,k,b,c);p=m+p|0;l=(-2147483648^p)<(-2147483648^m)?1+l|0:l;k===e?e=(new qa).Sc(p,l):(m= +h.Rna,h=m.od,m=m.Ud,c=nVa(k,e,b,c),(l===m?(-2147483648^p)>(-2147483648^h):l>m)&&o_(b),k=65535&p,e=p>>>16|0,t=65535&g,h=g>>>16|0,m=ca(k,t),t=ca(e,t),v=ca(k,h),k=m+((t+v|0)<<16)|0,m=(m>>>16|0)+v|0,g=(((ca(p,a)+ca(l,g)|0)+ca(e,h)|0)+(m>>>16|0)|0)+(((65535&m)+t|0)>>>16|0)|0,e=k+c|0,g=(-2147483648^e)<(-2147483648^k)?1+g|0:g,-2147483648===(-2147483648^g)&&(-2147483648^e)<(-2147483648^c)&&o_(b),e=(new qa).Sc(e,g))}}c=e.od;e=e.Ud;if(f)return f=-c|0,c=0!==c?~e:-e|0,(0===c?0!==f:0e&&o_(b);return(new qa).Sc(c,e)}function o_(a){throw(new dH).e('For input string: "'+a+'"');}function nVa(a,b,c,e){for(var f=0;a!==b;){var g=Msa(Ku(),65535&(c.charCodeAt(a)|0),e);-1===g&&o_(c);f=ca(f,e)+g|0;a=1+a|0}return f}mVa.prototype.$classData=r({P7a:0},!1,"java.lang.Long$",{P7a:1,f:1,q:1,o:1});var oVa=void 0;function UD(){oVa||(oVa=(new mVa).a());return oVa}function pVa(){this.Ema=this.Dma=null}pVa.prototype=new u;pVa.prototype.constructor=pVa; +pVa.prototype.a=function(){qVa=this;this.Dma=ha(Ja(ma),"Sun Mon Tue Wed Thu Fri Sat".split(" "));this.Ema=ha(Ja(ma),"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "));return this};function rVa(a,b){a=""+b;return 2>(a.length|0)?"0"+a:a}pVa.prototype.$classData=r({h8a:0},!1,"java.util.Date$",{h8a:1,f:1,q:1,o:1});var qVa=void 0;function p_(){qVa||(qVa=(new pVa).a());return qVa}function sVa(){this.r=null}sVa.prototype=new u;sVa.prototype.constructor=sVa;function tVa(){}tVa.prototype=sVa.prototype; +function uVa(a,b,c){return b===a.r?(a.r=c,!0):!1}sVa.prototype.d=function(a){this.r=a;return this};function SI(){}SI.prototype=new u;SI.prototype.constructor=SI;SI.prototype.a=function(){return this};SI.prototype.$classData=r({H8a:0},!1,"java.util.regex.GroupStartMap$OriginallyWrapped$",{H8a:1,f:1,q:1,o:1});var Lwa=void 0;function vVa(){this.mX=this.rE=null}vVa.prototype=new u;vVa.prototype.constructor=vVa;vVa.prototype.t=function(){return this.mX}; +function twa(a){return(a.rE.global?"g":"")+(a.rE.ignoreCase?"i":"")+(a.rE.multiline?"m":"")}vVa.prototype.$classData=r({P8a:0},!1,"java.util.regex.Pattern",{P8a:1,f:1,q:1,o:1});function wVa(){this.Gma=this.Hma=null}wVa.prototype=new u;wVa.prototype.constructor=wVa;wVa.prototype.a=function(){xVa=this;this.Hma=new ba.RegExp("^\\\\Q(.|\\n|\\r)\\\\E$");this.Gma=new ba.RegExp("^\\(\\?([idmsuxU]*)(?:-([idmsuxU]*))?\\)");return this};function tf(a,b,c){a=Hv(a,b,0);return sx(Iv(a,c,wa(c)))} +function Hv(a,b,c){if(0!==(16&c))a=(new R).M(yVa(b),c);else{a=a.Hma.exec(b);if(null!==a){a=a[1];if(void 0===a)throw(new iL).e("undefined.get");a=(new z).d((new R).M(yVa(a),c))}else a=y();if(a.b()){var e=uf().Gma.exec(b);if(null!==e){a=e[0];if(void 0===a)throw(new iL).e("undefined.get");a=b.substring(a.length|0);var f=c;var g=e[1];if(void 0!==g)for(var h=g.length|0,k=0;ka?a:0;return this};function r_(){}r_.prototype=new u;r_.prototype.constructor=r_;r_.prototype.a=function(){return this};r_.prototype.Ia=function(a){return null===a?y():(new z).d(a)};r_.prototype.$classData=r({$8a:0},!1,"scala.Option$",{$8a:1,f:1,q:1,o:1});var BVa=void 0;function Vb(){BVa||(BVa=(new r_).a());return BVa}function CVa(){this.si=this.uN=this.Qg=this.ab=null}CVa.prototype=new Rwa; +CVa.prototype.constructor=CVa;function BKa(a,b){if(!b)throw(new uK).d("assertion failed");}CVa.prototype.a=function(){DVa=this;ue();ii();this.ab=yC();this.Qg=qe();Xxa||(Xxa=(new FJ).a());Xxa||(Xxa=(new FJ).a());EVa||(EVa=(new s_).a());this.uN=(new lT).a();this.si=(new t_).a();(new u_).a();return this}; +function FVa(a,b){if(xda(b,1))return(new Pc).fd(b);if(uaa(b,1))return(new GVa).NG(b);if(waa(b,1))return(new HVa).HG(b);if(vaa(b,1))return(new Ju).BB(b);if(Baa(b,1))return(new IVa).IG(b);if(Aaa(b,1))return(new JVa).JG(b);if(yaa(b,1))return(new KVa).KG(b);if(zaa(b,1))return(new LVa).LG(b);if(xaa(b,1))return(new MVa).MG(b);if($za(b))return(new NVa).OG(b);if(null===b)return null;throw(new x).d(b);}function OVa(a,b){if(!b)throw(new Zj).e("requirement failed");} +CVa.prototype.$classData=r({e9a:0},!1,"scala.Predef$",{e9a:1,Ihb:1,f:1,Ehb:1});var DVa=void 0;function Gb(){DVa||(DVa=(new CVa).a());return DVa}function PVa(){this.l=this.kma=null}PVa.prototype=new u;PVa.prototype.constructor=PVa;function QVa(a,b){var c=new PVa;c.kma=b;if(null===a)throw mb(E(),null);c.l=a;return c} +PVa.prototype.RE=function(){OVa(Gb(),null===this.l.UE.c());if(null===Ywa().aT.c()){Mva||(Mva=(new tI).a());var a=Mva.gia;a&&a.$classData&&a.$classData.ge.Soa||VKa||(VKa=(new mT).a())}a=Ywa();var b=a.aT.c();try{wI(a.aT,this);try{var c=this.kma;a:for(;;){var e=c;if(!H().h(e)){if(e instanceof Vt){var f=e.Wn;wI(this.l.UE,e.Nf);try{f.RE()}catch(l){var g=Ph(E(),l);if(null!==g){var h=this.l.UE.c();wI(this.l.UE,H());QVa(this.l,h).RE();throw mb(E(),g);}throw l;}c=this.l.UE.c();continue a}throw(new x).d(e); +}break}}finally{var k=this.l.UE;k.W0=!1;k.lx=null}}finally{wI(a.aT,b)}};PVa.prototype.$classData=r({n9a:0},!1,"scala.concurrent.BatchingExecutor$Batch",{n9a:1,f:1,Lma:1,Soa:1});function RVa(){this.r=this.Fna=this.C0=null}RVa.prototype=new u;RVa.prototype.constructor=RVa;RVa.prototype.RE=function(){OVa(Gb(),null!==this.r);try{this.Fna.P(this.r)}catch(c){var a=Ph(E(),c);if(null!==a){var b=JJ(KJ(),a);if(b.b())throw mb(E(),a);a=b.c();this.C0.cW(a)}else throw c;}}; +function SVa(a,b){var c=new RVa;c.C0=a;c.Fna=b;c.r=null;return c}function TVa(a,b){OVa(Gb(),null===a.r);a.r=b;try{a.C0.B0(a)}catch(e){if(b=Ph(E(),e),null!==b){var c=JJ(KJ(),b);if(c.b())throw mb(E(),b);b=c.c();a.C0.cW(b)}else throw e;}}RVa.prototype.$classData=r({v9a:0},!1,"scala.concurrent.impl.CallbackRunnable",{v9a:1,f:1,Lma:1,t9a:1}); +function bxa(a,b,c){var e=(new AF).a();a.wP(w(function(f,g,h){return function(k){try{var l=g.P(k);if(l===f)return yda(h,k);if(l instanceof AF){var m=h.r;var p=m instanceof AF?UVa(h,m):h;k=l;a:for(;;){if(k!==p){var t=k.r;b:if(t instanceof v_){if(!p.IW(t))throw(new Hj).e("Cannot link completed promises together");}else{if(t instanceof AF){k=UVa(k,t);continue a}if(t instanceof qT&&(l=t,uVa(k,l,p))){if(tc(l))for(t=l;!t.b();){var v=t.ga();VVa(p,v);t=t.ta()}break b}continue a}}break}}else return zda(h, +l)}catch(A){p=Ph(E(),A);if(null!==p){v=JJ(KJ(),p);if(!v.b())return p=v.c(),Gj(h,p);throw mb(E(),p);}throw A;}}}(a,b,e)),c);return e}function WVa(a){a=a.Pea();if(a instanceof z)return"Future("+a.i+")";if(y()===a)return"Future(\x3cnot completed\x3e)";throw(new x).d(a);} +function dxa(a,b,c){var e=(new AF).a();a.wP(w(function(f,g,h){return function(k){a:try{var l=h.P(k)}catch(m){k=Ph(E(),m);if(null!==k){l=JJ(KJ(),k);if(!l.b()){k=l.c();l=(new Ld).kn(k);break a}throw mb(E(),k);}throw m;}return yda(g,l)}}(a,e,b)),c);return e}function XVa(){this.M1=this.jV=0;this.ypa=this.Wg=null}XVa.prototype=new u;XVa.prototype.constructor=XVa; +XVa.prototype.a=function(){YVa=this;this.jV=-1024;this.M1=1024;this.Wg=ja(Ja(ZVa),[1+(this.M1-this.jV|0)|0]);this.ypa=GE(BE(),(new qa).Sc(-1,-1));return this};function Kj(a,b){if(a.jV<=b&&b<=a.M1){var c=b-a.jV|0,e=a.Wg.n[c];null===e&&(e=BE(),e=Bua(new eH,GE(e,(new qa).Sc(b,b>>31))),a.Wg.n[c]=e);return e}a=BE();return Bua(new eH,GE(a,(new qa).Sc(b,b>>31)))} +function $Va(a,b){var c=a.jV,e=c>>31,f=b.Ud;(e===f?(-2147483648^c)<=(-2147483648^b.od):e>31,f=b.Ud,c=f===e?(-2147483648^b.od)<=(-2147483648^c):f>>0)):zWa(a,b,c,1E9,0,2)} +function Tya(a,b,c,e,f){if(0===(e|f))throw(new x_).e("/ by zero");if(c===b>>31){if(f===e>>31){if(-2147483648===b&&-1===e)return a.Wj=0,-2147483648;var g=b/e|0;a.Wj=g>>31;return g}return-2147483648===b&&-2147483648===e&&0===f?a.Wj=-1:a.Wj=0}if(g=0>c){var h=-b|0;c=0!==b?~c:-c|0}else h=b;if(b=0>f){var k=-e|0;e=0!==e?~f:-f|0}else k=e,e=f;h=AWa(a,h,c,k,e);if(g===b)return h;g=a.Wj;a.Wj=0!==h?~g:-g|0;return-h|0} +function SD(a,b,c){return 0>c?-(4294967296*+((0!==b?~c:-c|0)>>>0)+ +((-b|0)>>>0)):4294967296*c+ +(b>>>0)}function Zsa(a,b){if(-9223372036854775808>b)return a.Wj=-2147483648,0;if(0x7fffffffffffffff<=b)return a.Wj=2147483647,-1;var c=b|0,e=b/4294967296|0;a.Wj=0>b&&0!==c?-1+e|0:e;return c} +function AWa(a,b,c,e,f){return 0===(-2097152&c)?0===(-2097152&f)?(c=(4294967296*c+ +(b>>>0))/(4294967296*f+ +(e>>>0)),a.Wj=c/4294967296|0,c|0):a.Wj=0:0===f&&0===(e&(-1+e|0))?(e=31-ea(e)|0,a.Wj=c>>>e|0,b>>>e|0|c<<1<<(31-e|0)):0===e&&0===(f&(-1+f|0))?(b=31-ea(f)|0,a.Wj=0,c>>>b|0):zWa(a,b,c,e,f,0)|0}function bsa(a,b,c,e,f){if(0===(e|f))throw(new x_).e("/ by zero");return 0===c?0===f?(a.Wj=0,+(b>>>0)/+(e>>>0)|0):a.Wj=0:AWa(a,b,c,e,f)} +function yza(a,b,c){return c===b>>31?""+b:0>c?"-"+yWa(a,-b|0,0!==b?~c:-c|0):yWa(a,b,c)} +function zWa(a,b,c,e,f,g){var h=(0!==f?ea(f):32+ea(e)|0)-(0!==c?ea(c):32+ea(b)|0)|0,k=h,l=0===(32&k)?e<>>1|0)>>>(31-k|0)|0|f<=(-2147483648^A):(-2147483648^v)>=(-2147483648^D))t=p,v=m,p=k-l|0,t=(-2147483648^p)>(-2147483648^k)?-1+(t-v|0)|0:t-v|0,k=p,p=t,32>h?c|=1<>>1|0;l=l>>>1|0|m<<31;m=t}h=p;if(h===f?(-2147483648^k)>=(-2147483648^e):(-2147483648^h)>=(-2147483648^ +f))h=4294967296*p+ +(k>>>0),e=4294967296*f+ +(e>>>0),1!==g&&(m=h/e,f=m/4294967296|0,l=c,c=m=l+(m|0)|0,b=(-2147483648^m)<(-2147483648^l)?1+(b+f|0)|0:b+f|0),0!==g&&(e=h%e,k=e|0,p=e/4294967296|0);if(0===g)return a.Wj=b,c;if(1===g)return a.Wj=p,k;a=""+k;return""+(4294967296*b+ +(c>>>0))+"000000000".substring(a.length|0)+a} +function BWa(a,b,c,e,f){if(0===(e|f))throw(new x_).e("/ by zero");if(c===b>>31){if(f===e>>31){if(-1!==e){var g=b%e|0;a.Wj=g>>31;return g}return a.Wj=0}if(-2147483648===b&&-2147483648===e&&0===f)return a.Wj=0;a.Wj=c;return b}if(g=0>c){var h=-b|0;c=0!==b?~c:-c|0}else h=b;0>f?(b=-e|0,e=0!==e?~f:-f|0):(b=e,e=f);f=c;0===(-2097152&f)?0===(-2097152&e)?(h=(4294967296*f+ +(h>>>0))%(4294967296*e+ +(b>>>0)),a.Wj=h/4294967296|0,h|=0):a.Wj=f:0===e&&0===(b&(-1+b|0))?(a.Wj=0,h&=-1+b|0):0===b&&0===(e&(-1+e|0))?a.Wj= +f&(-1+e|0):h=zWa(a,h,f,b,e,1)|0;return g?(g=a.Wj,a.Wj=0!==h?~g:-g|0,-h|0):h}wWa.prototype.$classData=r({Oeb:0},!1,"scala.scalajs.runtime.RuntimeLong$",{Oeb:1,f:1,q:1,o:1});var xWa=void 0;function Ea(){xWa||(xWa=(new wWa).a());return xWa}function CWa(){}CWa.prototype=new u;CWa.prototype.constructor=CWa;function y_(){}d=y_.prototype=CWa.prototype;d.P=function(a){return this.Wa(a,XI().u0)};d.vA=function(a){return WI(this,a)};d.ro=function(a){return this.Wa(a,XI().u0)|0};d.t=function(){return"\x3cfunction1\x3e"}; +d.Ep=function(a){return!!this.Wa(a,XI().u0)};var cWa=r({$eb:0},!1,"scala.runtime.Nothing$",{$eb:1,bf:1,f:1,o:1});function z_(){this.l=null}z_.prototype=new u;z_.prototype.constructor=z_;z_.prototype.Kc=function(a){return a.k};z_.prototype.zc=function(a){return xu(this.l.ea,a)};z_.prototype.$classData=r({tra:0},!1,"amf.client.convert.Amqp091ChannelBindingConverter$Amqp091ChannelBindingMatcher$",{tra:1,f:1,md:1,Pc:1,Fc:1});function A_(){this.l=null}A_.prototype=new u;A_.prototype.constructor=A_; +A_.prototype.Kc=function(a){return a.k};A_.prototype.zc=function(a){return xu(this.l.ea,a)};A_.prototype.$classData=r({ura:0},!1,"amf.client.convert.Amqp091ChannelExchangeConverter$Amqp091ChannelExchangeMatcher$",{ura:1,f:1,md:1,Pc:1,Fc:1});function B_(){this.l=null}B_.prototype=new u;B_.prototype.constructor=B_;B_.prototype.Kc=function(a){return a.k};B_.prototype.zc=function(a){return xu(this.l.ea,a)}; +B_.prototype.$classData=r({vra:0},!1,"amf.client.convert.Amqp091MessageBindingConverter$Amqp091MessageBindingMatcher$",{vra:1,f:1,md:1,Pc:1,Fc:1});function C_(){this.l=null}C_.prototype=new u;C_.prototype.constructor=C_;C_.prototype.Kc=function(a){return a.k};C_.prototype.zc=function(a){return xu(this.l.ea,a)};C_.prototype.$classData=r({wra:0},!1,"amf.client.convert.Amqp091OperationBindingConverter$Amqp091OperationBindingMatcher$",{wra:1,f:1,md:1,Pc:1,Fc:1});function D_(){this.l=null} +D_.prototype=new u;D_.prototype.constructor=D_;D_.prototype.Kc=function(a){return a.k};D_.prototype.zc=function(a){return xu(this.l.ea,a)};D_.prototype.$classData=r({xra:0},!1,"amf.client.convert.Amqp091QueueConverter$Amqp091QueueMatcher$",{xra:1,f:1,md:1,Pc:1,Fc:1});function E_(){this.l=null}E_.prototype=new u;E_.prototype.constructor=E_;E_.prototype.Kc=function(a){return a.Jh()};E_.prototype.zc=function(a){return xu(this.l.ea,a)}; +E_.prototype.$classData=r({yra:0},!1,"amf.client.convert.AnyShapeConverter$AnyShapeMatcher$",{yra:1,f:1,md:1,Pc:1,Fc:1});function F_(){this.l=null}F_.prototype=new u;F_.prototype.constructor=F_;function DWa(a){var b=new F_;if(null===a)throw mb(E(),null);b.l=a;return b}F_.prototype.Kc=function(a){return a.Be()};function gfa(a,b){return xu(a.l.ea,b)}F_.prototype.zc=function(a){return gfa(this,a)}; +F_.prototype.$classData=r({zra:0},!1,"amf.client.convert.BaseUnitConverter$BaseUnitMatcher$",{zra:1,f:1,md:1,Pc:1,Fc:1});function G_(){}G_.prototype=new u;G_.prototype.constructor=G_;G_.prototype.Kc=function(a){return a.k};G_.prototype.zc=function(a){return(new H_).jla(a)};G_.prototype.$classData=r({Ara:0},!1,"amf.client.convert.CachedReferenceConverter$CachedReferenceMatcher$",{Ara:1,f:1,md:1,Pc:1,Fc:1});function I_(){this.l=null}I_.prototype=new u;I_.prototype.constructor=I_;I_.prototype.Kc=function(a){return a.k}; +function EWa(a,b){return xu(a.l.ea,b)}I_.prototype.zc=function(a){return EWa(this,a)};I_.prototype.$classData=r({Bra:0},!1,"amf.client.convert.CallbackConverter$CallbackMatcher$",{Bra:1,f:1,md:1,Pc:1,Fc:1});function J_(){this.l=null}J_.prototype=new u;J_.prototype.constructor=J_;J_.prototype.Kc=function(a){return a.k};J_.prototype.zc=function(a){return xu(this.l.ea,a)};J_.prototype.$classData=r({Cra:0},!1,"amf.client.convert.ChannelBindingConverter$ChannelBindingMatcher$",{Cra:1,f:1,md:1,Pc:1,Fc:1}); +function K_(){this.l=null}K_.prototype=new u;K_.prototype.constructor=K_;K_.prototype.Kc=function(a){return a.k};K_.prototype.zc=function(a){return xu(this.l.ea,a)};K_.prototype.$classData=r({Dra:0},!1,"amf.client.convert.ClassTermMappingConverter$ClassTermMappingConverter$",{Dra:1,f:1,md:1,Pc:1,Fc:1});function L_(){this.l=null}L_.prototype=new u;L_.prototype.constructor=L_;L_.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};L_.prototype.Kc=function(a){return a}; +L_.prototype.zc=function(a){return a};L_.prototype.$classData=r({Kra:0},!1,"amf.client.convert.CoreBaseConverter$AnyMatcher$",{Kra:1,f:1,IF:1,Fc:1,Pc:1});function M_(){this.l=null}M_.prototype=new u;M_.prototype.constructor=M_;M_.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};M_.prototype.Kc=function(a){return a};M_.prototype.zc=function(a){return a};M_.prototype.$classData=r({Lra:0},!1,"amf.client.convert.CoreBaseConverter$BooleanMatcher$",{Lra:1,f:1,IF:1,Fc:1,Pc:1}); +function N_(){this.l=null}N_.prototype=new u;N_.prototype.constructor=N_;N_.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};N_.prototype.Kc=function(a){return a};N_.prototype.zc=function(a){return a};N_.prototype.$classData=r({Mra:0},!1,"amf.client.convert.CoreBaseConverter$ContentMatcher$",{Mra:1,f:1,IF:1,Fc:1,Pc:1});function O_(){this.l=null}O_.prototype=new u;O_.prototype.constructor=O_;O_.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this}; +O_.prototype.Kc=function(a){return a};O_.prototype.zc=function(a){return a};O_.prototype.$classData=r({Nra:0},!1,"amf.client.convert.CoreBaseConverter$DoubleMatcher$",{Nra:1,f:1,IF:1,Fc:1,Pc:1});function P_(){this.l=null}P_.prototype=new u;P_.prototype.constructor=P_;P_.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};P_.prototype.Kc=function(a){return a};P_.prototype.zc=function(a){return a}; +P_.prototype.$classData=r({Ora:0},!1,"amf.client.convert.CoreBaseConverter$IntMatcher$",{Ora:1,f:1,IF:1,Fc:1,Pc:1});function hq(){this.l=null}hq.prototype=new u;hq.prototype.constructor=hq;hq.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};hq.prototype.Kc=function(a){return a};hq.prototype.zc=function(a){return a};hq.prototype.$classData=r({Pra:0},!1,"amf.client.convert.CoreBaseConverter$ProfileNameMatcher$",{Pra:1,f:1,IF:1,Fc:1,Pc:1});function Q_(){this.l=null} +Q_.prototype=new u;Q_.prototype.constructor=Q_;Q_.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};Q_.prototype.Kc=function(a){return a};Q_.prototype.zc=function(a){return a};Q_.prototype.$classData=r({Qra:0},!1,"amf.client.convert.CoreBaseConverter$StringMatcher$",{Qra:1,f:1,IF:1,Fc:1,Pc:1});function R_(){this.l=null}R_.prototype=new u;R_.prototype.constructor=R_;R_.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};R_.prototype.Kc=function(a){return a}; +R_.prototype.zc=function(a){return a};R_.prototype.$classData=r({Rra:0},!1,"amf.client.convert.CoreBaseConverter$UnitMatcher$",{Rra:1,f:1,IF:1,Fc:1,Pc:1});function $T(){this.l=null}$T.prototype=new u;$T.prototype.constructor=$T;$T.prototype.ep=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};$T.prototype.Kc=function(a){return a};$T.prototype.zc=function(a){return a};$T.prototype.$classData=r({Sra:0},!1,"amf.client.convert.CoreBaseConverter$VendorMatcher$",{Sra:1,f:1,IF:1,Fc:1,Pc:1}); +function S_(){this.l=null}S_.prototype=new u;S_.prototype.constructor=S_;S_.prototype.Kc=function(a){return a.k};S_.prototype.zc=function(a){return FWa(this,a)};function FWa(a,b){return xu(a.l.ea,b)}S_.prototype.$classData=r({Vra:0},!1,"amf.client.convert.CorrelationIdConverter$CorrelationIdMatcher$",{Vra:1,f:1,md:1,Pc:1,Fc:1});function T_(){this.l=null}T_.prototype=new u;T_.prototype.constructor=T_;T_.prototype.Kc=function(a){return a.k};T_.prototype.zc=function(a){return U_(this,a)}; +function U_(a,b){return xu(a.l.ea,b)}T_.prototype.$classData=r({Wra:0},!1,"amf.client.convert.CreativeWorkConverter$CreativeWorkMatcher$",{Wra:1,f:1,md:1,Pc:1,Fc:1});function V_(){}V_.prototype=new u;V_.prototype.constructor=V_;V_.prototype.Kc=function(a){return a.k};V_.prototype.zc=function(a){return(new Tk).HO(a)};V_.prototype.$classData=r({Xra:0},!1,"amf.client.convert.CustomDomainPropertyConverter$CustomDomainPropertyMatcher$",{Xra:1,f:1,md:1,Pc:1,Fc:1});function W_(){}W_.prototype=new u; +W_.prototype.constructor=W_;W_.prototype.Kc=function(a){return a.k};W_.prototype.zc=function(a){return(new cl).aU(a)};W_.prototype.Br=function(){return this};W_.prototype.$classData=r({Yra:0},!1,"amf.client.convert.DataNodeConverter$ArrayNodeMatcher$",{Yra:1,f:1,md:1,Pc:1,Fc:1});function X_(){this.l=null}X_.prototype=new u;X_.prototype.constructor=X_; +function fl(a,b){return b instanceof Xk?(a.l.cS(),(new Yk).aE(b)):b instanceof Vi?(a.l.eS(),(new Zk).GO(b)):b instanceof bl?(a.l.qR(),(new cl).aU(b)):null}X_.prototype.Kc=function(a){return a.k};X_.prototype.zc=function(a){return fl(this,a)};X_.prototype.Br=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};X_.prototype.$classData=r({Zra:0},!1,"amf.client.convert.DataNodeConverter$DataNodeMatcher$",{Zra:1,f:1,md:1,Pc:1,Fc:1});function Y_(){}Y_.prototype=new u; +Y_.prototype.constructor=Y_;Y_.prototype.Kc=function(a){return a.k};Y_.prototype.zc=function(a){return(new Yk).aE(a)};Y_.prototype.Br=function(){return this};Y_.prototype.$classData=r({$ra:0},!1,"amf.client.convert.DataNodeConverter$ObjectNodeMatcher$",{$ra:1,f:1,md:1,Pc:1,Fc:1});function Z_(){}Z_.prototype=new u;Z_.prototype.constructor=Z_;Z_.prototype.Kc=function(a){return a.k};Z_.prototype.zc=function(a){return(new Zk).GO(a)};Z_.prototype.Br=function(){return this}; +Z_.prototype.$classData=r({asa:0},!1,"amf.client.convert.DataNodeConverter$ScalarNodeMatcher$",{asa:1,f:1,md:1,Pc:1,Fc:1});function $_(){this.l=null}$_.prototype=new u;$_.prototype.constructor=$_;$_.prototype.Kc=function(a){return a.k};$_.prototype.zc=function(a){return xu(this.l.ea,a)};$_.prototype.$classData=r({bsa:0},!1,"amf.client.convert.DatatypePropertyMappingConverter$DatatypePropertyMappingConverter$",{bsa:1,f:1,md:1,Pc:1,Fc:1});function a0(){this.l=null}a0.prototype=new u; +a0.prototype.constructor=a0;a0.prototype.P$=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};a0.prototype.Kc=function(a){return a.k};a0.prototype.zc=function(a){return xu(this.l.ea,a)};a0.prototype.$classData=r({csa:0},!1,"amf.client.convert.DeclarationsConverter$AbstractDeclarationMatcher$",{csa:1,f:1,md:1,Pc:1,Fc:1});function mU(){this.l=null}mU.prototype=new u;mU.prototype.constructor=mU;mU.prototype.P$=function(a){if(null===a)throw mb(E(),null);this.l=a;return this}; +mU.prototype.Kc=function(a){return a.k};mU.prototype.zc=function(a){return xu(this.l.ea,a)};mU.prototype.$classData=r({dsa:0},!1,"amf.client.convert.DeclarationsConverter$ParameterizedDeclarationMatcher$",{dsa:1,f:1,md:1,Pc:1,Fc:1});function b0(){this.l=null}b0.prototype=new u;b0.prototype.constructor=b0;b0.prototype.Kc=function(a){return a.k};b0.prototype.zc=function(a){return xu(this.l.ea,a)}; +b0.prototype.$classData=r({esa:0},!1,"amf.client.convert.DialectDomainElementConverter$DialectDomainElementConvertej$",{esa:1,f:1,md:1,Pc:1,Fc:1});function c0(){this.l=null}c0.prototype=new u;c0.prototype.constructor=c0;c0.prototype.Kc=function(a){return a.k};c0.prototype.zc=function(a){return xu(this.l.ea,a)};c0.prototype.$classData=r({fsa:0},!1,"amf.client.convert.DocumentMappingConverter$DocumentMappingConverter$",{fsa:1,f:1,md:1,Pc:1,Fc:1});function d0(){this.l=null}d0.prototype=new u; +d0.prototype.constructor=d0;function GWa(a,b){return xu(a.l.ea,b)}d0.prototype.Kc=function(a){return a.k};d0.prototype.zc=function(a){return GWa(this,a)};d0.prototype.$classData=r({gsa:0},!1,"amf.client.convert.DocumentsModelConverter$DocumentModelConverter$",{gsa:1,f:1,md:1,Pc:1,Fc:1});function e0(){this.l=null}e0.prototype=new u;e0.prototype.constructor=e0;e0.prototype.Kc=function(a){return a.Oc()};function HWa(a){var b=new e0;if(null===a)throw mb(E(),null);b.l=a;return b} +e0.prototype.zc=function(a){return cea(this,a)};function cea(a,b){return xu(a.l.ea,b)}e0.prototype.$classData=r({hsa:0},!1,"amf.client.convert.DomainElementConverter$DomainElementMatcher$",{hsa:1,f:1,md:1,Pc:1,Fc:1});function f0(){}f0.prototype=new u;f0.prototype.constructor=f0;f0.prototype.Kc=function(a){return a.k};f0.prototype.zc=function(a){return(new Uk).cE(a)};f0.prototype.$classData=r({isa:0},!1,"amf.client.convert.DomainExtensionConverter$DomainExtensionMatcher$",{isa:1,f:1,md:1,Pc:1,Fc:1}); +function g0(){this.l=null}g0.prototype=new u;g0.prototype.constructor=g0;g0.prototype.Kc=function(a){return a.k};g0.prototype.zc=function(a){return xu(this.l.ea,a)};g0.prototype.$classData=r({jsa:0},!1,"amf.client.convert.DynamicBindingConverter$DynamicBindingMatcher$",{jsa:1,f:1,md:1,Pc:1,Fc:1});function h0(){this.l=null}h0.prototype=new u;h0.prototype.constructor=h0;h0.prototype.Kc=function(a){return a.k};h0.prototype.zc=function(a){return xu(this.l.ea,a)}; +h0.prototype.$classData=r({ksa:0},!1,"amf.client.convert.EmptyBindingConverter$EmptyBindingMatcher$",{ksa:1,f:1,md:1,Pc:1,Fc:1});function i0(){this.l=null}i0.prototype=new u;i0.prototype.constructor=i0;i0.prototype.Kc=function(a){return a.k};i0.prototype.zc=function(a){return xu(this.l.ea,a)};i0.prototype.$classData=r({lsa:0},!1,"amf.client.convert.EncodingConverter$EncodingMatcher$",{lsa:1,f:1,md:1,Pc:1,Fc:1});function j0(){this.l=null}j0.prototype=new u;j0.prototype.constructor=j0; +j0.prototype.Kc=function(a){return a.k};j0.prototype.zc=function(a){return IWa(this,a)};function IWa(a,b){return xu(a.l.ea,b)}j0.prototype.$classData=r({msa:0},!1,"amf.client.convert.EndPointConverter$EndPointMatcher$",{msa:1,f:1,md:1,Pc:1,Fc:1});function k0(){this.l=null}k0.prototype=new u;k0.prototype.constructor=k0;k0.prototype.Kc=function(a){return a.k};k0.prototype.zc=function(a){return JWa(this,a)};function JWa(a,b){return xu(a.l.ea,b)} +k0.prototype.$classData=r({nsa:0},!1,"amf.client.convert.ExampleConverter$ExampleMatcher$",{nsa:1,f:1,md:1,Pc:1,Fc:1});function l0(){this.l=null}l0.prototype=new u;l0.prototype.constructor=l0;l0.prototype.Kc=function(a){return a.k};l0.prototype.zc=function(a){return KWa(this,a)};function KWa(a,b){return xu(a.l.ea,b)}l0.prototype.$classData=r({osa:0},!1,"amf.client.convert.ExternalConverter$ExternalConverter$",{osa:1,f:1,md:1,Pc:1,Fc:1});function m0(){}m0.prototype=new u;m0.prototype.constructor=m0; +m0.prototype.Kc=function(a){return a.k};m0.prototype.zc=function(a){return(new Uo).dq(a)};m0.prototype.$classData=r({psa:0},!1,"amf.client.convert.FieldConverter$AnnotationsFieldMatcher$",{psa:1,f:1,md:1,Pc:1,Fc:1});function n0(){this.l=null}n0.prototype=new u;n0.prototype.constructor=n0;n0.prototype.Kc=function(a){return a.k};n0.prototype.zc=function(a){return xu(this.l.ea,a)};n0.prototype.$classData=r({vsa:0},!1,"amf.client.convert.FileShapeConverter$FileShapeMatcher$",{vsa:1,f:1,md:1,Pc:1,Fc:1}); +function kU(){}kU.prototype=new u;kU.prototype.constructor=kU;kU.prototype.Kc=function(a){return a.k};kU.prototype.zc=function(a){return GLa(a)};kU.prototype.$classData=r({ysa:0},!1,"amf.client.convert.GraphDomainConverter$GraphDomainConverter$",{ysa:1,f:1,md:1,Pc:1,Fc:1});function o0(){this.l=null}o0.prototype=new u;o0.prototype.constructor=o0;o0.prototype.Kc=function(a){return a.k};o0.prototype.zc=function(a){return xu(this.l.ea,a)}; +o0.prototype.$classData=r({zsa:0},!1,"amf.client.convert.HttpMessageBindingConverter$HttpMessageBindingMatcher$",{zsa:1,f:1,md:1,Pc:1,Fc:1});function p0(){this.l=null}p0.prototype=new u;p0.prototype.constructor=p0;p0.prototype.Kc=function(a){return a.k};p0.prototype.zc=function(a){return xu(this.l.ea,a)};p0.prototype.$classData=r({Asa:0},!1,"amf.client.convert.HttpOperationBindingConverter$HttpOperationBindingMatcher$",{Asa:1,f:1,md:1,Pc:1,Fc:1});function q0(){this.l=null}q0.prototype=new u; +q0.prototype.constructor=q0;q0.prototype.Kc=function(a){return a.k};q0.prototype.zc=function(a){return xu(this.l.ea,a)};q0.prototype.$classData=r({Bsa:0},!1,"amf.client.convert.IriTemplateMappingConverter$IriTemplateMappingConverter$",{Bsa:1,f:1,md:1,Pc:1,Fc:1});function r0(){this.l=null}r0.prototype=new u;r0.prototype.constructor=r0;r0.prototype.Kc=function(a){return a.k};r0.prototype.zc=function(a){return xu(this.l.ea,a)}; +r0.prototype.$classData=r({Csa:0},!1,"amf.client.convert.KafkaMessageBindingConverter$KafkaMessageBindingMatcher$",{Csa:1,f:1,md:1,Pc:1,Fc:1});function s0(){this.l=null}s0.prototype=new u;s0.prototype.constructor=s0;s0.prototype.Kc=function(a){return a.k};s0.prototype.zc=function(a){return xu(this.l.ea,a)};s0.prototype.$classData=r({Dsa:0},!1,"amf.client.convert.KafkaOperationBindingConverter$KafkaOperationBindingMatcher$",{Dsa:1,f:1,md:1,Pc:1,Fc:1});function t0(){this.l=null}t0.prototype=new u; +t0.prototype.constructor=t0;t0.prototype.Kc=function(a){return a.k};t0.prototype.zc=function(a){return xu(this.l.ea,a)};t0.prototype.$classData=r({Esa:0},!1,"amf.client.convert.LicenseConverter$LicenseMatcher$",{Esa:1,f:1,md:1,Pc:1,Fc:1});function u0(){this.l=null}u0.prototype=new u;u0.prototype.constructor=u0;u0.prototype.Kc=function(a){return a.k};u0.prototype.zc=function(a){return xu(this.l.ea,a)}; +u0.prototype.$classData=r({Fsa:0},!1,"amf.client.convert.MessageBindingConverter$MessageBindingMatcher$",{Fsa:1,f:1,md:1,Pc:1,Fc:1});function v0(){this.l=null}v0.prototype=new u;v0.prototype.constructor=v0;v0.prototype.Kc=function(a){return a.k};v0.prototype.zc=function(a){return xu(this.l.ea,a)};v0.prototype.$classData=r({Gsa:0},!1,"amf.client.convert.MqttMessageBindingConverter$MqttMessageBindingMatcher$",{Gsa:1,f:1,md:1,Pc:1,Fc:1});function w0(){this.l=null}w0.prototype=new u; +w0.prototype.constructor=w0;w0.prototype.Kc=function(a){return a.k};w0.prototype.zc=function(a){return xu(this.l.ea,a)};w0.prototype.$classData=r({Hsa:0},!1,"amf.client.convert.MqttOperationBindingConverter$MqttOperationBindingMatcher$",{Hsa:1,f:1,md:1,Pc:1,Fc:1});function x0(){this.l=null}x0.prototype=new u;x0.prototype.constructor=x0;x0.prototype.Kc=function(a){return a.k};x0.prototype.zc=function(a){return xu(this.l.ea,a)}; +x0.prototype.$classData=r({Isa:0},!1,"amf.client.convert.MqttServerBindingConverter$MqttServerBindingMatcher$",{Isa:1,f:1,md:1,Pc:1,Fc:1});function y0(){this.l=null}y0.prototype=new u;y0.prototype.constructor=y0;y0.prototype.Kc=function(a){return a.k};y0.prototype.zc=function(a){return xu(this.l.ea,a)};y0.prototype.$classData=r({Jsa:0},!1,"amf.client.convert.MqttServerLastWillConverter$MqttServerLastWillMatcher$",{Jsa:1,f:1,md:1,Pc:1,Fc:1});function z0(){this.l=null}z0.prototype=new u; +z0.prototype.constructor=z0;z0.prototype.Kc=function(a){return a.k};z0.prototype.zc=function(a){return xu(this.l.ea,a)};z0.prototype.$classData=r({Ksa:0},!1,"amf.client.convert.NilShapeConverter$NilShapeMatcher$",{Ksa:1,f:1,md:1,Pc:1,Fc:1});function A0(){this.l=null}A0.prototype=new u;A0.prototype.constructor=A0;A0.prototype.Kc=function(a){return a.k};A0.prototype.zc=function(a){return xu(this.l.ea,a)}; +A0.prototype.$classData=r({Lsa:0},!1,"amf.client.convert.NodeMappingConverter$NodeMappingConverter$",{Lsa:1,f:1,md:1,Pc:1,Fc:1});function B0(){this.l=null}B0.prototype=new u;B0.prototype.constructor=B0;function LWa(a,b){return xu(a.l.ea,b)}B0.prototype.Kc=function(a){return a.k};B0.prototype.zc=function(a){return LWa(this,a)};B0.prototype.$classData=r({Msa:0},!1,"amf.client.convert.NodeShapeConverter$NodeShapeMatcher$",{Msa:1,f:1,md:1,Pc:1,Fc:1});function C0(){this.l=null}C0.prototype=new u; +C0.prototype.constructor=C0;C0.prototype.Kc=function(a){return a.k};C0.prototype.zc=function(a){return xu(this.l.ea,a)};C0.prototype.$classData=r({Nsa:0},!1,"amf.client.convert.OAuth2FlowConverter$OAuth2FlowMatcher$",{Nsa:1,f:1,md:1,Pc:1,Fc:1});function D0(){this.l=null}D0.prototype=new u;D0.prototype.constructor=D0;D0.prototype.Kc=function(a){return a.k};D0.prototype.zc=function(a){return xu(this.l.ea,a)}; +D0.prototype.$classData=r({Osa:0},!1,"amf.client.convert.ObjectPropertyMappingConverter$ObjectPropertyMappingConverter$",{Osa:1,f:1,md:1,Pc:1,Fc:1});function E0(){this.l=null}E0.prototype=new u;E0.prototype.constructor=E0;E0.prototype.Kc=function(a){return a.k};E0.prototype.zc=function(a){return xu(this.l.ea,a)};E0.prototype.$classData=r({Psa:0},!1,"amf.client.convert.OperationBindingConverter$OperationBindingMatcher$",{Psa:1,f:1,md:1,Pc:1,Fc:1});function F0(){this.l=null}F0.prototype=new u; +F0.prototype.constructor=F0;F0.prototype.Kc=function(a){return a.k};F0.prototype.zc=function(a){return MWa(this,a)};function MWa(a,b){return xu(a.l.ea,b)}F0.prototype.$classData=r({Qsa:0},!1,"amf.client.convert.OperationConverter$OperationMatcher$",{Qsa:1,f:1,md:1,Pc:1,Fc:1});function G0(){this.l=null}G0.prototype=new u;G0.prototype.constructor=G0;G0.prototype.Kc=function(a){return a.k};G0.prototype.zc=function(a){return xu(this.l.ea,a)}; +G0.prototype.$classData=r({Rsa:0},!1,"amf.client.convert.OrganizationConverter$OrganizationMatcher$",{Rsa:1,f:1,md:1,Pc:1,Fc:1});function H0(){this.l=null}H0.prototype=new u;H0.prototype.constructor=H0;H0.prototype.Kc=function(a){return a.k};H0.prototype.zc=function(a){return I0(this,a)};function I0(a,b){return xu(a.l.ea,b)}H0.prototype.$classData=r({Ssa:0},!1,"amf.client.convert.ParameterConverter$ParameterMatcher$",{Ssa:1,f:1,md:1,Pc:1,Fc:1});function J0(){this.l=null}J0.prototype=new u; +J0.prototype.constructor=J0;J0.prototype.Kc=function(a){return a.k};J0.prototype.zc=function(a){return xu(this.l.ea,a)};J0.prototype.$classData=r({Tsa:0},!1,"amf.client.convert.ParametrizedSecuritySchemeConverter$ParametrizedSecuritySchemeMatcher$",{Tsa:1,f:1,md:1,Pc:1,Fc:1});function K0(){this.l=null}K0.prototype=new u;K0.prototype.constructor=K0;K0.prototype.Kc=function(a){return a.k};K0.prototype.zc=function(a){return L0(this,a)};function L0(a,b){return xu(a.l.ea,b)} +K0.prototype.$classData=r({Usa:0},!1,"amf.client.convert.PayloadConverter$PayloadMatcher$",{Usa:1,f:1,md:1,Pc:1,Fc:1});function M0(){this.l=null}M0.prototype=new u;M0.prototype.constructor=M0;M0.prototype.Kc=function(a){return a.Sv()};M0.prototype.zc=function(a){return nfa(this,a)};function nfa(a,b){return xu(a.l.ea,b)}M0.prototype.$classData=r({Vsa:0},!1,"amf.client.convert.PayloadFragmentConverter$PayloadFragmentMatcher$",{Vsa:1,f:1,md:1,Pc:1,Fc:1});function N0(){}N0.prototype=new u; +N0.prototype.constructor=N0;N0.prototype.Kc=function(a){return a.k};N0.prototype.zc=function(a){var b=new Zp;b.k=a;return b};N0.prototype.$classData=r({Wsa:0},!1,"amf.client.convert.PayloadValidatorConverter$PayloadValidatorMatcher$",{Wsa:1,f:1,md:1,Pc:1,Fc:1});function O0(){this.l=null}O0.prototype=new u;O0.prototype.constructor=O0;O0.prototype.Kc=function(a){return a.k};O0.prototype.zc=function(a){return xu(this.l.ea,a)}; +O0.prototype.$classData=r({Xsa:0},!1,"amf.client.convert.PropertyDependenciesConverter$PropertyDependenciesMatcher$",{Xsa:1,f:1,md:1,Pc:1,Fc:1});function P0(){this.l=null}P0.prototype=new u;P0.prototype.constructor=P0;P0.prototype.Kc=function(a){return a.k};P0.prototype.zc=function(a){return xu(this.l.ea,a)};P0.prototype.$classData=r({Ysa:0},!1,"amf.client.convert.PropertyMappingConverter$PropertyMappingConverter$",{Ysa:1,f:1,md:1,Pc:1,Fc:1});function Q0(){this.l=null}Q0.prototype=new u; +Q0.prototype.constructor=Q0;function NWa(a,b){return xu(a.l.ea,b)}Q0.prototype.Kc=function(a){return a.k};Q0.prototype.zc=function(a){return NWa(this,a)};function OWa(a){var b=new Q0;if(null===a)throw mb(E(),null);b.l=a;return b}Q0.prototype.$classData=r({Zsa:0},!1,"amf.client.convert.PropertyShapeConverter$PropertyShapeMatcher$",{Zsa:1,f:1,md:1,Pc:1,Fc:1});function R0(){this.l=null}R0.prototype=new u;R0.prototype.constructor=R0;R0.prototype.Kc=function(a){return a.k}; +R0.prototype.zc=function(a){return xu(this.l.ea,a)};R0.prototype.$classData=r({$sa:0},!1,"amf.client.convert.PublicNodeMappingConverter$PublicNodeMappingConverter$",{$sa:1,f:1,md:1,Pc:1,Fc:1});function S0(){}S0.prototype=new u;S0.prototype.constructor=S0;S0.prototype.Kc=function(a){return PWa(a)};S0.prototype.zc=function(a){if(a instanceof T0)a=a.dv;else throw(new x).d(a);return a}; +S0.prototype.$classData=r({ata:0},!1,"amf.client.convert.ReferenceResolverConverter$ReferenceResolverMatcher$",{ata:1,f:1,md:1,Pc:1,Fc:1});function U0(){this.l=null}U0.prototype=new u;U0.prototype.constructor=U0;U0.prototype.Kc=function(a){return a.k};U0.prototype.zc=function(a){return QWa(this,a)};function QWa(a,b){return xu(a.l.ea,b)}U0.prototype.$classData=r({bta:0},!1,"amf.client.convert.RequestConverter$RequestMatcher$",{bta:1,f:1,md:1,Pc:1,Fc:1});function V0(){}V0.prototype=new u; +V0.prototype.constructor=V0;V0.prototype.Kc=function(a){return RWa(a)};V0.prototype.zc=function(a){if(a instanceof W0)a=a.dv;else throw(new x).d(a);return a};V0.prototype.$classData=r({cta:0},!1,"amf.client.convert.ResourceLoaderConverter$ResourceLoaderMatcher$",{cta:1,f:1,md:1,Pc:1,Fc:1});function X0(){}X0.prototype=new u;X0.prototype.constructor=X0;X0.prototype.Kc=function(a){return a.k};X0.prototype.zc=function(a){return(new Wm).l1(a)}; +X0.prototype.$classData=r({dta:0},!1,"amf.client.convert.ResourceTypeConverter$ResourceTypeMatcher$",{dta:1,f:1,md:1,Pc:1,Fc:1});function Y0(){this.l=null}Y0.prototype=new u;Y0.prototype.constructor=Y0;Y0.prototype.Kc=function(a){return a.k};Y0.prototype.zc=function(a){return SWa(this,a)};function SWa(a,b){return xu(a.l.ea,b)}Y0.prototype.$classData=r({eta:0},!1,"amf.client.convert.ResponseConverter$ResponseMatcher$",{eta:1,f:1,md:1,Pc:1,Fc:1});function Z0(){this.l=null}Z0.prototype=new u; +Z0.prototype.constructor=Z0;Z0.prototype.Kc=function(a){return a.k};Z0.prototype.zc=function(a){return TWa(this,a)};function TWa(a,b){return xu(a.l.ea,b)}Z0.prototype.$classData=r({fta:0},!1,"amf.client.convert.ScalarShapeConverter$ScalarShapeMatcher$",{fta:1,f:1,md:1,Pc:1,Fc:1});function $0(){this.l=null}$0.prototype=new u;$0.prototype.constructor=$0;$0.prototype.Kc=function(a){return a.k};$0.prototype.zc=function(a){return xu(this.l.ea,a)}; +$0.prototype.$classData=r({gta:0},!1,"amf.client.convert.SchemaShapeConverter$SchemaShapeMatcher$",{gta:1,f:1,md:1,Pc:1,Fc:1});function a1(){this.l=null}a1.prototype=new u;a1.prototype.constructor=a1;a1.prototype.Kc=function(a){return a.k};a1.prototype.zc=function(a){return xu(this.l.ea,a)};a1.prototype.$classData=r({hta:0},!1,"amf.client.convert.ScopeConverter$ScopeMatcher$",{hta:1,f:1,md:1,Pc:1,Fc:1});function b1(){this.l=null}b1.prototype=new u;b1.prototype.constructor=b1;b1.prototype.Kc=function(a){return a.k}; +b1.prototype.zc=function(a){return xu(this.l.ea,a)};b1.prototype.$classData=r({ita:0},!1,"amf.client.convert.SecurityRequirementConverter$SecurityRequirementMatcher$",{ita:1,f:1,md:1,Pc:1,Fc:1});function c1(){this.l=null}c1.prototype=new u;c1.prototype.constructor=c1;function UWa(a,b){return xu(a.l.ea,b)}c1.prototype.Kc=function(a){return a.k};c1.prototype.zc=function(a){return UWa(this,a)}; +c1.prototype.$classData=r({jta:0},!1,"amf.client.convert.SecuritySchemeConverter$SecuritySchemeMatcher$",{jta:1,f:1,md:1,Pc:1,Fc:1});function d1(){this.l=null}d1.prototype=new u;d1.prototype.constructor=d1;d1.prototype.Kc=function(a){return a.k};d1.prototype.zc=function(a){return xu(this.l.ea,a)};d1.prototype.$classData=r({kta:0},!1,"amf.client.convert.ServerBindingConverter$ServerBindingMatcher$",{kta:1,f:1,md:1,Pc:1,Fc:1});function e1(){this.l=null}e1.prototype=new u;e1.prototype.constructor=e1; +e1.prototype.Kc=function(a){return a.k};e1.prototype.zc=function(a){return VWa(this,a)};function VWa(a,b){return xu(a.l.ea,b)}e1.prototype.$classData=r({lta:0},!1,"amf.client.convert.ServerConverter$ServerMatcher$",{lta:1,f:1,md:1,Pc:1,Fc:1});function f1(){}f1.prototype=new u;f1.prototype.constructor=f1;f1.prototype.Kc=function(a){return a.k};f1.prototype.zc=function(a){return(new g1).qU(a)};f1.prototype.Wz=function(){return this}; +f1.prototype.$classData=r({mta:0},!1,"amf.client.convert.SettingsConverter$ApiKeySettingsMatcher$",{mta:1,f:1,md:1,Pc:1,Fc:1});function h1(){}h1.prototype=new u;h1.prototype.constructor=h1;h1.prototype.Kc=function(a){return a.k};h1.prototype.zc=function(a){return(new i1).rU(a)};h1.prototype.Wz=function(){return this};h1.prototype.$classData=r({nta:0},!1,"amf.client.convert.SettingsConverter$HttpSettingsMatcher$",{nta:1,f:1,md:1,Pc:1,Fc:1});function j1(){}j1.prototype=new u; +j1.prototype.constructor=j1;j1.prototype.Kc=function(a){return a.k};j1.prototype.zc=function(a){return(new k1).sU(a)};j1.prototype.Wz=function(){return this};j1.prototype.$classData=r({ota:0},!1,"amf.client.convert.SettingsConverter$OAuth1SettingsMatcher$",{ota:1,f:1,md:1,Pc:1,Fc:1});function l1(){}l1.prototype=new u;l1.prototype.constructor=l1;l1.prototype.Kc=function(a){return a.k};l1.prototype.zc=function(a){return(new m1).tU(a)};l1.prototype.Wz=function(){return this}; +l1.prototype.$classData=r({pta:0},!1,"amf.client.convert.SettingsConverter$OAuth2SettingsMatcher$",{pta:1,f:1,md:1,Pc:1,Fc:1});function n1(){}n1.prototype=new u;n1.prototype.constructor=n1;n1.prototype.Kc=function(a){return a.k};n1.prototype.zc=function(a){return(new o1).uU(a)};n1.prototype.Wz=function(){return this};n1.prototype.$classData=r({qta:0},!1,"amf.client.convert.SettingsConverter$OpenIdConnectSettingsMatcher$",{qta:1,f:1,md:1,Pc:1,Fc:1});function p1(){this.l=null}p1.prototype=new u; +p1.prototype.constructor=p1;p1.prototype.Kc=function(a){return a.k};p1.prototype.zc=function(a){return WWa(this,a)};p1.prototype.Wz=function(a){if(null===a)throw mb(E(),null);this.l=a;return this};function WWa(a,b){return b instanceof q1?(XWa(a.l),(new k1).sU(b)):b instanceof wE?(YWa(a.l),(new m1).tU(b)):b instanceof bR?(ZWa(a.l),(new g1).qU(b)):b instanceof r1?($Wa(a.l),(new i1).rU(b)):b instanceof uE?(aXa(a.l),(new o1).uU(b)):null!==b?(new Pm).XG(b):null} +p1.prototype.$classData=r({rta:0},!1,"amf.client.convert.SettingsConverter$SettingsMatcher$",{rta:1,f:1,md:1,Pc:1,Fc:1});function s1(){this.l=null}s1.prototype=new u;s1.prototype.constructor=s1;s1.prototype.Kc=function(a){return a.Ce()};s1.prototype.zc=function(a){return t1(this,a)};function bXa(a){var b=new s1;if(null===a)throw mb(E(),null);b.l=a;return b}function t1(a,b){return xu(a.l.ea,b)} +s1.prototype.$classData=r({sta:0},!1,"amf.client.convert.ShapeConverter$ShapeMatcher$",{sta:1,f:1,md:1,Pc:1,Fc:1});function u1(){}u1.prototype=new u;u1.prototype.constructor=u1;u1.prototype.Kc=function(a){return a.k};u1.prototype.zc=function(a){return(new v1).Z$(a)};u1.prototype.$classData=r({tta:0},!1,"amf.client.convert.ShapeExtensionConverter$ShapeExtensionMatcher$",{tta:1,f:1,md:1,Pc:1,Fc:1});function w1(){this.l=null}w1.prototype=new u;w1.prototype.constructor=w1;w1.prototype.Kc=function(a){return a.k}; +w1.prototype.zc=function(a){return xu(this.l.ea,a)};w1.prototype.$classData=r({uta:0},!1,"amf.client.convert.TagConverter$TagMatcher$",{uta:1,f:1,md:1,Pc:1,Fc:1});function x1(){this.l=null}x1.prototype=new u;x1.prototype.constructor=x1;x1.prototype.Kc=function(a){return a.k};x1.prototype.zc=function(a){return xu(this.l.ea,a)};x1.prototype.$classData=r({vta:0},!1,"amf.client.convert.TemplatedLinkConverter$TemplatedLinkConverter$",{vta:1,f:1,md:1,Pc:1,Fc:1});function y1(){}y1.prototype=new u; +y1.prototype.constructor=y1;y1.prototype.Kc=function(a){return a.k};y1.prototype.zc=function(a){return(new Um).m1(a)};y1.prototype.$classData=r({wta:0},!1,"amf.client.convert.TraitConverter$TraitMatcher$",{wta:1,f:1,md:1,Pc:1,Fc:1});function z1(){this.l=null}z1.prototype=new u;z1.prototype.constructor=z1;z1.prototype.Kc=function(a){return a.ac};z1.prototype.zc=function(a){return xu(this.l.ea,a)}; +z1.prototype.$classData=r({xta:0},!1,"amf.client.convert.TupleShapeConverter$TupleShapeMatcher$",{xta:1,f:1,md:1,Pc:1,Fc:1});function A1(){}A1.prototype=new u;A1.prototype.constructor=A1;A1.prototype.Kc=function(a){return a.k};A1.prototype.zc=function(a){return(new B1).ila(a)};A1.prototype.$classData=r({yta:0},!1,"amf.client.convert.ValidationCandidateConverter$ValidationCandidateMatcher$",{yta:1,f:1,md:1,Pc:1,Fc:1});function C1(){}C1.prototype=new u;C1.prototype.constructor=C1;C1.prototype.Kc=function(a){return a.k}; +C1.prototype.zc=function(a){return(new $p).gla(a)};C1.prototype.$classData=r({zta:0},!1,"amf.client.convert.ValidationConverter$ValidationReportMatcher$",{zta:1,f:1,md:1,Pc:1,Fc:1});function D1(){}D1.prototype=new u;D1.prototype.constructor=D1;D1.prototype.Kc=function(a){return a.k};D1.prototype.zc=function(a){return(new eq).hla(a)};D1.prototype.$classData=r({Ata:0},!1,"amf.client.convert.ValidationConverter$ValidationResultMatcher$",{Ata:1,f:1,md:1,Pc:1,Fc:1});function E1(){}E1.prototype=new u; +E1.prototype.constructor=E1;E1.prototype.Kc=function(a){return a.k};E1.prototype.zc=function(a){return eea(a)};E1.prototype.$classData=r({Bta:0},!1,"amf.client.convert.VariableValueConverter$VariableValueMatcher$",{Bta:1,f:1,md:1,Pc:1,Fc:1});function F1(){this.l=null}F1.prototype=new u;F1.prototype.constructor=F1;F1.prototype.Kc=function(a){return a.k};F1.prototype.zc=function(a){return cXa(this,a)};function cXa(a,b){return xu(a.l.ea,b)} +F1.prototype.$classData=r({Dta:0},!1,"amf.client.convert.VocabularyReferenceConverter$VocabularyReferenceConverter$",{Dta:1,f:1,md:1,Pc:1,Fc:1});function G1(){this.l=null}G1.prototype=new u;G1.prototype.constructor=G1;G1.prototype.Kc=function(a){return a.k};G1.prototype.zc=function(a){return xu(this.l.ea,a)};G1.prototype.$classData=r({Gta:0},!1,"amf.client.convert.WebSocketsChannelBindingConverter$WebSocketsChannelBindingMatcher$",{Gta:1,f:1,md:1,Pc:1,Fc:1});function H1(){this.l=null} +H1.prototype=new u;H1.prototype.constructor=H1;H1.prototype.Kc=function(a){return a.k};H1.prototype.zc=function(a){return xu(this.l.ea,a)};H1.prototype.$classData=r({Hta:0},!1,"amf.client.convert.XMLSerializerConverter$XMLSerializerMatcher$",{Hta:1,f:1,md:1,Pc:1,Fc:1});function dXa(a){ab();a=B(a.k.Y(),dl().R);ab().cb();return gb(a)}function eXa(a,b){var c=a.k,e=dl().R;eb(c,e,b);return a}function fXa(){this.xja=null}fXa.prototype=new u;fXa.prototype.constructor=fXa;d=fXa.prototype; +d.Ar=function(a,b){WAa(this,a,b)};function hfa(a){var b=new fXa;b.xja=a;return b}d.yB=function(a,b){return YAa(this,a,b)};d.Ns=function(a,b,c,e,f,g){this.Gc(a.j,b,c,e,f,Yb().dh,g)};d.Gc=function(a,b,c,e,f,g,h){var k=this.xja,l=ab(),m=ab().Lf();c=bb(l,c,m).Ra();l=ab();gXa||(gXa=(new I1).a());f=bb(l,f,gXa).Ra();l=ab();m=ab().Lf();k.Eoa(a,b,c,e,f,g,bb(l,h,m).Ra())};d.$classData=r({swa:0},!1,"amf.client.resolve.ClientErrorHandlerConverter$$anon$1",{swa:1,f:1,zq:1,Zp:1,Bp:1});function I1(){} +I1.prototype=new u;I1.prototype.constructor=I1;I1.prototype.a=function(){return this};I1.prototype.Kc=function(a){return(new be).jj(a)};I1.prototype.zc=function(a){return a.yc};I1.prototype.$classData=r({uwa:0},!1,"amf.client.resolve.ClientErrorHandlerConverter$RangeToLexicalConverter$",{uwa:1,f:1,md:1,Pc:1,Fc:1});var gXa=void 0;function J1(){CF.call(this);this.mna=null}J1.prototype=new YLa;J1.prototype.constructor=J1; +J1.prototype.e=function(a){this.mna=a;var b=(new CF).e(a);CF.prototype.Ge.call(this,a,b);return this};Object.defineProperty(J1.prototype,"msj",{get:function(){return this.mna},configurable:!0});J1.prototype.$classData=r({Awa:0},!1,"amf.client.resource.ResourceNotFound",{Awa:1,Nga:1,bf:1,f:1,o:1});function Ft(){}Ft.prototype=new u;Ft.prototype.constructor=Ft;Ft.prototype.a=function(){return this}; +Ft.prototype.Ji=function(a){a=Mc(ua(),a,",");var b=[];for(var c=0,e=a.n.length;c>31,f=65535&c,g=c>>>16|0,h=65535&a,k=a>>>16|0,l=ca(f,h);h=ca(g,h);var m=ca(f,k);f=l+((h+m|0)<<16)|0;l=(l>>>16|0)+m|0;b=(((ca(c,b)+ca(e,a)|0)+ca(g,k)|0)+(l>>>16|0)|0)+(((65535&l)+h|0)>>>16|0)|0;return(new qa).Sc(f,b)};d.a=function(){this.E1=-2;this.HI=0;return this}; +d.h=function(a){if(a instanceof FE){var b;if(b=this.ri===a.ri&&this.ci===a.ci)a:{for(b=0;b!==this.ci;){if(this.cg.n[b]!==a.cg.n[b]){b=!1;break a}b=1+b|0}b=!0}a=b}else a=!1;return a};d.t=function(){return Mj(Nj(),this)};d.Sc=function(a,b){FE.prototype.a.call(this);this.ri=a;this.ci=1;this.cg=ha(Ja(Qa),[b]);return this};d.tr=function(a){return fZa(this,a)};function Zra(a){if(-2===a.E1){if(0===a.ri)var b=-1;else for(b=0;0===a.cg.n[b];)b=1+b|0;a.E1=b}return a.E1} +function AE(a){a:for(;;){if(0b||36b.ri?1:a.rib.ci?a.ri:a.ci=(f.length|0)||h>=(g.length|0)){f=(f.length|0)-(g.length|0)|0;break a}var k=(65535&(f.charCodeAt(h)|0))-(65535&(g.charCodeAt(h)|0))|0;if(0!==k){f=k;break a}if(37===(65535&(f.charCodeAt(h)|0))){if((2+h|0)>=(f.length|0)||(2+h|0)>=(g.length|0))throw(new uK).d("Invalid escape in URI");ua();k=f.substring(1+h|0,3+h|0);k=OK(0,k,g.substring(1+h|0,3+h|0));if(0!==k){f=k;break a}h=3+h|0}else h=1+h|0}}return f}}(this), +c=this.fL,e=a.fL;c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:OK(ua(),c,e);0!==c?b=c:(c=this.LA,c=c===a.LA?0:c?1:-1,0!==c?b=c:this.LA?(c=b(this.cP,a.cP)|0,0!==c?b=c:(c=this.Rs,e=a.Rs,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)|0,0!==c?b=c:(c=this.Jt,e=a.Jt,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)|0,0!==c?b=c:(c=this.It,a=a.It,b=Va(Wa(),c,a)?0:void 0===c?-1:void 0===a?1:b(c,a)|0)))):void 0!==this.fA&&void 0!==a.fA?(c=this.dP,e=a.dP,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)| +0,0!==c?b=c:(c=this.fA,e=a.fA,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:OK(ua(),c,e),0!==c?b=c:(c=this.bP,e=a.bP,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:(c|0)-(e|0)|0,0!==c?b=c:(c=this.Rs,e=a.Rs,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)|0,0!==c?b=c:(c=this.Jt,e=a.Jt,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)|0,0!==c?b=c:(c=this.It,a=a.It,b=Va(Wa(),c,a)?0:void 0===c?-1:void 0===a?1:b(c,a)|0)))))):(c=this.eL,e=a.eL,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)|0,0!==c?b= +c:(c=this.Rs,e=a.Rs,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)|0,0!==c?b=c:(c=this.Jt,e=a.Jt,c=Va(Wa(),c,e)?0:void 0===c?-1:void 0===e?1:b(c,e)|0,0!==c?b=c:(c=this.It,a=a.It,b=Va(Wa(),c,a)?0:void 0===c?-1:void 0===a?1:b(c,a)|0)))));return 0===b}return!1};d.t=function(){return this.Y1};d.tr=function(a){return hZa(this,a)}; +function hZa(a,b){var c=function(){return function(g,h){return g===h?0:gb)throw(new Mv).ue(b);var c=a.qf,e=b-(c.length|0)|0;if(0>e)c=c.substring(0,b);else for(b=0;b!==e;)c+="\x00",b=1+b|0;a.qf=c}d=Y2.prototype; +d.a=function(){this.qf="";return this};d.bI=function(a,b){return this.qf.substring(a,b)};d.t=function(){return this.qf};d.Kaa=function(a){Y2.prototype.e.call(this,ka(a));return this};d.xS=function(a){this.qf=""+this.qf+a};d.ue=function(a){Y2.prototype.a.call(this);if(0>a)throw(new sZa).a();return this};d.Oa=function(){return this.qf.length|0};function jF(a,b){b=ba.String.fromCharCode(b);a.qf=""+a.qf+b}d.e=function(a){Y2.prototype.a.call(this);if(null===a)throw(new sf).a();this.qf=a;return this}; +function tZa(a){for(var b=a.qf,c="",e=-1+(b.length|0)|0;01/a?"-"+b:b;b=a.length|0;a=101!==(65535&(a.charCodeAt(-3+b|0)|0))?a:a.substring(0,-1+b|0)+"0"+a.substring(-1+b|0);if(!c||0<=(a.indexOf(".")|0))return a;c=a.indexOf("e")|0;return a.substring(0,c)+"."+a.substring(c)}function xZa(a,b){for(var c="",e=0;e!==b;)c=""+c+a,e=1+e|0;return c}function Eza(a,b,c,e){var f=e.length|0;f>=c?vza(a,e):0!==(1&b)?uZa(a,e,xZa(" ",c-f|0)):uZa(a,xZa(" ",c-f|0),e)}function bL(a,b){return 0!==(256&a)?b.toUpperCase():b} +d.t=function(){if(this.RU)throw(new RK).a();return null===this.KD?this.aI:this.KD.t()};function Dza(a){return(0!==(1&a)?"-":"")+(0!==(2&a)?"#":"")+(0!==(4&a)?"+":"")+(0!==(8&a)?" ":"")+(0!==(16&a)?"0":"")+(0!==(32&a)?",":"")+(0!==(64&a)?"(":"")+(0!==(128&a)?"\x3c":"")}d.v7a=function(){this.KD=null;this.aI="";this.RU=!1};function wza(a,b){if(void 0===a)return b;a=+ba.parseInt(a,10);return 2147483647>=a?Aa(a):-1}function yZa(a,b,c,e){null===a.KD?a.aI=a.aI+(""+b+c)+e:vZa(a,[b,c,e])} +function zza(a,b,c,e,f){var g=(e.length|0)+(f.length|0)|0;g>=c?uZa(a,e,f):0!==(16&b)?yZa(a,e,xZa("0",c-g|0),f):0!==(1&b)?yZa(a,e,f,xZa(" ",c-g|0)):yZa(a,xZa(" ",c-g|0),e,f)}function Aza(a,b,c,e){Eza(a,b,c,bL(b,e!==e?"NaN":01/a?"-"+b:b;return c&&0>(a.indexOf(".")|0)?a+".":a}function XK(a,b,c,e,f){e=0>e?f:f.substring(0,e);Eza(a,b,c,bL(b,e))}function aL(a){throw(new cL).e(Dza(a));}function vza(a,b){null===a.KD?a.aI=""+a.aI+b:vZa(a,[b])} +function xza(a,b,c,e){if((e.length|0)>=c&&0===(108&b))vza(a,bL(b,e));else if(0===(124&b))XK(a,b,c,-1,e);else{if(45!==(65535&(e.charCodeAt(0)|0)))var f=0!==(4&b)?"+":0!==(8&b)?" ":"";else 0!==(64&b)?(e=e.substring(1)+")",f="("):(e=e.substring(1),f="-");if(0!==(32&b)){for(var g=e.length|0,h=0;;){if(h!==g){var k=65535&(e.charCodeAt(h)|0);k=48<=k&&57>=k}else k=!1;if(k)h=1+h|0;else break}h=-3+h|0;if(!(0>=h)){for(g=e.substring(h);3>24};d.h=function(a){return a instanceof qa?this.od===a.od&&this.Ud===a.Ud:!1}; +d.Fi=function(a,b,c){qa.prototype.Sc.call(this,a|b<<22,b>>10|c<<12);return this};d.t=function(){return yza(Ea(),this.od,this.Ud)};d.Sc=function(a,b){this.od=a;this.Ud=b;return this};d.tr=function(a){Ea();var b=this.od,c=this.Ud,e=a.od;a=a.Ud;return c===a?b===e?0:(-2147483648^b)<(-2147483648^e)?-1:1:c>31);return this};d.Upa=function(){return this.od<<16>>16};d.z=function(){return this.od^this.Ud};d.gH=function(){return this.od}; +d.$classData=r({Neb:0},!1,"scala.scalajs.runtime.RuntimeLong",{Neb:1,iH:1,f:1,o:1,ym:1});function QT(){this.tD=this.Ll=null}QT.prototype=new u;QT.prototype.constructor=QT;function f3(){}d=f3.prototype=QT.prototype;d.H=function(){return"ProfileName"};d.E=function(){return 2};d.h=function(a){return this===a?!0:a instanceof QT?this.Ll===a.Ll?this.tD===a.tD:!1:!1};d.G=function(a){switch(a){case 0:return this.Ll;case 1:return this.tD;default:throw(new U).e(""+a);}};d.t=function(){return this.Ll}; +d.FB=function(a,b){this.Ll=a;this.tD=b};d.e=function(a){QT.prototype.FB.call(this,a,hk());return this};d.z=function(){return X(this)};d.$classData=r({PA:0},!1,"amf.ProfileName",{PA:1,f:1,y:1,v:1,q:1,o:1});function FL(){this.k=null}FL.prototype=new u;FL.prototype.constructor=FL;d=FL.prototype;d.a=function(){FL.prototype.IO.call(this,(HXa(),IXa(new j2,H(),y())));return this};d.H=function(){return"Environment"};d.E=function(){return 1}; +d.h=function(a){if(this===a)return!0;if(a instanceof FL){var b=this.k;a=a.k;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.IO=function(a){this.k=a;return this};d.P4=function(){var a=ab(),b=this.k.NH,c=RZa();return bb(a,b,c).Ra()};d.z=function(){return X(this)};function mAa(a,b){a=a.k;var c=ab(),e=lAa();b=uk(tk(c,b,e));return(new FL).IO(IXa(new j2,b,a.NH))} +FL.prototype.withResolver=function(a){return(new FL).IO(SZa(this.k,(ab(),RZa(),PWa(a))))};FL.prototype.withLoaders=function(a){return mAa(this,a)};FL.prototype.add=function(a){return(new FL).IO(Jea(this.k,(ab(),lAa(),RWa(a))))};FL.prototype.withClientResolver=function(a){var b=new HL;b.Hoa=a;return(new FL).IO(SZa(this.k,(ab(),RZa(),PWa(b))))};FL.prototype.addClientLoader=function(a){var b=new GL;b.pba=a;return(new FL).IO(Jea(this.k,(ab(),lAa(),RWa(b))))}; +Object.defineProperty(FL.prototype,"reference",{get:function(){return this.P4()},configurable:!0});Object.defineProperty(FL.prototype,"loaders",{get:function(){var a=ab(),b=this.k.lH,c=lAa();return Ak(a,b,c).Ra()},configurable:!0});FL.prototype.$classData=r({Jta:0},!1,"amf.client.environment.Environment",{Jta:1,f:1,y:1,v:1,q:1,o:1});function Uo(){this.k=null}Uo.prototype=new u;Uo.prototype.constructor=Uo;d=Uo.prototype;d.a=function(){Uo.prototype.dq.call(this,(O(),(new P).a()));return this};d.H=function(){return"Annotations"}; +d.E=function(){return 1};d.$k=function(){return this.k};d.h=function(a){return this===a?!0:a instanceof Uo?this.k===a.k:!1};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function TZa(a){var b=ab(),c=new UZa,e=a.k.hf,f=Ef().u;c=xs(e,c,f);a=w(function(){return function(g){return g.cp}}(a));e=K();a=c.ka(a,e.u);c=FLa();return Ak(b,a,c).Ra()}d.dq=function(a){this.k=a;return this};d.z=function(){return X(this)}; +d.sL=function(){var a=ab(),b=Ab(this.k,q(Bb));b.b()?b=y():(b=b.c(),b=(new z).d(b.da));var c=ab().Lf();return bb(a,b,c).Ra()};Object.defineProperty(Uo.prototype,"autoGeneratedName",{get:function(){return Ab(this.k,q(nN)).na()},configurable:!0});Object.defineProperty(Uo.prototype,"inlinedElement",{get:function(){return Ab(this.k,q(VZa)).na()},configurable:!0}); +Object.defineProperty(Uo.prototype,"inheritanceProvenance",{get:function(){var a=ab(),b=Ab(this.k,q(Zi));b.b()?b=y():(b=b.c(),b=(new z).d(b.nw));var c=ab().Lf();return bb(a,b,c).Ra()},configurable:!0});Object.defineProperty(Uo.prototype,"resolvedLinkTarget",{get:function(){var a=ab(),b=Ab(this.k,q(WZa));b.b()?b=y():(b=b.c(),b=(new z).d(b.iP));var c=ab().Lf();return bb(a,b,c).Ra()},configurable:!0}); +Object.defineProperty(Uo.prototype,"resolvedLink",{get:function(){var a=ab(),b=Ab(this.k,q(XZa));b.b()?b=y():(b=b.c(),b=(new z).d(b.hP));var c=ab().Lf();return bb(a,b,c).Ra()},configurable:!0});Object.defineProperty(Uo.prototype,"isTracked",{get:function(){var a=new YZa,b=this.k.hf,c=Ef().u;return xs(b,a,c).Da()},configurable:!0});Uo.prototype.isTrackedBy=function(a){var b=new ZZa;b.sM=a;a=this.k.hf;var c=Ef().u;return xs(a,b,c).Da()}; +Object.defineProperty(Uo.prototype,"isLocal",{get:function(){return Ab(this.k,q(zka)).na()},configurable:!0});Uo.prototype.location=function(){return this.sL()};Uo.prototype.fragmentName=function(){var a=ab(),b=Ab(this.k,q($Za));b.b()?b=y():(b=b.c(),b=(new z).d(b.vg));var c=ab().Lf();return bb(a,b,c).Ra()};Uo.prototype.custom=function(){return TZa(this)};Uo.prototype.lexical=function(){var a=Ab(this.k,q(jd));a.b()?a=y():(a=a.c(),a=(new z).d(a.yc));return a.b()?rfa():a.c()}; +Object.defineProperty(Uo.prototype,"_internal",{get:function(){return this.$k()},configurable:!0});Uo.prototype.$classData=r({Ota:0},!1,"amf.client.model.Annotations",{Ota:1,f:1,y:1,v:1,q:1,o:1});function g3(){this.k=null}g3.prototype=new u;g3.prototype.constructor=g3;d=g3.prototype;d.H=function(){return"Graph"};d.E=function(){return 1};d.h=function(a){if(this===a)return!0;if(a instanceof g3){var b=this.k;a=a.k;return null===b?null===a:b.h(a)}return!1}; +d.TV=function(){var a=ab(),b=NDa(this.k),c=ab().Lf();return Ak(a,b,c).Ra()};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function GLa(a){var b=new g3;b.k=a;return b}d.z=function(){return X(this)};g3.prototype.remove=function(a){Dha(this.k.Rh.Y(),a);return this};g3.prototype.getObjectByPropertyId=function(a){var b=ab();a=a_a(this.k,a);var c=ab().jr();return Ak(b,a,c).Ra()}; +g3.prototype.scalarByProperty=function(a){var b=ab();a=b_a(this.k,a);var c=ab().QM();return Ak(b,a,c).Ra()};g3.prototype.properties=function(){return this.TV()};g3.prototype.types=function(){var a=ab(),b=c_a(this.k),c=ab().Lf();return Ak(a,b,c).Ra()};g3.prototype.$classData=r({Hua:0},!1,"amf.client.model.domain.Graph",{Hua:1,f:1,y:1,v:1,q:1,o:1});function d_a(a){ab();a=B(a.k.Y(),FY().R);ab().cb();return gb(a)}function e_a(a){var b=ab();a=a.k.kI();var c=f_a();return Ak(b,a,c).Ra()} +function g_a(a,b){var c=a.k;ab();h_a();b=b.k;var e=FY().te;Vd(c,e,b);return a}function i_a(a,b){var c=a.k;O();var e=(new P).a();Sd(c,b,e);return a}function j_a(a,b){var c=a.k,e=ab(),f=f_a();b=uk(tk(e,b,f));e=FY().Aj;Zd(c,e,b);return a}function k_a(a){ab();a=iRa(a.k);var b=h_a();return xu(b.l.ea,a)}function h3(){this.ea=this.k=null}h3.prototype=new u;h3.prototype.constructor=h3;function l_a(){}d=l_a.prototype=h3.prototype;d.Xe=function(){i3();var a=B(this.k.Y(),eO().R);i3().cb();return gb(a)}; +d.tq=function(){return this.LD()};d.Yd=function(){return this.Xe()};d.Zb=function(a){return lU(this,a)};d.Wb=function(){return hU(this)};d.$b=function(a){return iU(this,a)};d.Rj=function(){i3();var a=B(this.k.Y(),eO().Va);i3().cb();return gb(a)};d.O4=function(){i3();var a=B(this.k.Y(),eO().Vf);i3().cb();return gb(a)};d.mla=function(a){this.k=a;this.ea=nv().ea};d.sq=function(a){var b=this.k,c=eO().Zc;eb(b,c,a);return this};d.rb=function(){return So(this)}; +d.Hh=function(a){var b=this.k,c=eO().Va;eb(b,c,a);return this};d.Yb=function(a){return nU(this,a)};d.Ab=function(){return this.Oc().j};d.sh=function(){return this.Rj()};d.LD=function(){i3();var a=B(this.k.Y(),eO().Zc);i3().cb();return gb(a)};d.Td=function(a){var b=this.k,c=eO().R;eb(b,c,a);return this};h3.prototype.annotations=function(){return this.rb()};h3.prototype.graph=function(){return jU(this)};h3.prototype.withId=function(a){return this.$b(a)};h3.prototype.withExtendsNode=function(a){return this.Zb(a)}; +h3.prototype.withCustomDomainProperties=function(a){return this.Yb(a)};Object.defineProperty(h3.prototype,"position",{get:function(){return this.Wb()},configurable:!0});Object.defineProperty(h3.prototype,"id",{get:function(){return this.Ab()},configurable:!0});Object.defineProperty(h3.prototype,"extendsNode",{get:function(){return fU(this)},configurable:!0});Object.defineProperty(h3.prototype,"customDomainProperties",{get:function(){return gU(this)},configurable:!0}); +h3.prototype.withSubClasOf=function(a){XXa(this.k,a);return this};h3.prototype.withRange=function(a){var b=this.k,c=eO().Vf;eb(b,c,a);return this};h3.prototype.withDescription=function(a){return this.Hh(a)};h3.prototype.withDisplayName=function(a){return this.sq(a)};h3.prototype.withName=function(a){return this.Td(a)};Object.defineProperty(h3.prototype,"subPropertyOf",{get:function(){var a=i3(),b=B(this.k.Y(),eO().eB),c=i3().cb();return Ak(a,b,c).Ra()},configurable:!0}); +Object.defineProperty(h3.prototype,"range",{get:function(){return this.O4()},configurable:!0});Object.defineProperty(h3.prototype,"description",{get:function(){return this.sh()},configurable:!0});Object.defineProperty(h3.prototype,"displayName",{get:function(){return this.tq()},configurable:!0});Object.defineProperty(h3.prototype,"name",{get:function(){return this.Yd()},configurable:!0});function Pm(){this.ea=this.k=null}Pm.prototype=new u;Pm.prototype.constructor=Pm;function m_a(){} +d=m_a.prototype=Pm.prototype;d.a=function(){O();var a=(new P).a();Pm.prototype.XG.call(this,(new Om).K((new S).a(),a));return this};d.Zb=function(a){return lU(this,a)};d.Oc=function(){return this.k};d.Wb=function(){return hU(this)};d.$b=function(a){return iU(this,a)};d.rb=function(){return So(this)};d.Yb=function(a){return nU(this,a)};d.Ab=function(){return this.Oc().j};d.oc=function(){return this.k};d.XG=function(a){this.k=a;this.ea=nv().ea;return this};Pm.prototype.annotations=function(){return this.rb()}; +Pm.prototype.graph=function(){return jU(this)};Pm.prototype.withId=function(a){return this.$b(a)};Pm.prototype.withExtendsNode=function(a){return this.Zb(a)};Pm.prototype.withCustomDomainProperties=function(a){return this.Yb(a)};Object.defineProperty(Pm.prototype,"position",{get:function(){return this.Wb()},configurable:!0});Object.defineProperty(Pm.prototype,"id",{get:function(){return this.Ab()},configurable:!0}); +Object.defineProperty(Pm.prototype,"extendsNode",{get:function(){return fU(this)},configurable:!0});Object.defineProperty(Pm.prototype,"customDomainProperties",{get:function(){return gU(this)},configurable:!0});Pm.prototype.withAdditionalProperties=function(a){var b=this.k;Z();Z().Um();a=a.k;var c=Nm().Dy;Vd(b,c,a);return this};Object.defineProperty(Pm.prototype,"additionalProperties",{get:function(){Z();var a=ar(this.k.Y(),Nm().Dy);return fl(Z().Um(),a)},configurable:!0}); +Pm.prototype.$classData=r({fN:0},!1,"amf.client.model.domain.Settings",{fN:1,f:1,Pd:1,qc:1,gc:1,ib:1});function H_(){this.k=null}H_.prototype=new u;H_.prototype.constructor=H_;d=H_.prototype;d.H=function(){return"CachedReference"};d.jla=function(a){this.k=a;return this};d.E=function(){return 1};d.Rv=function(){return this.k.Of};d.h=function(a){if(this===a)return!0;if(a instanceof H_){var b=this.k;a=a.k;return null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.r7a=function(a,b,c){H_.prototype.jla.call(this,n_a(a,b.Be(),c))};d.z=function(){return X(this)};Object.defineProperty(H_.prototype,"resolved",{get:function(){return this.k.Hm},configurable:!0});Object.defineProperty(H_.prototype,"content",{get:function(){ab();var a=this.k.ur;return gfa(ab().$e(),a)},configurable:!0}); +Object.defineProperty(H_.prototype,"url",{get:function(){return this.Rv()},configurable:!0});H_.prototype.$classData=r({dwa:0},!1,"amf.client.reference.CachedReference",{dwa:1,f:1,y:1,v:1,q:1,o:1});function j3(){this.yL=this.Of=this.hx=null}j3.prototype=new u;j3.prototype.constructor=j3;d=j3.prototype;d.Hc=function(a,b){j3.prototype.YT.call(this,KLa(b,a),b,y());return this};d.H=function(){return"Content"};d.E=function(){return 3};d.Rv=function(){return this.Of}; +d.h=function(a){if(this===a)return!0;if(a instanceof j3&&this.hx===a.hx&&this.Of===a.Of){var b=this.yL;a=a.yL;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.hx;case 1:return this.Of;case 2:return this.yL;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.t1=function(a,b,c){j3.prototype.YT.call(this,KLa(b,a),b,(new z).d(c));return this};d.z=function(){return X(this)};d.qv=function(a,b,c){j3.prototype.YT.call(this,KLa(b,a),b,c);return this}; +d.YT=function(a,b,c){this.hx=a;this.Of=b;this.yL=c;return this};Object.defineProperty(j3.prototype,"mime",{get:function(){return this.yL},configurable:!0});Object.defineProperty(j3.prototype,"url",{get:function(){return this.Rv()},configurable:!0});Object.defineProperty(j3.prototype,"stream",{get:function(){return this.hx},configurable:!0});j3.prototype.$classData=r({ewa:0},!1,"amf.client.remote.Content",{ewa:1,f:1,y:1,v:1,q:1,o:1});function B1(){this.k=null}B1.prototype=new u; +B1.prototype.constructor=B1;d=B1.prototype;d.H=function(){return"ValidationCandidate"};d.E=function(){return 1};d.h=function(a){if(this===a)return!0;if(a instanceof B1){var b=this.k;a=a.k;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.ila=function(a){this.k=a;return this};d.z=function(){return X(this)};d.X6a=function(a,b){B1.prototype.ila.call(this,aC(a.Ce(),b.Sv()))}; +Object.defineProperty(B1.prototype,"payload",{get:function(){ab();var a=this.k.le;return nfa(ofa(),a)},configurable:!0});Object.defineProperty(B1.prototype,"shape",{get:function(){ab();var a=this.k.pa;return t1(ab().Bg(),a)},configurable:!0});B1.prototype.$classData=r({Dwa:0},!1,"amf.client.validate.ValidationCandidate",{Dwa:1,f:1,y:1,v:1,q:1,o:1});function k3(){this.k=null}k3.prototype=new u;k3.prototype.constructor=k3;d=k3.prototype;d.H=function(){return"ValidationShapeSet"};d.E=function(){return 1}; +d.h=function(a){if(this===a)return!0;if(a instanceof k3){var b=this.k;a=a.k;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.z=function(){return X(this)};d.$6a=function(a){this.k=a};d.z7a=function(a,b){var c=ab(),e=o_a();k3.prototype.$6a.call(this,p_a(new q_a,uk(tk(c,a,e)),b))};Object.defineProperty(k3.prototype,"defaultSeverity",{get:function(){return this.k.vo},configurable:!0}); +Object.defineProperty(k3.prototype,"candidates",{get:function(){var a=ab(),b=this.k.Gz,c=o_a();return Ak(a,b,c).Ra()},configurable:!0});k3.prototype.$classData=r({Gwa:0},!1,"amf.client.validate.ValidationShapeSet",{Gwa:1,f:1,y:1,v:1,q:1,o:1});function r_a(){this.xe=this.YB=this.Q=this.OB=this.da=this.$g=null}r_a.prototype=new u;r_a.prototype.constructor=r_a;d=r_a.prototype;d.H=function(){return"Root"};d.E=function(){return 6}; +d.h=function(a){if(this===a)return!0;if(a instanceof r_a){var b=this.$g,c=a.$g;(null===b?null===c:b.h(c))&&this.da===a.da&&this.OB===a.OB?(b=this.Q,c=a.Q,b=null===b?null===c:b.h(c)):b=!1;return b&&this.YB===a.YB?this.xe===a.xe:!1}return!1};d.G=function(a){switch(a){case 0:return this.$g;case 1:return this.da;case 2:return this.OB;case 3:return this.Q;case 4:return this.YB;case 5:return this.xe;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.z=function(){return X(this)}; +function ega(a,b,c,e,f,g){var h=new r_a;h.$g=a;h.da=b;h.OB=c;h.Q=e;h.YB=f;h.xe=g;return h}d.$classData=r({Rwa:0},!1,"amf.core.Root",{Rwa:1,f:1,y:1,v:1,q:1,o:1});function l3(){}l3.prototype=new OT;l3.prototype.constructor=l3;l3.prototype.a=function(){return this};l3.prototype.P=function(a){return(new NM).cE(a)};l3.prototype.t=function(){return"DomainExtensionAnnotation"};l3.prototype.$classData=r({gxa:0},!1,"amf.core.annotations.DomainExtensionAnnotation$",{gxa:1,bF:1,f:1,za:1,q:1,o:1});var s_a=void 0; +function CFa(){s_a||(s_a=(new l3).a());return s_a}function hr(){this.cF=Ea().dl;this.mK=Ea().dl;this.nH=null}hr.prototype=new u;hr.prototype.constructor=hr;d=hr.prototype;d.H=function(){return"Execution"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof hr){var b=this.cF,c=b.Ud,e=a.cF;b.od===e.od&&c===e.Ud?(b=this.mK,c=b.Ud,e=a.mK,b=b.od===e.od&&c===e.Ud):b=!1;if(b)return b=this.nH,a=a.nH,null===b?null===a:b.h(a)}return!1}; +function Fga(a,b,c,e){a.cF=b;a.mK=c;a.nH=e;return a}d.G=function(a){switch(a){case 0:return this.cF;case 1:return this.mK;case 2:return this.nH;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function Cga(a,b,c){var e=a.nH,f=K(),g=new t_a;g.XP=b;g.nC=c;b=J(f,(new Ib).ha([g]));f=K();e=e.ia(b,f.u);b=a.cF;a=b.od;b=b.Ud;return Fga(new hr,(new qa).Sc(a,b),c,e)} +function Ega(a){var b=Bga(),c=b.od;b=b.Ud;var e=a.cF,f=e.od;e=e.Ud;a=a.nH;return Fga(new hr,(new qa).Sc(f,e),(new qa).Sc(c,b),a)}d.z=function(){var a=-889275714;a=OJ().Ga(a,pL(OJ(),this.cF));a=OJ().Ga(a,pL(OJ(),this.mK));a=OJ().Ga(a,NJ(OJ(),this.nH));return OJ().fe(a,3)};d.$classData=r({Rxa:0},!1,"amf.core.benchmark.Execution",{Rxa:1,f:1,y:1,v:1,q:1,o:1});function t_a(){this.XP=null;this.nC=Ea().dl}t_a.prototype=new u;t_a.prototype.constructor=t_a;d=t_a.prototype;d.H=function(){return"Log"};d.E=function(){return 2}; +d.h=function(a){if(this===a)return!0;if(a instanceof t_a&&this.XP===a.XP){var b=this.nC,c=b.Ud;a=a.nC;return b.od===a.od&&c===a.Ud}return!1};d.G=function(a){switch(a){case 0:return this.XP;case 1:return this.nC;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.z=function(){var a=-889275714;a=OJ().Ga(a,NJ(OJ(),this.XP));a=OJ().Ga(a,pL(OJ(),this.nC));return OJ().fe(a,2)};d.$classData=r({Txa:0},!1,"amf.core.benchmark.Log",{Txa:1,f:1,y:1,v:1,q:1,o:1}); +function Dq(){CF.call(this);this.Yka=null}Dq.prototype=new X2;Dq.prototype.constructor=Dq;Dq.prototype.bL=function(a){this.Yka=a;a="Cyclic found following references "+UJ(a,""," -\x3e ","");CF.prototype.Ge.call(this,a,null);return this};Dq.prototype.$classData=r({pya:0},!1,"amf.core.exception.CyclicReferenceException",{pya:1,wi:1,wg:1,bf:1,f:1,o:1});function Fq(){CF.call(this)}Fq.prototype=new X2;Fq.prototype.constructor=Fq; +Fq.prototype.e=function(a){CF.prototype.Ge.call(this,"Cannot parse document with specified media type: "+a,null);return this};Fq.prototype.$classData=r({qya:0},!1,"amf.core.exception.UnsupportedMediaTypeException",{qya:1,wi:1,wg:1,bf:1,f:1,o:1});function Cq(){CF.call(this);this.gr=null}Cq.prototype=new X2;Cq.prototype.constructor=Cq;Cq.prototype.e=function(a){this.gr=a;CF.prototype.Ge.call(this,"Cannot parse document with specified vendor: "+a,null);return this}; +Cq.prototype.$classData=r({rya:0},!1,"amf.core.exception.UnsupportedVendorException",{rya:1,wi:1,wg:1,bf:1,f:1,o:1});function sb(){this.qa=this.r=this.ba=null;this.fP=!1}sb.prototype=new u;sb.prototype.constructor=sb;d=sb.prototype;d.H=function(){return"Field"};d.E=function(){return 4};d.h=function(a){return a instanceof sb?ic(a.r)===ic(this.r):!1};d.G=function(a){switch(a){case 0:return this.ba;case 1:return this.r;case 2:return this.qa;case 3:return this.fP;default:throw(new U).e(""+a);}};d.t=function(){return ic(this.r)}; +function rb(a,b,c,e){a.ba=b;a.r=c;a.qa=e;a.fP=!0;return a}d.z=function(){var a=-889275714;a=OJ().Ga(a,NJ(OJ(),this.ba));a=OJ().Ga(a,NJ(OJ(),this.r));a=OJ().Ga(a,NJ(OJ(),this.qa));a=OJ().Ga(a,this.fP?1231:1237);return OJ().fe(a,4)};d.$classData=r({tya:0},!1,"amf.core.metamodel.Field",{tya:1,f:1,y:1,v:1,q:1,o:1});function u_a(){this.tg=this.Hg=this.ae=this.xc=this.uc=this.De=this.qa=this.g=this.ba=null}u_a.prototype=new u;u_a.prototype.constructor=u_a;d=u_a.prototype; +d.a=function(){v_a=this;Cr(this);tU(this);ii();var a=F().Zd;a=[G(a,"Unit")];for(var b=-1+(a.length|0)|0,c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;this.ba=c;ii();a=[this.tg,this.xc,this.ae,this.Hg,this.De];b=-1+(a.length|0)|0;for(c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;this.g=c;this.qa=tb(new ub,vb().hg,"Base Unit","Base class for every single document model unit. After parsing a document the parser generate parsing Units. Units encode the domain elements and can reference other units to re-use descriptions.",H()); +return this};d.Pn=function(a){this.xc=a};d.Mn=function(a){this.Hg=a};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.Vq=function(){throw mb(E(),(new nb).e("BaseUnit is an abstract class"));};d.On=function(a){this.tg=a};d.lc=function(){this.Vq()};d.Kb=function(){return this.ba};d.Rn=function(a){this.ae=a};d.Nn=function(a){this.uc=a};d.Qn=function(a){this.De=a};d.$classData=r({Kya:0},!1,"amf.core.metamodel.document.BaseUnitModel$",{Kya:1,f:1,Hn:1,hc:1,Rb:1,rc:1}); +var v_a=void 0;function Bq(){v_a||(v_a=(new u_a).a());return v_a}function w_a(){this.wd=this.bb=this.mc=this.qa=this.ba=this.g=this.Tt=null;this.xa=0}w_a.prototype=new u;w_a.prototype.constructor=w_a;d=w_a.prototype; +d.a=function(){x_a=this;Cr(this);uU(this);var a=(new xc).yd(dl()),b=F().Ul;a=this.Tt=rb(new sb,a,G(b,"member"),tb(new ub,ci().Qi,"member","",H()));b=dl().g;this.g=ji(a,b);a=F().Pg;a=G(a,"Array");b=F().Qi;b=G(b,"Seq");var c=dl().ba;this.ba=ji(a,ji(b,c));this.qa=tb(new ub,vb().Pg,"Array Node","Node that represents a dynamic array data structure",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){return this.g}; +d.lc=function(){hs();O();var a=(new P).a();return(new bl).K((new S).a(),a)};d.Kb=function(){return this.ba};d.$classData=r({Sya:0},!1,"amf.core.metamodel.domain.ArrayNodeModel$",{Sya:1,f:1,pd:1,hc:1,Rb:1,rc:1});var x_a=void 0;function al(){x_a||(x_a=(new w_a).a());return x_a}function y_a(){this.wd=this.bb=this.mc=this.qa=this.g=this.ba=null;this.xa=0}y_a.prototype=new u;y_a.prototype.constructor=y_a; +function z_a(a){if(0===(1&a.xa)<<24>>24){var b=(new xc).yd(nc());var c=F().Zd;b=rb(new sb,b,G(c,"extends"),tb(new ub,vb().hg,"extends","Entity that is going to be extended overlaying or adding additional information\nThe type of the relationship provide the semantics about thow the referenced and referencer elements must be combined when generating the domain model from the document model.",H()));a.mc=b;a.xa=(1|a.xa)<<24>>24}return a.mc}d=y_a.prototype; +d.a=function(){A_a=this;Cr(this);uU(this);ii();var a=F().Zd;a=[G(a,"DomainElement")];for(var b=-1+(a.length|0)|0,c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;this.ba=c;ii();a=[this.Ni()];b=-1+(a.length|0)|0;for(c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;this.g=c;this.qa=tb(new ub,vb().hg,"Domain element","Base class for any element describing a domain model. Domain Elements are encoded or declared into base units",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){}; +d.Ni=function(){return 0===(1&this.xa)<<24>>24?z_a(this):this.mc};function Yd(a){if(0===(2&a.xa)<<24>>24&&0===(2&a.xa)<<24>>24){var b=(new xc).yd(Ud());var c=F().Zd;b=rb(new sb,b,G(c,"customDomainProperties"),tb(new ub,vb().hg,"custom domain properties","Extensions provided for a particular domain element.",H()));a.wd=b;a.xa=(2|a.xa)<<24>>24}return a.wd}d.Ub=function(){return this.g};d.jc=function(){return this.qa};d.Vq=function(){throw mb(E(),(new nb).e("DomainElement is an abstract class"));}; +d.lc=function(){this.Vq()};d.Kb=function(){return this.ba};d.$classData=r({Uya:0},!1,"amf.core.metamodel.domain.DomainElementModel$",{Uya:1,f:1,pd:1,hc:1,Rb:1,rc:1});var A_a=void 0;function nc(){A_a||(A_a=(new y_a).a());return A_a}function B_a(){this.wd=this.bb=this.mc=this.qa=this.ba=this.g=this.Nd=this.Rd=null;this.xa=0}B_a.prototype=new u;B_a.prototype.constructor=B_a;d=B_a.prototype; +d.a=function(){C_a=this;Cr(this);uU(this);var a=qb(),b=F().Zd;this.Rd=rb(new sb,a,G(b,"raw"),tb(new ub,vb().hg,"raw","Raw textual information that cannot be processed for the current model semantics.",H()));a=qb();b=F().Tb;this.Nd=rb(new sb,a,G(b,"mediaType"),tb(new ub,vb().Tb,"mediaType","Media type associated to the encoded fragment information",H()));ii();a=[this.Rd,this.Nd];b=-1+(a.length|0)|0;for(var c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;this.g=c;a=F().Zd;a=G(a,"ExternalDomainElement");b=nc().ba; +this.ba=ji(a,b);this.qa=tb(new ub,vb().hg,"External Domain Element","Domain element containing foreign information that cannot be included into the model semantics",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.lc=function(){O();var a=(new P).a();return(new Pk).K((new S).a(),a)};d.Kb=function(){return this.ba}; +d.$classData=r({Vya:0},!1,"amf.core.metamodel.domain.ExternalDomainElementModel$",{Vya:1,f:1,pd:1,hc:1,Rb:1,rc:1});var C_a=void 0;function Ok(){C_a||(C_a=(new B_a).a());return C_a}function D_a(){this.wd=this.bb=this.mc=this.qa=this.ba=this.Xp=this.vf=null;this.xa=0}D_a.prototype=new u;D_a.prototype.constructor=D_a;d=D_a.prototype; +d.a=function(){E_a=this;Cr(this);uU(this);var a=qb(),b=F().Pg;this.vf=rb(new sb,a,G(b,"value"),tb(new ub,vb().Pg,"value","",H()));a=qb();b=F().Pg;this.Xp=rb(new sb,a,G(b,"alias"),tb(new ub,vb().Pg,"alias","",H()));a=F().Pg;a=G(a,"Link");b=dl().ba;this.ba=ji(a,b);this.qa=tb(new ub,vb().Pg,"Link Node","Node that represents a dynamic link in a data structure",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa}; +d.Ub=function(){ii();for(var a=[this.vf],b=-1+(a.length|0)|0,c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;a=c;b=dl().g;c=ii();return a.ia(b,c.u)};d.lc=function(){dha();O();var a=(new P).a();return cha(0,"","",a)};d.Kb=function(){return this.ba};d.$classData=r({Yya:0},!1,"amf.core.metamodel.domain.LinkNodeModel$",{Yya:1,f:1,pd:1,hc:1,Rb:1,rc:1});var E_a=void 0;function os(){E_a||(E_a=(new D_a).a());return E_a}function ub(){this.f3=this.l0=this.nT=this.ff=null}ub.prototype=new u;ub.prototype.constructor=ub; +d=ub.prototype;d.H=function(){return"ModelDoc"};d.E=function(){return 4};d.h=function(a){if(this===a)return!0;if(a instanceof ub){var b=this.ff,c=a.ff;if((null===b?null===c:b.h(c))&&this.nT===a.nT&&this.l0===a.l0)return b=this.f3,a=a.f3,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.ff;case 1:return this.nT;case 2:return this.l0;case 3:return this.f3;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +function tb(a,b,c,e,f){a.ff=b;a.nT=c;a.l0=e;a.f3=f;return a}d.z=function(){return X(this)};d.$classData=r({$ya:0},!1,"amf.core.metamodel.domain.ModelDoc",{$ya:1,f:1,y:1,v:1,q:1,o:1});function Gr(){this.K0=this.y3=this.he=this.rr=null}Gr.prototype=new u;Gr.prototype.constructor=Gr;d=Gr.prototype;d.H=function(){return"ModelVocabulary"};d.E=function(){return 4};d.h=function(a){return this===a?!0:a instanceof Gr?this.rr===a.rr&&this.he===a.he&&this.y3===a.y3&&this.K0===a.K0:!1}; +d.G=function(a){switch(a){case 0:return this.rr;case 1:return this.he;case 2:return this.y3;case 3:return this.K0;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function Fr(a,b,c,e,f){a.rr=b;a.he=c;a.y3=e;a.K0=f;return a}d.z=function(){return X(this)};d.$classData=r({bza:0},!1,"amf.core.metamodel.domain.ModelVocabulary",{bza:1,f:1,y:1,v:1,q:1,o:1});function F_a(){this.wd=this.bb=this.mc=this.qa=this.ba=this.af=this.vf=null;this.xa=0}F_a.prototype=new u; +F_a.prototype.constructor=F_a;d=F_a.prototype;d.a=function(){G_a=this;Cr(this);uU(this);var a=qb(),b=F().Pg;this.vf=rb(new sb,a,G(b,"value"),tb(new ub,vb().Pg,"value","value for an scalar dynamic node",H()));a=yc();b=F().Ua;this.af=rb(new sb,a,G(b,"datatype"),tb(new ub,vb().Pg,"dataType","Data type of value for an scalar dynamic node",H()));a=F().Pg;a=G(a,"Scalar");b=dl().ba;this.ba=ji(a,b);this.qa=tb(new ub,vb().Pg,"Scalar Node","Node that represents a dynamic scalar value data structure",H());return this}; +d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){var a=this.vf,b=this.af,c=dl().g;return ji(a,ji(b,c))};d.lc=function(){vs();var a=y();return ts(0,"",a,(O(),(new P).a()))};d.Kb=function(){return this.ba};d.$classData=r({fza:0},!1,"amf.core.metamodel.domain.ScalarNodeModel$",{fza:1,f:1,pd:1,hc:1,Rb:1,rc:1});var G_a=void 0;function Wi(){G_a||(G_a=(new F_a).a());return G_a} +function H_a(){this.wd=this.bb=this.mc=this.qa=this.ba=this.g=this.zi=this.ig=null;this.xa=0}H_a.prototype=new u;H_a.prototype.constructor=H_a;d=H_a.prototype; +d.a=function(){I_a=this;Cr(this);uU(this);var a=Sk(),b=F().Zd;this.ig=rb(new sb,a,G(b,"definedBy"),tb(new ub,vb().hg,"defined by","Definition for the extended entity",H()));a=dl();b=F().Zd;this.zi=rb(new sb,a,G(b,"extension"),tb(new ub,vb().hg,"extension","Data structure associated to the extension",H()));ii();a=[this.ig,this.zi];b=-1+(a.length|0)|0;for(var c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;a=c;b=nc().g;c=ii();this.g=a.ia(b,c.u);a=F().Ta;a=G(a,"ShapeExtension");b=nc().ba;this.ba=ji(a,b);this.qa=tb(new ub, +vb().Ta,"Shape Extension","Custom extensions for a data shape definition inside an API definition",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.lc=function(){O();var a=(new P).a();return(new m3).K((new S).a(),a)};d.Kb=function(){return this.ba};d.$classData=r({oza:0},!1,"amf.core.metamodel.domain.extensions.ShapeExtensionModel$",{oza:1,f:1,pd:1,hc:1,Rb:1,rc:1});var I_a=void 0; +function Ot(){I_a||(I_a=(new H_a).a());return I_a}function J_a(){this.wd=this.bb=this.mc=this.qa=this.ba=this.vf=this.R=null;this.xa=0}J_a.prototype=new u;J_a.prototype.constructor=J_a;d=J_a.prototype; +d.a=function(){K_a=this;Cr(this);uU(this);var a=qb(),b=F().Tb;this.R=rb(new sb,a,G(b,"name"),tb(new ub,vb().Tb,"name","name of the template variable",H()));a=dl();b=F().Zd;this.vf=rb(new sb,a,G(b,"value"),tb(new ub,vb().hg,"value","value of the variables",H()));a=F().Zd;a=G(a,"VariableValue");b=nc().ba;this.ba=ji(a,b);this.qa=tb(new ub,vb().hg,"Variable Value","Value for a variable in a graph template",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa}; +d.Ub=function(){ii();for(var a=[this.R,this.vf],b=-1+(a.length|0)|0,c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;a=c;b=nc().g;c=ii();return a.ia(b,c.u)};d.lc=function(){O();var a=(new P).a();return(new hl).K((new S).a(),a)};d.Kb=function(){return this.ba};d.$classData=r({rza:0},!1,"amf.core.metamodel.domain.templates.VariableValueModel$",{rza:1,f:1,pd:1,hc:1,Rb:1,rc:1});var K_a=void 0;function gl(){K_a||(K_a=(new J_a).a());return K_a}function bl(){el.call(this);this.Xa=this.aa=null}bl.prototype=new BXa; +bl.prototype.constructor=bl;function Mqa(a,b){var c=B(a.aa,al().Tt),e=K();b=c.yg(b,e.u);c=al().Tt;e=Zr(new $r,b,(new P).a());Vd(a,c,e);return b}function TBa(a,b){var c=al().Tt;b=Zr(new $r,b,(new P).a());Vd(a,c,b);return a}d=bl.prototype;d.bc=function(){return al()};d.fa=function(){return this.Xa};d.Y=function(){return this.aa}; +function L_a(a){var b=rt(pt(a.aa),w(function(){return function(f){f=f.ma();var g=al().Tt;return!(null===f?null===g:ra(f,g))}}(a))),c=a.Xa;b=(new bl).K(b,Yi(O(),c));b=Rd(b,a.j);null!==a.j&&Rd(b,a.j);c=B(a.aa,al().Tt);a=w(function(){return function(f){return f.VJ()}}(a));var e=K();TBa(b,c.ka(a,e.u));return b}d.YL=function(a,b,c){var e=B(this.aa,al().Tt);a=w(function(f,g,h,k){return function(l){return l.YL(g,h,k)}}(this,a,b,c));b=K();e=e.ka(a,b.u);return TBa(this,e)}; +d.K=function(a,b){this.aa=a;this.Xa=b;el.prototype.dq.call(this,b);return this};d.VJ=function(){return L_a(this)};d.$classData=r({Mza:0},!1,"amf.core.model.domain.ArrayNode",{Mza:1,IY:1,f:1,qd:1,vc:1,tc:1});function pB(){this.dF=this.la=null}pB.prototype=new u;pB.prototype.constructor=pB;d=pB.prototype;d.vi=function(a,b){this.la=a;this.dF=b;return this};d.H=function(){return"ElementTree"};d.E=function(){return 2}; +d.h=function(a){if(this===a)return!0;if(a instanceof pB&&this.la===a.la){var b=this.dF;a=a.dF;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.la;case 1:return this.dF;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.z=function(){return X(this)};d.$classData=r({Pza:0},!1,"amf.core.model.domain.ElementTree",{Pza:1,f:1,y:1,v:1,q:1,o:1});function CXa(){this.Rh=null}CXa.prototype=new u;CXa.prototype.constructor=CXa;d=CXa.prototype;d.H=function(){return"Graph"}; +d.E=function(){return 1};function tO(a,b,c){var e=a.Rh;c=Zr(new $r,c,(new P).a());a=QDa(a,b);Rg(e,b,c,a)}d.h=function(a){if(this===a)return!0;if(a instanceof CXa){var b=this.Rh;a=a.Rh;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.Rh;default:throw(new U).e(""+a);}}; +function c_a(a){var b=a.Rh.bc().Kb();a=function(){return function(g){return ic(g)}}(a);var c=ii().u;if(c===ii().u)if(b===H())a=H();else{c=b.ga();var e=c=ji(a(c),H());for(b=b.ta();b!==H();){var f=b.ga();f=ji(a(f),H());e=e.Nf=f;b=b.ta()}a=c}else{for(c=se(b,c);!b.b();)e=b.ga(),c.jd(a(e)),b=b.ta();a=c.Rc()}return a.fj()}d.t=function(){return V(W(),this)};function ODa(a,b,c){var e=a.Rh;c=c.r;a=QDa(a,b);Rg(e,b,c,a)} +function NDa(a){var b=a.Rh.Y().vb,c=mz();c=Ua(c);var e=Id().u;b=Jd(b,c,e);a=w(function(){return function(f){return ic(f.Lc.r)}}(a));c=Xd();return b.ka(a,c.u).ke()} +function b_a(a,b){var c=a.Rh.Y().vb,e=mz();e=Ua(e);var f=Id().u;a=Jd(c,e,f).Fb(w(function(g,h){return function(k){return ic(k.Lc.r)===ic(RB(F(),h))}}(a,b)));if(a instanceof z){a=a.i.r.r;if(a instanceof jh){ii();a=[a.r];b=-1+(a.length|0)|0;for(c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;return c}return a instanceof $r&&a.wb.Da()?a.wb.ua():H()}if(y()===a)return H();throw(new x).d(a);}function QDa(a,b){a=a.Rh.Y().vb.Ja(b);a.b()?a=y():(a=a.c(),a=(new z).d(a.x));return a.b()?(O(),(new P).a()):a.c()} +function a_a(a,b){var c=a.Rh.Y().vb,e=mz();e=Ua(e);var f=Id().u;b=Jd(c,e,f).Fb(w(function(g,h){return function(k){return ic(k.Lc.r)===ic(RB(F(),h))}}(a,b)));if(b instanceof z){b=b.i.r.r;if(Rk(b)){ii();a=[b];b=-1+(a.length|0)|0;for(c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;return c}return b instanceof $r&&b.wb.Da()&&Rk(b.wb.ga())?(b=b.wb,a=w(function(){return function(g){return g}}(a)),c=K(),b.ka(a,c.u).ua()):H()}if(y()===b)return H();throw(new x).d(b);}d.z=function(){return X(this)}; +d.$classData=r({Rza:0},!1,"amf.core.model.domain.Graph",{Rza:1,f:1,y:1,v:1,q:1,o:1});function ns(){el.call(this);this.MB=this.Xa=this.aa=null}ns.prototype=new BXa;ns.prototype.constructor=ns;function M_a(){}d=M_a.prototype=ns.prototype;d.bc=function(){return os()};d.fa=function(){return this.Xa};d.Y=function(){return this.aa};function QM(a,b){a.MB=(new z).d(b);return a}d.YL=function(){return this};d.K=function(a,b){this.aa=a;this.Xa=b;el.prototype.dq.call(this,b);this.MB=y();return this}; +d.VJ=function(){var a=pt(this.aa),b=this.Xa;a=(new ns).K(a,Yi(O(),b));a=Rd(a,this.j);a.MB=this.MB;return a};d.$classData=r({Gga:0},!1,"amf.core.model.domain.LinkNode",{Gga:1,IY:1,f:1,qd:1,vc:1,tc:1});function Xk(){el.call(this);this.ina=this.Xa=this.aa=null}Xk.prototype=new BXa;Xk.prototype.constructor=Xk;d=Xk.prototype;d.bc=function(){return this.ina};d.fa=function(){return this.Xa}; +function N_a(a){var b=pt(a.aa),c=a.Xa;b=(new Xk).K(b,Yi(O(),c));null!==a.j&&Rd(b,a.j);c=ls(a);var e=w(function(g){return function(h){return hd(g.aa,h).ua()}}(a)),f=Xd();c.bd(e,f.u).U(w(function(g,h){return function(k){var l=k.r;k=k.Lc;var m=l.r.VJ();return Rg(h,k,m,l.x)}}(a,b)));return b} +function ls(a){var b=a.aa.vb,c=mz();c=Ua(c);var e=Id().u;b=Jd(b,c,e);a=w(function(){return function(f){if(null!==f){f=f.Lc;dea();var g=dl().g;if(!Cg(g,f))return(new z).d(f).ua()}return y().ua()}}(a));c=Xd();return b.bd(a,c.u)}d.Y=function(){return this.aa};function O_a(a){var b=ls(a);a=w(function(e){return function(f){var g=uCa((new je).e(f.r.$));f=ar(e.aa,f);return(new R).M(g,f)}}(a));var c=Xd();return b.ka(a,c.u).Ch(Gb().si)} +d.YL=function(a,b,c){ls(this).U(w(function(e,f,g,h){return function(k){var l=uCa((new je).e(k.r.$)),m=Ed(ua(),l,"?")?l.substring(0,-1+(l.length|0)|0):l;m=f.Fb(w(function(A,D){return function(C){return C.la===D}}(e,m)));var p=hd(e.aa,k);if(p instanceof z&&(p=p.i,null!==p)){p=p.r;var t=p.r;if(m.b())var v=y();else v=m.c(),v=(new z).d(v.dF);m=t.YL(g,v.b()?H():v.c(),Ed(ua(),l,"?")&&m.b()?w(function(){return function(){}}(e)):h);it(e.aa,k);return oC(e,Gia(Fu(),l,g,h),m,p.x)}}}(this,b,a,c)));return this}; +function P_a(a){var b=dl(),c=F().Pg,e=(new je).e(a);e=jj(e.td);return rb(new sb,b,G(c,e),tb(new ub,vb().Pg,a,"",H()))}function Nqa(a,b,c,e){f2(c,a.j,J(K(),H()));Rg(a,b,c,e);return a}function oC(a,b,c,e){var f=F().Pg.he;0===(b.indexOf(f)|0)&&(f=F().Pg.he,b=b.split(f).join(""));Nqa(a,P_a(b),c,e);return a}d.K=function(a,b){this.aa=a;this.Xa=b;el.prototype.dq.call(this,b);this.ina=(new Q_a).aE(this);return this};d.VJ=function(){return N_a(this)}; +d.$classData=r({Tza:0},!1,"amf.core.model.domain.ObjectNode",{Tza:1,IY:1,f:1,qd:1,vc:1,tc:1});function Vi(){el.call(this);this.Xa=this.aa=null}Vi.prototype=new BXa;Vi.prototype.constructor=Vi;d=Vi.prototype;d.bc=function(){return Wi()};d.fa=function(){return this.Xa}; +function jha(a,b){var c=Wi().af,e=vs();b=Uh().zj===b?e.fqa:Uh().hi===b?e.oma:Uh().Xo===b?e.RB:Uh().mr===b?e.ana:Uh().Nh===b?e.jka:Uh().of===b?e.Lka:Uh().TC===b?e.Nja:Uh().Mi===b?e.mja:Uh().jo===b?e.vr:Uh().hw===b?e.nC:Uh().tj===b?e.Kja:Uh().NA===b?e.Lja:Uh().Ly===b?e.Ika:Uh().rx===b?e.nja:Uh().MA===b?e.jja:Uh().bB===b?e.coa:Uh().Yr===b?e.aja:Uh().zp===b?e.bja:Uh().aB===b?e.uH:ih(new jh,b,(O(),(new P).a()));Vd(a,c,b)}d.Y=function(){return this.aa}; +function Tia(a,b,c){var e=Wi().vf;Vd(a,e,ih(new jh,b,c))}d.YL=function(a,b,c){return Sia(Fu(),this,a,c)};d.K=function(a,b){this.aa=a;this.Xa=b;el.prototype.dq.call(this,b);return this};d.VJ=function(){var a=pt(this.aa),b=this.Xa;a=(new Vi).K(a,Yi(O(),b));return Rd(a,this.j)};d.$classData=r({$za:0},!1,"amf.core.model.domain.ScalarNode",{$za:1,IY:1,f:1,qd:1,vc:1,tc:1});function n3(){this.j=this.Ke=this.g=null;this.xa=!1}n3.prototype=new u;n3.prototype.constructor=n3;function R_a(){} +d=R_a.prototype=n3.prototype;d.ub=function(a){return Ai(this,a)};d.pc=function(a){return Rd(this,a)};d.dd=function(){var a=B(this.Y(),FY().R).A;a=a.b()?"default-parametrized":a.c();a=(new je).e(a);return"/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.kI=function(){return B(this.g,FY().Aj)};function iRa(a){return B(a.g,FY().te)}d.Zg=function(){return FY().R};d.Sd=function(a){this.j=a};d.K=function(a){this.g=a;return this};function o3(){this.r=this.$=null} +o3.prototype=new u;o3.prototype.constructor=o3;d=o3.prototype;d.H=function(){return"Variable"};d.E=function(){return 2};d.Yd=function(){return this.$};d.h=function(a){return this===a?!0:a instanceof o3?this.$===a.$?this.r===a.r:!1:!1};d.G=function(a){switch(a){case 0:return this.$;case 1:return this.r;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.BI=function(){return this.r};d.z=function(){return X(this)};d.Haa=function(a,b){this.$=a;this.r=b;return this}; +Object.defineProperty(o3.prototype,"value",{get:function(){return this.BI()},configurable:!0});Object.defineProperty(o3.prototype,"name",{get:function(){return this.Yd()},configurable:!0});o3.prototype.$classData=r({jAa:0},!1,"amf.core.model.domain.templates.Variable",{jAa:1,f:1,y:1,v:1,q:1,o:1});function mM(){this.HN=this.IN=null;this.Hm=!1}mM.prototype=new u;mM.prototype.constructor=mM;d=mM.prototype;d.H=function(){return"DeclarationPromise"};d.E=function(){return 3}; +d.h=function(a){if(this===a)return!0;if(a instanceof mM){var b=this.IN,c=a.IN;return(null===b?null===c:b.h(c))&&this.HN===a.HN?this.Hm===a.Hm:!1}return!1};d.G=function(a){switch(a){case 0:return this.IN;case 1:return this.HN;case 2:return this.Hm;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function OAa(a,b,c){a.IN=b;a.HN=c;a.Hm=!1;return a} +d.z=function(){var a=-889275714;a=OJ().Ga(a,NJ(OJ(),this.IN));a=OJ().Ga(a,NJ(OJ(),this.HN));a=OJ().Ga(a,this.Hm?1231:1237);return OJ().fe(a,3)};d.$classData=r({rAa:0},!1,"amf.core.parser.DeclarationPromise",{rAa:1,f:1,y:1,v:1,q:1,o:1});function yha(){this.lj=0;this.Lz=null}yha.prototype=new u;yha.prototype.constructor=yha;d=yha.prototype;d.Ar=function(a,b){WAa(this,a,b)};d.yB=function(a,b){return YAa(this,a,b)};d.Ns=function(a,b,c,e,f,g){a=a.j;var h=Yb().dh;EU(this,a,b,c,e,f,h,g)}; +d.Gc=function(a,b,c,e,f,g,h){EU(this,a,b,c,e,f,g,h)};d.e1=function(a,b){this.lj=a;this.Lz=b;return this};d.$classData=r({uAa:0},!1,"amf.core.parser.DefaultParserSideErrorHandler",{uAa:1,f:1,a7:1,zq:1,Zp:1,Bp:1});function S_a(){this.r=this.Lc=null}S_a.prototype=new u;S_a.prototype.constructor=S_a;d=S_a.prototype;d.H=function(){return"FieldEntry"};function lh(a,b){var c=new S_a;c.Lc=a;c.r=b;return c}d.E=function(){return 2}; +d.h=function(a){if(this===a)return!0;if(a instanceof S_a){var b=this.Lc,c=a.Lc;return(null===b?null===c:b.h(c))?this.r===a.r:!1}return!1};d.G=function(a){switch(a){case 0:return this.Lc;case 1:return this.r;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function T_a(a){var b=ih(new jh,!aj(a.r.r),a.r.r.fa());b=kh(b,a.r.x);return lh(a.Lc,b)}function YX(a){var b=a.r.r.wb;a=w(function(){return function(e){return e}}(a));var c=K();return b.ka(a,c.u)}d.z=function(){return X(this)}; +d.$classData=r({AAa:0},!1,"amf.core.parser.FieldEntry",{AAa:1,f:1,y:1,v:1,q:1,o:1});function p3(){}p3.prototype=new wLa;p3.prototype.constructor=p3;p3.prototype.a=function(){return this};p3.prototype.t=function(){return"FieldEntry"};p3.prototype.ug=function(a,b){return lh(a,b)};p3.prototype.$classData=r({BAa:0},!1,"amf.core.parser.FieldEntry$",{BAa:1,Teb:1,f:1,cra:1,q:1,o:1});var U_a=void 0;function mz(){U_a||(U_a=(new p3).a());return U_a}function kD(){this.da=this.ww=null}kD.prototype=new u; +kD.prototype.constructor=kD;d=kD.prototype;d.H=function(){return"FragmentRef"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof kD){var b=this.ww,c=a.ww;if(null===b?null===c:b.h(c))return b=this.da,a=a.da,null===b?null===a:b.h(a)}return!1};function jD(a,b,c){a.ww=b;a.da=c;return a}d.G=function(a){switch(a){case 0:return this.ww;case 1:return this.da;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.z=function(){return X(this)}; +d.$classData=r({IAa:0},!1,"amf.core.parser.FragmentRef",{IAa:1,f:1,y:1,v:1,q:1,o:1});function Iq(){this.ad=this.$n=this.Jd=null}Iq.prototype=new u;Iq.prototype.constructor=Iq;d=Iq.prototype;d.H=function(){return"ParsedReference"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof Iq){var b=this.Jd,c=a.Jd;(null===b?null===c:b.h(c))?(b=this.$n,c=a.$n,b=null===b?null===c:b.h(c)):b=!1;if(b)return b=this.ad,a=a.ad,null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.Jd;case 1:return this.$n;case 2:return this.ad;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function Hq(a,b,c,e){a.Jd=b;a.$n=c;a.ad=e;return a}d.z=function(){return X(this)};d.$classData=r({NAa:0},!1,"amf.core.parser.ParsedReference",{NAa:1,f:1,y:1,v:1,q:1,o:1});function BU(){this.ms=this.$d=null}BU.prototype=new u;BU.prototype.constructor=BU;function V_a(){}d=V_a.prototype=BU.prototype;d.H=function(){return"Range"};d.E=function(){return 2}; +d.h=function(a){if(this===a)return!0;if(a instanceof BU){var b=this.$d,c=a.$d;if(null===b?null===c:b.h(c))return b=this.ms,a=a.ms,null===b?null===a:b.h(a)}return!1};d.sp=function(){return this.t()};d.G=function(a){switch(a){case 0:return this.$d;case 1:return this.ms;default:throw(new U).e(""+a);}};d.t=function(){return"["+this.$d+"-"+this.ms+"]"};d.fU=function(a,b){this.$d=a;this.ms=b;return this};d.z=function(){return X(this)}; +BU.prototype.contains=function(a){return a.$d.cf>=this.$d.cf&&a.ms.cf<=this.ms.cf};BU.prototype.toString=function(){return this.sp()};BU.prototype.extent=function(a){return(new BU).fU(W_a(this.$d,a.$d),X_a(this.ms,a.ms))};Object.defineProperty(BU.prototype,"end",{get:function(){return this.ms},configurable:!0});Object.defineProperty(BU.prototype,"start",{get:function(){return this.$d},configurable:!0});BU.prototype.$classData=r({Kga:0},!1,"amf.core.parser.Range",{Kga:1,f:1,y:1,v:1,q:1,o:1}); +function Y_a(){this.vg=this.Ca=this.jP=null}Y_a.prototype=new u;Y_a.prototype.constructor=Y_a;d=Y_a.prototype;d.H=function(){return"RefContainer"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof Y_a&&this.jP===a.jP&&Bj(this.Ca,a.Ca)){var b=this.vg;a=a.vg;return null===b?null===a:b.h(a)}return!1};function Z_a(a,b,c){var e=new Y_a;e.jP=a;e.Ca=b;e.vg=c;return e} +d.G=function(a){switch(a){case 0:return this.jP;case 1:return this.Ca;case 2:return this.vg;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.z=function(){return X(this)};d.$classData=r({RAa:0},!1,"amf.core.parser.RefContainer",{RAa:1,f:1,y:1,v:1,q:1,o:1});function LN(){this.Df=null}LN.prototype=new u;LN.prototype.constructor=LN;function $_a(){}d=$_a.prototype=LN.prototype;d.a=function(){this.Df=Rb(Ut(),H());return this};d.H=function(){return"ReferenceCollector"};d.E=function(){return 0}; +d.h=function(a){return a instanceof LN&&!0};d.G=function(a){throw(new U).e(""+a);};d.t=function(){return V(W(),this)};function MN(a,b,c,e){var f=Hha(Lha(),b);if(null===f)throw(new x).d(f);b=f.ma();f=f.ya();var g=a.Df.Ja(b);a:{if(g instanceof z){var h=g.i;if(null!==h){a.Df.jm(b,a0a(h,c,e,f));break a}}if(y()===g)a=a.Df,VLa||(VLa=(new DU).a()),g=K(),c=(new v2).vi(b,J(g,(new Ib).ha([Z_a(c,e,f)]))),a.Xh((new R).M(b,c));else throw(new x).d(g);}}d.z=function(){return X(this)}; +d.$classData=r({Lga:0},!1,"amf.core.parser.ReferenceCollector",{Lga:1,f:1,y:1,v:1,q:1,o:1});function q3(){this.Jd=this.mO=null}q3.prototype=new u;q3.prototype.constructor=q3;d=q3.prototype;d.H=function(){return"ReferenceResolutionResult"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof q3){var b=this.mO,c=a.mO;if(null===b?null===c:b.h(c))return b=this.Jd,a=a.Jd,null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.mO;case 1:return this.Jd;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.bH=function(a,b){this.mO=a;this.Jd=b;return this};d.z=function(){return X(this)};d.$classData=r({XAa:0},!1,"amf.core.parser.ReferenceResolutionResult",{XAa:1,f:1,y:1,v:1,q:1,o:1});function aO(){this.Th=this.Ca=null}aO.prototype=new u;aO.prototype.constructor=aO;d=aO.prototype;d.H=function(){return"ValueNode"};d.E=function(){return 1}; +d.h=function(a){return this===a?!0:a instanceof aO?Bj(this.Ca,a.Ca):!1};d.G=function(a){switch(a){case 0:return this.Ca;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function kOa(a){var b=a.Ca,c=qTa();b=+N(b,c,a.Th);return ih(new jh,b,b0a(a))}d.Vb=function(a,b){this.Ca=a;this.Th=b;return this};d.nf=function(){var a=this.Ca,b=Dd();a=N(a,b,this.Th);return ih(new jh,a,b0a(this))};d.z=function(){return X(this)};function b0a(a){return Od(O(),a.Ca.re())} +d.Zf=function(){var a=this.Ca,b=bc();a=N(a,b,this.Th).va;return ih(new jh,a,b0a(this))};d.mE=function(){var a=this.Ca,b=TAa();a=N(a,b,this.Th)|0;return ih(new jh,a,b0a(this))};d.Up=function(){var a=this.Ca,b=pM();a=!!N(a,b,this.Th);return ih(new jh,a,b0a(this))};d.$classData=r({iBa:0},!1,"amf.core.parser.ValueNode",{iBa:1,f:1,y:1,v:1,q:1,o:1});function c0a(){this.lg=this.RS=this.lC=null}c0a.prototype=new u;c0a.prototype.constructor=c0a;d=c0a.prototype;d.H=function(){return"Node"};d.E=function(){return 3}; +d.h=function(a){if(this===a)return!0;if(a instanceof c0a){if(this.lC===a.lC){var b=this.RS,c=a.RS;b=null===b?null===c:b.h(c)}else b=!1;if(b)return b=this.lg,a=a.lg,null===b?null===a:U2(b,a)}return!1};d.G=function(a){switch(a){case 0:return this.lC;case 1:return this.RS;case 2:return this.lg;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};function VM(a){var b=pd(a.lg);return kz(b).jC(Uc(function(){return function(c,e){c=(new qg).e(c).ja;return 0<(c===e?0:cg.jb()){f=this.m;g=sg().PX;var h=this.Bh.j,k=y();ec(f,g,h,k,"RAML Responses must not have duplicated status codes",c.i.da)}b.U(w(function(l,m){return function(p){return Dg(m,oy(l.m.$h.x2(),p,w(function(t){return function(v){var A=t.Bh.j;J(K(),H());Ai(v,A)}}(l)),!1).EH())}}(this,e)))}b=this.Bh;f=Xh().Al;e=Zr(new $r, +e,Od(O(),c.i));c=Od(O(),c);Rg(b,f,e,c)}Ry(new Sy,this.Bh,a,H(),this.m).hd()}else Q().nd!==a&&(a=this.m,c=sg().r6,e=this.Bh.j,b=b.i,f=y(),ec(a,c,e,f,"Invalid 'describedBy' type, map expected",b.da))}};d.z=function(){return X(this)};d.$classData=r({YOa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlDescribedByParser",{YOa:1,f:1,y:1,v:1,q:1,o:1});function HP(){this.l=this.AT=this.JL=this.Ou=this.Id=null}HP.prototype=new u;HP.prototype.constructor=HP;d=HP.prototype;d.H=function(){return"ValueAndOrigin"}; +d.E=function(){return 4};d.h=function(a){if(this===a)return!0;if(a instanceof HP&&a.l===this.l){if(this.Id===a.Id&&Bj(this.Ou,a.Ou)){var b=this.JL,c=a.JL;b=null===b?null===c:b.h(c)}else b=!1;if(b)return b=this.AT,a=a.AT,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.Id;case 1:return this.Ou;case 2:return this.JL;case 3:return this.AT;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +function UFa(a,b,c,e,f,g){a.Id=c;a.Ou=e;a.JL=f;a.AT=g;if(null===b)throw mb(E(),null);a.l=b;return a}d.z=function(){return X(this)};d.$classData=r({bPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlExternalTypesParser$ValueAndOrigin",{bPa:1,f:1,y:1,v:1,q:1,o:1});function V3(){this.Fa=null}V3.prototype=new ALa;V3.prototype.constructor=V3;V3.prototype.du=function(a,b,c,e){return UFa(new HP,this.Fa,a,b,c,e)};V3.prototype.t=function(){return"ValueAndOrigin"}; +function k4a(a){var b=new V3;if(null===a)throw mb(E(),null);b.Fa=a;return b}V3.prototype.$classData=r({cPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlExternalTypesParser$ValueAndOrigin$",{cPa:1,Ypa:1,f:1,aga:1,q:1,o:1});function l4a(){this.l=this.Jo=this.yw=null}l4a.prototype=new u;l4a.prototype.constructor=l4a;d=l4a.prototype;d.H=function(){return"MixedEmitters"};d.E=function(){return 2}; +d.h=function(a){if(this===a)return!0;if(a instanceof l4a&&a.l===this.l){var b=this.yw,c=a.yw;if(null===b?null===c:b.h(c))return b=this.Jo,a=a.Jo,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.yw;case 1:return this.Jo;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +function m4a(a,b){a.Jo.U(w(function(f,g){return function(h){h.Ob(g)}}(a,b)));if(a.yw.Da()){var c=b.s;b=b.ca;var e=(new rr).e(b);a.yw.U(w(function(f,g){return function(h){h.Qa(g)}}(a,e)));pr(c,mr(T(),tr(ur(),e.s,b),Q().sa))}}d.z=function(){return X(this)};d.$classData=r({iPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlInlinedUnionShapeEmitter$MixedEmitters",{iPa:1,f:1,y:1,v:1,q:1,o:1});function n4a(){this.l=this.ah=this.Ou=this.Id=this.m=null}n4a.prototype=new u; +n4a.prototype.constructor=n4a;d=n4a.prototype;d.H=function(){return"RamlExternalOasLibParser"};d.E=function(){return 4};d.h=function(a){if(this===a)return!0;if(a instanceof n4a&&a.l===this.l){var b=this.m,c=a.m;return(null===b?null===c:b.h(c))&&this.Id===a.Id&&Bj(this.Ou,a.Ou)?this.ah===a.ah:!1}return!1};d.G=function(a){switch(a){case 0:return this.m;case 1:return this.Id;case 2:return this.Ou;case 3:return this.ah;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.hd=function(){var a=Iha((new je).e(this.ah))+(Ed(ua(),this.ah,"/")?"":"/"),b=QG(TG(),this.Id,this.Ou.da.Rf,vF().dl,this.m),c=Cj(b);b=o4a(this.l,this.m,this.Ou);b.mH=(new z).d(c.Fd);oYa(b,c.Fd);var e=(new W3).Tx(Zfa($fa(),$q(new Dc,c,y()),a,"application/json",H(),dBa(),this.Id),b);c=c.Fd;var f=qc(),g=cc().bi;e.wca(N(c,f,g),a+"#/definitions/");b=b.Qh.Oo;a=(new EB).mt(!1,this.m);b=(new Fc).Vd(b);b=lMa(a,b.Sb.Ye().Dd());a=Rb(Ut(),H());e=w(function(){return function(h){return(new R).M(h,Ab(h.fa(),q(p4a)))}}(this)); +c=K();b.ka(e,c.u).U(w(function(h,k){return function(l){if(null!==l){var m=l.ma(),p=l.ya();if(m instanceof vh&&p instanceof z){p=p.i.j;var t=B(m.Y(),qf().R).A;t=t.b()?null:t.c();if(p===t)return l=B(m.Y(),qf().R).A,l=l.b()?null:l.c(),k.Xh((new R).M(l,m))}}if(null!==l&&(m=l.ma(),p=l.ya(),m instanceof vh&&p instanceof z))return l=p.i,p=B(m.Y(),qf().R).A,p=p.b()?null:p.c(),k.Xh((new R).M(p,m)),k.Xh((new R).M(l.j,m));if(null!==l&&(m=l.ma(),p=l.ya(),m instanceof vh&&y()===p))return l=B(m.Y(),qf().R).A,l= +l.b()?null:l.c(),k.Xh((new R).M(l,m));throw(new x).d(l);}}(this,a)));b=this.m.pe();e=this.ah;c=Gb().si;f=UA(new VA,nu());a.U(w(function(h,k){return function(l){return k.jd(l)}}(a,f,c)));b.FT=b.FT.cc((new R).M(e,f.eb))};d.z=function(){return X(this)};d.$classData=r({lPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlJsonSchemaExpression$RamlExternalOasLibParser",{lPa:1,f:1,y:1,v:1,q:1,o:1});function G3(){this.N=this.p=this.Uw=null}G3.prototype=new u;G3.prototype.constructor=G3;d=G3.prototype; +d.H=function(){return"RamlOAuth1SettingsEmitters"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof G3){var b=this.Uw,c=a.Uw;return(null===b?null===c:b.h(c))?this.p===a.p:!1}return!1};d.G=function(a){switch(a){case 0:return this.Uw;case 1:return this.p;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Pa=function(){var a=this.Uw.g,b=J(Ef(),H()),c=hd(a,vZ().zJ);c.b()||(c=c.c(),(new z).d(Dg(b,Yg(Zg(),"requestTokenUri",c,y(),this.N))));c=hd(a,vZ().km);c.b()||(c=c.c(),(new z).d(Dg(b,Yg(Zg(),"authorizationUri",c,y(),this.N))));c=hd(a,vZ().GJ);c.b()||(c=c.c(),(new z).d(Dg(b,Yg(Zg(),"tokenCredentialsUri",c,y(),this.N))));a=hd(a,vZ().DJ);a.b()||(a=a.c(),(new z).d(Dg(b,$x("signatures",a,this.p,!1))));return b};d.k1=function(a,b,c){this.Uw=a;this.p=b;this.N=c;return this};d.z=function(){return X(this)}; +d.$classData=r({tPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlOAuth1SettingsEmitters",{tPa:1,f:1,y:1,v:1,q:1,o:1});function q4a(){this.N=this.p=this.tP=null}q4a.prototype=new u;q4a.prototype.constructor=q4a;d=q4a.prototype;d.H=function(){return"RamlOAuth2SettingsEmitters"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof q4a){var b=this.tP,c=a.tP;return(null===b?null===c:b.h(c))?this.p===a.p:!1}return!1}; +d.G=function(a){switch(a){case 0:return this.tP;case 1:return this.p;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.Pa=function(){var a=this.tP.g,b=J(Ef(),H()),c=B(this.tP.g,xE().Ap).kc();c.b()||(c=c.c(),this.B$(c,b));a=hd(a,xE().Gy);a.b()||(a=a.c(),(new z).d(Dg(b,$x("authorizationGrants",a,this.p,!1))));return b};d.YK=function(a,b,c){this.tP=a;this.p=b;this.N=c;return this};d.z=function(){return X(this)}; +d.B$=function(a,b){a=a.g;var c=hd(a,Jm().km);c.b()||(c=c.c(),(new z).d(Dg(b,$g(new ah,"authorizationUri",c,y()))));c=hd(a,Jm().vq);c.b()||(c=c.c(),(new z).d(Dg(b,Yg(Zg(),"accessTokenUri",c,y(),this.N))));a=hd(a,Jm().lo);a.b()||(a=a.c(),(new z).d(Dg(b,(new r4a).Iaa("scopes",a,this.p))))};d.$classData=r({wPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlOAuth2SettingsEmitters",{wPa:1,f:1,y:1,v:1,q:1,o:1});function Zy(){this.Q=this.p=this.pa=null}Zy.prototype=new u; +Zy.prototype.constructor=Zy;d=Zy.prototype;d.H=function(){return"RamlRecursiveShapeEmitter"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof Zy&&this.pa===a.pa&&this.p===a.p){var b=this.Q;a=a.Q;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.pa;case 1:return this.p;case 2:return this.Q;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Pa=function(){var a=J(Ef(),H());Dg(a,cx(new dx,"type","object",Q().Na,ld()));var b=fh((new je).e("recursive")),c=B(this.pa.aa,Ci().Ys).A;Dg(a,cx(new dx,b,c.b()?null:c.c(),Q().Na,ld()));return a};d.z=function(){return X(this)};d.FO=function(a,b,c){this.pa=a;this.p=b;this.Q=c;return this};d.$classData=r({BPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlRecursiveShapeEmitter",{BPa:1,f:1,y:1,v:1,q:1,o:1});function X3(){this.N=this.p=this.Ba=null}X3.prototype=new u; +X3.prototype.constructor=X3;d=X3.prototype;d.H=function(){return"RamlSecuritySettingsValuesEmitters"};d.SG=function(a,b,c){this.Ba=a;this.p=b;this.N=c;return this};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof X3){var b=this.Ba,c=a.Ba;return(null===b?null===c:b.h(c))?this.p===a.p:!1}return!1};d.G=function(a){switch(a){case 0:return this.Ba;case 1:return this.p;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Pa=function(){var a=this.Ba.r.r,b=J(Ef(),H()),c=a instanceof q1?(new G3).k1(a,this.p,this.N).Pa():a instanceof wE?(new q4a).YK(a,this.p,this.N).Pa():a instanceof bR?d3a(a,this.p).Pa():H();ws(b,c);a=hd(a.Y(),Nm().Dy);a.b()||(a=a.c(),ws(b,iy(new jy,a.r.r,this.p,!1,Rb(Ut(),H()),this.N.hj()).Pa()));return b};d.z=function(){return X(this)};d.$classData=r({JPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlSecuritySettingsValuesEmitters",{JPa:1,f:1,y:1,v:1,q:1,o:1}); +function Y3(){GP.call(this);this.fv=this.Fd=this.se=this.mfa=this.de=this.ra=this.OJ=this.kB=this.Jq=this.Aa=this.HZ=null}Y3.prototype=new N2;Y3.prototype.constructor=Y3;function s4a(){}s4a.prototype=Y3.prototype; +Y3.prototype.HB=function(a,b,c,e,f,g){this.Aa=b;this.Jq=c;this.kB=e;this.OJ=f;this.ra=g;GP.prototype.ss.call(this,g);c=bc();this.de=N(b,c,g).va;if(a instanceof ye)b=g=a.i;else{if(!(a instanceof ve))throw(new x).d(a);b=a.i;g=b.i}this.mfa=(new R).M(b,g);this.se=this.mfa.ma();this.Fd=this.mfa.ya();a=(new Bz).ln(a).pk();a.b()?a=y():(a=a.c(),a=(new z).d(Od(O(),a.Aa)));this.fv=a.b()?(O(),(new P).a()):a.c();return this}; +function t4a(a){var b=wpa(ypa(),a.se);b=Sd(b,a.de,a.fv);a.Jq.P(b);var c=a.se;if(c instanceof Es&&c.i.re()instanceof vw){var e=new u4a;c=c.i.re();e.wa=b;e.Za=c;I2.prototype.EB.call(e,a);e.xV=fca((new EP).GB(!0,!0,!1),b);return I2.prototype.Xi.call(e)}return b} +function v4a(a){var b=a.Fd,c=qc();b=Iw(b,c);if(b instanceof ye)a=w4a(new x4a,a,a.de,a.se,b.i,w(function(e){return function(f){e.Jq.P(f)}}(a))).IV();else{if(!(b instanceof ve))throw(new x).d(b);b=a.Jq;c=tRa(vRa(),a.se);a=b.P(Sd(c,a.de,a.fv))}return a} +Y3.prototype.Cc=function(){zma||(zma=(new ez).a());var a=this.Fd,b=jc(kc(this.Fd),qc());if(b.b())b=y();else{b=b.c();var c=ac((new M).W(b),"format");b=c.b()?ac((new M).W(b),fh((new je).e("format"))):c;b.b()?b=y():(b=b.c(),b=(new z).d(b.i.t()))}b=y4a(z4a("",b,this.OJ,!1,this.Nb()),a);if(b.b())a=y();else{a=b.c();if(hla()===a)a=(new M3).ZK(this.Aa,this.Fd,this.Jq,!0,this.Nb()),a=FP(a);else if(gla()===a)a=(new N3).ZK(this.Aa,this.Fd,this.Jq,!0,this.Nb()),a=FP(a);else if(UHa()===a)a=A4a(this);else if(wca()=== +a)if(a=this.Fd.re(),a instanceof xt){c=this.Jq;var e=(new z).d(this.se);a=$A(c,0,e,!1,this.Nb()).AP(a.va).c();"schema"!==this.de&&"type"!==this.de&&this.Jq.P(Sd(a,this.de,this.fv))}else if(a instanceof vw)a=B4a(this);else throw(new x).d(a);else if(zx()===a)a=this.xca();else if($e()===a||cf()===a||ff()===a)a=B4a(this);else if(Ze()===a)a=v4a(this);else if(yx()===a)a=t4a(this);else if(Lca(a))a=C4a(this,a);else{if(SHa()!==a)throw(new x).d(a);a=this.OJ.gF;a=Lca(a)?C4a(this,a):$e()===a?B4a(this):t4a(this); +a.fa().Lb((new N1).a())}a=(new z).d(a)}a.b()||(c=a.c(),this.Fd.re()instanceof xt&&!b.Ha(SHa())&&(b=(new Z3).a(),Cb(c,b)));e=a;b=this.Fd.re();if(b instanceof vw&&e.na()){c=new B3;e=e.c();var f=this.Nb(),g=this.kB,h=y();c.pa=e;c.X=b;c.m=f;c.gQ=g;c.xP=h;c.hd()}b=this.Fd.re();if(b instanceof vw&&a.na()){c=a.c();if(this.kB.Lw){ii();e=[Zx().H9];f=-1+(e.length|0)|0;for(g=H();0<=f;)g=ji(e[f],g),f=-1+f|0;e=g}else{e=H();ii();f=[Zx().pa,Zx().le,Zx().jk];g=-1+(f.length|0)|0;for(h=H();0<=g;)h=ji(f[g],h),g=-1+ +g|0;f=h;g=ii();e=e.ia(f,g.u)}Ry(new Sy,c,b,e,this.Nb()).hd()}return a}; +function A4a(a){O();var b=(new P).a();b=(new Vh).K((new S).a(),b);b=Sd(b,a.de,a.fv);a.Jq.P(b);var c=a.Fd.re();if(c instanceof xt){wD();var e=mh(T(),"");T();c=(new qg).e(c.va);e=pG(0,e,mh(0,aQ(c,"?")));e=a.Nb().$h.iF().du(e,w(function(g,h){return function(k){return Rd(k,h.j)}}(a,b)),a.kB.Lw,a.OJ).Cc().c()}else{if(!(c instanceof vw))throw(new x).d(c);e=c.sb;c=w(function(g){return function(h){var k=h.Aa,l=bc();return"type"===N(k,l,g.Nb()).va?(wD(),T(),k=mh(T(),"type"),T(),h=h.i,l=bc(),h=N(h,l,g.Nb()).va, +h=(new qg).e(h),h=aQ(h,"?"),pG(0,k,mh(T(),h))):h}}(a));var f=rw();c=e.ka(c,f.sc);wD();e=mh(T(),"");T();ur();f=c.kc();f.b()?f=y():(f=f.c(),f=(new z).d(f.da.Rf));c=tr(0,c,f.b()?"":f.c());T();e=pG(0,e,mr(T(),c,Q().sa));e=a.Nb().$h.iF().du(e,w(function(g,h){return function(k){return Rd(k,h.j)}}(a,b)),a.kB.Lw,a.OJ).Cc().c()}a=K();O();c=(new P).a();c=(new Th).K((new S).a(),c);e=[e,Rd(c,b.j)];a=J(a,(new Ib).ha(e));e=xn().Le;return Zd(b,e,a)} +function C4a(a,b){if(df()===b){var c=PY(QY(),a.se);c=Sd(c,a.de,a.fv);a.Jq.P(c);b=a.Fd.hb().gb;if(Q().sa===b){var e=a.Fd,f=qc();b=new D4a;e=N(e,f,a.Nb());b.wa=c;b.Za=e;I2.prototype.EB.call(b,a);return b.Xi()}return c}c=UY(VY(),a.se);c=Sd(c,a.de,a.fv);a.Jq.P(c);e=a.Fd.hb().gb;if(Q().sa===e){f=a.Fd;var g=qc();e=new E4a;f=N(f,g,a.Nb());e.nq=b;e.wa=c;e.Za=f;I2.prototype.EB.call(e,a);return e.DH()}if(Q().cd===e)return e=a.se,YFa(new JP,a,e,c,y(),a.Nb()).hd(),a=Fg().af,b=ih(new jh,LC(MC(),b),(new P).a()), +e=Od(O(),e),Rg(c,a,b,e),c;e=Fg().af;a=ih(new jh,LC(MC(),b),Od(O(),a.Fd.re()));return Vd(c,e,a)} +function B4a(a){if(F4a(a)){var b=a.Fd.hb().gb;if(Q().Na===b)a=a.Jq,O(),b=(new P).a(),a=a.P((new Wh).K((new S).a(),b));else{if(Q().sa!==b)throw(new x).d(b);a=G4a(a,a.Fd,a.Jq).CH()}return a}b=yRa(ARa(),a.se);b=Sd(b,a.de,a.fv);a.Jq.P(b);var c=a.Fd.hb().gb;if(Q().sa===c){c=a.Fd;var e=qc();return H4a(new I4a,a,b,N(c,e,a.Nb())).Xi()}if(Q().cd===c)return YFa(new JP,a,a.se,b,y(),a.Nb()).hd(),b;if(jc(kc(a.Fd),bc()).na()){c=a.Nb().hp(a.Fd);c instanceof ve?(c=c.i,e=(new R).M(c,fB(a.Nb().pe(),c,Ys(),(new z).d(w(function(m, +p){return function(t){var v=m.Nb(),A=sg().Oy,D=p.j,C=m.Fd,I=y();ec(v,A,D,I,t,C.da)}}(a,b)))))):(c=a.Fd,e=bc(),c=N(c,e,a.Nb()).va,e=(new R).M(c,fB(a.Nb().pe(),c,Zs(),y())));if(null!==e){c=e.ma();var f=e.ya();if(null!==c&&f instanceof z)return c=f.i.Ug(c,Rs(O(),a.Fd)),Sd(c,a.de,a.fv).pc(b.j)}if(null!==e&&(c=e.ma(),null!==c&&(f=ff(),Nh(),Nh(),c=Oh(Nh(),c,"",f,!1),f=$e(),null!==c&&c===f)))return b.Xa.Lb((new xi).a()),b;if(null!==e&&(c=e.ma(),null!==c)){e=wi(new vi,(new S).a(),Od(O(),a.Fd),c,y(),(new z).d(w(function(m, +p){return function(t){var v=db().pf;eb(p,v,t)}}(a,b))),!1);e=Sd(e,c,a.fv);Jb(e,a.Nb());a.Jq.P(e);if(tCa((new je).e(c)))f=!1;else{f=pd(a.Nb().pe().xi).th.Er();for(var g=!1;!g&&f.Ya();){g=f.$a();var h=Mc(ua(),c,"\\.");g=g===zj((new Pc).fd(h))}f=g}if(f){f=a.Nb();g=sg().vR;h=b.j;var k="Chained reference '"+c;a=a.Fd;var l=y();ec(f,g,h,l,k,a.da)}else lB(e,c,a.Fd,a.Nb());a=jb(b,e);b=db().ed;return eb(a,b,c)}throw(new x).d(e);}throw(new x).d(c);} +Y3.prototype.xca=function(){var a=Od(O(),this.Fd);a=(new Vh).K((new S).a(),a);a=Sd(a,this.de,this.fv);this.Jq.P(a);var b=this.Fd.hb().gb;if(Q().sa===b){var c=this.Fd,e=qc();b=new J4a;c=N(c,e,this.Nb());b.Za=c;b.wa=a;I2.prototype.EB.call(b,this);return b.zP()}if(Q().cd===b)YFa(new JP,this,this.se,a,y(),this.Nb()).hd();else{b=this.Nb();c=Wd().dN;e=a.j;var f="Invalid node for union shape '"+this.Fd.t(),g=this.Fd,h=y();ec(b,c,e,h,f,g.da)}return a}; +function F4a(a){var b=a.Fd,c=qc();b=Iw(b,c);if(b instanceof ye)return b=b.i,a=a.uM(b),a.b()?a=!1:(a=a.c().i,c=bc(),a=Iw(a,c),a=a instanceof ye?"file"===a.i.va:!1),a?!0:ac((new M).W(b),"fileTypes").na();if(b instanceof ve)return b=a.Fd,a=bc(),b=Iw(b,a),b instanceof ye?"file"===b.i.va:!1;throw(new x).d(b);}function LP(){this.l=this.pa=this.X=null}LP.prototype=new u;LP.prototype.constructor=LP;d=LP.prototype;d.H=function(){return"AndConstraintParser"};d.E=function(){return 2}; +d.h=function(a){if(this===a)return!0;if(a instanceof LP&&a.l===this.l&&Bj(this.X,a.X)){var b=this.pa;a=a.pa;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.X;case 1:return this.pa;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.TK=function(a,b,c){this.X=b;this.pa=c;if(null===a)throw mb(E(),null);this.l=a;return this}; +d.hd=function(){var a=(new M).W(this.X),b=fh((new je).e("and"));a=ac(a,b);if(!a.b()){a=a.c();b=a.i;var c=lc();b=Iw(b,c);if(b instanceof ye){b=b.i;c=K();b=b.og(c.u);c=w(function(g){return function(h){if(null!==h){var k=h.ma();h=h.Ki();return nD(g.l.hQ(),(ue(),(new ye).d(k)),"item"+h,w(function(l,m){return function(p){return p.ub(l.pa.j+"/and/"+m,lt())}}(g,h)),g.l.kB.Lw,vP()).Cc()}throw(new x).d(h);}}(this));var e=K();b=b.ka(c,e.u).Cb(w(function(){return function(g){return g.na()}}(this)));c=w(function(){return function(g){return g.c()}}(this)); +e=K();b=b.ka(c,e.u);c=this.pa;e=qf().fi;a=Od(O(),a.i);bs(c,e,b,a)}else{b=this.l.Nb();c=sg().iY;e=this.pa.j;var f=y();ec(b,c,e,f,"And constraints are built from multiple shape nodes",a.da)}}};d.z=function(){return X(this)};d.$classData=r({XPa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlTypeParser$AndConstraintParser",{XPa:1,f:1,y:1,v:1,q:1,o:1});function x4a(){this.l=this.yb=this.X=this.ad=this.$=null}x4a.prototype=new u;x4a.prototype.constructor=x4a;d=x4a.prototype;d.H=function(){return"DataArrangementParser"}; +d.E=function(){return 4};d.h=function(a){if(this===a)return!0;if(a instanceof x4a&&a.l===this.l){if(this.$===a.$){var b=this.ad,c=a.ad;b=null===b?null===c:b.h(c)}else b=!1;if(b&&Bj(this.X,a.X))return b=this.yb,a=a.yb,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.$;case 1:return this.ad;case 2:return this.X;case 3:return this.yb;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.IV=function(){var a=ac((new M).W(this.X),fh((new je).e("tuple")));if(a instanceof z){a=a.i.i;var b=lc();if(Iw(a,b)instanceof ye)ue(),a=GRa(IRa(),this.ad),a=Sd(a,this.$,this.l.fv),a=(new ve).d(a);else{a=GRa(IRa(),this.ad);a=Sd(a,this.$,this.l.fv);b=this.l.Nb();var c=sg().u6,e=a.j,f=this.ad,g=y();ec(b,c,e,g,"Tuples must have a list of types",f.da);ue();a=(new ve).d(a)}}else if(y()===a)ue(),a=tRa(vRa(),this.ad),a=Sd(a,this.$,this.l.fv),a=(new ye).d(a);else throw(new x).d(a);if(a instanceof ve)return b= +K4a,c=this.l,e=this.X,f=this.yb,g=new L4a,g.wa=a.i,g.Za=e,g.eh=f,I2.prototype.EB.call(g,c),b(g);if(a instanceof ye)return b=this.l,c=this.X,e=this.yb,f=new M4a,f.wa=a.i,f.Za=c,f.eh=e,I2.prototype.EB.call(f,b),f.Xi();throw(new x).d(a);};function w4a(a,b,c,e,f,g){a.$=c;a.ad=e;a.X=f;a.yb=g;if(null===b)throw mb(E(),null);a.l=b;return a}d.z=function(){return X(this)}; +d.$classData=r({aQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlTypeParser$DataArrangementParser",{aQa:1,f:1,y:1,v:1,q:1,o:1});function NP(){this.l=this.pa=this.X=null}NP.prototype=new u;NP.prototype.constructor=NP;d=NP.prototype;d.H=function(){return"NotConstraintParser"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof NP&&a.l===this.l&&Bj(this.X,a.X)){var b=this.pa;a=a.pa;return null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.X;case 1:return this.pa;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.TK=function(a,b,c){this.X=b;this.pa=c;if(null===a)throw mb(E(),null);this.l=a;return this}; +d.hd=function(){var a=(new M).W(this.X),b=fh((new je).e("not"));a=ac(a,b);if(!a.b()&&(a=a.c(),b=nD(this.l.hQ(),(ue(),(new ve).d(a)),"not",w(function(f){return function(g){return Rd(g,f.pa.j+"/not")}}(this)),!1,this.l.OJ).Cc(),b instanceof z)){b=b.i;var c=this.pa,e=qf().Bi;a=Od(O(),a.i);Rg(c,e,b,a)}};d.z=function(){return X(this)};d.$classData=r({fQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlTypeParser$NotConstraintParser",{fQa:1,f:1,y:1,v:1,q:1,o:1}); +function KP(){this.l=this.pa=this.X=null}KP.prototype=new u;KP.prototype.constructor=KP;d=KP.prototype;d.H=function(){return"OrConstraintParser"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof KP&&a.l===this.l&&Bj(this.X,a.X)){var b=this.pa;a=a.pa;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.X;case 1:return this.pa;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.TK=function(a,b,c){this.X=b;this.pa=c;if(null===a)throw mb(E(),null);this.l=a;return this}; +d.hd=function(){var a=(new M).W(this.X),b=fh((new je).e("or"));a=ac(a,b);if(!a.b()){a=a.c();b=a.i;var c=lc();b=Iw(b,c);if(b instanceof ye){b=b.i;c=K();b=b.og(c.u);c=w(function(g){return function(h){if(null!==h){var k=h.ma();h=h.Ki();return nD(g.l.hQ(),(ue(),(new ye).d(k)),"item"+h,w(function(l,m){return function(p){return p.ub(l.pa.j+"/or/"+m,lt())}}(g,h)),g.l.kB.Lw,vP()).Cc()}throw(new x).d(h);}}(this));var e=K();b=b.ka(c,e.u).Cb(w(function(){return function(g){return g.na()}}(this)));c=w(function(){return function(g){return g.c()}}(this)); +e=K();b=b.ka(c,e.u);c=this.pa;e=qf().ki;a=Od(O(),a.i);bs(c,e,b,a)}else{b=this.l.Nb();c=sg().nY;e=this.pa.j;var f=y();ec(b,c,e,f,"Or constraints are built from multiple shape nodes",a.da)}}};d.z=function(){return X(this)};d.$classData=r({gQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlTypeParser$OrConstraintParser",{gQa:1,f:1,y:1,v:1,q:1,o:1});function OP(){this.l=this.xb=this.ad=null}OP.prototype=new u;OP.prototype.constructor=OP;d=OP.prototype;d.H=function(){return"PropertiesParser"}; +d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof OP&&a.l===this.l&&Bj(this.ad,a.ad)){var b=this.xb;a=a.xb;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.ad;case 1:return this.xb;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Vg=function(){var a=this.ad.sb,b=w(function(e){return function(f){var g=e.l,h=e.xb,k=new N4a;k.tb=f;k.xb=h;if(null===g)throw mb(E(),null);k.l=g;return k.Cc().ua()}}(this)),c=rw();return a.bd(b,c.sc)};function ZFa(a,b,c,e){a.ad=c;a.xb=e;if(null===b)throw mb(E(),null);a.l=b;return a}d.z=function(){return X(this)};d.$classData=r({hQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlTypeParser$PropertiesParser",{hQa:1,f:1,y:1,v:1,q:1,o:1});function N4a(){this.l=this.xb=this.tb=null} +N4a.prototype=new u;N4a.prototype.constructor=N4a;d=N4a.prototype;d.H=function(){return"PropertyShapeParser"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof N4a&&a.l===this.l&&this.tb===a.tb){var b=this.xb;a=a.xb;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.tb;case 1:return this.xb;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Cc=function(){var a=Kc(this.tb.Aa);if(a instanceof z){var b=a.i.va;a=this.xb.P(b);var c=Od(O(),this.tb);a=Db(a,c);if(0<=(b.length|0)&&"/"===b.substring(0,1)&&Ed(ua(),b,"/"))if("//"===b)c=Qi().cv,eb(a,c,"^.*$");else{c=(new qg).e(b);var e=c.ja.length|0;c=gh(hh(),c.ja,1,e);c=(new qg).e(c);c=c.np(0,c.Oa()-1|0);e=Qi().cv;eb(a,e,c)}c=jc(kc(this.tb.i),qc());if(c instanceof z){c=c.i;e=ac((new M).W(c),"required");if(!e.b()){var f=e.c(),g=!!(new Qg).Vb(f.i,this.l.Nb()).Up().r;e=Qi().ji;g=ih(new jh,g?1:0, +(new P).a());f=Od(O(),f).Lb((new xi).a());Rg(a,e,g,f)}c=(new M).W(c);e=fh((new je).e("readOnly"));f=this.l;g=Qi().cl;Gg(c,e,Hg(Ig(f,g,this.l.Nb()),a))}c=Qi().Uf;e=F().Pg;f=this.tb.Aa;g=bc();f=N(f,g,this.l.Nb()).va;f=(new je).e(f);f=jj(f.td);e=ih(new jh,ic(G(e,f)),Od(O(),this.tb.Aa));Vd(a,c,e);cs(a.aa,Qi().ji).b()&&(B(a.aa,Qi().cv).A.na()?(b=Qi().ji,es(a,b,0)):(e=!Ed(ua(),b,"?"),c=Qi().ji,es(a,c,e?1:0),c=Qi().R,e||(b=(new qg).e(b),b=aQ(b,"?"),b=(new qg).e(b),b=Wp(b,"/"),b=(new qg).e(b),b=aQ(b,"/")), +eb(a,c,b),b=Qi().Uf,c=F().Pg,e=this.tb.Aa,f=bc(),e=N(e,f,this.l.Nb()).va,e=(new qg).e(e),e=aQ(e,"?"),eb(a,b,ic(G(c,e)))));b=PW(QW(),this.tb,w(function(h,k){return function(l){return l.ub(k.j,lt())}}(this,a)),RW(!1,!0),QP(),this.l.Nb()).Cc();b.b()||(b=b.c(),c=this.tb.i.hb().gb,e=Q().nd,c===e&&b.fa().Lb((new Xz).a()),c=Qi().Vf,Vd(a,c,b));return(new z).d(a)}if(y()===a)return a=this.l.Nb(),b=sg().n6,c=this.tb.Aa,e=y(),ec(a,b,"",e,"Invalid property name",c.da),y();throw(new x).d(a);};d.z=function(){return X(this)}; +d.$classData=r({iQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlTypeParser$PropertyShapeParser",{iQa:1,f:1,y:1,v:1,q:1,o:1});function MP(){this.l=this.pa=this.X=null}MP.prototype=new u;MP.prototype.constructor=MP;d=MP.prototype;d.H=function(){return"XoneConstraintParser"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof MP&&a.l===this.l&&Bj(this.X,a.X)){var b=this.pa;a=a.pa;return null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.X;case 1:return this.pa;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.TK=function(a,b,c){this.X=b;this.pa=c;if(null===a)throw mb(E(),null);this.l=a;return this}; +d.hd=function(){this.l.Jq.P(this.pa);var a=(new M).W(this.X),b=fh((new je).e("xor"));a=ac(a,b);if(!a.b()){a=a.c();b=a.i;var c=lc();b=Iw(b,c);if(b instanceof ye){b=b.i;c=K();b=b.og(c.u);c=w(function(g){return function(h){if(null!==h){var k=h.ma();h=h.Ki();return nD(g.l.hQ(),(ue(),(new ye).d(k)),"item"+h,w(function(l,m){return function(p){return p.ub(l.pa.j+"/xor/"+m,lt())}}(g,h)),g.l.kB.Lw,vP()).Cc()}throw(new x).d(h);}}(this));var e=K();b=b.ka(c,e.u).Cb(w(function(){return function(g){return g.na()}}(this))); +c=w(function(){return function(g){return g.c()}}(this));e=K();b=b.ka(c,e.u);c=this.pa;e=qf().li;a=Od(O(),a.i);bs(c,e,b,a)}else{b=this.l.Nb();c=sg().uY;e=this.pa.j;var f=y();ec(b,c,e,f,"Xone constraints are built from multiple shape nodes",a.da)}}};d.z=function(){return X(this)};d.$classData=r({nQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.RamlTypeParser$XoneConstraintParser",{nQa:1,f:1,y:1,v:1,q:1,o:1});function EX(){this.m=this.Q=null}EX.prototype=new u; +EX.prototype.constructor=EX;d=EX.prototype;d.H=function(){return"ReferenceDeclarations"};d.E=function(){return 1};d.h=function(a){if(this===a)return!0;if(a instanceof EX){var b=this.Q;a=a.Q;return null===b?null===a:U2(b,a)}return!1};d.G=function(a){switch(a){case 0:return this.Q;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Ht=function(a,b){this.Q.Xh((new R).M(a,b));var c=lFa(this.m.Dl(),a);if(b instanceof ad||b instanceof $3)this.m.Dl().dca=this.m.Dl().dca.cc((new R).M(a,b));else if(Zc(b))b.tk().U(w(function(e,f){return function(g){return $h(f,g)}}(this,c)));else throw(new x).d(b);};function O4a(a){a=a.Q.Ur().xg();return kz(a)}d.z=function(){return X(this)};d.$classData=r({uQa:0},!1,"amf.plugins.document.webapi.parser.spec.declaration.ReferenceDeclarations",{uQa:1,f:1,y:1,v:1,q:1,o:1}); +function P4a(){this.m=this.Q=this.X=this.la=this.wf=null}P4a.prototype=new u;P4a.prototype.constructor=P4a;d=P4a.prototype;d.H=function(){return"ReferencesParser"};d.E=function(){return 4}; +function pz(a,b){b=Q4a(a,b);a.Q.U(w(function(c,e){return function(f){a:{if(null!==f){var g=f.Jd,h=f.$n;if(Kk(g)&&null!==h){f=h.Of;e.Q.Xh((new R).M(f,g));h=e.m.Dl();var k=h.ij;g=jD(new kD,g.qe(),Lc(g));h.ij=k.cc((new R).M(f,g));break a}}if(null!==f&&(g=f.Jd,h=f.$n,g instanceof mf&&null!==h)){e.Q.Xh((new R).M(h.Of,g));break a}null!==f&&(g=f.Jd,f=f.$n,(g instanceof ad||g instanceof $3)&&null!==f&&e.Ht(f.Of,g))}}}(a,b)));return b} +d.h=function(a){if(this===a)return!0;if(a instanceof P4a){var b=this.wf,c=a.wf;if((null===b?null===c:b.h(c))&&this.la===a.la&&Bj(this.X,a.X))return b=this.Q,a=a.Q,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.wf;case 1:return this.la;case 2:return this.X;case 3:return this.Q;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.rM=function(a){a=this.Q.Fb(w(function(b,c){return function(e){return e.$n.Of===c}}(this,a)));if(a.b())return y();a=a.c();return(new z).d(a.Jd)}; +function qz(a,b,c,e,f){var g=new P4a;g.wf=a;g.la=b;g.X=c;g.Q=e;g.m=f;return g}d.oG=function(a,b){var c=Ab(a.fa(),q(Rc));if(c instanceof z){c=c.i;var e=a.fa(),f=e.hf;Ef();var g=Jf(new Kf,(new Lf).a());for(f=f.Dc;!f.b();){var h=f.ga();!1!==!(h instanceof tB)&&Of(g,h);f=f.ta()}e.hf=g.eb;b=c.Xb.Zj(b);b=(new tB).hk(b);return Cb(a,b)}if(y()===c){b=[b];if(0===(b.length|0))b=vd();else{c=wd(new xd,vd());e=0;for(g=b.length|0;ea.oL)throw(new M4).a();CJa(a.UN,b);return a}d.z=function(){var a=-889275714;a=OJ().Ga(a,this.oL);return OJ().fe(a,1)};Ip.prototype.append=function(a){return EJa(this,a)}; +Ip.prototype.toString=function(){return this.sp()};Object.defineProperty(Ip.prototype,"length",{get:function(){return this.UN.Oa()},configurable:!0});Object.defineProperty(Ip.prototype,"limit",{get:function(){return this.oL},configurable:!0});Ip.prototype.$classData=r({k3a:0},!1,"org.mulesoft.common.io.LimitedStringBuffer",{k3a:1,f:1,y:1,v:1,q:1,o:1});function DN(){this.Oz=this.mA=this.JA=0;this.Et=this.Bt=null}DN.prototype=new u;DN.prototype.constructor=DN;d=DN.prototype;d.H=function(){return"SimpleDateTime"}; +d.E=function(){return 5};d.h=function(a){if(this===a)return!0;if(a instanceof DN){if(this.JA===a.JA&&this.mA===a.mA&&this.Oz===a.Oz){var b=this.Bt,c=a.Bt;b=null===b?null===c:b.h(c)}else b=!1;if(b)return b=this.Et,a=a.Et,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.JA;case 1:return this.mA;case 2:return this.Oz;case 3:return this.Bt;case 4:return this.Et;default:throw(new U).e(""+a);}}; +d.t=function(){var a=this.JA,b=this.mA,c=this.Oz,e=(new qg).e("%04d-%02d-%02d");b=[a,b,c];ua();e=e.ja;K();vk();a=[];c=0;for(var f=b.length|0;cc||12e||31a||24b||60c||60e||999999999this.bC?this.jQ.$a():$B().ce.$a()};function p9a(a,b){if(0>a.bC)return-1;a=a.bC-b|0;return 0>a?0:a}xT.prototype.iC=function(a,b){a=0b)b=p9a(this,a);else if(b<=a)b=0;else if(0>this.bC)b=b-a|0;else{var c=p9a(this,a);b=b-a|0;b=c=this.kH)throw(new iL).e("next on empty iterator");for(var a=this.Tj;;){if(this.Tjb.cf||a.cf===b.cf&&a.Dg>=b.Dg?a:b}d.z=function(){var a=-889275714;a=OJ().Ga(a,this.cf);a=OJ().Ga(a,this.Dg);return OJ().fe(a,2)};CU.prototype.toString=function(){return this.sp()};Object.defineProperty(CU.prototype,"isZero",{get:function(){return this.Yx()},configurable:!0});CU.prototype.compareTo=function(a){return this.ID(a)};CU.prototype.max=function(a){return X_a(this,a)}; +CU.prototype.min=function(a){return W_a(this,a)};CU.prototype.lt=function(a){return 0>this.ID(a)};Object.defineProperty(CU.prototype,"column",{get:function(){return this.Dg},configurable:!0});Object.defineProperty(CU.prototype,"line",{get:function(){return this.cf},configurable:!0});CU.prototype.$classData=r({Jga:0},!1,"amf.core.parser.Position",{Jga:1,f:1,ym:1,y:1,v:1,q:1,o:1});function Wab(){BU.call(this)}Wab.prototype=new V_a;Wab.prototype.constructor=Wab; +Wab.prototype.a=function(){BU.prototype.fU.call(this,ld(),ld());return this};Wab.prototype.$classData=r({QAa:0},!1,"amf.core.parser.Range$NONE$",{QAa:1,Kga:1,f:1,y:1,v:1,q:1,o:1});var Xab=void 0;function rfa(){Xab||(Xab=(new Wab).a());return Xab}function v2(){this.ea=this.Df=this.Of=null}v2.prototype=new u;v2.prototype.constructor=v2;d=v2.prototype;d.vi=function(a,b){this.Of=a;this.Df=b;this.ea=nv().ea;return this};d.H=function(){return"Reference"};d.E=function(){return 2}; +function a0a(a,b,c,e){var f=a.Df;b=Z_a(b,c,e);c=K();f=f.yg(b,c.u);return(new v2).vi(a.Of,f)}d.h=function(a){if(this===a)return!0;if(a instanceof v2&&this.Of===a.Of){var b=this.Df;a=a.Df;return null===b?null===a:b.h(a)}return!1}; +function Yab(a,b){yq(zq(),"AMFCompiler#parserReferences: Recursive reference "+b);var c=a.ea,e=fp();return Vfa(c,b,e).Yg(w(function(f,g){return function(h){var k=(new u2).K((new S).a(),(O(),(new P).a()));k=Rd(k,g);var l=Bq().uc;k=eb(k,l,g);h=h.hx.t();Kfa(k,h);return k}}(a,b)),ml())}d.G=function(a){switch(a){case 0:return this.Of;case 1:return this.Df;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +function Zab(a,b,c,e,f,g){if(b instanceof bg)e.Ha(wM())&&e.Ha(yM())?f.U(w(function(l,m,p){return function(t){var v=dc().CR,A=p.j,D=y();ec(m,v,A,D,"The !include tag must be avoided when referencing a library",t.da)}}(a,g,b))):wM()!==c&&f.U(w(function(l,m,p){return function(t){var v=dc().CR,A=p.j,D=y();ec(m,v,A,D,"Libraries must be applied by using 'uses'",t.da)}}(a,g,b)));else{a:{for(e=b.bc().Kb();!e.b();){var h=ic(e.ga()),k=F().$c.he;if(-1!==(h.indexOf(k)|0)){e=!0;break a}e=e.ta()}e=!1}e||wM()=== +c&&f.U(w(function(l,m,p){return function(t){var v=dc().lY,A=p.j,D=y();ec(m,v,A,D,"Fragments must be imported by using '!include'",t.da)}}(a,g,b)))}}function bga(a,b,c,e,f,g,h){var k=f.NH;if(k instanceof z)return k.i.JT(mia(b,Kq(a.Of))).Pq(w(function(l){return function(m){return nq(hp(),oq(function(p,t){return function(){return(new q3).bH(y(),(new z).d(t.ur))}}(l,m)),ml())}}(a)),ml()).YV($ab(a,b,c,e,f,g,h),ml());if(y()===k)return abb(a,b,c,e,f,g,h);throw(new x).d(k);} +function abb(a,b,c,e,f,g,h){var k=a.Df,l=w(function(){return function(p){return p.jP}}(a)),m=K();k=k.ka(l,m.u).fj();l=1l.jb()){k= +a.m;l=sg().PX;var m=c.j,p=y();ec(k,l,m,p,"RAML Responses must not have duplicated status codes",f.i.da)}h.U(w(function(t,v,A){return function(D){return Dg(v,oy(t.m.$h.x2(),D,w(function(C,I){return function(L){var Y=I.j;J(K(),H());Ai(L,Y)}}(t,A)),t.tn).EH())}}(a,g,c)))}k=B(c.g,Pl().Al);h=Pl().Al;g=ws((new Lf).a(),g);k=k.Hd();g=Zr(new $r,ws(g,k),Od(O(),f.i));f=Od(O(),f);Rg(c,h,g,f)}f=(new Nd).a();f=w(function(t,v,A){return function(D){wGa();return xGa(yGa(D,v,A,t.m))}}(a,w(function(t,v){return function(A){return v.mI(A)}}(a, +c)),f));g=(new M).W(b);h=Pl().dc;Gg(g,"securedBy",sP(Gy(Hg(Ig(a,h,a.m),c),f)));f=(new M).W(b);g=Pl().Va;Gg(f,"description",nh(Hg(Ig(a,g,a.m),c)));if(e){ii();e=[Zx().Aea];f=-1+(e.length|0)|0;for(g=H();0<=f;)g=ji(e[f],g),f=-1+f|0;e=g}else{ii();e=[Zx().Kl];f=-1+(e.length|0)|0;for(g=H();0<=f;)g=ji(e[f],g),f=-1+f|0;e=g}Ry(new Sy,c,b,e,a.m).hd();return c}d.$classData=r({aTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.RamlOperationParser",{aTa:1,f:1,sg:1,y:1,v:1,q:1,o:1}); +function r4(){this.kd=this.cja=this.m=this.Bh=this.ba=this.X=null}r4.prototype=new u;r4.prototype.constructor=r4;d=r4.prototype;d.H=function(){return"RamlSecuritySettingsParser"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof r4&&Bj(this.X,a.X)&&this.ba===a.ba){var b=this.Bh;a=a.Bh;return null===b?null===a:b.h(a)}return!1}; +function Ydb(a,b,c){c=a.X.sb.Si(w(function(h,k){return function(l){l=l.Aa;var m=bc();l=N(l,m,h.m).va;return k.Ha(l)||Bla(Px(),l)}}(a,c)));if(tc(c)){T();ur();var e=c.kc();e.b()?e=y():(e=e.c(),e=(new z).d(e.da.Rf));c=tr(0,c,e.b()?"":e.c());c=mr(T(),c,Q().sa);e=(new z).d(b.j);var f=(new ox).a(),g=(new Nd).a();a=px(c,f,e,g,a.m).Fr();c=Nm().Dy;Vd(b,c,a)}return b}d.G=function(a){switch(a){case 0:return this.X;case 1:return this.ba;case 2:return this.Bh;default:throw(new U).e(""+a);}}; +function S5a(a){var b=a.ba;if("OAuth 1.0"===b){b=a.Bh.cX();var c=(new M).W(a.X),e=vZ().zJ;Gg(c,"requestTokenUri",nh(Hg(Ig(a,e,a.m),b)));c=(new M).W(a.X);e=vZ().km;Gg(c,"authorizationUri",nh(Hg(Ig(a,e,a.m),b)));c=(new M).W(a.X);e=vZ().GJ;Gg(c,"tokenCredentialsUri",nh(Hg(Ig(a,e,a.m),b)));c=(new M).W(a.X);e=vZ().DJ;Gg(c,"signatures",Hg(Ig(a,e,a.m),b));b=Ydb(a,b,(new Ib).ha(["requestTokenUri","authorizationUri","tokenCredentialsUri","signatures"]))}else"OAuth 2.0"===b?b=Zdb(a):a.cja===b?(b=a.Bh.mQ(), +c=(new M).W(a.X),e=aR().R,Gg(c,"name",Hg(Ig(a,e,a.m),b)),c=(new M).W(a.X),e=aR().Ny,Gg(c,"in",Hg(Ig(a,e,a.m),b)),b=Ydb(a,b,(new Ib).ha(["name","in"]))):(b=a.Bh.aX(),b=Ydb(a,b,(new Ib).ha([])));c=a.X;ii();e=[Zx().Xda];for(var f=-1+(e.length|0)|0,g=H();0<=f;)g=ji(e[f],g),f=-1+f|0;Ry(new Sy,b,c,g,a.m).hd();a=Od(O(),a.X);return Db(b,a)}d.t=function(){return V(W(),this)}; +function Zdb(a){var b=a.Bh.pQ(),c=(new Nv).PG(oq(function(h,k){return function(){var l=vSa(xSa(),h.X),m=k.j;J(K(),H());return Ai(l,m)}}(a,b))),e=ac((new M).W(a.X),"authorizationUri");if(!e.b()){e=e.c();var f=Jm().km;qP(Hg(Ig(a,f,a.m),Ov(c)),e)}e=ac((new M).W(a.X),"accessTokenUri");e.b()||(e=e.c(),f=Jm().vq,qP(nh(Hg(Ig(a,f,a.m),Ov(c))),e));e=(new M).W(a.X);f=fh((new je).e("flow"));e=ac(e,f);e.b()||(e=e.c(),f=Jm().Wv,qP(Hg(Ig(a,f,a.m),Ov(c)),e));e=(new M).W(a.X);f=xE().Gy;Gg(e,"authorizationGrants", +sP(Hg(Ig(a,f,a.m),b)));e=w(function(h,k){return function(l){var m=(new Qg).Vb(l,h.m).Zf(),p=h.Bh;if(p instanceof jm){var t=!1,v=B(B(p.g,im().Eq).g,Xh().Oh);if(v instanceof wE){t=!0;v=B(v.g,xE().Ap).kc();if(v.b())v=!1;else{v=B(v.c().g,Jm().lo);var A=w(function(){return function(C){C=B(C.g,Gm().R).A;return C.b()?null:C.c()}}(h)),D=K();v=v.ka(A,D.u).Ha(m.t())}if(v)return O(),p=(new P).a(),p=(new Hm).K((new S).a(),p),m=Gm().R,l=(new Qg).Vb(l,h.m).Zf(),l=Vd(p,m,l),p=Ov(k).j,J(K(),H()),Ai(l,p)}if(t)return O(), +t=(new P).a(),t=(new Hm).K((new S).a(),t),v=Ov(k).j,J(K(),H()),t=Ai(t,v),v=h.m,A=sg().p8,D=t.j,m=m.t(),p=B(B(p.g,im().Eq).g,Xh().R).A,p="Scope '"+m+"' not found in settings of declared secured by "+(p.b()?null:p.c())+".",m=y(),ec(v,A,D,m,p,l.da),t;O();p=(new P).a();p=(new Hm).K((new S).a(),p);m=Gm().R;l=(new Qg).Vb(l,h.m).Zf();l=Vd(p,m,l);p=Ov(k).j;J(K(),H());return Ai(l,p)}O();p=(new P).a();p=(new Hm).K((new S).a(),p);m=Gm().R;l=(new Qg).Vb(l,h.m).Zf();l=Vd(p,m,l);p=Ov(k).j;J(K(),H());return Ai(l, +p)}}(a,c));f=ac((new M).W(a.X),"scopes");if(!f.b()){f=f.c();var g=Jm().lo;qP(sP(Gy(Hg(Ig(a,g,a.m),Ov(c)),e)),f)}c=c.r;c.b()||(e=c.c(),c=xE().Ap,e=J(K(),(new Ib).ha([e])),Zd(b,c,e));return Ydb(a,b,(new Ib).ha(["authorizationUri","accessTokenUri","authorizationGrants","scopes"]))}d.rk=function(){null===this.kd&&SP(this);return this.kd};d.z=function(){return X(this)};function T5a(a,b,c,e,f){a.X=b;a.ba=c;a.Bh=e;a.m=f;a.cja=jx((new je).e("apiKey"));return a} +d.$classData=r({tTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.RamlSecuritySettingsParser",{tTa:1,f:1,sg:1,y:1,v:1,q:1,o:1});function $db(){this.kd=this.m=this.qo=this.X=null}$db.prototype=new u;$db.prototype.constructor=$db; +function aeb(a,b,c){var e=ac((new M).W(a.X),"baseUriParameters");if(e instanceof z){e=e.i;var f=e.i.hb().gb;if(Q().sa===f){f=e.i;var g=qc();f=T3(new U3,N(f,g,a.m),w(function(k,l){return function(m){var p=l.j;J(K(),H());Ai(m,p)}}(a,b)),a.m).Vg();g=w(function(){return function(k){var l=cj().We;return eb(k,l,"path")}}(a));var h=K();f=f.ka(g,h.u);g=w(function(k,l,m){return function(p){var t=l.Fb(w(function(v,A){return function(D){D=B(D.g,cj().R).A;return(D.b()?null:D.c())===A}}(k,p)));return t instanceof +z?t.i:beb(p,m.j)}}(a,f,b));h=K();g=c.ka(g,h.u);c=f.Dm(w(function(k,l){return function(m){return l.Ha(m)}}(a,g)));if(null===c)throw(new x).d(c);c=c.ya();f=K();g=g.ia(c,f.u);f=Yl().Aj;g=Zr(new $r,g,Od(O(),e.i));e=Od(O(),e);Rg(b,f,g,e);c.U(w(function(k){return function(l){var m=k.m,p=sg().HJ,t=l.j,v=y(),A=B(l.g,cj().R).A;m.Ns(p,t,v,"Unused base uri parameter "+(A.b()?null:A.c()),Ab(l.x,q(jd)),yb(l))}}(a)))}else Q().nd!==f&&(b=a.m,a=sg().a6,e=e.i,c=y(),ec(b,a,"",c,"Invalid node for baseUriParameters", +e.da))}else if(y()===e)c.Da()&&(e=Yl().Aj,a=w(function(k,l){return function(m){return beb(m,l.j)}}(a,b)),f=K(),a=Zr(new $r,c.ka(a,f.u),(O(),(new P).a())),O(),c=(new P).a(),Rg(b,e,a,c));else throw(new x).d(e);}d=$db.prototype;d.H=function(){return"RamlServersParser"};d.E=function(){return 2};function ceb(a,b,c){var e=new $db;e.X=a;e.qo=b;e.m=c;return e} +function beb(a,b){O();var c=(new P).a();c=(new Wl).K((new S).a(),c);O();var e=(new P).a();c=Sd(c,a,e);e=cj().We;c=eb(c,e,"path");e=cj().yj;c=Bi(c,e,!0);J(K(),H());Ai(c,b);a=c.dX(a);b=Uh().zj;e=Fg().af;eb(a,e,b);c.x.Lb((new Xz).a());return c}d.h=function(a){if(this===a)return!0;if(a instanceof $db&&Bj(this.X,a.X)){var b=this.qo;a=a.qo;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.X;case 1:return this.qo;default:throw(new U).e(""+a);}}; +d.t=function(){return V(W(),this)};d.rk=function(){null===this.kd&&SP(this);return this.kd}; +d.hd=function(){var a=ac((new M).W(this.X),"baseUri");if(a instanceof z){a=a.i;var b=zla(Cla(),a.i,this.m).Zf().t(),c=this.qo.CM(b),e=Yl().Pf;qP(nh(Hg(Ig(this,e,this.m),c)),a);e=a.i;var f=c.j,g=ic(Yl().Pf.r);bca(b,e,f,g,this.m);if(!Cja(Yv(),b)){e=this.m;f=sg().s6;g=this.qo.j;var h=Bja(Yv(),b),k=a.i,l=y();ec(e,f,g,l,h,k.da)}e=(new M).W(this.X);f=fh((new je).e("serverDescription"));g=Yl().Va;Gg(e,f,Hg(Ig(this,g,this.m),c));aeb(this,c,Dja(Yv(),b));b=this.qo;e=Qm().lh;f=K();g=(new Xz).a();c=[Cb(c,g)]; +c=Zr(new $r,J(f,(new Ib).ha(c)),Od(O(),a.i));a=Od(O(),a);Rg(b,e,c,a)}else if(y()===a)a=ac((new M).W(this.X),"baseUriParameters"),a.b()||(a=a.c(),c=this.m,b=sg().S7,e=this.qo.j,f=y(),ec(c,b,e,f,"'baseUri' not defined and 'baseUriParameters' defined.",a.da),O(),c=(new P).a(),c=(new Zl).K((new S).a(),c),b=this.qo.j,J(K(),H()),f=Ai(c,b),aeb(this,f,H()),c=this.qo,b=Qm().lh,e=K(),g=(new Xz).a(),f=[Cb(f,g)],e=Zr(new $r,J(e,(new Ib).ha(f)),Od(O(),a.i)),a=Od(O(),a),Rg(c,b,e,a));else throw(new x).d(a);a=ac((new M).W(this.X), +fh((new je).e("servers")));a.b()||(a=a.c().i,c=qc(),b=rw().sc,a=N(a,sw(b,c),this.m),c=w(function(m){return function(p){return gGa(hGa(m.qo.j,p,wz(uz(),m.m)))}}(this)),b=K(),a.ka(c,b.u).U(w(function(m){return function(p){var t=m.qo,v=Qm().lh;return ig(t,v,p)}}(this))))};d.z=function(){return X(this)};d.$classData=r({wTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.RamlServersParser",{wTa:1,f:1,sg:1,y:1,v:1,q:1,o:1});function deb(){this.kd=this.m=this.wc=this.xb=this.tb=null} +deb.prototype=new u;deb.prototype.constructor=deb;d=deb.prototype; +d.Xw=function(){var a=Hb(this.xb),b=Od(O(),this.tb);a=Db(a,b);b=this.tb.i.hb().gb;if(Q().sa===b){b=this.tb.i;var c=qc();b=N(b,c,this.m);if(ac((new M).W(b),"value").na()){c=(new M).W(b);var e=ag().Zc;Gg(c,"displayName",nh(Hg(Ig(this,e,this.m),a)));c=(new M).W(b);e=ag().Va;Gg(c,"description",nh(Hg(Ig(this,e,this.m),a)));c=(new M).W(b);e=ag().Fq;Gg(c,"strict",nh(Hg(Ig(this,e,this.m),a)));c=ac((new M).W(b),"value");c.b()||(c=c.c(),i4(j4(new k4,c.i,a,this.wc,this.m)));ii();c=[Zx().Kd];e=-1+(c.length|0)| +0;for(var f=H();0<=e;)f=ji(c[e],f),e=-1+e|0;Ry(new Sy,a,b,f,this.m).hd();c=this.m.Gg();Vaa(c)&&Zz(this.m,a.j,b,"example")}else i4(j4(new k4,this.tb.i,a,this.wc,this.m))}else Q().nd!==b&&i4(j4(new k4,this.tb.i,a,this.wc,this.m));return a};d.H=function(){return"RamlSingleExampleValueParser"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof deb&&this.tb===a.tb&&this.xb===a.xb){var b=this.wc;a=a.wc;return null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.tb;case 1:return this.xb;case 2:return this.wc;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.rk=function(){null===this.kd&&SP(this);return this.kd};function P5a(a,b,c,e){var f=new deb;f.tb=a;f.xb=b;f.wc=c;f.m=e;return f}d.z=function(){return X(this)};d.$classData=r({yTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.RamlSingleExampleValueParser",{yTa:1,f:1,sg:1,y:1,v:1,q:1,o:1});function eeb(){}eeb.prototype=new y_; +eeb.prototype.constructor=eeb;d=eeb.prototype;d.eg=function(a){return a instanceof tm};d.$f=function(a,b){return a instanceof tm?a:b.P(a)};d.Sa=function(a){return this.eg(a)};d.Wa=function(a,b){return this.$f(a,b)};d.$classData=r({BTa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.SecurityRequirementsEmitter$$anonfun$collect$1",{BTa:1,fb:1,f:1,za:1,Ea:1,q:1,o:1});function rR(){sR.call(this);this.O0=null}rR.prototype=new B6a;rR.prototype.constructor=rR; +rR.prototype.fK=function(){var a=tA(uA(),Au(),this.O0.x),b=ar(this.O0.g,Jk().nb).fh,c=GN(b);b=OA();var e=(new PA).e(b.pi),f=(new qg).e(b.mi);tc(f)&&QA(e,b.mi);f=e.s;var g=e.ca,h=(new rr).e(g),k=wr(),l=D6a(this,this.O0,a).Qc,m=K();a=[KEa(c,H(),a,this.je)];a=J(m,(new Ib).ha(a));c=K();jr(k,l.ia(a,c.u),h);pr(f,mr(T(),tr(ur(),h.s,g),Q().sa));return(new RA).Ac(SA(zs(),b.pi),e.s)};rR.prototype.Lj=function(){return this.je}; +rR.prototype.$classData=r({PTa:0},!1,"amf.plugins.document.webapi.parser.spec.oas.JsonSchemaValidationFragmentEmitter",{PTa:1,uha:1,m7:1,UR:1,f:1,QR:1,SY:1});function L2(){this.ea=this.Qc=this.Q=this.p=this.h0=null}L2.prototype=new u;L2.prototype.constructor=L2;d=L2.prototype; +d.Jw=function(a,b,c,e){this.h0=a;this.p=b;this.Q=c;this.ea=nv().ea;var f=ula(wla(),a,y());a=J(Ef(),H());if(tc(f.Oo)){var g=JEa(e.zf),h=(new Fc).Vd(f.Oo);Dg(a,oy(g,h.Sb.Ye().Dd(),c,b))}tc(f.x)&&(g=(new Fc).Vd(f.x),Dg(a,(new feb).CU(g.Sb.Ye().Dd(),b,e)));tc(f.Ko)&&(g=jx((new je).e("resourceTypes")),h=(new Fc).Vd(f.Ko),Dg(a,(new i6).jE(g,h.Sb.Ye().Dd(),b,H(),e)));tc(f.Ro)&&(g=jx((new je).e("traits")),h=(new Fc).Vd(f.Ro),Dg(a,(new i6).jE(g,h.Sb.Ye().Dd(),b,H(),e)));tc(f.Pp)&&(g=(new Fc).Vd(f.Pp),Dg(a, +(new geb).CU(g.Sb.Ye().Dd(),b,e)));h=(new Fc).Vd(f.Cs);g=Xd().u;g=se(h,g);for(h=h.Sb.Ye();h.Ya();){var k=h.$a();g.jd(Dz(Ez(),k,y()))}g=g.Rc();k=(new Fc).Vd(f.Es);h=Xd().u;h=se(k,h);for(k=k.Sb.Ye();k.Ya();){var l=k.$a();h.jd(Sma(Ez(),l,y()))}h=h.Rc();k=Xd();h=g.ia(h,k.u);h.Da()&&(g=new j6,h=h.ke(),g.zu=h,g.p=b,g.Q=c,g.la="parameters",g.N=e,Dg(a,g));tc(f.YD)&&(g=(new Fc).Vd(f.YD),Dg(a,(new heb).Jw(g.Sb.Ye().Dd(),b,c,e)));tc(f.Np)&&(g=(new Fc).Vd(f.Np),Dg(a,(new k6).VO("responses",g.Sb.Ye().Dd(),b,c, +e)));tc(f.qK)&&(g=(new Fc).Vd(f.qK),Dg(a,(new NX).eA("examples",g.Sb.Ye().Dd(),b,e)));tc(f.ZL)&&(g=(new Fc).Vd(f.ZL),Dg(a,(new ieb).Jw(g.Sb.Ye().Dd(),b,c,e)));tc(f.pL)&&(g=(new Fc).Vd(f.pL),Dg(a,(new jeb).Jw(g.Sb.Ye().Dd(),b,c,e)));if(tc(f.mB)){g=(new Fc).Vd(f.mB);Xd();Id();f=(new Lf).a();for(g=g.Sb.Ye();g.Ya();)h=g.$a().Hd(),ws(f,h);f=f.ua();g=Wt(f);g.b()?g=y():(g=g.c(),g=(new z).d(g.x));g=g.b()?(O(),(new P).a()):g.c();b=(new ZX).kE(f,b,c,g,e);c=kr(wr(),g,q(jd));e=Q().Na;Dg(a,ky("callbacks",b,e, +c))}this.Qc=a;return this};d.H=function(){return"OasDeclarationsEmitter"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof L2){var b=this.h0,c=a.h0;if((null===b?null===c:b.h(c))&&this.p===a.p)return b=this.Q,a=a.Q,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.h0;case 1:return this.p;case 2:return this.Q;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.z=function(){return X(this)}; +d.$classData=r({bUa:0},!1,"amf.plugins.document.webapi.parser.spec.oas.OasDeclarationsEmitter",{bUa:1,f:1,ib:1,y:1,v:1,q:1,o:1});function m6a(){}m6a.prototype=new y_;m6a.prototype.constructor=m6a;d=m6a.prototype;d.Ee=function(a,b){return a instanceof z?a.i:b.P(a)};d.Sa=function(a){return this.He(a)};d.Wa=function(a,b){return this.Ee(a,b)};d.He=function(a){return a instanceof z}; +d.$classData=r({lUa:0},!1,"amf.plugins.document.webapi.parser.spec.oas.OasDocumentParser$$anonfun$1",{lUa:1,fb:1,f:1,za:1,Ea:1,q:1,o:1});function k6a(){}k6a.prototype=new y_;k6a.prototype.constructor=k6a;d=k6a.prototype;d.BD=function(a,b){if(null!==a){var c=a.ya();if(0a.Ze)throw(new RE).a();a.ud=h;KE.prototype.qg.call(b,c);h=b.bj;if(null!==h)a.cqa(g,h,b.Mk+e|0,f);else for(;e!==c;)f=g,h=b.aV(e),a.dqa(f,h),e=1+e|0,g=1+g|0}d.Oa=function(){return this.Ze-this.ud|0}; +function Ifb(a,b){if(a===b)return 0;for(var c=a.ud,e=a.Ze-c|0,f=b.ud,g=b.Ze-f|0,h=e=c)a.fc=rF().Xs;else{var e=xa(b,a.Ij);a.As=1+a.As|0;if(55296===(64512&e)&&a.Asa.Bda&&(a.Bda=a.DE);b=(65535&(a.charCodeAt(b)|0))&&48<=(65535&(a.charCodeAt(b)|0)))b=-1+b|0;else break;for(var f=b;;)if(-1!==b&&36!==(65535&(a.charCodeAt(b)|0))&&46!==(65535&(a.charCodeAt(b)|0)))b=-1+b|0;else break;var g=1+b|0;if(b===f&&e!==(a.length|0))return c;for(;;)if(-1!==b&&36===(65535&(a.charCodeAt(b)| +0)))b=-1+b|0;else break;f=-1===b?!0:46===(65535&(a.charCodeAt(b)|0));var h;(h=f)||(h=65535&(a.charCodeAt(g)|0),h=!(90h||65>h));if(h){e=a.substring(g,e);g=c;if(null===g)throw(new sf).a();c=""===g?e:""+e+gc(46)+c;if(f)return c}}}function mgb(){this.u=null}mgb.prototype=new jWa;mgb.prototype.constructor=mgb;function H6(){}H6.prototype=mgb.prototype;function ngb(){h5.call(this)}ngb.prototype=new z9a;ngb.prototype.constructor=ngb;ngb.prototype.Rka=function(a){return ogb(a)}; +ngb.prototype.$classData=r({hbb:0},!1,"scala.collection.immutable.HashMap$HashTrieMap$$anon$3",{hbb:1,wcb:1,mk:1,f:1,Ii:1,Qb:1,Pb:1});function pgb(){h5.call(this)}pgb.prototype=new z9a;pgb.prototype.constructor=pgb;pgb.prototype.Rka=function(a){return a.Tk};pgb.prototype.$classData=r({obb:0},!1,"scala.collection.immutable.HashSet$HashTrieSet$$anon$1",{obb:1,wcb:1,mk:1,f:1,Ii:1,Qb:1,Pb:1});function I6(){}I6.prototype=new lWa;I6.prototype.constructor=I6;I6.prototype.a=function(){return this}; +I6.prototype.tG=function(){return qgb()};I6.prototype.$classData=r({wbb:0},!1,"scala.collection.immutable.ListMap$",{wbb:1,Apa:1,hM:1,gM:1,f:1,q:1,o:1});var rgb=void 0;function Aha(){rgb||(rgb=(new I6).a());return rgb}function J6(){}J6.prototype=new u9a;J6.prototype.constructor=J6;J6.prototype.a=function(){return this};J6.prototype.v0=function(){return vd()};J6.prototype.$classData=r({Qbb:0},!1,"scala.collection.immutable.Set$",{Qbb:1,Bpa:1,SP:1,RP:1,Mo:1,f:1,No:1});var sgb=void 0; +function qe(){sgb||(sgb=(new J6).a());return sgb}function K6(){this.Jo=null}K6.prototype=new H9a;K6.prototype.constructor=K6;K6.prototype.a=function(){G9a.prototype.a.call(this);return this};K6.prototype.Rc=function(){return tgb(this)};function tgb(a){return a.Jo.Dc.Dd().bd(w(function(){return function(b){return b.Dd()}}(a)),(Pt(),(new Qt).a()))}K6.prototype.$classData=r({ccb:0},!1,"scala.collection.immutable.Stream$StreamBuilder",{ccb:1,yib:1,f:1,Js:1,vl:1,ul:1,tl:1}); +function jG(){this.gT=this.qL=this.HS=0;this.eka=this.cka=this.aka=this.Zja=this.Xja=this.mT=null}jG.prototype=new u;jG.prototype.constructor=jG;d=jG.prototype;d.Eg=function(){return this.aka};d.a=function(){this.mT=ja(Ja(Ha),[32]);this.gT=1;this.qL=this.HS=0;return this};d.Un=function(){return this.gT};d.Kk=function(a){return MS(this,a)};d.rG=function(a){this.eka=a};d.Fl=function(){return this.mT};d.ui=function(a){this.Zja=a};d.Ej=function(){return this.cka}; +function MS(a,b){if(a.qL>=a.mT.n.length){var c=32+a.HS|0,e=a.HS^c;if(1024>e)1===a.Un()&&(a.Jg(ja(Ja(Ha),[32])),a.me().n[0]=a.Fl(),a.rw(1+a.Un()|0)),a.Zh(ja(Ja(Ha),[32])),a.me().n[31&(c>>>5|0)]=a.Fl();else if(32768>e)2===a.Un()&&(a.ui(ja(Ja(Ha),[32])),a.Te().n[0]=a.me(),a.rw(1+a.Un()|0)),a.Zh(ja(Ja(Ha),[32])),a.Jg(ja(Ja(Ha),[32])),a.me().n[31&(c>>>5|0)]=a.Fl(),a.Te().n[31&(c>>>10|0)]=a.me();else if(1048576>e)3===a.Un()&&(a.Gl(ja(Ja(Ha),[32])),a.Eg().n[0]=a.Te(),a.rw(1+a.Un()|0)),a.Zh(ja(Ja(Ha),[32])), +a.Jg(ja(Ja(Ha),[32])),a.ui(ja(Ja(Ha),[32])),a.me().n[31&(c>>>5|0)]=a.Fl(),a.Te().n[31&(c>>>10|0)]=a.me(),a.Eg().n[31&(c>>>15|0)]=a.Te();else if(33554432>e)4===a.Un()&&(a.xr(ja(Ja(Ha),[32])),a.Ej().n[0]=a.Eg(),a.rw(1+a.Un()|0)),a.Zh(ja(Ja(Ha),[32])),a.Jg(ja(Ja(Ha),[32])),a.ui(ja(Ja(Ha),[32])),a.Gl(ja(Ja(Ha),[32])),a.me().n[31&(c>>>5|0)]=a.Fl(),a.Te().n[31&(c>>>10|0)]=a.me(),a.Eg().n[31&(c>>>15|0)]=a.Te(),a.Ej().n[31&(c>>>20|0)]=a.Eg();else if(1073741824>e)5===a.Un()&&(a.rG(ja(Ja(Ha),[32])),a.js().n[0]= +a.Ej(),a.rw(1+a.Un()|0)),a.Zh(ja(Ja(Ha),[32])),a.Jg(ja(Ja(Ha),[32])),a.ui(ja(Ja(Ha),[32])),a.Gl(ja(Ja(Ha),[32])),a.xr(ja(Ja(Ha),[32])),a.me().n[31&(c>>>5|0)]=a.Fl(),a.Te().n[31&(c>>>10|0)]=a.me(),a.Eg().n[31&(c>>>15|0)]=a.Te(),a.Ej().n[31&(c>>>20|0)]=a.Eg(),a.js().n[31&(c>>>25|0)]=a.Ej();else throw(new Zj).a();a.HS=c;a.qL=0}a.mT.n[a.qL]=b;a.qL=1+a.qL|0;return a}d.Rc=function(){return lG(this)};d.zt=function(a,b){MT(this,a,b)};d.Jg=function(a){this.Xja=a};d.xr=function(a){this.cka=a};d.me=function(){return this.Xja}; +d.js=function(){return this.eka};function lG(a){var b=a.HS+a.qL|0;if(0===b)return iG().pJ;var c=(new L6).Fi(0,b,0);ck(c,a,a.gT);1c)this.Zh(this.me().n[31&(b>>>5|0)]);else if(32768>c)this.Jg(this.Te().n[31&(b>>>10|0)]),this.Zh(this.me().n[0]);else if(1048576>c)this.ui(this.Eg().n[31&(b>>>15|0)]),this.Jg(this.Te().n[0]),this.Zh(this.me().n[0]);else if(33554432>c)this.Gl(this.Ej().n[31&(b>>>20|0)]),this.ui(this.Eg().n[0]),this.Jg(this.Te().n[0]), +this.Zh(this.me().n[0]);else if(1073741824>c)this.xr(this.js().n[31&(b>>>25|0)]),this.Gl(this.Ej().n[0]),this.ui(this.Eg().n[0]),this.Jg(this.Te().n[0]),this.Zh(this.me().n[0]);else throw(new Zj).a();this.jG=b;b=this.g$-this.jG|0;this.h$=32>b?b:32;this.od=0}else this.lX=!1;return a};d.Eg=function(){return this.bka};d.Un=function(){return this.Q9};d.rG=function(a){this.fka=a};d.Sc=function(a,b){this.g$=b;this.jG=-32&a;this.od=31&a;a=b-this.jG|0;this.h$=32>a?a:32;this.lX=(this.jG+this.od|0)g.w)throw(new U).e("0");k=e.length|0;a=g.w+k|0;uD(g,a);Ba(g.L,0,g.L,k,g.w);k=g.L;var l=k.n.length;h=f=0;var m=e.length|0;l=mc.w)throw(new U).e("0");var f=e.length|0,g=c.w+f|0;uD(c,g);Ba(c.L,0,c.L,f,c.w);f=c.L;var h=f.n.length,k=0,l=0,m=e.length|0;h=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;l=g.n.length;k=h=0;m=e.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var l=g.n.length;k=h=0;var m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=c.length|0;k=mc.w)throw(new U).e("0");h=e.length|0;f=c.w+h|0;uD(c,f);Ba(c.L,0,c.L,h,c.w);h=c.L;var k=h.n.length,l=g=0,m=e.length|0;k=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m= +c.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var l=g.n.length;k=h=0;var m=b.length|0;l=mf.w)throw(new U).e("0");h=e.length|0;g=f.w+h|0;uD(f,g);Ba(f.L,0,f.L,h,f.w);h=f.L;l=h.n.length;b=k=0;var m=e.length|0;l=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length|0;k=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;l=f.n.length;k=h=0;var m=c.length|0;l=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c, +f);Ba(c.L,0,c.L,g,c.w);g=c.L;var l=g.n.length;k=h=0;var m=e.length|0;l=mf.w)throw(new U).e("0");h=e.length|0;g=f.w+h|0;uD(f,g);Ba(f.L,0,f.L,h,f.w);h=f.L;l=h.n.length;k=c=0;var m=e.length|0;l=me.w)throw(new U).e("0");var f=b.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length|0;k=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=ma.w)throw(new U).e("0");k=f.length|0;h=a.w+k|0;uD(a,h);Ba(a.L,0,a.L,k,a.w);k=a.L;c=k.n.length;b=l=0;m=f.length|0;c=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;l=f.n.length;k=h=0;m=c.length|0;l=mf.w)throw(new U).e("0");b=c.length|0;h=f.w+b|0;uD(f,h);Ba(f.L,0,f.L,b,f.w);b=f.L;var k=b.n.length,l=g=0,m=c.length|0;k=mb.w)throw(new U).e("0");g=c.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;l=g.n.length;k=h=0;var m=c.length|0;l=me.w)throw(new U).e("0");h=f.length|0;g=e.w+h|0;uD(e,g);Ba(e.L,0,e.L,h,e.w);h=e.L;m=h.n.length;l=k=0;p=f.length|0;m=pb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;l=g.n.length;k=h=0;m=e.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m=b.length|0;l=mc.w)throw(new U).e("0");f=e.length|0;h=c.w+f|0;uD(c,h);Ba(c.L,0,c.L,f,c.w);f=c.L;var k=f.n.length,l=g=0,m=e.length|0;k=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L, +0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=mg.w)throw(new U).e("0");k=f.length|0;h=g.w+k|0;uD(g,h);Ba(g.L,0,g.L,k,g.w);k=g.L;p=k.n.length; +m=l=0;var t=f.length|0;p=te.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=mf.w)throw(new U).e("0");a=c.length|0;h=f.w+a|0;uD(f,h);Ba(f.L,0,f.L,a,f.w);a=f.L;l=a.n.length;k=g=0;m=c.length|0;l=mh.w)throw(new U).e("0");l=f.length|0;a=h.w+l|0;uD(h,a);Ba(h.L,0,h.L,l,h.w);l=h.L;p=l.n.length;m=k=0;t=f.length|0;p=tb.w)throw(new U).e("0");var f=c.length|0,g=b.w+f|0;uD(b,g);Ba(b.L,0,b.L,f,b.w);f=b.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=mb.w)throw(new U).e("0");f=c.length|0;g=b.w+f|0;uD(b,g);Ba(b.L,0,b.L,f,b.w);f=b.L;h=f.n.length;l=k=0;m=c.length|0;h=mb.w)throw(new U).e("0");f=c.length|0;g=b.w+f|0;uD(b,g);Ba(b.L,0,b.L,f,b.w);f=b.L;h=f.n.length;l=k=0;m=c.length|0;h=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=mc.w)throw(new U).e("0");h=e.length|0;f=c.w+h|0;uD(c,f);Ba(c.L,0,c.L,h,c.w);h=c.L;var k=h.n.length,l=g=0,m=e.length|0;k=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m=b.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");var f=b.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;h=f.n.length;l=k=0;m=b.length|0;h=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;h=f.n.length;l=k=0;m=b.length|0;h=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m=c.length|0;l=mc.w)throw(new U).e("0");h=e.length|0;f=c.w+h|0;uD(c,f);Ba(c.L,0,c.L,h,c.w);h=c.L;var k=h.n.length, +l=g=0,m=e.length|0;k=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=mf.w)throw(new U).e("0");g=c.length|0;e=f.w+g|0;uD(f,e);Ba(f.L,0,f.L,g,f.w);g=f.L;var k=g.n.length,l=h=0,m=c.length|0;k=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0; +uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=c.length|0;k=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var l=g.n.length;k=h=0;var m=e.length|0;l=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;l=g.n.length;k=h=0;m=e.length|0;l=mA.w)throw(new U).e("0");I=D.length|0;C=A.w+I|0;uD(A,C);Ba(A.L,0,A.L,I,A.w);I=A.L;var Y=I.n.length,ia=L=0,pa=D.length|0;Y=pae.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length| +0;k=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=b.length|0;k=mb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;l=g.n.length;k=h=0;var m=e.length|0;l=mb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;var k=g.n.length,l=h=0,m=e.length|0;k=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;l=f.n.length;k=h=0;m=c.length|0;l=ma.ID(c);b=c?b:y();return b.b()?a:b.c()}}(this)))}; +d.$classData=r({NRa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.OasPayloadsEmitter",{NRa:1,f:1,db:1,Ma:1,y:1,v:1,q:1,o:1});function ekb(){this.N=this.Q=this.p=this.lp=null}ekb.prototype=new u;ekb.prototype.constructor=ekb;d=ekb.prototype;d.H=function(){return"OasResponseEmitter"};d.E=function(){return 3};d.h=function(a){if(this===a)return!0;if(a instanceof ekb){var b=this.lp,c=a.lp;if((null===b?null===c:b.h(c))&&this.p===a.p)return b=this.Q,a=a.Q,null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.lp;case 1:return this.p;case 2:return this.Q;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Qa=function(a){var b=this.lp.g,c=(new PA).e(a.ca),e=hd(b,Dm().R);e.b()?e=y():(e=e.c(),e=(new z).d(e.r.r));hV(new iV,e.b()?ih(new jh,"default",(new P).a()):e.c(),Q().Na).Ob(c);e=(new PA).e(a.ca);if(Za(this.lp).na())this.N.rL(this.lp).Ob(e);else{var f=e.s,g=e.ca,h=(new rr).e(g),k=J(Ef(),H()),l=hd(b,Dm().Va);if(l.b()){l=Dm().Va;var m=ih(new jh,"",(new P).a());O();var p=(new P).a();l=(new z).d(lh(l,kh(m,p)))}l.b()||(l=l.c(),(new z).d(Dg(k,$g(new ah,"description",l,y()))));l=hd(b,Am().Tf);l.b()||(l= +l.c(),(new z).d(Dg(k,(new eX).Sq("headers",l,this.p,this.Q,this.N))));this.N.zf instanceof pA&&(l=this.lp.g.vb,m=mz(),m=Ua(m),p=Id().u,l=Jd(l,m,p).Fb(w(function(){return function(t){t=t.Lc;var v=Dm().Ne;return null===t?null===v:t.h(v)}}(this))),l.b()||(l=l.c(),m=YX(l),Dg(k,ky("content",(new hY).kE(m,this.p,this.Q,l.r.x,this.N),Q().Na,ld()))),l=this.lp.g.vb,m=mz(),m=Ua(m),p=Id().u,l=Jd(l,m,p).Fb(w(function(){return function(t){t=t.Lc;var v=Dm().nN;return null===t?null===v:t.h(v)}}(this))),l.b()||(l= +l.c(),m=YX(l),Dg(k,ky("links",(new ckb).kE(m,this.p,this.Q,l.r.x,this.N),Q().Na,ld()))));this.N.zf instanceof ZV&&(l=VPa(YPa(),B(this.lp.g,zD().Ne)),m=l.uo,m.b()||(m=m.c(),p=hd(m.g,xm().Nd),p.b()||(p=p.c(),(new z).d(Dg(k,$g(new ah,jx((new je).e("mediaType")),p,y())))),m=hd(m.g,xm().Jc),m.b()||(m=m.c(),(new z).d(wh(m.r.r.fa(),q(IR))?void 0:Dg(k,(new d6).Zz(m,this.p,this.Q,this.N))))),l.yH.Da()&&Dg(k,(new z7).VO(jx((new je).e("responsePayloads")),l.yH,this.p,this.Q,this.N)));b=hd(b,Dm().Ec);b.b()|| +(b=b.c(),(new z).d(Dg(k,$Pa(cQa(),"examples",b,this.p,this.N))));ws(k,ay(this.lp,this.p,this.N).Pa());jr(wr(),this.p.zb(k),h);pr(f,mr(T(),tr(ur(),h.s,g),Q().sa))}c=xF(c.s,0);sr(a,c,xF(e.s,0))};d.z=function(){return X(this)};function fkb(a,b,c,e){var f=new ekb;f.lp=a;f.p=b;f.Q=c;f.N=e;return f}d.La=function(){return kr(wr(),this.lp.x,q(jd))};d.$classData=r({ORa:0},!1,"amf.plugins.document.webapi.parser.spec.domain.OasResponseEmitter",{ORa:1,f:1,db:1,Ma:1,y:1,v:1,q:1,o:1}); +function gkb(){this.N=this.p=this.Kd=null}gkb.prototype=new u;gkb.prototype.constructor=gkb;d=gkb.prototype;d.H=function(){return"OasResponseExampleEmitter"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof gkb){var b=this.Kd,c=a.Kd;return(null===b?null===c:b.h(c))?this.p===a.p:!1}return!1};d.G=function(a){switch(a){case 0:return this.Kd;case 1:return this.p;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Qa=function(a){var b=hd(this.Kd.g,ag().mo);if(b.b()){if(b=B(this.Kd.g,Zf().Rd).A,!b.b()){var c=b.c();T();b=this.TU(this.Kd);var e=mh(T(),b);b=(new PA).e(a.ca);(new v7).e(c).Ob(b);c=b.s;e=[e];if(0>c.w)throw(new U).e("0");var f=e.length|0,g=c.w+f|0;uD(c,g);Ba(c.L,0,c.L,f,c.w);f=c.L;var h=f.n.length,k=0,l=0,m=e.length|0;h=mc.w)throw(new U).e("0");f=e.length|0;g=c.w+f|0;uD(c,g);Ba(c.L,0,c.L,f,c.w);f=c.L;h=f.n.length;l=k=0;m=e.length|0;h=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;k=g.n.length;l=h=0;m=c.length|0;k=mb.w)throw(new U).e("0");h=e.length|0;g=b.w+h|0;uD(b,g);Ba(b.L,0,b.L,h,b.w);h=b.L;var l=h.n.length,m=k=0,p=e.length|0;l=pA.w)throw(new U).e("0");I=C.length|0;v=A.w+I|0;uD(A,v);Ba(A.L,0,A.L,I,A.w);I=A.L;ia=I.n.length;Y=L=0;pa=C.length|0;ia=paC.w)throw(new U).e("0");I=A.length|0;v=C.w+I|0;uD(C,v);Ba(C.L,0,C.L,I,C.w);I=C.L;ia=I.n.length;Y=L=0;pa=A.length|0;ia=pae.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=m< +h?m:h;m=g.n.length;for(h=hb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;var k=g.n.length,l=h=0,m=e.length|0;k=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=c.length|0;k=mk.w)throw(new U).e("0");var t=m.length|0;p=k.w+t|0;uD(k,p);Ba(k.L,0,k.L,t,k.w);t=k.L;var v=t.n.length,A=0,D=0,C=m.length|0;v=Cc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length|0;k=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=mA.w)throw(new U).e("0");I=D.length|0;C=A.w+I|0;uD(A,C);Ba(A.L,0,A.L,I,A.w);I=A.L;var Y=I.n.length,ia=L=0,pa=D.length|0;Y=pae.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=mc.w)throw(new U).e("0");h=f.length|0;g=c.w+h|0;uD(c,g);Ba(c.L,0,c.L,h,c.w);h=c.L;var l=h.n.length;e=k=0;var m=f.length|0;l=mc.w)throw(new U).e("0");h=f.length|0;g=c.w+h|0;uD(c,g);Ba(c.L,0,c.L,h,c.w);h=c.L;l=h.n.length;e=k=0;m=f.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");f=c.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;l=f.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length|0;k=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;h=k=0;var m= +c.length|0;l=me.w)throw(new U).e("0");g= +c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;h=k=0;var m=c.length|0;l=mb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;var k=g.n.length,l=h=0,m=e.length|0;k=mb.$d.ID(a))a=b.$d}else throw(new x).d(b);return a}; +d.$classData=r({jUa:0},!1,"amf.plugins.document.webapi.parser.spec.oas.OasDocumentEmitter$WebApiEmitter$InfoEmitter",{jUa:1,f:1,db:1,Ma:1,y:1,v:1,q:1,o:1});function B4(){this.l=this.vP=null}B4.prototype=new u;B4.prototype.constructor=B4;d=B4.prototype;d.H=function(){return"OasHeaderEmitter"};d.E=function(){return 1};d.h=function(a){return this===a?!0:a instanceof B4&&a.l===this.l?this.vP===a.vP:!1};d.G=function(a){switch(a){case 0:return this.vP;default:throw(new U).e(""+a);}}; +d.t=function(){return V(W(),this)};d.Qa=function(a){cx(new dx,this.vP.la,this.vP.r,Q().Na,ld()).Qa(a)};d.z=function(){return X(this)};function A4(a,b,c){a.vP=c;if(null===b)throw mb(E(),null);a.l=b;return a}d.La=function(){return ld()};d.$classData=r({CUa:0},!1,"amf.plugins.document.webapi.parser.spec.oas.OasFragmentEmitter$OasHeaderEmitter",{CUa:1,f:1,db:1,Ma:1,y:1,v:1,q:1,o:1});function A7(){this.zE=this.N=null}A7.prototype=new QGa;A7.prototype.constructor=A7;d=A7.prototype;d.H=function(){return"OasModuleEmitter"}; +d.E=function(){return 1};d.h=function(a){if(this===a)return!0;if(a instanceof A7){var b=this.zE;a=a.zE;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.zE;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.r0=function(){var a=tA(uA(),Au(),this.zE.x),b=K(),c=[IYa(this,this.zE,a)];b=J(b,(new Ib).ha(c));c=ar(this.zE.g,Af().Ic);c=(new L2).Jw(c,a,ar(this.zE.g,Af().xc),this.N).Qc;var e=hd(this.zE.g,Bq().ae);if(e.b())var f=y();else e=e.c(),f=(new z).d($g(new ah,jx((new je).e("usage")),e,y()));e=OA();var g=(new PA).e(e.pi),h=(new qg).e(e.mi);tc(h)&&QA(g,e.mi);h=g.s;var k=g.ca,l=(new rr).e(k);UUa(l,"swagger",(T(),mh(T(),"2.0")));var m=wr();f=f.ua();var p=K();c=c.ia(f,p.u);f=K();jr(m,a.zb(c.ia(b,f.u)),l);pr(h, +mr(T(),tr(ur(),l.s,k),Q().sa));return(new RA).Ac(SA(zs(),e.pi),g.s)};function Tkb(a,b,c){a.zE=b;tQ.prototype.aA.call(a,c);return a}d.z=function(){return X(this)};d.$classData=r({QUa:0},!1,"amf.plugins.document.webapi.parser.spec.oas.OasModuleEmitter",{QUa:1,UR:1,f:1,QR:1,y:1,v:1,q:1,o:1});function Nkb(){this.N=this.Q=this.p=this.oA=null}Nkb.prototype=new u;Nkb.prototype.constructor=Nkb;d=Nkb.prototype;d.H=function(){return"OasNamedParameterEmitter"};d.E=function(){return 3}; +d.h=function(a){if(this===a)return!0;if(a instanceof Nkb&&this.oA===a.oA&&this.p===a.p){var b=this.Q;a=a.Q;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.oA;case 1:return this.p;case 2:return this.Q;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Qa=function(a){var b=this.oA.yr;b=B(b.Y(),b.Zg()).A;if(b instanceof z)b=b.i;else{b=this.N.hj();var c=dc().Fh,e=this.oA.yr.j,f=y(),g="Cannot declare parameter without name "+this.oA.yr,h=Ab(this.oA.yr.fa(),q(jd)),k=this.oA.yr.Ib();b.Gc(c.j,e,f,g,h,Yb().qb,k);b="default-name"}T();e=mh(T(),b);b=(new PA).e(a.ca);c=this.oA.yr;c instanceof Wl?m5a(c,this.p,this.Q,!1,this.N).Ob(b):c instanceof ym&&(new p4).pU(c,this.p,this.Q,this.N).Ob(b);c=b.s;e=[e];if(0>c.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0; +uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var l=g.n.length;k=h=0;var m=e.length|0;l=me.w)throw(new U).e("0"); +g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=c.length|0;k=me.w)throw(new U).e("0");var f=c.length|0,g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;var h=f.n.length,k=0,l=0,m=c.length|0;h=me.w)throw(new U).e("0");g=f.length|0;c=e.w+g|0;uD(e,c);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=f.length|0;k=mc.w)throw(new U).e("0");h=e.length|0;f=c.w+h|0;uD(c,f);Ba(c.L,0,c.L,h,c.w);h=c.L; +var k=h.n.length,l=g=0,m=e.length|0;k=mc.w)throw(new U).e("0");h=e.length|0;f=c.w+h|0;uD(c,f);Ba(c.L,0,c.L,h,c.w);h=c.L;var k=h.n.length,l=g=0,m=e.length|0;k=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var l=g.n.length; +k=h=0;var m=e.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;h=k=0;var m= +c.length|0;l=me.w)throw(new U).e("0");g=c.length| +0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;h=k=0;var m=c.length|0;l=m=this.ap(a,b)};C7.prototype.$classData=r({HVa:0},!1,"amf.plugins.document.webapi.parser.spec.raml.RamlDocumentEmitter$WebApiEmitter$$anonfun$defaultOrder$1$1",{HVa:1,f:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});function oY(){m6.call(this);this.Je=this.lk=null}oY.prototype=new peb;oY.prototype.constructor=oY;function Ykb(){}Ykb.prototype=oY.prototype; +function mcb(a,b){var c=a.lk.da;J(K(),H());c=Ai(b,c);var e=a.lk.da,f=Bq().uc;eb(c,f,e);c=a.lk.$g.Xd;e=qc();e=N(c,e,a.Nb());c=pz(qz(b,"uses",e,a.lk.Q,a.Nb()),a.lk.da);a.rA(a.lk,e);e=a.ML(e);f=Y1(new Z1,a.Nb().Gg());e=Cb(e,f);f=Jk().nb;Vd(b,f,e);e=a.Nb().pe().et();e.Da()&&(f=Af().Ic,Bf(b,f,e));tc(c.Q)&&(c=O4a(c),e=Gk().xc,Bf(b,e,c));Fb(a.Nb().ni);return b} +function Zkb(a){var b=iA().ho;if(null===b?null===a:b.h(a)){ii();a=[Zx().Uea];b=-1+(a.length|0)|0;for(var c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;return c}b=iA().N7;if(null===b?null===a:b.h(a)){ii();a=[Zx().eca];b=-1+(a.length|0)|0;for(c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;return c}b=iA().D5;if(null===b?null===a:b.h(a)){ii();a=[Zx().cp];b=-1+(a.length|0)|0;for(c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;return c}return H()} +oY.prototype.ML=function(a){var b=sSa(uSa(),this.lk.$g.Xd.Fd),c=this.lk.da;J(K(),H());b=Ai(b,c);Zz(this.Nb(),b.j,a,"webApi");c=(new M).W(a);var e=Qm().R;Gg(c,"title",nh(Hg(Ig(this,e,this.Nb()),b)));c=(new M).W(a);e=Qm().Va;Gg(c,"description",nh(Hg(Ig(this,e,this.Nb()),b)));c=ac((new M).W(a),"mediaType");if(!c.b()){e=c.c();this.Nb().Vka=!0;c=Od(O(),e);var f=e.i.hb().gb;Q().cd===f?e=PAa((new Tx).Vb(e.i,this.Nb())):(c.Lb((new W1).a()),f=K(),e=[zla(Cla(),e.i,this.Nb()).Zf()],e=Zr(new $r,J(f,(new Ib).ha(e)), +(new P).a()));f=Qm().yl;Rg(b,f,e,c);f=Qm().Wp;Rg(b,f,e,c)}c=(new M).W(a);e=Qm().Ym;Gg(c,"version",nh(Hg(Ig(this,e,this.Nb()),b)));c=(new M).W(a);e=fh((new je).e("termsOfService"));f=Qm().XF;Gg(c,e,Hg(Ig(this,f,this.Nb()),b));c=(new M).W(a);e=Qm().Gh;Gg(c,"protocols",sP(Hg(Ig(this,e,this.Nb()),b)));c=(new M).W(a);e=fh((new je).e("contact"));f=Qm().SF;Gg(c,e,Gy(Hg(Ig(this,f,this.Nb()),b),w(function(h){return function(k){Wma();var l=h.Nb();Wma();k=(new XP).pv(k,wz(uz(),l));return iGa(k)}}(this))));c= +(new M).W(a);e=fh((new je).e("license"));f=Qm().OF;Gg(c,e,Gy(Hg(Ig(this,f,this.Nb()),b),w(function(h){return function(k){Pma();var l=h.Nb();Pma();k=(new RP).pv(k,wz(uz(),l));return aGa(k)}}(this))));c=(new M).W(a);e=fh((new je).e("tags"));c=ac(c,e);if(!c.b()){c=c.c();e=c.i;f=qc();var g=rw().sc;e=N(e,sw(g,f),this.Nb());f=w(function(h,k){return function(l){return KGa(dna(fna(),(T(),T(),mr(T(),l,Q().sa)),w(function(m,p){return function(t){var v=p.j;J(K(),H());return Ai(t,v)}}(h,k)),h.Nb()))}}(this,b)); +g=K();f=e.ka(f,g.u);e=Qm().Xm;f=Zr(new $r,f,Od(O(),c.i));c=Od(O(),c);Rg(b,e,f,c)}e=wt((new M).W(a),"^/.*");e.Da()&&(c=J(Ef(),H()),e.U(w(function(h,k,l){return function(m){nD(h.Nb().$h.x0(),m,w(function(p,t){return function(v){return q6a(t,v)}}(h,k)),y(),l,!1).hd()}}(this,b,c))),e=Qm().Yp,c=Zr(new $r,c,(new P).a()),Vd(b,e,c),$kb(this.Nb()));ceb(a,b,this.Nb()).hd();c=(new Nd).a();c=w(function(h,k,l){return function(m){wGa();return xGa(yGa(m,k,l,h.Nb()))}}(this,w(function(h,k){return function(l){return k.mI(l)}}(this, +b)),c));e=(new M).W(a);f=Qm().dc;Gg(e,"securedBy",sP(Gy(Hg(Ig(this,f,this.Nb()),b),c)));c=ac((new M).W(a),"documentation");c.b()||(e=c.c(),c=Qm().Uv,f=e.i,g=lc(),f=p7a(new o7a,this,N(f,g,this.Nb()),this.Nb().pe(),b.j).Vg(),e=Od(O(),e),bs(b,c,f,e));Ry(new Sy,b,a,Zkb(this.Nb().iv),this.Nb()).hd();return b};oY.prototype.$D=function(a,b){this.lk=a;this.Je=b;m6.prototype.ss.call(this,b);return this};function D7(){this.jz=this.p=this.Xb=this.Uh=null}D7.prototype=new u;D7.prototype.constructor=D7;d=D7.prototype; +d.H=function(){return"ReferenceEmitter"};d.E=function(){return 4};d.h=function(a){if(this===a)return!0;if(a instanceof D7){var b=this.Uh,c=a.Uh;(null===b?null===c:b.h(c))?(b=this.Xb,c=a.Xb,b=null===b?null===c:b.h(c)):b=!1;return b&&this.p===a.p?this.jz===a.jz:!1}return!1};d.G=function(a){switch(a){case 0:return this.Uh;case 1:return this.Xb;case 2:return this.p;case 3:return this.jz;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Cba=function(){var a=Lc(this.Uh);return a.b()?this.Uh.j:a.c()};d.Qa=function(a){var b=this.Xb;b=(b.b()?(new tB).hk(J(Gb().Qg,H())):b.c()).Xb.Fb(w(function(f){return function(g){if(null!==g){var h=g.ya();if(null!==h)return h.ma()===f.Uh.j}throw(new x).d(g);}}(this)));if(b.b())b=y();else{var c=b.c();a:{if(null!==c){b=c.ma();var e=c.ya();if(null!==e){c=e.ya();b=(new R).M(b,c);break a}}throw(new x).d(c);}b=(new z).d(b)}b=b.b()?(new R).M(Hb(this.jz),this.Cba()):b.c();cx(new dx,b.ma(),b.ya(),Q().Na,ld()).Qa(a)}; +function alb(a,b,c,e,f){a.Uh=b;a.Xb=c;a.p=e;a.jz=f;return a}d.z=function(){return X(this)};d.La=function(){return ld()};d.$classData=r({iWa:0},!1,"amf.plugins.document.webapi.parser.spec.raml.ReferenceEmitter",{iWa:1,f:1,db:1,Ma:1,y:1,v:1,q:1,o:1});function blb(){this.p=this.wf=null}blb.prototype=new u;blb.prototype.constructor=blb;d=blb.prototype;d.H=function(){return"ReferencesEmitter"};d.E=function(){return 2}; +d.h=function(a){if(this===a)return!0;if(a instanceof blb){var b=this.wf,c=a.wf;return(null===b?null===c:b.h(c))?this.p===a.p:!1}return!1};d.G=function(a){switch(a){case 0:return this.wf;case 1:return this.p;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Qa=function(a){var b=Ab(this.wf.fa(),q(Rc)),c=b.b()?(new tB).hk(J(Gb().Qg,H())):b.c();b=this.wf.Ve();var e=new seb,f=K();b=b.ec(e,f.u);if(b.Da()){e=Rb(Gb().ab,H());f=(new qd).d(e);e=(new Nd).a();c=c.Xb;var g=w(function(p,t,v,A){return function(D){if(null!==D){var C=D.ma(),I=D.ya();if(null!==I){D=I.ma();var L=I.ya();I=t.Fb(w(function(ia,pa){return function(La){return La.j===pa}}(p,D)));if(I instanceof z){I=I.i;v.oa=v.oa.cc((new R).M(I.j,I));D=(new R).M(D,L);C=[(new R).M(C,D)];if(0===(C.length|0))C= +vd();else{D=wd(new xd,vd());L=0;for(var Y=C.length|0;Le.w)throw(new U).e("0");g=f.length|0;c=e.w+g|0;uD(e,c);Ba(e.L,0,e.L,g,e.w);g=e.L;var k=g.n.length,l=h=0,m=f.length|0;k=me.w)throw(new U).e("0");f=b.length|0;g=e.w+f|0;uD(e,g);Ba(e.L,0,e.L,f,e.w);f=e.L;l=f.n.length;k=h=0;var m=b.length| +0;l=ma||b(this.Ze-this.ud|0))throw(new U).a();return KSa(this.By,this.bj,this.Mk,this.ud+a|0,this.ud+b|0,this.Ss)};d.Ska=function(a,b,c){if(0>b||0>c||b>(a.n.length-c|0))throw(new U).a();var e=this.ud,f=e+c|0;if(f>this.Ze)throw(new Lv).a();this.ud=f;Ba(this.bj,this.Mk+e|0,a,b,c)};d.Tka=function(a){if(0>a||a>=this.Ze)throw(new U).a();return this.bj.n[this.Mk+a|0]};d.dqa=function(a,b){this.bj.n[this.Mk+a|0]=b};d.aV=function(a){return this.bj.n[this.Mk+a|0]}; +d.cqa=function(a,b,c,e){Ba(b,c,this.bj,this.Mk+a|0,e)};d.hH=function(){return this.Ss};d.$classData=r({P2a:0},!1,"java.nio.HeapCharBuffer",{P2a:1,L2a:1,Rha:1,f:1,ym:1,eP:1,SU:1,U7a:1});function emb(){x6.call(this);this.gL=null;this.hL=0}emb.prototype=new Hfb;emb.prototype.constructor=emb;d=emb.prototype;d.EP=function(){throw(new VE).a();};d.bI=function(a,b){return this.pea(a,b)};d.AO=function(){var a=this.ud;if(a===this.Ze)throw(new Lv).a();this.ud=1+a|0;return xa(this.gL,this.hL+a|0)}; +d.t=function(){var a=this.hL;return ka(ya(this.gL,this.ud+a|0,this.Ze+a|0))};function xsa(a,b,c,e,f){var g=new emb;g.gL=b;g.hL=c;x6.prototype.cla.call(g,a,null,-1);KE.prototype.qg.call(g,e);KE.prototype.J1.call(g,f);return g}d.pea=function(a,b){if(0>a||b(this.Ze-this.ud|0))throw(new U).a();return xsa(this.By,this.gL,this.hL,this.ud+a|0,this.ud+b|0)}; +d.Ska=function(a,b,c){if(0>b||0>c||b>(a.n.length-c|0))throw(new U).a();var e=this.ud,f=e+c|0;if(f>this.Ze)throw(new Lv).a();this.ud=f;for(c=e+c|0;e!==c;){f=b;var g=xa(this.gL,this.hL+e|0);a.n[f]=g;e=1+e|0;b=1+b|0}};d.Tka=function(a){if(0>a||a>=this.Ze)throw(new U).a();return xa(this.gL,this.hL+a|0)};d.dqa=function(){throw(new VE).a();};d.aV=function(a){return xa(this.gL,this.hL+a|0)};d.cqa=function(){throw(new VE).a();};d.hH=function(){return!0}; +d.$classData=r({R2a:0},!1,"java.nio.StringCharBuffer",{R2a:1,L2a:1,Rha:1,f:1,ym:1,eP:1,SU:1,U7a:1});function M4(){CF.call(this)}M4.prototype=new m_;M4.prototype.constructor=M4;d=M4.prototype;d.a=function(){CF.prototype.Ge.call(this,null,null);return this};d.H=function(){return"LimitReachedException"};d.E=function(){return 0};d.h=function(a){return a instanceof M4&&!0};d.G=function(a){throw(new U).e(""+a);};d.z=function(){return X(this)}; +d.$classData=r({j3a:0},!1,"org.mulesoft.common.io.LimitReachedException",{j3a:1,wg:1,bf:1,f:1,o:1,y:1,v:1,q:1});function fmb(){this.Rf=null;this.bg=this.Yf=this.If=this.rf=this.pA=this.Au=0}fmb.prototype=new u;fmb.prototype.constructor=fmb;d=fmb.prototype;d.H=function(){return"SourceLocation"};d.E=function(){return 7};d.h=function(a){return this===a?!0:a instanceof fmb?this.Rf===a.Rf&&this.Au===a.Au&&this.pA===a.pA&&this.rf===a.rf&&this.If===a.If&&this.Yf===a.Yf&&this.bg===a.bg:!1}; +d.G=function(a){switch(a){case 0:return this.Rf;case 1:return this.Au;case 2:return this.pA;case 3:return this.rf;case 4:return this.If;case 5:return this.Yf;case 6:return this.bg;default:throw(new U).e(""+a);}};d.Yx=function(){return 0===this.rf&&0===this.If&&0===this.Yf&&0===this.bg&&0===this.Au&&0===this.pA}; +d.t=function(){var a=this.Rf;if(null===a)throw(new sf).a();return(""===a?"Unknown":this.Rf)+((0>=this.Au&&0>=this.pA&&1!==this.rf&&1!==this.Yf)&0!==this.If&&0!==this.bg?"":"["+this.Au+","+this.pA+"]")+(0>=this.rf&&0>=this.Yf?"":": "+this.rf+","+this.If+".."+this.Yf+","+this.bg)};d.tr=function(a){return gmb(this,a)};d.gs=function(a){return gmb(this,a)};function nha(a,b,c,e,f,g,h){var k=new fmb;k.Rf=a;k.Au=b;k.pA=c;k.rf=e;k.If=f;k.Yf=g;k.bg=h;return k} +function gmb(a,b){if(a.Rf!==b.Rf)return a=a.Rf,b=b.Rf,a===b?0:a=this.ap(a,b)}; +zI.prototype.$classData=r({f8a:0},!1,"java.util.Arrays$$anon$3",{f8a:1,f:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});function TK(){CF.call(this);this.zG=null}TK.prototype=new z6;TK.prototype.constructor=TK;TK.prototype.xo=function(){return"Flags \x3d '"+this.zG+"'"};TK.prototype.e=function(a){this.zG=a;CF.prototype.Ge.call(this,null,null);if(null===a)throw(new sf).a();return this};TK.prototype.$classData=r({i8a:0},!1,"java.util.DuplicateFormatFlagsException",{i8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1}); +function wZa(){CF.call(this);this.zG=null;this.lG=0}wZa.prototype=new z6;wZa.prototype.constructor=wZa;wZa.prototype.xo=function(){return"Conversion \x3d "+gc(this.lG)+", Flags \x3d "+this.zG};wZa.prototype.$classData=r({j8a:0},!1,"java.util.FormatFlagsConversionMismatchException",{j8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function ZK(){CF.call(this);this.lG=0}ZK.prototype=new z6;ZK.prototype.constructor=ZK;ZK.prototype.xo=function(){return"Code point \x3d 0x"+(+(this.lG>>>0)).toString(16)}; +ZK.prototype.ue=function(a){this.lG=a;CF.prototype.Ge.call(this,null,null);return this};ZK.prototype.$classData=r({n8a:0},!1,"java.util.IllegalFormatCodePointException",{n8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function zZa(){CF.call(this);this.lG=0;this.eja=null}zZa.prototype=new z6;zZa.prototype.constructor=zZa;zZa.prototype.xo=function(){return ba.String.fromCharCode(this.lG)+" !\x3d "+Fj(this.eja)}; +zZa.prototype.$classData=r({o8a:0},!1,"java.util.IllegalFormatConversionException",{o8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function cL(){CF.call(this);this.zG=null}cL.prototype=new z6;cL.prototype.constructor=cL;cL.prototype.xo=function(){return"Flags \x3d '"+this.zG+"'"};cL.prototype.e=function(a){this.zG=a;CF.prototype.Ge.call(this,null,null);if(null===a)throw(new sf).a();return this}; +cL.prototype.$classData=r({p8a:0},!1,"java.util.IllegalFormatFlagsException",{p8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function YK(){CF.call(this);this.Una=0}YK.prototype=new z6;YK.prototype.constructor=YK;YK.prototype.xo=function(){return""+this.Una};YK.prototype.ue=function(a){this.Una=a;CF.prototype.Ge.call(this,null,null);return this};YK.prototype.$classData=r({q8a:0},!1,"java.util.IllegalFormatPrecisionException",{q8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1}); +function dL(){CF.call(this);this.Vqa=0}dL.prototype=new z6;dL.prototype.constructor=dL;dL.prototype.xo=function(){return""+this.Vqa};dL.prototype.ue=function(a){this.Vqa=a;CF.prototype.Ge.call(this,null,null);return this};dL.prototype.$classData=r({r8a:0},!1,"java.util.IllegalFormatWidthException",{r8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function VK(){CF.call(this);this.PH=null}VK.prototype=new z6;VK.prototype.constructor=VK;VK.prototype.xo=function(){return"Format specifier '"+this.PH+"'"}; +VK.prototype.e=function(a){this.PH=a;CF.prototype.Ge.call(this,null,null);if(null===a)throw(new sf).a();return this};VK.prototype.$classData=r({s8a:0},!1,"java.util.MissingFormatArgumentException",{s8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function UK(){CF.call(this);this.PH=null}UK.prototype=new z6;UK.prototype.constructor=UK;UK.prototype.xo=function(){return this.PH};UK.prototype.e=function(a){this.PH=a;CF.prototype.Ge.call(this,null,null);if(null===a)throw(new sf).a();return this}; +UK.prototype.$classData=r({t8a:0},!1,"java.util.MissingFormatWidthException",{t8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function SK(){CF.call(this);this.PH=null}SK.prototype=new z6;SK.prototype.constructor=SK;SK.prototype.xo=function(){return"Conversion \x3d '"+this.PH+"'"};SK.prototype.e=function(a){this.PH=a;CF.prototype.Ge.call(this,null,null);if(null===a)throw(new sf).a();return this}; +SK.prototype.$classData=r({v8a:0},!1,"java.util.UnknownFormatConversionException",{v8a:1,sE:1,Zx:1,wi:1,wg:1,bf:1,f:1,o:1});function RUa(){R.call(this);this.$4=this.FI=0}RUa.prototype=new dgb;RUa.prototype.constructor=RUa;d=RUa.prototype;d.JM=function(){return this.FI};d.a5=function(){return this.$4};d.ya=function(){return gc(this.$4)};d.ma=function(){return this.FI};d.$classData=r({l9a:0},!1,"scala.Tuple2$mcIC$sp",{l9a:1,d_:1,f:1,tda:1,y:1,v:1,q:1,o:1});function E7(){this.zka=null}E7.prototype=new u; +E7.prototype.constructor=E7;function UC(a){var b=new E7;b.zka=a;return b}E7.prototype.ap=function(a,b){return raa(this.zka.P(a),b)};E7.prototype.wE=function(a,b){return 0>=this.ap(a,b)};E7.prototype.$classData=r({H9a:0},!1,"scala.math.LowPriorityOrderingImplicits$$anon$3",{H9a:1,f:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});function F7(){this.nv=this.l=null}F7.prototype=new u;F7.prototype.constructor=F7;F7.prototype.ap=function(a,b){return this.l.ap(this.nv.P(a),this.nv.P(b))}; +function hmb(a,b){var c=new F7;if(null===a)throw mb(E(),null);c.l=a;c.nv=b;return c}F7.prototype.wE=function(a,b){return 0>=this.ap(a,b)};F7.prototype.$classData=r({L9a:0},!1,"scala.math.Ordering$$anon$2",{L9a:1,f:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});function OR(){this.Y_=null}OR.prototype=new u;OR.prototype.constructor=OR;OR.prototype.d1=function(a){this.Y_=a;return this};OR.prototype.ap=function(a,b){return this.Y_.ug(a,b)?-1:this.Y_.ug(b,a)?1:0};OR.prototype.wE=function(a,b){return!this.Y_.ug(b,a)}; +OR.prototype.$classData=r({M9a:0},!1,"scala.math.Ordering$$anon$6",{M9a:1,f:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});function eT(){this.C2=null}eT.prototype=new u;eT.prototype.constructor=eT;d=eT.prototype;d.zs=function(a){var b=this.Lo();return b===q(Oa)?ja(Ja(Oa),[a]):b===q(Pa)?ja(Ja(Pa),[a]):b===q(Na)?ja(Ja(Na),[a]):b===q(Qa)?ja(Ja(Qa),[a]):b===q(Ra)?ja(Ja(Ra),[a]):b===q(Sa)?ja(Ja(Sa),[a]):b===q(Ta)?ja(Ja(Ta),[a]):b===q(Ma)?ja(Ja(Ma),[a]):b===q(Ka)?ja(Ja(oa),[a]):Mu(Nu(),this.Lo(),a)}; +d.h=function(a){if(a&&a.$classData&&a.$classData.ge.Iu){var b=this.Lo();a=a.Lo();b=b===a}else b=!1;return b};d.t=function(){return i9a(this,this.C2)};d.Lo=function(){return this.C2};d.$K=function(a){this.C2=a;return this};d.z=function(){return NJ(OJ(),this.C2)};d.$classData=r({T9a:0},!1,"scala.reflect.ClassTag$GenericClassTag",{T9a:1,f:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});function G7(){this.u=null}G7.prototype=new H6;G7.prototype.constructor=G7;G7.prototype.a=function(){FT.prototype.a.call(this);return this}; +G7.prototype.Qd=function(){pj();return(new Lf).a()};G7.prototype.$classData=r({kab:0},!1,"scala.collection.Seq$",{kab:1,xA:1,wA:1,vt:1,Mo:1,f:1,wt:1,No:1});var imb=void 0;function K(){imb||(imb=(new G7).a());return imb}function jmb(){this.u=null}jmb.prototype=new H6;jmb.prototype.constructor=jmb;function kmb(){}kmb.prototype=jmb.prototype;function H7(){}H7.prototype=new lWa;H7.prototype.constructor=H7; +H7.prototype.a=function(){lmb=this;(new JT).d1(Uc(function(){return function(a){return a}}(this)));return this};function mmb(a,b,c,e,f,g,h){var k=31&(b>>>g|0),l=31&(e>>>g|0);if(k!==l)return a=1<=this.ap(a,b)}; +d.$classData=r({nya:0},!1,"amf.core.emitter.SpecOrdering$Default$",{nya:1,f:1,lya:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});var Amb=void 0;function Fqa(){Amb||(Amb=(new zmb).a());return Amb}function Bmb(){}Bmb.prototype=new u;Bmb.prototype.constructor=Bmb;d=Bmb.prototype;d.a=function(){return this};d.zb=function(a){var b=a.Dm(w(function(){return function(e){return e.La().Yx()}}(this)));if(null!==b){a=b.ma();b=b.ya().nk(this);var c=K();return b.ia(a,c.u)}throw(new x).d(b);};d.ap=function(a,b){return a.La().ID(b.La())}; +d.wE=function(a,b){return 0>=this.ap(a,b)};d.$classData=r({oya:0},!1,"amf.core.emitter.SpecOrdering$Lexical$",{oya:1,f:1,lya:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});var Cmb=void 0;function tD(){Cmb||(Cmb=(new Bmb).a());return Cmb}function Dmb(){this.tg=this.Hg=this.ae=this.xc=this.uc=this.De=this.nb=this.Ic=this.g=this.ba=this.qa=null}Dmb.prototype=new u;Dmb.prototype.constructor=Dmb;d=Dmb.prototype; +d.a=function(){Emb=this;Cr(this);tU(this);a2(this);b2(this);R5(this);this.qa=tb(new ub,vb().hg,"Document","A Document is a parsing Unit that encodes a stand-alone DomainElement and can include references to other DomainElements that reference from the encoded DomainElement.\nSince it encodes a DomainElement, but also declares references, it behaves like a Fragment and a Module at the same time.\nThe main difference is that the Document encoded DomainElement is stand-alone and that the references declared are supposed to be private not for re-use from other Units", +H());return this};d.uD=function(a){this.g=a};d.nc=function(){};d.Mn=function(a){this.Hg=a};d.Pn=function(a){this.xc=a};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.On=function(a){this.tg=a};d.Jx=function(a){this.Ic=a};d.lc=function(){O();var a=(new P).a();return(new mf).K((new S).a(),a)};d.Kb=function(){return this.ba};d.bq=function(a){this.nb=a};d.Rn=function(a){this.ae=a};d.vD=function(a){this.ba=a};d.Nn=function(a){this.uc=a};d.Qn=function(a){this.De=a}; +d.$classData=r({Lya:0},!1,"amf.core.metamodel.document.DocumentModel$",{Lya:1,f:1,SA:1,yq:1,Hn:1,hc:1,Rb:1,rc:1,Sy:1});var Emb=void 0;function Gk(){Emb||(Emb=(new Dmb).a());return Emb}function Fmb(){this.wd=this.bb=this.mc=this.Zc=this.Va=this.qa=this.ba=this.g=this.Jc=this.DF=this.la=this.R=null;this.xa=0}Fmb.prototype=new u;Fmb.prototype.constructor=Fmb;d=Fmb.prototype; +d.a=function(){Gmb=this;Cr(this);uU(this);Laa(this);pb(this);var a=qb(),b=F().Tb;this.la=this.R=rb(new sb,a,G(b,"name"),tb(new ub,vb().Tb,"name","name for an entity",H()));a=(new xc).yd(yc());b=F().Ul;this.DF=rb(new sb,a,G(b,"domain"),tb(new ub,ci().Ul,"domain","RDFS domain property",H()));a=qf();b=F().Eb;this.Jc=rb(new sb,a,G(b,"schema"),tb(new ub,vb().Eb,"schema","Schema for an entity",H()));ii();a=[this.DF,this.Jc,this.R];b=-1+(a.length|0)|0;for(var c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;a=c;b=db().g; +c=ii();a=a.ia(b,c.u);b=nc().g;c=ii();this.g=a.ia(b,c.u);a=F().Zd;a=G(a,"DomainProperty");b=F().Qi;b=G(b,"Property");c=nc().ba;this.ba=ji(a,ji(b,c));this.qa=tb(new ub,vb().hg,"Custom Domain Property","Definition of an extension to the domain model defined directly by a user in the RAML/OpenAPI document.\nThis can be achieved by using an annotationType in RAML. In OpenAPI thy don't need to\n be declared, they can just be used.\n This should be mapped to new RDF properties declared directly in the main document or module.\n Contrast this extension mechanism with the creation of a propertyTerm in a vocabulary, a more\nre-usable and generic way of achieving the same functionality.\nIt can be validated using a SHACL shape", +H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.G8=function(a){this.Zc=a};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.Nk=function(a){this.Va=a};d.lc=function(){O();var a=(new P).a();return(new Pd).K((new S).a(),a)};d.Kb=function(){return this.ba};d.$classData=r({lza:0},!1,"amf.core.metamodel.domain.extensions.CustomDomainPropertyModel$",{lza:1,f:1,pd:1,hc:1,Rb:1,rc:1,Oi:1,Bga:1,sk:1});var Gmb=void 0;function Sk(){Gmb||(Gmb=(new Fmb).a());return Gmb} +function Hmb(){this.wd=this.bb=this.mc=this.R=this.la=this.Aj=this.te=this.qa=this.ba=null;this.xa=0}Hmb.prototype=new u;Hmb.prototype.constructor=Hmb;d=Hmb.prototype;d.a=function(){Imb=this;Cr(this);uU(this);wb(this);Lab(this);var a=F().Zd;a=G(a,"ParametrizedDeclaration");var b=nc().ba;this.ba=ji(a,b);this.qa=tb(new ub,vb().hg,"Parametrized Declaration","Generic graph template supporting variables that can be transformed into a domain element",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){}; +d.jc=function(){return this.qa};d.Ub=function(){return Kab(this)};d.K8=function(a){this.te=a};d.Vq=function(){throw mb(E(),(new nb).e("ParametrizedDeclaration is abstract and cannot be instantiated by default"));};d.M8=function(a){this.la=a};d.lc=function(){this.Vq()};d.Kb=function(){return this.ba};d.Vl=function(a){this.R=a};d.L8=function(a){this.Aj=a};d.$classData=r({qza:0},!1,"amf.core.metamodel.domain.templates.ParametrizedDeclarationModel$",{qza:1,f:1,Dga:1,pd:1,hc:1,Rb:1,rc:1,Oi:1,nm:1}); +var Imb=void 0;function FY(){Imb||(Imb=(new Hmb).a());return Imb}function Pk(){this.j=this.Ke=this.$g=this.x=this.g=null;this.xa=!1}Pk.prototype=new u;Pk.prototype.constructor=Pk;d=Pk.prototype;d.H=function(){return"ExternalDomainElement"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof Pk?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}}; +d.pc=function(a){return Rd(this,a)};d.bc=function(){return Ok()};d.fa=function(){return this.x};d.t=function(){return V(W(),this)};d.dd=function(){return"#/external"};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;this.$g=y();return this};d.$classData=r({Qza:0},!1,"amf.core.model.domain.ExternalDomainElement",{Qza:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1}); +function zi(){rf.call(this);this.mn=this.Xa=this.aa=null}zi.prototype=new jhb;zi.prototype.constructor=zi;d=zi.prototype;d.yh=function(){throw mb(E(),(new nb).e("Recursive shape cannot be linked"));};d.bc=function(){return Ci()};d.fa=function(){return this.Xa};function Di(a,b){a.mn=(new z).d(b);a.fh.iz(b);b.fh.U(w(function(c){return function(e){return c.fh.iz(e)}}(a)));return a}d.dd=function(){return"/recursive"}; +d.VN=function(a,b,c){b=(new S).a();O();var e=(new P).a();b=(new zi).K(b,e);b.j=this.j;Tca(this,a,b,y(),c);a=this.mn;a.b()||(a=a.c(),Di(b,a));this.fh.U(w(function(f,g){return function(h){return g.fh.iz(h)}}(this,b)));return b};d.mh=function(){return Uc(function(){return function(a,b){return(new zi).K(a,b)}}(this))};d.Y=function(){return this.aa};d.K=function(a,b){this.aa=a;this.Xa=b;rf.prototype.a.call(this);this.mn=y();return this}; +d.$classData=r({Xza:0},!1,"amf.core.model.domain.RecursiveShape",{Xza:1,Dx:1,f:1,qd:1,vc:1,tc:1,rg:1,xh:1,Ex:1});function hl(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}hl.prototype=new u;hl.prototype.constructor=hl;d=hl.prototype;d.H=function(){return"VariableValue"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof hl?this.g===a.g?this.x===a.x:!1:!1}; +d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return gl()};d.fa=function(){return this.x};d.t=function(){return V(W(),this)};d.dd=function(){var a=B(this.g,gl().R).A;a=a.b()?"default-variable":a.c();a=(new je).e(a);return"/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a}; +d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({kAa:0},!1,"amf.core.model.domain.templates.VariableValue",{kAa:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function Tx(){this.Th=this.Ca=null}Tx.prototype=new u;Tx.prototype.constructor=Tx;d=Tx.prototype;d.H=function(){return"DefaultArrayNode"};d.E=function(){return 1};d.h=function(a){return this===a?!0:a instanceof Tx?Bj(this.Ca,a.Ca):!1};d.rV=function(){var a=this.Ca,b=lc();return(new R).M(N(a,b,this.Th),this.Ca)}; +d.G=function(a){switch(a){case 0:return this.Ca;default:throw(new U).e(""+a);}};d.nV=function(){return UAa(this)};d.n3=function(){return PAa(this)};d.t=function(){return V(W(),this)};d.e5=function(){return RAa(this)};d.Qaa=function(){return SAa(this)};d.Vb=function(a,b){this.Ca=a;this.Th=b;return this};d.Sba=function(a){return oM(this,a)};d.z=function(){return X(this)};d.$classData=r({tAa:0},!1,"amf.core.parser.DefaultArrayNode",{tAa:1,f:1,qAa:1,Iga:1,LY:1,y:1,v:1,q:1,o:1}); +function Aq(){this.ni=this.Df=this.qh=null;this.lj=0;this.Fu=this.a3=this.Ip=this.Bc=null}Aq.prototype=new u;Aq.prototype.constructor=Aq;function Jmb(){}d=Jmb.prototype=Aq.prototype;d.H=function(){return"ParserContext"};d.Ar=function(a,b){WAa(this,a,b)};function Ifa(a){var b=a.a3.Ur();a=w(function(){return function(e){var f=Lc(e);return Hq(new Iq,e,(new v2).vi(f.b()?e.j:f.c(),H()),y())}}(a));var c=Xd();return b.ka(a,c.u).ke()}d.E=function(){return 5}; +d.h=function(a){if(this===a)return!0;if(a instanceof Aq){if(this.qh===a.qh){var b=this.Df,c=a.Df;b=null===b?null===c:b.h(c)}else b=!1;if(b&&this.ni===a.ni&&this.lj===a.lj)return b=this.Hp(),a=a.Hp(),null===b?null===a:b.h(a)}return!1};d.yB=function(a,b){return YAa(this,a,b)};d.G=function(a){switch(a){case 0:return this.qh;case 1:return this.Df;case 2:return this.ni;case 3:return this.lj;case 4:return this.Hp();default:throw(new U).e(""+a);}};d.Ns=function(a,b,c,e,f,g){this.Gc(a.j,b,c,e,f,Yb().dh,g)}; +d.t=function(){return V(W(),this)};d.Gc=function(a,b,c,e,f,g,h){var k=(new qg).e(e);var l=h.b()?"":h.c();l=(new qg).e(l);var m=Gb().uN;k=xq(k,l,m);k=(new qg).e(k);f.b()?l=y():(l=f.c(),l=(new z).d(l.r));l=l.b()?"":l.c();l=(new qg).e(l);m=Gb().uN;k=xq(k,l,m);this.Fu.Ha(k)||(this.Fu.Tm(k),k=this.Hp(),k instanceof z?k.i.Gc(a,b,c,e,f,g,h.b()?(new z).d(this.qh):h):(k=bp(),l=this.lj,h=h.b()?(new z).d(this.qh):h,WLa(gp(k),g,a,b,c,e,f,l,h)))}; +function eHa(a,b){var c=a.a3,e=Lc(b);c.Ja(e.b()?b.j:e.c())instanceof z||(c=a.a3,e=Lc(b),c.Ue(e.b()?b.j:e.c(),b));return a}d.Hp=function(){return this.Bc};d.z=function(){var a=-889275714;a=OJ().Ga(a,NJ(OJ(),this.qh));a=OJ().Ga(a,NJ(OJ(),this.Df));a=OJ().Ga(a,NJ(OJ(),this.ni));a=OJ().Ga(a,this.lj);a=OJ().Ga(a,NJ(OJ(),this.Hp()));return OJ().fe(a,5)};d.zo=function(a,b,c,e,f){this.qh=a;this.Df=b;this.ni=c;this.lj=e;this.Bc=f;this.Ip=Rb(Ut(),H());this.a3=Rb(Ut(),H());this.Fu=J(DB(),H());return this}; +d.$classData=r({Xu:0},!1,"amf.core.parser.ParserContext",{Xu:1,f:1,zq:1,Zp:1,Bp:1,y:1,v:1,q:1,o:1});function V7(){}V7.prototype=new U5;V7.prototype.constructor=V7;V7.prototype.a=function(){return this};V7.prototype.P=function(a){return this.cu(a)};V7.prototype.cu=function(a){a=kb(a);var b=F().Eb;b=ic(G(b,"Shape"));for(a=a.Kb();!a.b();){if(ic(a.ga())===b)return!0;a=a.ta()}return!1}; +V7.prototype.$classData=r({ICa:0},!1,"amf.core.resolution.stages.selectors.ShapeSelector$",{ICa:1,OR:1,f:1,za:1,y:1,v:1,q:1,o:1,lm:1});var Kmb=void 0;function UYa(){Kmb||(Kmb=(new V7).a());return Kmb}function W7(){this.kp=this.ws=this.Xb=this.ZJ=this.p=this.pb=this.gh=this.dm=this.TL=this.$J=null}W7.prototype=new u;W7.prototype.constructor=W7;d=W7.prototype;d.H=function(){return"DeclarationsGroupEmitter"};d.E=function(){return 10}; +d.h=function(a){if(this===a)return!0;if(a instanceof W7){var b=this.$J,c=a.$J;(null===b?null===c:b.h(c))?(b=this.TL,c=a.TL,b=null===b?null===c:b.h(c)):b=!1;b?(b=this.dm,c=a.dm,b=null===b?null===c:b.h(c)):b=!1;b?(b=this.gh,c=a.gh,b=null===b?null===c:b.h(c)):b=!1;b?(b=this.pb,c=a.pb,b=null===b?null===c:b.h(c)):b=!1;b&&this.p===a.p?(b=this.ZJ,c=a.ZJ,b=null===b?null===c:b.h(c)):b=!1;b?(b=this.Xb,c=a.Xb,b=null===b?null===c:U2(b,c)):b=!1;b?(b=this.ws,c=a.ws,b=null===b?null===c:b.h(c)):b=!1;return b?this.kp=== +a.kp:!1}return!1};d.G=function(a){switch(a){case 0:return this.$J;case 1:return this.TL;case 2:return this.dm;case 3:return this.gh;case 4:return this.pb;case 5:return this.p;case 6:return this.ZJ;case 7:return this.Xb;case 8:return this.ws;case 9:return this.kp;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +d.Qa=function(a){var b=B(this.TL.g,UV().$u).A;b=b.b()?null:b.c();b=nd(this,b);a:{if(null!==b&&(b=b.ya(),b instanceof ze)){var c=(new z).d(O0a(b,this));break a}c=y()}if(this.ZJ.b()){b=B(this.TL.g,UV().R).A;b=b.b()?null:b.c();T();var e=mh(T(),b);b=(new PA).e(a.ca);var f=b.s,g=b.ca,h=(new rr).e(g);Lmb(this).U(w(function(p,t,v){return function(A){var D=B(A.g,Fw().HX).A;D instanceof z?D=D.i:(D=A.j,D=Mc(ua(),D,"#"),D=Oc((new Pc).fd(D)),D=Mc(ua(),D,"/"),D=Oc((new Pc).fd(D)),D=(new je).e(D),D=ba.decodeURI(D.td)); +var C=mh(T(),D);D=(new PA).e(t.ca);var I=v.b()?y():mNa(v.c(),A),L=p.dm,Y=p.gh,ia=p.pb,pa=p.p,La=p.Xb,ob=p.kp,zb=y(),Zb=y(),Cc=H();nNa(A,L,Y,ia,pa,La,zb,!1,Zb,I,!1,Cc,ob).Ob(D);A=D.s;C=[C];if(0>A.w)throw(new U).e("0");L=C.length|0;I=A.w+L|0;uD(A,I);Ba(A.L,0,A.L,L,A.w);L=A.L;pa=L.n.length;ia=Y=0;La=C.length|0;pa=Lac.w)throw(new U).e("0"); +g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length|0;k=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w); +g=c.L;k=g.n.length;l=h=0;m=e.length|0;k=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length|0;k=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var k=g.n.length,l=h=0,m=e.length|0;k=m>24?z_a(this):this.mc};d.an=function(a){this.oe=a}; +d.Ub=function(){var a=this.Ut,b=this.R,c=this.ej,e=this.Ax,f=this.at,g=this.Y7,h=db().g,k=nc().g,l=ii();h=h.ia(k,l.u);return ji(a,ji(b,ji(c,ji(e,ji(f,ji(g,h))))))};d.jc=function(){return this.qa};d.KN=function(a){this.at=a};d.$m=function(a){this.ed=a};d.lc=function(){O();var a=(new P).a();return(new Cd).K((new S).a(),a)};d.JN=function(a){this.Ts=a};d.Kb=function(){return this.ba}; +d.$classData=r({xGa:0},!1,"amf.plugins.document.vocabularies.metamodel.domain.NodeMappingModel$",{xGa:1,f:1,pd:1,hc:1,Rb:1,rc:1,mm:1,PR:1,d7:1});var Ymb=void 0;function wj(){Ymb||(Ymb=(new Xmb).a());return Ymb}function gO(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}gO.prototype=new u;gO.prototype.constructor=gO;d=gO.prototype;d.H=function(){return"ClassTerm"};d.E=function(){return 2};d.ub=function(a){Vb().Ia(this.j).b()&&Ai(this,a);return this}; +d.h=function(a){return this===a?!0:a instanceof gO?this.g===a.g?this.x===a.x:!1:!1};function Zmb(a,b){var c=fO().kh,e=w(function(){return function(g){return ih(new jh,g,(new P).a())}}(a)),f=K();b=Zr(new $r,b.ka(e,f.u),(new P).a());Vd(a,c,b)}d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return fO()};d.t=function(){return V(W(),this)};d.fa=function(){return this.x};d.dd=function(){return""}; +d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};function $mb(a,b){var c=fO().fz,e=w(function(){return function(g){return ih(new jh,g,(new P).a())}}(a)),f=K();b=Zr(new $r,b.ka(e,f.u),(new P).a());Vd(a,c,b)}d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({OGa:0},!1,"amf.plugins.document.vocabularies.model.domain.ClassTerm",{OGa:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1}); +function IV(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}IV.prototype=new u;IV.prototype.constructor=IV;d=IV.prototype;d.H=function(){return"DocumentMapping"};d.E=function(){return 2};d.ub=function(a){Vb().Ia(this.j).b()&&Ai(this,a);return this};d.h=function(a){return this===a?!0:a instanceof IV?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return GO()}; +d.fa=function(){return this.x};d.t=function(){return V(W(),this)};d.dd=function(){return""};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({YGa:0},!1,"amf.plugins.document.vocabularies.model.domain.DocumentMapping",{YGa:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function VV(){this.j=this.Ke=this.x=this.g=null;this.xa=!1} +VV.prototype=new u;VV.prototype.constructor=VV;d=VV.prototype;d.H=function(){return"DocumentsModel"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof VV?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return Hc()};d.t=function(){return V(W(),this)};d.fa=function(){return this.x};d.dd=function(){return"/documents"}; +d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({$Ga:0},!1,"amf.plugins.document.vocabularies.model.domain.DocumentsModel",{$Ga:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function yO(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}yO.prototype=new u;yO.prototype.constructor=yO;d=yO.prototype;d.H=function(){return"External"};d.E=function(){return 2}; +d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof yO?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return dd()};d.fa=function(){return this.x};d.t=function(){return V(W(),this)}; +d.dd=function(){var a=B(this.g,dd().Zc).A;if(a instanceof z)return a=(new je).e(a.i),"/externals/"+jj(a.td);if(y()===a)throw mb(E(),(new nb).e("Cannot set ID of external without alias"));throw(new x).d(a);};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this}; +d.$classData=r({bHa:0},!1,"amf.plugins.document.vocabularies.model.domain.External",{bHa:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function OV(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}OV.prototype=new u;OV.prototype.constructor=OV;d=OV.prototype;d.H=function(){return"PublicNodeMapping"};d.E=function(){return 2};d.ub=function(a){Vb().Ia(this.j).b()&&Ai(this,a);return this};d.h=function(a){return this===a?!0:a instanceof OV?this.g===a.g?this.x===a.x:!1:!1}; +d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return UV()};d.fa=function(){return this.x};d.t=function(){return V(W(),this)};d.dd=function(){return""};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this}; +d.$classData=r({qHa:0},!1,"amf.plugins.document.vocabularies.model.domain.PublicNodeMapping",{qHa:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function bO(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}bO.prototype=new u;bO.prototype.constructor=bO;d=bO.prototype;d.H=function(){return"VocabularyReference"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof bO?this.g===a.g?this.x===a.x:!1:!1}; +d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return td()};d.fa=function(){return this.x};d.t=function(){return V(W(),this)};d.dd=function(){var a=B(this.g,td().Xp).A;if(a instanceof z)return a=(new je).e(a.i),"/vocabularyReference/"+jj(a.td);if(y()===a)throw mb(E(),(new nb).e("Cannot set ID of VocabularyReference without alias"));throw(new x).d(a);};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)}; +d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({uHa:0},!1,"amf.plugins.document.vocabularies.model.domain.VocabularyReference",{uHa:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function y2(){this.r=this.$=null}y2.prototype=new u;y2.prototype.constructor=y2;d=y2.prototype;d.a=function(){this.$="form-body-parameter";this.r="true";return this};d.H=function(){return"FormBodyParameter"};d.E=function(){return 0}; +d.h=function(a){return a instanceof y2&&!0};d.G=function(a){throw(new U).e(""+a);};d.t=function(){return V(W(),this)};d.ve=function(){return this.$};d.z=function(){return X(this)};var Rma=r({VIa:0},!1,"amf.plugins.document.webapi.annotations.FormBodyParameter",{VIa:1,f:1,Eh:1,gf:1,Vm:1,y:1,v:1,q:1,o:1});y2.prototype.$classData=Rma;function Ty(){this.r=this.$=this.j=null}Ty.prototype=new u;Ty.prototype.constructor=Ty;d=Ty.prototype;d.H=function(){return"JSONSchemaId"};d.E=function(){return 1}; +d.h=function(a){return this===a?!0:a instanceof Ty?this.j===a.j:!1};d.G=function(a){switch(a){case 0:return this.j;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.ve=function(){return this.$};d.e=function(a){this.j=a;this.$="json-schema-id";this.r=a;return this};d.z=function(){return X(this)};var p4a=r({aJa:0},!1,"amf.plugins.document.webapi.annotations.JSONSchemaId",{aJa:1,f:1,Eh:1,gf:1,Vm:1,y:1,v:1,q:1,o:1});Ty.prototype.$classData=p4a; +function C2(){this.r=this.$=this.yc=this.KL=null}C2.prototype=new u;C2.prototype.constructor=C2;d=C2.prototype;d.H=function(){return"ParameterNameForPayload"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof C2&&this.KL===a.KL){var b=this.yc;a=a.yc;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.KL;case 1:return this.yc;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.ve=function(){return this.$};d.z=function(){return X(this)}; +d.xU=function(a,b){this.KL=a;this.yc=b;this.$="parameter-name-for-payload";this.r=a+"-\x3e"+b.t();return this};var u5a=r({fJa:0},!1,"amf.plugins.document.webapi.annotations.ParameterNameForPayload",{fJa:1,f:1,Eh:1,gf:1,Vm:1,y:1,v:1,q:1,o:1});C2.prototype.$classData=u5a;function g4(){this.r=this.$=this.Vk=null}g4.prototype=new u;g4.prototype.constructor=g4;d=g4.prototype;d.H=function(){return"ParsedJSONExample"};d.E=function(){return 1}; +d.h=function(a){return this===a?!0:a instanceof g4?this.Vk===a.Vk:!1};d.G=function(a){switch(a){case 0:return this.Vk;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.ve=function(){return this.$};d.e=function(a){this.Vk=a;this.$="parsed-json-example";this.r=a;return this};d.z=function(){return X(this)};d.$classData=r({hJa:0},!1,"amf.plugins.document.webapi.annotations.ParsedJSONExample",{hJa:1,f:1,Eh:1,gf:1,Vm:1,y:1,v:1,q:1,o:1});function jg(){this.r=this.$=this.Vk=null} +jg.prototype=new u;jg.prototype.constructor=jg;d=jg.prototype;d.H=function(){return"ParsedRamlDatatype"};d.E=function(){return 1};d.h=function(a){return this===a?!0:a instanceof jg?this.Vk===a.Vk:!1};d.G=function(a){switch(a){case 0:return this.Vk;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.ve=function(){return this.$};d.e=function(a){this.Vk=a;this.$="parsed-raml-datatype";this.r=a;return this};d.z=function(){return X(this)}; +var wmb=r({kJa:0},!1,"amf.plugins.document.webapi.annotations.ParsedRamlDatatype",{kJa:1,f:1,Eh:1,gf:1,Vm:1,y:1,v:1,q:1,o:1});jg.prototype.$classData=wmb;function G2(){this.$L=!1;this.r=this.$=this.yc=null}G2.prototype=new u;G2.prototype.constructor=G2;d=G2.prototype;d.H=function(){return"RequiredParamPayload"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof G2&&this.$L===a.$L){var b=this.yc;a=a.yc;return null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.$L;case 1:return this.yc;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.ve=function(){return this.$};d.z=function(){var a=-889275714;a=OJ().Ga(a,this.$L?1231:1237);a=OJ().Ga(a,NJ(OJ(),this.yc));return OJ().fe(a,2)};function yYa(a,b,c){a.$L=b;a.yc=c;a.$="required-param-payload";a.r=""+vva(MH(),b,"-\x3e")+c.t();return a} +var q5a=r({mJa:0},!1,"amf.plugins.document.webapi.annotations.RequiredParamPayload",{mJa:1,f:1,Eh:1,gf:1,Vm:1,y:1,v:1,q:1,o:1});G2.prototype.$classData=q5a;function gy(){YV.call(this);this.Zia=this.zqa=this.yV=this.um=null}gy.prototype=new sOa;gy.prototype.constructor=gy;d=gy.prototype;d.H=function(){return"JsonSchemaEmitterContext"};d.E=function(){return 2};d.h=function(a){if(this===a)return!0;if(a instanceof gy){var b=this.um,c=a.um;return(null===b?null===c:b.h(c))?this.yV===a.yV:!1}return!1}; +d.G=function(a){switch(a){case 0:return this.um;case 1:return this.yV;default:throw(new U).e(""+a);}};d.Xba=function(){return this.yV};d.t=function(){return V(W(),this)};d.hj=function(){return this.um};d.Aqa=function(){return this.zqa};d.cU=function(a,b){this.um=a;this.yV=b;var c=KO();YV.prototype.Ti.call(this,a,c,b);PEa||(PEa=(new ZO).a());this.zqa=PEa;this.Zia="anyOf";return this};d.$ia=function(){return this.Zia};d.z=function(){return X(this)};d.Rda=function(){return"/definitions/"}; +d.$classData=r({rJa:0},!1,"amf.plugins.document.webapi.contexts.JsonSchemaEmitterContext",{rJa:1,cha:1,dha:1,TR:1,f:1,y:1,v:1,q:1,o:1});function $w(){this.Ae=this.N=this.Hj=this.ET=this.Ba=this.la=null}$w.prototype=new u;$w.prototype.constructor=$w;d=$w.prototype;d.H=function(){return"RamlScalarValueEmitter"};d.E=function(){return 4}; +d.h=function(a){if(this===a)return!0;if(a instanceof $w){if(this.la===a.la){var b=this.Ba,c=a.Ba;b=null===b?null===c:b.h(c)}else b=!1;b?(b=this.ET,c=a.ET,b=null===b?null===c:b.h(c)):b=!1;if(b)return b=this.Hj,a=a.Hj,null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.la;case 1:return this.Ba;case 2:return this.ET;case 3:return this.Hj;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)}; +function anb(a,b){T();var c=a.la,e=mh(T(),c);c=(new PA).e(b.ca);var f=c.s,g=c.ca,h=(new rr).e(g);T();var k=nr(or(),a.Ba.r.r.r),l=a.Hj;UUa(h,"value",mr(0,k,l.b()?a.Ae:l.c()));a.ET.U(w(function(p,t){return function(v){p.N.zf.tS().ug(v,Fqa()).Qa(t)}}(a,h)));pr(f,mr(T(),tr(ur(),h.s,g),Q().sa));a=c.s;e=[e];if(0>a.w)throw(new U).e("0");g=e.length|0;f=a.w+g|0;uD(a,f);Ba(a.L,0,a.L,g,a.w);g=a.L;l=g.n.length;k=h=0;var m=e.length|0;l=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;l=g.n.length;k=h= +0;m=e.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=b.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=me.w)throw(new U).e("0");g=c.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;m=c.length|0;l=mh.w)throw(new U).e("0");m=k.length|0;l=h.w+m|0;uD(h,l);Ba(h.L,0,h.L,m,h.w);m=h.L;v=m.n.length;t=p=0;var A=k.length|0;v=Ah.w)throw(new U).e("0");m=k.length|0;l=h.w+m|0;uD(h,l);Ba(h.L,0,h.L,m,h.w);m=h.L;v=m.n.length;t=p=0;A=k.length|0;v=Ab.w)throw(new U).e("0");var g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;var h=g.n.length,k=0,l=0,m=e.length|0;h=mb.w)throw(new U).e("0");g=e.length|0;f=b.w+g|0;uD(b,f);Ba(b.L,0,b.L,g,b.w);g=b.L;h=g.n.length;l=k=0;m=e.length|0;h=me.w)throw(new U).e("0");k=g.length|0;h=e.w+k|0;uD(e,h);Ba(e.L,0,e.L,k,e.w);k=e.L;var m=k.n.length,p=l=0,t=g.length|0;m=t>24?z_a(this):this.mc};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.Nk=function(a){this.Va=a};d.lc=function(){O();var a=(new P).a(),b=(new S).a();return(new Kl).K(b,a)};d.Kb=function(){return this.ba};d.Vl=function(a){this.R=a}; +d.$classData=r({u_a:0},!1,"amf.plugins.domain.webapi.metamodel.EndPointModel$",{u_a:1,f:1,pd:1,hc:1,Rb:1,rc:1,Oi:1,nm:1,sk:1});var ynb=void 0;function Jl(){ynb||(ynb=(new xnb).a());return ynb}function znb(){this.wd=this.bb=this.mc=this.oe=this.ed=this.te=this.pf=this.R=this.Va=this.qa=this.g=this.ba=this.WF=this.VF=this.kD=this.pN=this.RF=this.g8=null;this.xa=0}znb.prototype=new u;znb.prototype.constructor=znb;d=znb.prototype;d.bn=function(a){this.te=a}; +d.a=function(){Anb=this;Cr(this);uU(this);bM(this);wb(this);pb(this);var a=qb(),b=F().Ta;this.g8=rb(new sb,a,G(b,"template"),tb(new ub,vb().Ta,"template","URL template for a templated link",H()));a=qb();b=F().Ta;this.RF=rb(new sb,a,G(b,"operationId"),tb(new ub,vb().Ta,"operation ID","Identifier of the target operation",H()));a=qb();b=F().Ta;this.pN=rb(new sb,a,G(b,"operationRef"),tb(new ub,vb().Ta,"operation Ref","Reference of the target operation",H()));a=(new xc).yd(Gn());b=F().Ta;this.kD=rb(new sb, +a,G(b,"mapping"),tb(new ub,vb().Ta,"mapping","Variable mapping for the URL template",H()));a=qb();b=F().Ta;this.VF=rb(new sb,a,G(b,"requestBody"),tb(new ub,vb().Ta,"request body","",H()));a=Yl();b=F().Ta;this.WF=rb(new sb,a,G(b,"server"),tb(new ub,vb().Ta,"server","",H()));a=F().Ta;a=G(a,"TemplatedLink");b=nc().ba;this.ba=ji(a,b);a=this.R;b=this.g8;var c=this.RF,e=this.kD,f=this.VF,g=this.Va,h=this.WF,k=nc().g,l=db().g,m=ii();k=k.ia(l,m.u);this.g=ji(a,ji(b,ji(c,ji(e,ji(f,ji(g,ji(h,k)))))));this.qa= +tb(new ub,vb().Ta,"Templated Link","Templated link containing URL template and variables mapping",H());return this};d.cn=function(a){this.pf=a};d.Ed=function(a){this.bb=a};d.nc=function(){};d.an=function(a){this.oe=a};d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.$m=function(a){this.ed=a};d.Nk=function(a){this.Va=a};d.lc=function(){O();var a=(new P).a();return(new Bn).K((new S).a(),a)};d.Kb=function(){return this.ba};d.Vl=function(a){this.R=a}; +d.$classData=r({G_a:0},!1,"amf.plugins.domain.webapi.metamodel.TemplatedLinkModel$",{G_a:1,f:1,pd:1,hc:1,Rb:1,rc:1,mm:1,nm:1,sk:1});var Anb=void 0;function An(){Anb||(Anb=(new znb).a());return Anb}function Bnb(){this.wd=this.bb=this.mc=this.R=this.Va=this.Xm=this.qa=this.ba=this.dc=this.Yp=this.Uv=this.OF=this.SF=this.XF=this.Ym=this.Gh=this.fY=this.yl=this.Wp=this.lh=null;this.xa=0}Bnb.prototype=new u;Bnb.prototype.constructor=Bnb;d=Bnb.prototype; +d.a=function(){Cnb=this;Cr(this);uU(this);wb(this);pb(this);ida(this);var a=(new xc).yd(Yl()),b=F().Ta;this.lh=rb(new sb,a,G(b,"server"),tb(new ub,vb().Ta,"server","server information",H()));a=(new xc).yd(qb());b=F().Ta;this.Wp=rb(new sb,a,G(b,"accepts"),tb(new ub,vb().Ta,"accepts","Media-types accepted in a API request",H()));a=(new xc).yd(qb());b=F().Ta;this.yl=rb(new sb,a,G(b,"contentType"),tb(new ub,vb().Ta,"content type","Media types returned by a API response",H()));a=qb();b=F().Ta;this.fY= +rb(new sb,a,G(b,"identifier"),tb(new ub,vb().Ta,"identifier","Specific api identifier",H()));a=(new xc).yd(qb());b=F().Ta;this.Gh=rb(new sb,a,G(b,"scheme"),tb(new ub,vb().Ta,"scheme","URI scheme for the API protocol",H()));a=qb();b=F().Tb;this.Ym=rb(new sb,a,G(b,"version"),tb(new ub,vb().Tb,"version","Version of the API",H()));a=qb();b=F().Tb;this.XF=rb(new sb,a,G(b,"termsOfService"),tb(new ub,vb().Tb,"terms of service","Terms and conditions when using the API",H()));a=Tl();b=F().Tb;this.SF=rb(new sb, +a,G(b,"provider"),tb(new ub,vb().Tb,"provider","Organization providing some kind of asset or service",H()));a=Ml();b=F().Tb;this.OF=rb(new sb,a,G(b,"license"),tb(new ub,vb().Tb,"license","License for the API",H()));a=(new xc).yd(li());b=F().Tb;this.Uv=rb(new sb,a,G(b,"documentation"),tb(new ub,vb().Tb,"documentation","Documentation associated to the API",H()));a=(new xc).yd(Jl());b=F().Ta;this.Yp=rb(new sb,a,G(b,"endpoint"),tb(new ub,vb().Ta,"endpoint","End points defined in the API",H()));a=(new xc).yd(rm()); +b=F().dc;this.dc=rb(new sb,a,G(b,"security"),tb(new ub,vb().dc,"security","Textual indication of the kind of security scheme used",H()));a=F().Ta;a=G(a,"WebAPI");b=F().Zd;b=G(b,"RootDomainElement");var c=nc().ba;this.ba=ji(a,ji(b,c));this.qa=tb(new ub,vb().Ta,"Web API","Top level element describing a HTTP API",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa}; +d.Ub=function(){ii();for(var a=[this.R,this.Va,this.fY,this.lh,this.Wp,this.yl,this.Gh,this.Ym,this.XF,this.SF,this.OF,this.Uv,this.Yp,this.dc,this.Xm],b=-1+(a.length|0)|0,c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;a=c;b=nc().g;c=ii();return a.ia(b,c.u)};d.Nk=function(a){this.Va=a};d.lc=function(){O();var a=(new P).a();return(new Rm).K((new S).a(),a)};d.rS=function(a){this.Xm=a};d.Kb=function(){return this.ba};d.Vl=function(a){this.R=a}; +d.$classData=r({H_a:0},!1,"amf.plugins.domain.webapi.metamodel.WebApiModel$",{H_a:1,f:1,pd:1,hc:1,Rb:1,rc:1,nm:1,sk:1,UY:1});var Cnb=void 0;function Qm(){Cnb||(Cnb=(new Bnb).a());return Cnb}function Dnb(){this.wd=this.bb=this.mc=this.R=this.la=this.Aj=this.te=this.qa=this.ba=null;this.xa=0}Dnb.prototype=new u;Dnb.prototype.constructor=Dnb;d=Dnb.prototype; +d.a=function(){Enb=this;Cr(this);uU(this);wb(this);Lab(this);var a=F().Ta;a=G(a,"ParametrizedResourceType");var b=FY().ba;this.ba=ji(a,b);this.qa=tb(new ub,vb().Ta,"Parametrized Resource Type","RAML resource type that can accept parameters",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){return Kab(this)};d.K8=function(a){this.te=a};d.M8=function(a){this.la=a};d.lc=function(){O();var a=(new P).a();return(new ij).K((new S).a(),a)}; +d.Kb=function(){return this.ba};d.Vl=function(a){this.R=a};d.L8=function(a){this.Aj=a};d.$classData=r({m0a:0},!1,"amf.plugins.domain.webapi.metamodel.templates.ParametrizedResourceTypeModel$",{m0a:1,f:1,Dga:1,pd:1,hc:1,Rb:1,rc:1,Oi:1,nm:1});var Enb=void 0;function sea(){Enb||(Enb=(new Dnb).a());return Enb}function Fnb(){this.wd=this.bb=this.mc=this.R=this.la=this.Aj=this.te=this.qa=this.ba=null;this.xa=0}Fnb.prototype=new u;Fnb.prototype.constructor=Fnb;d=Fnb.prototype; +d.a=function(){Gnb=this;Cr(this);uU(this);wb(this);Lab(this);var a=F().Ta;a=G(a,"ParametrizedTrait");var b=FY().ba;this.ba=ji(a,b);this.qa=tb(new ub,vb().Ta,"Parametrized Trait","RAML trait with declared parameters",H());return this};d.Ed=function(a){this.bb=a};d.nc=function(){};d.jc=function(){return this.qa};d.Ub=function(){return Kab(this)};d.K8=function(a){this.te=a};d.M8=function(a){this.la=a};d.lc=function(){O();var a=(new P).a();return(new kj).K((new S).a(),a)};d.Kb=function(){return this.ba}; +d.Vl=function(a){this.R=a};d.L8=function(a){this.Aj=a};d.$classData=r({n0a:0},!1,"amf.plugins.domain.webapi.metamodel.templates.ParametrizedTraitModel$",{n0a:1,f:1,Dga:1,pd:1,hc:1,Rb:1,rc:1,Oi:1,nm:1});var Gnb=void 0;function tea(){Gnb||(Gnb=(new Fnb).a());return Gnb}function em(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}em.prototype=new u;em.prototype.constructor=em;d=em.prototype;d.H=function(){return"Encoding"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)}; +d.h=function(a){return this===a?!0:a instanceof em?this.g===a.g?this.x===a.x:!1:!1};d.lI=function(a){O();var b=(new P).a();b=(new Wl).K((new S).a(),b);O();var c=(new P).a();a=Sd(b,a,c);b=dm().Tf;ig(this,b,a);return a};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return dm()};d.t=function(){return V(W(),this)};d.fa=function(){return this.x}; +d.dd=function(){var a=B(this.g,dm().lD).A;a=a.b()?"default-encoding":a.c();a=(new je).e(a);return"/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({r0a:0},!1,"amf.plugins.domain.webapi.models.Encoding",{r0a:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function Hn(){this.j=this.Ke=this.x=this.g=null;this.xa=!1} +Hn.prototype=new u;Hn.prototype.constructor=Hn;d=Hn.prototype;d.H=function(){return"IriTemplateMapping"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof Hn?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return Gn()};d.fa=function(){return this.x};d.t=function(){return V(W(),this)}; +d.dd=function(){var a=B(this.g,Gn().pD).A;a=a.b()?"unknownVar":a.c();a=(new je).e(a);return"/mapping/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({u0a:0},!1,"amf.plugins.domain.webapi.models.IriTemplateMapping",{u0a:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1}); +function Zl(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}Zl.prototype=new u;Zl.prototype.constructor=Zl;d=Zl.prototype;d.H=function(){return"Server"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof Zl?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return Yl()};d.t=function(){return V(W(),this)}; +d.fa=function(){return this.x};d.dd=function(){var a=B(this.g,Yl().Pf).A;a=a.b()?null:a.c();a=(new je).e(a);return"/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({H0a:0},!1,"amf.plugins.domain.webapi.models.Server",{H0a:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1}); +function Km(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}Km.prototype=new u;Km.prototype.constructor=Km;d=Km.prototype;d.H=function(){return"OAuth2Flow"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof Km?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return Jm()};d.t=function(){return V(W(),this)}; +d.fa=function(){return this.x};d.dd=function(){var a=B(this.g,Jm().Wv).A;a=a.b()?"default-flow":a.c();a=(new je).e(a);return"/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({g1a:0},!1,"amf.plugins.domain.webapi.models.security.OAuth2Flow",{g1a:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1}); +function Hm(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}Hm.prototype=new u;Hm.prototype.constructor=Hm;d=Hm.prototype;d.H=function(){return"Scope"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof Hm?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return Gm()};d.fa=function(){return this.x}; +d.t=function(){return V(W(),this)};d.dd=function(){var a=B(this.g,Gm().R).A;a=a.b()?"default-scope":a.c();a=(new je).e(a);return"/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({l1a:0},!1,"amf.plugins.domain.webapi.models.security.Scope",{l1a:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1}); +function tm(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}tm.prototype=new u;tm.prototype.constructor=tm;d=tm.prototype;d.H=function(){return"SecurityRequirement"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof tm?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return rm()};d.fa=function(){return this.x}; +d.t=function(){return V(W(),this)};d.dd=function(){var a=B(this.g,rm().R).A;a=a.b()?"default-requirement":a.c();a=(new je).e(a);return"/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};function A5a(a,b){O();var c=(new P).a();c=(new jm).K((new S).a(),c);var e=im().R;b=eb(c,e,b);c=rm().Gh;ig(a,c,b);return b}d.Y=function(){return this.g};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this}; +d.$classData=r({n1a:0},!1,"amf.plugins.domain.webapi.models.security.SecurityRequirement",{n1a:1,f:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function RZ(){CF.call(this);this.yP=null}RZ.prototype=new X2;RZ.prototype.constructor=RZ;d=RZ.prototype;d.H=function(){return"ParseException"};function Jua(a){var b=new RZ;b.yP=a;CF.prototype.Ge.call(b,null,null);return b}d.E=function(){return 1};d.h=function(a){if(this===a)return!0;if(a instanceof RZ){var b=this.yP;a=a.yP;return null===b?null===a:b.h(a)}return!1}; +d.G=function(a){switch(a){case 0:return this.yP;default:throw(new U).e(""+a);}};d.xo=function(){return this.yP.wba()};d.z=function(){return X(this)};d.$classData=r({s3a:0},!1,"org.mulesoft.common.parse.ParseException",{s3a:1,wi:1,wg:1,bf:1,f:1,o:1,y:1,v:1,q:1});function X7(){M5.call(this);this.xp=null}X7.prototype=new c$a;X7.prototype.constructor=X7;d=X7.prototype;d.a=function(){O();var a=(new P).a();X7.prototype.TG.call(this,(new ad).K((new S).a(),a));return this}; +d.TG=function(a){this.xp=a;M5.prototype.TG.call(this,a);return this};d.$k=function(){return this.xp};d.Xr=function(){return this.xp};d.Be=function(){return this.xp};d.Rl=function(a){return V2(this,a)};d.Wr=function(){return this.xp};d.oc=function(){return this.xp};X7.prototype.getDeclarationByName=function(a){return this.Rl(a)};Object.defineProperty(X7.prototype,"_internal",{get:function(){return this.$k()},configurable:!0}); +X7.prototype.$classData=r({O6a:0},!1,"webapi.WebApiVocabulary",{O6a:1,vga:1,f:1,dj:1,qc:1,gc:1,ib:1,Wu:1,aw:1});function sI(){this.tma=this.Cg=!1;this.JS=null}sI.prototype=new bmb;sI.prototype.constructor=sI;function cmb(a,b){for(;""!==b;){var c=b.indexOf("\n")|0;if(0>c)a.JS=""+a.JS+b,b="";else{var e=""+a.JS+b.substring(0,c);ba.console&&(a.tma&&ba.console.error?ba.console.error(e):ba.console.log(e));a.JS="";b=b.substring(1+c|0)}}}sI.prototype.eq=function(a){this.tma=a;(new d9a).a();this.JS="";return this}; +sI.prototype.US=function(){};sI.prototype.$classData=r({M7a:0},!1,"java.lang.JSConsoleBasedPrintStream",{M7a:1,khb:1,jhb:1,x2a:1,f:1,ZY:1,eba:1,w7:1,SU:1});function Hnb(){R.call(this);this.b5=this.Z4=0}Hnb.prototype=new dgb;Hnb.prototype.constructor=Hnb;d=Hnb.prototype;d.vfa=function(){return this.Z4};d.ya=function(){return this.b5};d.wfa=function(){return this.b5};function ama(a,b){var c=new Hnb;c.Z4=a;c.b5=b;R.prototype.M.call(c,null,null);return c}d.ma=function(){return this.Z4}; +d.$classData=r({k9a:0},!1,"scala.Tuple2$mcDD$sp",{k9a:1,d_:1,f:1,tda:1,y:1,v:1,q:1,o:1,Lhb:1});function JI(){R.call(this);this.c5=this.FI=0}JI.prototype=new dgb;JI.prototype.constructor=JI;d=JI.prototype;d.JM=function(){return this.FI};d.Sc=function(a,b){this.FI=a;this.c5=b;R.prototype.M.call(this,null,null);return this};d.ya=function(){return this.c5};d.Ki=function(){return this.c5};d.ma=function(){return this.FI}; +d.$classData=r({m9a:0},!1,"scala.Tuple2$mcII$sp",{m9a:1,d_:1,f:1,tda:1,y:1,v:1,q:1,o:1,Mhb:1});function AF(){this.r=null}AF.prototype=new tVa;AF.prototype.constructor=AF;function UVa(a,b){for(;;){b:{var c=b;for(;;){var e=c.r;if(e instanceof AF)c=e;else break b}}if(b===c||uVa(a,b,c))return c;b=a.r;if(!(b instanceof AF))return a}}d=AF.prototype;d.a=function(){sVa.prototype.d.call(this,H());return this}; +function VVa(a,b){a:for(;;){var c=a.r;if(c instanceof v_)TVa(b,c);else{if(c instanceof AF){a=UVa(a,c);continue a}if(!(c instanceof qT))throw(new x).d(c);if(!uVa(a,c,ji(b,c)))continue a}break}}d.IW=function(a){a=mxa(oxa(),a);a:{var b=this;for(;;){var c=b.r;if(c instanceof qT){if(uVa(b,c,a)){b=c;break a}}else if(c instanceof AF)b=UVa(b,c);else{b=null;break a}}}if(null!==b){if(!b.b())for(;!b.b();)TVa(b.ga(),a),b=b.ta();return!0}return!1};d.t=function(){return WVa(this)}; +d.Pq=function(a,b){return axa(this,a,b)};d.wP=function(a,b){VVa(this,SVa(b,a))};d.rfa=function(a,b,c){return exa(this,a,b,c)};d.Yg=function(a,b){return cxa(this,a,b)};d.Pea=function(){a:{var a=this;for(;;){var b=a.r;if(b instanceof v_){a=(new z).d(b);break a}if(b instanceof AF)a=UVa(a,b);else{a=y();break a}}}return a};d.ZV=function(a,b){return fxa(this,a,b)};d.YV=function(a,b){return gxa(this,a,b)}; +d.Taa=function(){a:{var a=this;for(;;){var b=a.r;if(b instanceof v_){a=!0;break a}if(b instanceof AF)a=UVa(a,b);else{a=!1;break a}}}return a};d.$classData=r({x9a:0},!1,"scala.concurrent.impl.Promise$DefaultPromise",{x9a:1,Chb:1,f:1,q:1,o:1,Voa:1,Uoa:1,vda:1,Roa:1});function Y7(){}Y7.prototype=new u;Y7.prototype.constructor=Y7;Y7.prototype.a=function(){return this};Y7.prototype.ap=function(a,b){a|=0;b|=0;return a===b?0:a=this.ap(a,b)}; +Y7.prototype.$classData=r({N9a:0},!1,"scala.math.Ordering$Int$",{N9a:1,f:1,Uhb:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1});var Inb=void 0;function St(){Inb||(Inb=(new Y7).a());return Inb}function Z7(){}Z7.prototype=new u;Z7.prototype.constructor=Z7;Z7.prototype.a=function(){return this};Z7.prototype.ap=function(a,b){return a===b?0:a=this.ap(a,b)};Z7.prototype.$classData=r({O9a:0},!1,"scala.math.Ordering$String$",{O9a:1,f:1,Vhb:1,RH:1,jH:1,SH:1,QH:1,q:1,o:1}); +var Jnb=void 0;function mc(){Jnb||(Jnb=(new Z7).a());return Jnb}function $7(){this.cr=null}$7.prototype=new u;$7.prototype.constructor=$7;function a8(){}a8.prototype=$7.prototype;$7.prototype.h=function(a){return this===a};$7.prototype.t=function(){return this.cr};$7.prototype.z=function(){return qaa(this)};function Knb(){}Knb.prototype=new u;Knb.prototype.constructor=Knb;function Lnb(){}Lnb.prototype=Knb.prototype;function b8(){this.sc=this.u=null}b8.prototype=new kmb;b8.prototype.constructor=b8; +b8.prototype.a=function(){FT.prototype.a.call(this);Mnb=this;this.sc=(new w_).a();return this};b8.prototype.Qd=function(){hG();iG();return(new jG).a()};b8.prototype.$classData=r({K$a:0},!1,"scala.collection.IndexedSeq$",{K$a:1,Cpa:1,xA:1,wA:1,vt:1,Mo:1,f:1,wt:1,No:1});var Mnb=void 0;function rw(){Mnb||(Mnb=(new b8).a());return Mnb}function rS(){this.Tj=this.tB=0;this.Fa=null}rS.prototype=new c3;rS.prototype.constructor=rS;d=rS.prototype; +d.$a=function(){this.Tj>=this.tB&&$B().ce.$a();var a=this.Fa.lb(this.Tj);this.Tj=1+this.Tj|0;return a};d.bQ=function(a){if(0>=a)a=$B().ce;else{var b=this.tB-this.Tj|0;a=a<=(0=a?qS(new rS,this.Fa,this.Tj,this.tB):(this.Tj+a|0)>=this.tB?qS(new rS,this.Fa,this.tB,this.tB):qS(new rS,this.Fa,this.Tj+a|0,this.tB)};d.$classData=r({M$a:0},!1,"scala.collection.IndexedSeqLike$Elements",{M$a:1,mk:1,f:1,Ii:1,Qb:1,Pb:1,aib:1,q:1,o:1});function c8(){}c8.prototype=new u9a;c8.prototype.constructor=c8;c8.prototype.a=function(){return this}; +function Nnb(a,b,c,e,f,g){var h=31&(b>>>g|0),k=31&(e>>>g|0);if(h!==k)return a=1<>24&&0===(1&a.xa)<<24>>24){var b=(new xc).yd(Qi());var c=F().Eb;b=rb(new sb,b,G(c,"customShapePropertyDefinitions"),tb(new ub,vb().Eb,"custom shape property definitions","Custom constraint definitions added over a data shape",H()));a.tx=b;a.xa=(1|a.xa)<<24>>24}return a.tx}d.jc=function(){return this.qa};d.Ub=function(){return this.g};d.$m=function(a){this.ed=a};d.zz=function(a){this.Zm=a};d.pz=function(a){this.Zc=a}; +d.Vq=function(){throw mb(E(),(new nb).e("Shape is abstract and it cannot be instantiated by default"));};d.Bz=function(a){this.la=a};d.qz=function(a){this.Dn=a};d.sz=function(a){this.xd=a};d.kz=function(a){this.fi=a};d.Nk=function(a){this.Va=a}; +function nC(){var a=qf();if(0===(2&a.xa)<<24>>24&&0===(2&a.xa)<<24>>24){var b=(new xc).yd(Ot());var c=F().Eb;b=rb(new sb,b,G(c,"customShapeProperties"),tb(new ub,vb().Eb,"custom shape properties","Custom constraint values for a data shape",H()));a.sx=b;a.xa=(2|a.xa)<<24>>24}return a.sx}d.lc=function(){this.Vq()};d.uz=function(a){this.Bi=a};d.rz=function(a){this.Gn=a};d.lz=function(a){this.Vo=a};d.Kb=function(){return this.ba};d.Az=function(a){this.li=a};d.yz=function(a){this.ch=a}; +d.vz=function(a){this.ki=a};d.tz=function(a){this.R=a};d.xz=function(a){this.Jn=a};d.mz=function(a){this.Mh=a};d.$classData=r({gza:0},!1,"amf.core.metamodel.domain.ShapeModel$",{gza:1,f:1,Yv:1,pd:1,hc:1,Rb:1,rc:1,mm:1,Oi:1,sk:1});var lrb=void 0;function qf(){lrb||(lrb=(new krb).a());return lrb} +function mrb(){this.wd=this.bb=this.mc=this.oe=this.ed=this.te=this.pf=this.Va=this.sx=this.tx=this.la=this.uh=this.Zm=this.cl=this.Dn=this.Jn=this.Gn=this.Bi=this.li=this.fi=this.ki=this.xd=this.Vo=this.ch=this.$j=this.Mh=this.Zc=this.R=this.qa=this.ba=this.cv=this.PF=this.ji=this.Vf=this.Uf=null;this.xa=0}mrb.prototype=new u;mrb.prototype.constructor=mrb;d=mrb.prototype;d.bn=function(a){this.te=a};d.cn=function(a){this.pf=a}; +d.a=function(){nrb=this;Cr(this);uU(this);bM(this);pb(this);Y6(this);var a=yc(),b=F().Ua;this.Uf=rb(new sb,a,G(b,"path"),tb(new ub,ci().Ua,"path","Path to the constrained property",H()));a=qf();b=F().Eb;this.Vf=rb(new sb,a,G(b,"range"),tb(new ub,vb().Eb,"range","Range property constraint",H()));a=Ac();b=F().Ua;this.ji=rb(new sb,a,G(b,"minCount"),tb(new ub,ci().Ua,"min. count","Minimum count property constraint",H()));a=Ac();b=F().Ua;this.PF=rb(new sb,a,G(b,"maxCount"),tb(new ub,ci().Ua,"max. count", +"Maximum count property constraint",H()));a=qb();b=F().Eb;this.cv=rb(new sb,a,G(b,"patternName"),tb(new ub,vb().Eb,"pattern name","Patterned property constraint",H()));ii();a=F().Ua;a=[G(a,"PropertyShape")];b=-1+(a.length|0)|0;for(var c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;a=c;b=qf().ba;c=ii();this.ba=a.ia(b,c.u);this.qa=tb(new ub,vb().Eb,"Property Shape","Constraint over a property in a data shape.",H());return this};d.wz=function(a){this.cl=a};d.Ed=function(a){this.bb=a};d.oz=function(a){this.uh=a}; +d.nc=function(){};d.nz=function(a){this.$j=a};d.an=function(a){this.oe=a};d.jc=function(){return this.qa};d.Ub=function(){ii();for(var a=[this.Uf,this.Vf,this.ji,this.PF,this.cv],b=-1+(a.length|0)|0,c=H();0<=b;)c=ji(a[b],c),b=-1+b|0;a=c;b=qf().g;c=ii();a=a.ia(b,c.u);b=nc().g;c=ii();return a.ia(b,c.u)};d.$m=function(a){this.ed=a};d.pz=function(a){this.Zc=a};d.zz=function(a){this.Zm=a};d.Bz=function(a){this.la=a};d.qz=function(a){this.Dn=a};d.kz=function(a){this.fi=a};d.sz=function(a){this.xd=a}; +d.Nk=function(a){this.Va=a};d.lc=function(){O();var a=(new P).a();return(new Vk).K((new S).a(),a)};d.uz=function(a){this.Bi=a};d.rz=function(a){this.Gn=a};d.lz=function(a){this.Vo=a};d.Kb=function(){return this.ba};d.Az=function(a){this.li=a};d.vz=function(a){this.ki=a};d.yz=function(a){this.ch=a};d.tz=function(a){this.R=a};d.xz=function(a){this.Jn=a};d.mz=function(a){this.Mh=a}; +d.$classData=r({nza:0},!1,"amf.core.metamodel.domain.extensions.PropertyShapeModel$",{nza:1,f:1,Yv:1,pd:1,hc:1,Rb:1,rc:1,mm:1,Oi:1,sk:1});var nrb=void 0;function Qi(){nrb||(nrb=(new mrb).a());return nrb}function orb(){this.wd=this.bb=this.mc=this.R=this.Va=this.la=this.Aj=this.SC=this.qa=this.ba=null;this.xa=0}orb.prototype=new u;orb.prototype.constructor=orb;d=orb.prototype; +d.a=function(){prb=this;Cr(this);uU(this);wb(this);pb(this);ihb(this);var a=F().Zd;a=G(a,"AbstractDeclaration");var b=nc().ba;this.ba=ji(a,b);this.qa=tb(new ub,vb().hg,"Abstract Declaration","Graph template that can be used to declare a re-usable graph structure that can be applied to different domain elements\nin order to re-use common semantics. Similar to a Lisp macro or a C++ template.\nIt can be extended by any domain element adding bindings for the variables in the declaration.",H());return this}; +d.Ed=function(a){this.bb=a};d.nc=function(){};d.J8=function(a){this.la=a};d.jc=function(){return this.qa};d.Ub=function(){return hhb(this)};d.H8=function(a){this.SC=a};d.Vq=function(){throw mb(E(),(new nb).e("AbstractDeclarationModel is abstract and cannot be instantiated"));};d.Nk=function(a){this.Va=a};d.lc=function(){this.Vq()};d.Kb=function(){return this.ba};d.I8=function(a){this.Aj=a};d.Vl=function(a){this.R=a}; +d.$classData=r({pza:0},!1,"amf.core.metamodel.domain.templates.AbstractDeclarationModel$",{pza:1,f:1,Cga:1,pd:1,hc:1,Rb:1,rc:1,Oi:1,nm:1,sk:1});var prb=void 0;function kP(){prb||(prb=(new orb).a());return prb}function Td(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}Td.prototype=new u;Td.prototype.constructor=Td;d=Td.prototype;d.H=function(){return"DomainExtension"};d.E=function(){return 2};d.ub=function(a){return HOa(this,a)}; +d.h=function(a){return this===a?!0:a instanceof Td?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return Ud()};d.t=function(){return V(W(),this)};d.fa=function(){return this.x};d.dd=function(){return"/extension"};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};function RBa(a){a=B(a.g,Ud().ko);return!oN(a)} +function HOa(a,b){if(Vb().Ia(a.j).b())var c=!0;else c=a.j,c=0<=(c.length|0)&&"null/"===c.substring(0,5);c&&Ai(a,b);return a}d.Ena=function(){return B(B(this.g,Ud().ig).g,Sk().Jc)};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;return this};d.$classData=r({dAa:0},!1,"amf.core.model.domain.extensions.DomainExtension",{dAa:1,f:1,eAa:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function m3(){this.j=this.Ke=this.x=this.g=null;this.xa=!1}m3.prototype=new u; +m3.prototype.constructor=m3;d=m3.prototype;d.H=function(){return"ShapeExtension"};d.E=function(){return 2};d.ub=function(a){return Ai(this,a)};d.h=function(a){return this===a?!0:a instanceof m3?this.g===a.g?this.x===a.x:!1:!1};d.G=function(a){switch(a){case 0:return this.g;case 1:return this.x;default:throw(new U).e(""+a);}};d.pc=function(a){return Rd(this,a)};d.bc=function(){return Ot()};d.fa=function(){return this.x};d.t=function(){return V(W(),this)}; +d.dd=function(){var a=Vb().Ia(B(this.g,Ot().ig));a=a.b()?y():B(a.c().aa,qf().R).A;a=a.b()?"default-extension":a.c();a=(new je).e(a);return"/shape-extension/"+jj(a.td)};d.Md=function(a){return ds(this,a)};d.Ib=function(){return yb(this)};d.Y=function(){return this.g};d.Ena=function(){return B(B(this.g,Ot().ig).aa,Qi().Vf)};d.z=function(){return X(this)};d.Sd=function(a){this.j=a};d.K=function(a,b){this.g=a;this.x=b;this.j="http://a.ml/vocabularies#document/shape_extension";return this}; +d.$classData=r({gAa:0},!1,"amf.core.model.domain.extensions.ShapeExtension",{gAa:1,f:1,eAa:1,qd:1,vc:1,tc:1,y:1,v:1,q:1,o:1});function f4(){this.Lz=null;this.lj=0;this.$W=!1}f4.prototype=new u;f4.prototype.constructor=f4;d=f4.prototype;d.Ar=function(a,b){var c=dc().hS;b=b.tt;var e=y();nM(this,c,"",e,b,a);this.$W=!0};d.H=function(){return"WarningOnlyHandler"};d.E=function(){return 1};d.h=function(a){return this===a?!0:a instanceof f4?this.Lz===a.Lz:!1}; +d.yB=function(a,b){var c=dc().hS,e=Hb(a.mv);a=ZAa(this,a);var f=y();nM(this,c,"",f,e,a.da);this.$W=!0;return b};d.G=function(a){switch(a){case 0:return this.Lz;default:throw(new U).e(""+a);}};d.Ns=function(a,b,c,e,f,g){a=a.j;var h=Yb().dh;EU(this,a,b,c,e,f,h,g)};d.t=function(){return V(W(),this)};d.Gc=function(a,b,c,e,f,g,h){EU(this,a,b,c,e,f,g,h)};d.z=function(){return X(this)};d.e=function(a){this.Lz=a;this.lj=jga().bT;this.$W=!1;return this}; +d.$classData=r({jBa:0},!1,"amf.core.parser.WarningOnlyHandler",{jBa:1,f:1,a7:1,zq:1,Zp:1,Bp:1,y:1,v:1,q:1,o:1});function qw(){Aq.call(this);this.S_=this.UJ=null}qw.prototype=new Jmb;qw.prototype.constructor=qw;function $ja(a,b){var c=(new Mq).a(),e=Nq(),f=y(),g=Rb(Ut(),H()),h=y();a.UJ=g;a.S_=h;Aq.prototype.zo.call(a,"",b,c,e,f);return a}qw.prototype.$classData=r({xEa:0},!1,"amf.plugins.document.graph.parser.GraphParserContext",{xEa:1,Xu:1,f:1,zq:1,Zp:1,Bp:1,y:1,v:1,q:1,o:1}); +function qrb(){this.WB=0;this.To=this.Ig=this.kq=null;this.oo=!1;this.qi=null}qrb.prototype=new RL;qrb.prototype.constructor=qrb;d=qrb.prototype; +d.WW=function(a,b,c){if(Ubb(a)){var e=(new lO).Hb(Np(Op(),a)).ye(a),f=hp(),g=B(a.g,qO().Ot),h=w(function(){return function(l){var m=Ec().kq;l=l.A;return RMa(m,l.b()?null:l.c(),(Ec(),fp()))}}(this)),k=K();g=g.ka(h,k.u);h=K();return Bfa(f,g,h.u).Yg(w(function(l){return function(m){var p=w(function(){return function(v){return rrb(Ec(),v)}}(l)),t=K();return m.ka(p,t.u)}}(this)),ml()).Pq(w(function(l,m,p,t,v){return function(A){A=srb(Ec(),p,A);var D=jja((new lv).a());bp();var C=Rb(Gb().ab,H());return gp(bp()).aea(m, +A,C,D).Yg(w(function(I,L,Y,ia){return function(pa){var La=pa.aM();pa=function(id,yd,zd){return function(rd){Ec();var sd=ok().tD;return Waa(yd,rd,sd,zd).ua()}}(I,L,Y);if(ii().u===ii().u)if(La===H())pa=H();else{for(var ob=La,zb=(new Uj).eq(!1),Zb=(new qd).d(null),Cc=(new qd).d(null);ob!==H();){var vc=ob.ga();pa(vc).Hd().U(w(function(id,yd,zd,rd){return function(sd){yd.oa?(sd=ji(sd,H()),rd.oa.Nf=sd,rd.oa=sd):(zd.oa=ji(sd,H()),rd.oa=zd.oa,yd.oa=!0)}}(La,zb,Zb,Cc)));ob=ob.ta()}pa=zb.oa?Zb.oa:H()}else{ii(); +for(ob=(new Lf).a();!La.b();)zb=La.ga(),zb=pa(zb).Hd(),ws(ob,zb),La=La.ta();pa=ob.ua()}a:{for(La=pa;!La.b();){if(La.ga().zm===Yb().qb){La=!0;break a}La=La.ta()}La=!1}return aq(new bq,!La,L.j,ia,pa)}}(l,t,p,v)),ml())}}(this,e,c,a,b)),ml())}throw mb(E(),(new nb).e("Cannot resolve base unit of type "+la(a)));};d.a=function(){rq.prototype.a.call(this);trb=this;this.qi=nv().ea;this.kq=(new OMa).a();this.Ig=Eia().$;var a=K(),b=[Eia().$];this.To=J(a,(new Ib).ha(b));this.oo=!0;return this};d.kna=function(){return(new z).d(this.kq)}; +function OXa(a,b){a=b.$g.z9();a.b()?(Ec(),b=b.$g,b instanceof Dc?(b=jc(kc(b.Xd.Fd),qc()),b.b()?b=y():(b=b.c(),b=(new z).d(b.sb)),b=b.b()?H():b.c(),b=Jc(b,new obb),b.b()?b=y():(b=Kc(b.c().i),b.b()?b=y():(b=b.c(),b=(new z).d(b.va)))):b=y(),b.b()?b=y():(b=b.c(),b=(new z).d("%"+b))):b=a;if(b.b())return y();b=b.c();return(new z).d(iF(fF(),b))} +d.hI=function(a,b){return a instanceof ad?(new z).d(Pbb((new Nbb).TG(a))):a instanceof zO?(new z).d(qbb((new pbb).jU(a))):a instanceof AO?(new z).d(ybb((new xbb).iaa(a))):Ubb(a)?(new z).d(Gbb(Hbb(new Cbb,a,ZMa(this.kq,a).c(),b))):y()};function rrb(a,b){var c=YU(b),e=a.kq.Bf.Ja(c);if(e instanceof z)return e.i;b=(new mO).Hb(Np(Op(),b)).ye(b);b=xEa((new CO).jU(b));a.kq.Bf=a.kq.Bf.cc((new R).M(c,b));return b}d.NE=function(a){var b=new ZN;b.Coa=this.kq;b.Bc=a;b.Lq=(new LN).a();return b}; +d.FD=function(a){return a instanceof ad?!0:a instanceof zO?!0:a instanceof AO?!0:Ubb(a)?ZMa(this.kq,a).na():!1}; +d.tA=function(a,b){var c=OXa(0,a),e=!1,f=null;if(c instanceof z){e=!0;f=c;var g=f.i;if(zw().u8===g)return(new z).d(vDa(new $N,a,(new urb).eU(b,y())).lca())}if(e&&(g=f.i,zw().w5===g))return(new z).d(TNa(SNa(new TV,a,vrb(b,a))));if(e&&(g=f.i,zw().u5===g))return(new z).d(SNa(new TV,a,(new z8).eU(b,y())).e2());if(e&&(e=f.i,zw().v5===e))return b=vrb(b,a),a=SNa(new TV,a,(new z8).eU(b,y())).lca(),a instanceof zO&&$Ma(this.kq,a),(new z).d(a);c.b()?c=y():(c=c.c(),c=Mc(ua(),c,"\\|"),c=(new z).d(zj((new Pc).fd(c)))); +c.b()?e=y():(e=c.c(),e=Ec().kq.X.Ja(e));e.b()&&(Ec(),e=oba(a));if(e instanceof z)a=wrb(this,a,b,e.i,c);else throw mb(E(),(new nb).e("Unknown Dialect for document: "+a.da));return a};d.dy=function(){var a=K(),b=[bd(),dd(),td(),fO(),eO(),Sbb(),Gc(),wj(),Ae(),$d(),Hc(),UV(),GO(),Ehb(),Bhb(),qO(),xrb(),Fbb(),UDa()];return J(a,(new Ib).ha(b))};d.Qz=function(){return J(K(),(new Ib).ha("application/aml+json application/aml+yaml application/raml application/raml+json application/raml+yaml text/yaml text/x-yaml application/yaml application/x-yaml application/json".split(" ")))}; +d.pF=function(){return this.To};d.PE=function(a,b){return a instanceof wO?(new iO).Hb(b).ye(a):a instanceof zO?(new mO).Hb(b).ye(a):a instanceof pO?(new lO).Hb(b).ye(a):a};d.gi=function(){return this.Ig};function srb(a,b,c){return c.ne(b,Uc(function(){return function(e,f){return Gja(e,f)}}(a)))} +d.eO=function(){var a=(new Fc).Vd(this.kq.X),b=null;b=Rb(Gb().ab,H());for(a=a.Sb.Ye();a.Ya();){var c=a.$a();b=-1===(zEa(c).indexOf("Validation Profile")|0)?b.Wh(zEa(c),oq(function(e,f){return function(){return rrb(Ec(),f)}}(this,c))):b}return b};d.wr=function(){return J(K(),H())};d.nB=function(a){var b;if(b=a.$g instanceof Dc)PXa||(PXa=(new MXa).a()),b=NXa(a);return b};d.fp=function(){return nq(hp(),oq(function(){return function(){return Ec()}}(this)),ml())}; +function wrb(a,b,c,e,f){var g=a.kq;a=function(h,k,l,m){return function(p){var t=!1,v=null;if(k instanceof z){t=!0;v=k;var A=v.i;if(yrb(p,A)){v=A.indexOf("/")|0;v=A.substring(1,v);p=U1a(new s3,l,zrb(p,m));A=Od(O(),p.X);A=(new y3).K((new S).a(),A);t=p.kf.da;var D=Bq().uc;A=eb(A,D,t);A=Rd(A,p.kf.da);t=p.m.Qk.j;D=qO().ig;A=eb(A,D,t);t=Fbb().ER;v=eb(A,t,v);I1a(H1a(v,p.X,p.kf.Q,p.m),p.kf.da);tc(p.m.rd.Vn)&&(A=(new Fc).Vd(p.m.rd.Vn).Sb.Ye().Dd(),t=Bd().vh,Zd(v,t,A));A=D1a(p,v);A instanceof z?(A=A.i,p.m.Ip.jm(p.kf.da+ +"#/",A),p=Jk().nb,p=(new z).d(Vd(v,p,A))):p=y();return p}}if(t&&Arb(p,v.i))p=U1a(new s3,l,zrb(p,m)),v=Od(O(),p.X),v=(new x3).K((new S).a(),v),A=p.kf.da,t=Bq().uc,v=eb(v,t,A),v=Rd(v,p.kf.da),A=p.m.Qk.j,t=qO().ig,v=eb(v,t,A),v1a(p,"library"),A=H1a(v,p.X,p.kf.Q,p.m),t=Lc(v),A=I1a(A,t.b()?v.j:t.c()),tc(p.m.rd.Vn)&&(t=(new Fc).Vd(p.m.rd.Vn).Sb.Ye().Dd(),D=Bd().vh,Zd(v,D,t)),p.m.rd.et().Da()&&(t=p.m.rd.et(),D=Af().Ic,Bf(v,D,t)),A.ow().Da()&&(A=A.ow(),t=Gk().xc,Bf(v,t,A)),Fb(p.m.ni),p=(new z).d(v);else{if(A= +t)v=v.i,A=Brb(p)===iF(fF(),v);A?(v=new s3,p=zrb(p,m),p.B1=!0,p=U1a(v,l,p),v=G1a(p),v instanceof z?(v=v.i,A=(new wO).K(v.g,v.x),Rd(A,v.j),p=(new z).d(T1a(p,A))):p=y()):p=G1a(U1a(new s3,l,zrb(p,m)))}return p}}(a,f,b,c);if(g.Hm.Ha(YU(e)))return a(e);e=XMa(g,e);return a(e)} +d.ry=function(){QXa||(QXa=(new k2).a());var a=(new R).M("aliases-location",QXa);RXa||(RXa=(new m2).a());var b=(new R).M("custom-id",RXa);TXa||(TXa=(new q2).a());var c=(new R).M("ref-include",TXa);SXa||(SXa=(new o2).a());a=[a,b,c,(new R).M("json-pointer-ref",SXa)];b=UA(new VA,nu());c=0;for(var e=a.length|0;ce.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;l=g.n.length;k=h=0;var m=b.length|0;l=me.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;var h=g.n.length,k=0,l=0,m=b.length|0;h=ml.w)throw(new U).e("0");p=h.length|0;m=l.w+p|0;uD(l,m);Ba(l.L,0,l.L,p,l.w);p=l.L;var t=p.n.length,v=0,A=0,D=h.length|0;t=De.w)throw(new U).e("0");g=b.length|0;f=e.w+g|0;uD(e,f);Ba(e.L,0,e.L,g,e.w);g=e.L;h=g.n.length;l=k=0;m=b.length|0;h=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0,c.L,g,c.w);g=c.L;var h=g.n.length,k=0,l=0,m=e.length|0;h=mc.w)throw(new U).e("0");g=e.length|0;f=c.w+g|0;uD(c,f);Ba(c.L,0, +c.L,g,c.w);g=c.L;var h=g.n.length,k=0,l=0,m=e.length|0;h=m>24};d.h=function(a){if(a instanceof eH)return 0===fZa(this.Xl,a.Xl);if("number"===typeof a){a=+a;var b=this.Xl;b=Yra(CE(),b);if(53>=b)b=!0;else{var c=gZa(this.Xl);b=1024>=b&&c>=(-53+b|0)&&1024>c}return b&&!Csb(this)?(b=this.Xl,Oj(va(),Mj(Nj(),b))===a):!1}return na(a)?(a=+a,b=this.Xl,b=Yra(CE(),b),24>=b?b=!0:(c=gZa(this.Xl),b=128>=b&&c>=(-24+b|0)&&128>c),b&&!Csb(this)?(b=this.Xl,b=Mj(Nj(),b),da(Oj(va(),b))===a):!1):Dsb(this)&&Bda(this,a)}; +function Csb(a){a=osa(a.Xl,2147483647);return 0!==a.ri&&!a.h(Lj().ypa)}d.t=function(){var a=this.Xl;return Mj(Nj(),a)};d.tr=function(a){return fZa(this.Xl,a.Xl)};d.gs=function(a){return fZa(this.Xl,a.Xl)};d.Upa=function(){return this.Xl.gH()<<16>>16};d.z=function(){if(Dsb(this)){var a=this.Xl.rba();var b=a.od;a=a.Ud;b=(-1===a?0<=(-2147483648^b):-1=(-2147483648^b):0>a)?b:pL(OJ(),(new qa).Sc(b,a))}else b=NJ(OJ(),this.Xl);return b};d.gH=function(){return this.Xl.gH()}; +function Bua(a,b){a.Xl=b;return a}function Dsb(a){var b=$Va(Lj(),(new qa).Sc(0,-2147483648));return 0<=a.gs(b)?(b=$Va(Lj(),(new qa).Sc(-1,2147483647)),0>=a.gs(b)):!1}var ZVa=r({C9a:0},!1,"scala.math.BigInt",{C9a:1,Whb:1,iH:1,f:1,o:1,Yhb:1,Xhb:1,q:1,cM:1,ym:1});eH.prototype.$classData=ZVa;function C8(){this.cr=null}C8.prototype=new a8;C8.prototype.constructor=C8;C8.prototype.a=function(){this.cr="Boolean";return this};C8.prototype.zs=function(a){return ja(Ja(Ma),[a])};C8.prototype.Lo=function(){return q(Ma)}; +C8.prototype.$classData=r({X9a:0},!1,"scala.reflect.ManifestFactory$BooleanManifest$",{X9a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Esb=void 0;function Qxa(){Esb||(Esb=(new C8).a());return Esb}function D8(){this.cr=null}D8.prototype=new a8;D8.prototype.constructor=D8;D8.prototype.a=function(){this.cr="Byte";return this};D8.prototype.zs=function(a){return ja(Ja(Oa),[a])};D8.prototype.Lo=function(){return q(Oa)}; +D8.prototype.$classData=r({Y9a:0},!1,"scala.reflect.ManifestFactory$ByteManifest$",{Y9a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Fsb=void 0;function Jxa(){Fsb||(Fsb=(new D8).a());return Fsb}function E8(){this.cr=null}E8.prototype=new a8;E8.prototype.constructor=E8;E8.prototype.a=function(){this.cr="Char";return this};E8.prototype.zs=function(a){return ja(Ja(Na),[a])};E8.prototype.Lo=function(){return q(Na)}; +E8.prototype.$classData=r({Z9a:0},!1,"scala.reflect.ManifestFactory$CharManifest$",{Z9a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Gsb=void 0;function Lxa(){Gsb||(Gsb=(new E8).a());return Gsb}function F8(){this.cr=null}F8.prototype=new a8;F8.prototype.constructor=F8;F8.prototype.a=function(){this.cr="Double";return this};F8.prototype.zs=function(a){return ja(Ja(Ta),[a])};F8.prototype.Lo=function(){return q(Ta)}; +F8.prototype.$classData=r({$9a:0},!1,"scala.reflect.ManifestFactory$DoubleManifest$",{$9a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Hsb=void 0;function Pxa(){Hsb||(Hsb=(new F8).a());return Hsb}function G8(){this.cr=null}G8.prototype=new a8;G8.prototype.constructor=G8;G8.prototype.a=function(){this.cr="Float";return this};G8.prototype.zs=function(a){return ja(Ja(Sa),[a])};G8.prototype.Lo=function(){return q(Sa)}; +G8.prototype.$classData=r({a$a:0},!1,"scala.reflect.ManifestFactory$FloatManifest$",{a$a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Isb=void 0;function Oxa(){Isb||(Isb=(new G8).a());return Isb}function H8(){this.cr=null}H8.prototype=new a8;H8.prototype.constructor=H8;H8.prototype.a=function(){this.cr="Int";return this};H8.prototype.zs=function(a){return ja(Ja(Qa),[a])};H8.prototype.Lo=function(){return q(Qa)}; +H8.prototype.$classData=r({b$a:0},!1,"scala.reflect.ManifestFactory$IntManifest$",{b$a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Jsb=void 0;function Mxa(){Jsb||(Jsb=(new H8).a());return Jsb}function I8(){this.cr=null}I8.prototype=new a8;I8.prototype.constructor=I8;I8.prototype.a=function(){this.cr="Long";return this};I8.prototype.zs=function(a){return ja(Ja(Ra),[a])};I8.prototype.Lo=function(){return q(Ra)}; +I8.prototype.$classData=r({c$a:0},!1,"scala.reflect.ManifestFactory$LongManifest$",{c$a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Ksb=void 0;function Nxa(){Ksb||(Ksb=(new I8).a());return Ksb}function J8(){this.DA=null}J8.prototype=new Lnb;J8.prototype.constructor=J8;function Lsb(){}Lsb.prototype=J8.prototype;J8.prototype.h=function(a){return this===a};J8.prototype.t=function(){return this.DA};J8.prototype.z=function(){return qaa(this)};function K8(){this.cr=null}K8.prototype=new a8; +K8.prototype.constructor=K8;K8.prototype.a=function(){this.cr="Short";return this};K8.prototype.zs=function(a){return ja(Ja(Pa),[a])};K8.prototype.Lo=function(){return q(Pa)};K8.prototype.$classData=r({g$a:0},!1,"scala.reflect.ManifestFactory$ShortManifest$",{g$a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Msb=void 0;function Kxa(){Msb||(Msb=(new K8).a());return Msb}function L8(){this.cr=null}L8.prototype=new a8;L8.prototype.constructor=L8;L8.prototype.a=function(){this.cr="Unit";return this}; +L8.prototype.zs=function(a){return ja(Ja(oa),[a])};L8.prototype.Lo=function(){return q(Ka)};L8.prototype.$classData=r({h$a:0},!1,"scala.reflect.ManifestFactory$UnitManifest$",{h$a:1,TH:1,f:1,ax:1,Iu:1,Cv:1,Ju:1,q:1,o:1,v:1});var Nsb=void 0;function Rxa(){Nsb||(Nsb=(new L8).a());return Nsb} +function M8(a,b){if(b instanceof L6&&a instanceof L6){if(a===b)return!0;var c=a.Oa()===b.Oa();if(c)for(var e=b.Oa(),f=0;f=b)){c.zt(b,a);var e=0;for(a=a.mb();ea.w)throw(new U).e("0");g=f.length|0;c=a.w+g|0;uD(a,c);Ba(a.L,0,a.L,g,a.w);g=a.L;l=g.n.length;k=h=0;p=f.length|0;l=pa.w)throw(new U).e("0");v=p.length|0;t=a.w+v|0;uD(a,t);Ba(a.L,0,a.L,v,a.w);v=a.L;D=v.n.length;m=A=0;C=p.length|0;D=Cg.w)throw(new U).e("0");k=f.length|0;h=g.w+k|0;uD(g,h);Ba(g.L,0,g.L,k,g.w);k=g.L;a=k.n.length;l=c=0;p=f.length|0;a=pTp.w)throw(new U).e("0");var Nw= +Ss.length|0,fu=Tp.w+Nw|0;uD(Tp,fu);Ba(Tp.L,0,Tp.L,Nw,Tp.w);for(var Ow=Tp.L,Pw=Ow.n.length,Sq=0,gu=0,Qw=Ss.length|0,Rw=Qwb)return 1;var c=0;for(a=a.mb();a.Ya();){if(c===b)return a.Ya()?1:0;a.$a();c=1+c|0}return c-b|0}function ju(a,b,c){c=c.en(a.Zi());c.jh(a.ok());c.jd(b);return c.Rc()} +function Dw(a,b){var c=a.Oa(),e=a.Qd();if(1===c)e.jh(a);else if(1=a.Oe(1))return a.Zi();for(var c=a.Qd(),e=(new mq).a(),f=a.mb(),g=!1;f.Ya();){var h=f.$a();Nya(e,h)?c.jd(h):g=!0}return g||!b?c.Rc():a.Zi()}function qub(a,b,c){c=c.en(a.Zi());c.jd(b);c.jh(a.ok());return c.Rc()}function e9(a,b){b=pub(a,b);var c=a.Qd();a.U(w(function(e,f,g){return function(h){var k=f.P(h)|0;return 0===k?g.jd(h):(f.jm(h,-1+k|0),void 0)}}(a,b,c)));return c.Rc()} +function pub(a,b){var c=(new f9).aL(a);b.U(w(function(e,f){return function(g){var h=1+(f.P(g)|0)|0;f.Ue(g,h)}}(a,c)));return c}function mu(a,b){return a.Od(w(function(c,e){return function(f){return Va(Wa(),f,e)}}(a,b)))}function g9(a,b,c){return a.nk(hmb(c,b))}function rub(a,b,c){var e=0;for(a=a.mb().OD(c);a.Ya()&&b.P(a.$a());)e=1+e|0;return e}function sIa(a,b){return a.rn(b)}function sub(a,b){var c=a.gy(b);a=a.fy(b);return(new R).M(c,a)}function tub(a,b){return a.BL(b.Hd().op())} +function uub(a,b){var c=a.rn(b);a=a.rn(w(function(e,f){return function(g){return!f.P(g)}}(a,b)));return(new R).M(c,a)}function h9(a){return""+a.Xk()+a.xM()+"(...)"}function vub(a,b){b=Sj(a).am(b);return(new Rv).dH(b,w(function(c){return function(e){return c.CL(oq(function(f,g){return function(){return g}}(c,e)))}}(a)))}function i9(a,b){return a.rn(w(function(c,e){return function(f){return!e.P(f)}}(a,b)))} +function wub(a,b){return a.uK(w(function(c,e){return function(f){return e.Sa(f)}}(a,b))).BE(b)}function xub(a){throw(new Lu).e(vva(MH(),a,".newBuilder"));}function j9(a){return a.b()?a.mW():yub(a,1)}function Gl(){Ik.call(this)}Gl.prototype=new Agb;Gl.prototype.constructor=Gl;function zub(){}d=zub.prototype=Gl.prototype;d.a=function(){O();var a=(new P).a();Gl.prototype.UG.call(this,(new Fl).K((new S).a(),a));return this};d.H=function(){return"Extension"};d.MC=function(){return this.LM()};d.E=function(){return 1}; +d.LM=function(){return this.k};d.h=function(a){if(this===a)return!0;if(a instanceof Gl){var b=this.k;a=a.k;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.Be=function(){return this.LM()};d.qk=function(){return this.LM()};d.Wr=function(){return this.LM()};d.UG=function(a){Ik.prototype.Xz.call(this,a);return this};d.oc=function(){return this.LM()};d.z=function(){return X(this)}; +d.$classData=r({mga:0},!1,"amf.client.model.document.Extension",{mga:1,eN:1,f:1,dj:1,qc:1,gc:1,ib:1,bl:1,Wu:1,y:1,v:1,q:1,o:1});function Il(){Ik.call(this)}Il.prototype=new Agb;Il.prototype.constructor=Il;function Aub(){}d=Aub.prototype=Il.prototype;d.a=function(){O();var a=(new P).a();Il.prototype.VG.call(this,(new Hl).K((new S).a(),a));return this};d.H=function(){return"Overlay"};d.MC=function(){return this.MM()};d.E=function(){return 1}; +d.h=function(a){if(this===a)return!0;if(a instanceof Il){var b=this.k;a=a.k;return null===b?null===a:b.h(a)}return!1};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.Be=function(){return this.MM()};d.qk=function(){return this.MM()};d.Wr=function(){return this.MM()};d.VG=function(a){Ik.prototype.Xz.call(this,a);return this};d.oc=function(){return this.MM()};d.MM=function(){return this.k};d.z=function(){return X(this)}; +d.$classData=r({qga:0},!1,"amf.client.model.document.Overlay",{qga:1,eN:1,f:1,dj:1,qc:1,gc:1,ib:1,bl:1,Wu:1,y:1,v:1,q:1,o:1});function Pn(){this.ea=this.k=null}Pn.prototype=new u;Pn.prototype.constructor=Pn;d=Pn.prototype;d.H=function(){return"Amqp091ChannelBinding"};d.a=function(){O();var a=(new P).a(),b=(new S).a();Pn.prototype.Jla.call(this,(new On).K(b,a));return this};d.zg=function(){return $a(this)};d.Ng=function(a){return cb(this,a)};d.E=function(){return 1}; +d.Zb=function(a){return lU(this,a)};d.Oc=function(){return this.k};d.h=function(a){return this===a?!0:a instanceof Pn?this.k===a.k:!1};d.G=function(a){switch(a){case 0:return this.k;default:throw(new U).e(""+a);}};d.t=function(){return V(W(),this)};d.Wb=function(){return hU(this)};d.$b=function(a){return iU(this,a)};d.rq=function(a){var b=this.k,c=Nn().Lh;eb(b,c,a);return this};d.Kf=function(){return Bub(this)};d.Gj=function(){return Bub(this)};d.Jla=function(a){this.k=a;this.ea=nv().ea;return this}; +d.Mg=function(a){return hb(this,a)};d.rb=function(){return So(this)};function Bub(a){Z();a=a.k;O();var b=(new P).a(),c=(new S).a();b=(new On).K(c,b);a=Rd(b,a.j);b=Z();if(null===Z().pX&&null===Z().pX){c=Z();var e=new z_;if(null===b)throw mb(E(),null);e.l=b;c.pX=e}b=Z().pX;return xu(b.l.ea,a)}d.Yb=function(a){return nU(this,a)};d.Ab=function(){return this.k.j};d.oc=function(){return this.k};d.z=function(){return X(this)};d.Og=function(a){return ib(this,a)};Pn.prototype.annotations=function(){return this.rb()}; +Pn.prototype.graph=function(){return jU(this)};Pn.prototype.withId=function(a){return this.$b(a)};Pn.prototype.withExtendsNode=function(a){return this.Zb(a)};Pn.prototype.withCustomDomainProperties=function(a){return this.Yb(a)};Object.defineProperty(Pn.prototype,"position",{get:function(){return this.Wb()},configurable:!0});Object.defineProperty(Pn.prototype,"id",{get:function(){return this.Ab()},configurable:!0}); +Object.defineProperty(Pn.prototype,"extendsNode",{get:function(){return fU(this)},configurable:!0});Object.defineProperty(Pn.prototype,"customDomainProperties",{get:function(){return gU(this)},configurable:!0});Pn.prototype.link=function(){for(var a=arguments.length|0,b=0,c=[];b=a.Oa()?-1:b}function G9(a,b){return a.Jk(C9(a,b,0))}function H9(a,b,c){b=0b||a.b())throw(new U).e(""+b);return a.ga()} +function Tu(a,b){if(0>b)b=1;else a:{var c=0;for(;;){if(c===b){b=a.b()?0:1;break a}if(a.b()){b=-1;break a}c=1+c|0;a=a.ta()}}return b}function Avb(a,b){for(;!a.b();){if(b.P(a.ga()))return!0;a=a.ta()}return!1}function Bvb(a,b){if(b&&b.$classData&&b.$classData.ge.kW){if(a===b)return!0;for(;!a.b()&&!b.b()&&Va(Wa(),a.ga(),b.ga());)a=a.ta(),b=b.ta();return a.b()&&b.b()}return M8(a,b)}function Cvb(a,b){for(;!a.b();){if(!b.P(a.ga()))return!1;a=a.ta()}return!0} +function Dvb(a,b,c){for(;!a.b();)b=c.ug(b,a.ga()),a=a.ta();return b}function Evb(a,b,c){var e=0=e)return a.Qd().Rc();c=a.Qd();a=a.t().substring(b,e);return c.jh((new qg).e(a)).Rc()}function pia(a,b){a=a.t();b=97<=b&&122>=b||65<=b&&90>=b||48<=b&&57>=b?ba.String.fromCharCode(b):"\\"+gc(b);return Mc(ua(),a,b)}function zga(a,b){var c=(new Tj).a(),e=-1+b|0;if(!(0>=b))for(b=0;;){Vj(c,a.t());if(b===e)break;b=1+b|0}return c.Ef.qf} +function Oia(a){if(null===a.t())return null;if(0===(a.t().length|0))return"";var b=65535&(a.t().charCodeAt(0)|0),c=Ku();if(8544<=b&&8559>=b||9398<=b&&9423>=b||1===eVa(c,b))return a.t();a=Iu(ua(),a.t());b=a.n[0];a.n[0]=sja(Ku(),b);return Nsa(ua(),a,0,a.n.length)}function Wp(a,b){var c=a.t();return 0<=(c.length|0)&&c.substring(0,b.length|0)===b?a.t().substring(b.length|0):a.t()}function aQ(a,b){if(Ed(ua(),a.t(),b)){var c=a.t();a=(a.t().length|0)-(b.length|0)|0;return c.substring(0,a)}return a.t()} +function OB(a){var b=(new Tj).a(),c=new g5;if(null===a)throw mb(E(),null);c.Fa=a;c.nea=a.t();c.kH=c.nea.length|0;for(c.Tj=0;c.Ya();){a=c.Tw();for(var e=a.length|0,f=0;;)if(f=(65535&(a.charCodeAt(f)|0)))f=1+f|0;else break;a=fa?0:a)|0);for(var c=0,e=this.mb();c=a.o3().Oe(a.K2().Oa())?a.o3().Oa():a.K2().Oa()} +function pxb(a,b){return(new R).M(a.K2().lb(b),a.o3().lb(b))}function qxb(){}qxb.prototype=new Y9;qxb.prototype.constructor=qxb;function rxb(){}d=rxb.prototype=qxb.prototype;d.Hd=function(){return this};d.rP=function(){throw(new iL).e("next of empty set");};d.P=function(a){return this.Ha(a)};d.al=function(a){return this.iX(a)};d.b=function(){return!0};d.Kj=function(){return this};d.ng=function(){return this};d.KC=function(a){return sxb(this,a)};d.Di=function(){Snb||(Snb=(new h8).a());return Snb}; +d.jb=function(){return 0};d.mb=function(){var a=w$(this);return uc(a)};d.Qs=function(a){return this.iX(a)};d.lv=function(){return Rnb()};function w$(a){for(var b=H();!a.b();){var c=a.pT();b=ji(c,b);a=a.rP()}return b}d.pT=function(){throw(new iL).e("elem of empty set");};d.Ha=function(){return!1};function txb(a,b){return b.b()?a:b.Ql(a,Uc(function(){return function(c,e){return c.KC(e)}}(a)))}d.xg=function(){return this};d.iX=function(){return this};d.Vh=function(){return kz(this)};d.Zj=function(a){return this.KC(a)}; +d.Lk=function(a){return txb(this,a)};d.Xk=function(){return"ListSet"};function uxb(){}uxb.prototype=new Y9;uxb.prototype.constructor=uxb;d=uxb.prototype;d.Hd=function(){return this};d.a=function(){return this};d.P=function(){return!1};d.al=function(){return this};d.Kj=function(){return this};d.ng=function(){return this};d.Di=function(){return qe()};d.U=function(){};d.jb=function(){return 0};d.mb=function(){return $B().ce};d.Qs=function(){return this};d.lv=function(){return vd()};d.Ha=function(){return!1}; +d.xg=function(){return this};d.Vh=function(){return kz(this)};d.Zj=function(a){return(new x$).d(a)};d.$classData=r({Rbb:0},!1,"scala.collection.immutable.Set$EmptySet$",{Rbb:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,q:1,o:1});var vxb=void 0;function vd(){vxb||(vxb=(new uxb).a());return vxb}function x$(){this.dg=null}x$.prototype=new Y9;x$.prototype.constructor=x$;d=x$.prototype;d.Hd=function(){return this}; +d.ga=function(){return this.dg};d.P=function(a){return this.Ha(a)};d.al=function(a){return this.Qu(a)};d.Od=function(a){return!!a.P(this.dg)};d.Kj=function(){return this};d.ng=function(){return this};d.oh=function(a){return!!a.P(this.dg)};d.Di=function(){return qe()};d.U=function(a){a.P(this.dg)};d.jb=function(){return 1};d.d=function(a){this.dg=a;return this};d.mb=function(){$B();var a=(new Ib).ha([this.dg]);return qS(new rS,a,0,a.L.length|0)};d.Qs=function(a){return this.Qu(a)}; +d.Fb=function(a){return a.P(this.dg)?(new z).d(this.dg):y()};d.lv=function(){return vd()};d.LC=function(a){return this.Ha(a)?this:(new y$).M(this.dg,a)};d.ta=function(){return vd()};d.Ha=function(a){return Va(Wa(),a,this.dg)};d.xg=function(){return this};d.Vh=function(){return kz(this)};d.Zj=function(a){return this.LC(a)};d.Qu=function(a){return Va(Wa(),a,this.dg)?vd():this}; +d.$classData=r({Sbb:0},!1,"scala.collection.immutable.Set$Set1",{Sbb:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,q:1,o:1});function y$(){this.Sh=this.dg=null}y$.prototype=new Y9;y$.prototype.constructor=y$;d=y$.prototype;d.Hd=function(){return this};d.ga=function(){return this.dg};d.P=function(a){return this.Ha(a)};d.al=function(a){return this.Qu(a)};d.Od=function(a){return!!a.P(this.dg)||!!a.P(this.Sh)}; +d.FW=function(){return(new x$).d(this.Sh)};d.Kj=function(){return this};d.ng=function(){return this};d.M=function(a,b){this.dg=a;this.Sh=b;return this};d.oh=function(a){return!!a.P(this.dg)&&!!a.P(this.Sh)};d.Di=function(){return qe()};d.U=function(a){a.P(this.dg);a.P(this.Sh)};d.jb=function(){return 2};d.mb=function(){$B();var a=(new Ib).ha([this.dg,this.Sh]);return qS(new rS,a,0,a.L.length|0)};d.Qs=function(a){return this.Qu(a)}; +d.Fb=function(a){return a.P(this.dg)?(new z).d(this.dg):a.P(this.Sh)?(new z).d(this.Sh):y()};d.lv=function(){return vd()};d.LC=function(a){return this.Ha(a)?this:(new z$).Dr(this.dg,this.Sh,a)};d.ta=function(){return this.FW()};d.Ha=function(a){return Va(Wa(),a,this.dg)||Va(Wa(),a,this.Sh)};d.xg=function(){return this};d.Vh=function(){return kz(this)};d.Zj=function(a){return this.LC(a)};d.Qu=function(a){return Va(Wa(),a,this.dg)?(new x$).d(this.Sh):Va(Wa(),a,this.Sh)?(new x$).d(this.dg):this}; +d.$classData=r({Tbb:0},!1,"scala.collection.immutable.Set$Set2",{Tbb:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,q:1,o:1});function z$(){this.Il=this.Sh=this.dg=null}z$.prototype=new Y9;z$.prototype.constructor=z$;d=z$.prototype;d.Hd=function(){return this};d.ga=function(){return this.dg};d.P=function(a){return this.Ha(a)};d.al=function(a){return this.Qu(a)}; +d.Od=function(a){return!!a.P(this.dg)||!!a.P(this.Sh)||!!a.P(this.Il)};d.FW=function(){return(new y$).M(this.Sh,this.Il)};d.Kj=function(){return this};d.ng=function(){return this};d.oh=function(a){return!!a.P(this.dg)&&!!a.P(this.Sh)&&!!a.P(this.Il)};d.Di=function(){return qe()};d.U=function(a){a.P(this.dg);a.P(this.Sh);a.P(this.Il)};d.jb=function(){return 3};d.Dr=function(a,b,c){this.dg=a;this.Sh=b;this.Il=c;return this}; +d.mb=function(){$B();var a=(new Ib).ha([this.dg,this.Sh,this.Il]);return qS(new rS,a,0,a.L.length|0)};d.Qs=function(a){return this.Qu(a)};d.Fb=function(a){return a.P(this.dg)?(new z).d(this.dg):a.P(this.Sh)?(new z).d(this.Sh):a.P(this.Il)?(new z).d(this.Il):y()};d.lv=function(){return vd()};d.LC=function(a){return this.Ha(a)?this:(new wxb).dA(this.dg,this.Sh,this.Il,a)};d.ta=function(){return this.FW()};d.Ha=function(a){return Va(Wa(),a,this.dg)||Va(Wa(),a,this.Sh)||Va(Wa(),a,this.Il)};d.xg=function(){return this}; +d.Vh=function(){return kz(this)};d.Zj=function(a){return this.LC(a)};d.Qu=function(a){return Va(Wa(),a,this.dg)?(new y$).M(this.Sh,this.Il):Va(Wa(),a,this.Sh)?(new y$).M(this.dg,this.Il):Va(Wa(),a,this.Il)?(new y$).M(this.dg,this.Sh):this};d.$classData=r({Ubb:0},!1,"scala.collection.immutable.Set$Set3",{Ubb:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,q:1,o:1}); +function wxb(){this.kv=this.Il=this.Sh=this.dg=null}wxb.prototype=new Y9;wxb.prototype.constructor=wxb;d=wxb.prototype;d.Hd=function(){return this};d.ga=function(){return this.dg};d.P=function(a){return this.Ha(a)};d.al=function(a){return this.Qu(a)};d.Od=function(a){return!!a.P(this.dg)||!!a.P(this.Sh)||!!a.P(this.Il)||!!a.P(this.kv)};d.FW=function(){return(new z$).Dr(this.Sh,this.Il,this.kv)};d.Kj=function(){return this};d.ng=function(){return this}; +d.oh=function(a){return!!a.P(this.dg)&&!!a.P(this.Sh)&&!!a.P(this.Il)&&!!a.P(this.kv)};d.Di=function(){return qe()};d.U=function(a){a.P(this.dg);a.P(this.Sh);a.P(this.Il);a.P(this.kv)};d.jb=function(){return 4};d.mb=function(){$B();var a=(new Ib).ha([this.dg,this.Sh,this.Il,this.kv]);return qS(new rS,a,0,a.L.length|0)};d.Qs=function(a){return this.Qu(a)}; +d.Fb=function(a){return a.P(this.dg)?(new z).d(this.dg):a.P(this.Sh)?(new z).d(this.Sh):a.P(this.Il)?(new z).d(this.Il):a.P(this.kv)?(new z).d(this.kv):y()};d.lv=function(){return vd()};d.LC=function(a){return this.Ha(a)?this:xxb(xxb(xxb(xxb(xxb((new A$).a(),this.dg),this.Sh),this.Il),this.kv),a)};d.ta=function(){return this.FW()};d.Ha=function(a){return Va(Wa(),a,this.dg)||Va(Wa(),a,this.Sh)||Va(Wa(),a,this.Il)||Va(Wa(),a,this.kv)};d.dA=function(a,b,c,e){this.dg=a;this.Sh=b;this.Il=c;this.kv=e;return this}; +d.xg=function(){return this};d.Vh=function(){return kz(this)};d.Zj=function(a){return this.LC(a)};d.Qu=function(a){return Va(Wa(),a,this.dg)?(new z$).Dr(this.Sh,this.Il,this.kv):Va(Wa(),a,this.Sh)?(new z$).Dr(this.dg,this.Il,this.kv):Va(Wa(),a,this.Il)?(new z$).Dr(this.dg,this.Sh,this.kv):Va(Wa(),a,this.kv)?(new z$).Dr(this.dg,this.Sh,this.Il):this}; +d.$classData=r({Vbb:0},!1,"scala.collection.immutable.Set$Set4",{Vbb:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,q:1,o:1});function yxb(a,b){return b=e))for(e=0;;){var g=e;a.Du().P(a.PP().lb(g))&&(c.n[b]=g,b=1+b|0);if(e===f)break;e=1+e|0}a=b;a=0b||b>=Exb(a))throw(new U).e(""+b);var c=-1+a.dM().Oa()|0;c=Fxb(a,b,0,c);return a.NB().P(a.dM().lb(c)).Hd().ke().lb(b-a.Rx().n[c]|0)}function Exb(a){return a.Rx().n[a.dM().Oa()]} +var Fxb=function Gxb(a,b,c,e){var g=(c+e|0)/2|0;return b=a.Rx().n[1+g|0]?Gxb(a,b,1+g|0,e):g};function Hxb(a){var b=ja(Ja(Qa),[1+a.dM().Oa()|0]);b.n[0]=0;var c=a.dM().Oa(),e=-1+c|0;if(!(0>=c))for(c=0;;){var f=c;b.n[1+f|0]=b.n[f]+a.NB().P(a.dM().lb(f)).Hd().jb()|0;if(c===e)break;c=1+c|0}return b}function Ixb(a,b){return a.NB().P(a.tpa().lb(b))}function Jxb(a,b){return bc?c:224]);a=a.pO(b,!1,0,c,0);return null===a?f8():a}d.U=function(){};d.gI=function(a){return a};d.qea=function(a){if(a instanceof A$)return this.DW(a,0);var b=this.mb();return wT(b,a)};d.Cb=function(a){return Oxb(this,a)};d.jb=function(){return 0};d.mb=function(){return $B().ce}; +d.Qs=function(a){return Nxb(this,a)};d.XL=function(){return this};d.lv=function(){return f8()};d.Si=function(a){var b=6+this.jb()|0;b=ja(Ja(d8),[224>b?b:224]);a=this.pO(a,!0,0,b,0);return null===a?f8():a};d.M$=function(a){a=a+~(a<<9)|0;a^=a>>>14|0;a=a+(a<<4)|0;return a^(a>>>10|0)};function Nxb(a,b){a=a.XL(b,a.JD(b),0);return null===a?f8():a}d.ZO=function(){return null};d.Ha=function(a){return this.Qx(a,this.JD(a),0)};d.ta=function(){return this.vea()};d.vea=function(){return Nxb(this,this.ga())}; +d.dO=function(a){if(a instanceof A$){var b=6+this.jb()|0;b=ja(Ja(d8),[224>b?b:224]);a=this.jT(a,0,b,0);a=null===a?f8():a}else a=Ida(this,a);return a};d.e$=function(){return f8()};d.xg=function(){return this};d.jT=function(){return null};d.Vh=function(){return kz(this)};d.pO=function(){return null};d.Qx=function(){return!1};d.z1=function(a){if(a instanceof A$){var b=this.jb(),c=a.jb();b=6+(bb?b:224]);a=this.ZO(a,0,b,0);a=null===a?f8():a}else a=Oxb(this,a);return a}; +d.Zj=function(a){return xxb(this,a)};d.DW=function(){return!0};d.OW=function(a){if(a instanceof A$){var b=6+(this.jb()+a.jb()|0)|0;b=ja(Ja(d8),[224>b?b:224]);a=this.NW(a,0,b,0);a=null===a?f8():a}else a=Ivb(this,a);return a};var d8=r({sW:0},!1,"scala.collection.immutable.HashSet",{sW:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,Hi:1,q:1,o:1});A$.prototype.$classData=d8;function Pxb(){} +Pxb.prototype=new rxb;Pxb.prototype.constructor=Pxb;Pxb.prototype.a=function(){return this};Pxb.prototype.$classData=r({Bbb:0},!1,"scala.collection.immutable.ListSet$EmptyListSet$",{Bbb:1,zbb:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,q:1,o:1});var Qxb=void 0;function Rnb(){Qxb||(Qxb=(new Pxb).a());return Qxb}function Rxb(){this.cR=this.qka=null}Rxb.prototype=new rxb; +Rxb.prototype.constructor=Rxb;d=Rxb.prototype;d.rP=function(){return this.cR};d.al=function(a){return Sxb(a,this)};d.b=function(){return!1};d.KC=function(a){return Txb(this,a)?this:sxb(this,a)};d.jb=function(){a:{var a=this,b=0;for(;;){if(a.b())break a;a=a.rP();b=1+b|0}}return b};function Sxb(a,b){var c=H();for(;;){if(b.b())return lia(c);if(Va(Wa(),a,b.pT())){b=b.rP();for(a=c;!a.b();)c=a.ga(),b=sxb(b,c.pT()),a=a.ta();return b}var e=b.rP();c=ji(b,c);b=e}}d.Qs=function(a){return Sxb(a,this)}; +function sxb(a,b){var c=new Rxb;c.qka=b;if(null===a)throw mb(E(),null);c.cR=a;return c}d.Ha=function(a){return Txb(this,a)};d.pT=function(){return this.qka};d.iX=function(a){return Sxb(a,this)};function Txb(a,b){for(;;){if(a.b())return!1;if(Va(Wa(),a.pT(),b))return!0;a=a.rP()}}d.Zj=function(a){return this.KC(a)}; +d.$classData=r({Cbb:0},!1,"scala.collection.immutable.ListSet$Node",{Cbb:1,zbb:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,q:1,o:1});function Uxb(){this.th=null}Uxb.prototype=new bxb;Uxb.prototype.constructor=Uxb;d=Uxb.prototype;d.Hd=function(){return this};d.P=function(a){return this.th.Ha(a)};d.al=function(a){return this.Qu(a)};d.Kj=function(){return this};d.ng=function(){return this}; +d.Di=function(){return qe()};function pd(a){var b=new Uxb;X9.prototype.Vd.call(b,a);return b}d.Qs=function(a){return this.Qu(a)};d.lv=function(){return vd()};d.LC=function(a){return this.th.Ha(a)?this:J(qe(),H()).Lk(this).Zj(a)};d.xg=function(){return this};d.Vh=function(){return kz(this)};d.Zj=function(a){return this.LC(a)};d.Qu=function(a){return this.th.Ha(a)?J(qe(),H()).Lk(this).Qs(a):this}; +d.$classData=r({Lbb:0},!1,"scala.collection.immutable.MapLike$ImmutableDefaultKeySet",{Lbb:1,F2:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,q:1,o:1,qy:1,$i:1,oj:1,mj:1});function Vxb(){}Vxb.prototype=new V9;Vxb.prototype.constructor=Vxb;function Wxb(){}Wxb.prototype=Vxb.prototype;Vxb.prototype.Hd=function(){return this};Vxb.prototype.Kj=function(){return this};function dxb(){u$.call(this);this.Fa=null} +dxb.prototype=new v$;dxb.prototype.constructor=dxb;d=dxb.prototype;d.lb=function(a){return j$(this,a)};d.P=function(a){return j$(this,a|0)};d.nt=function(a){if(null===a)throw mb(E(),null);this.Fa=a;u$.prototype.nt.call(this,a);return this};d.lW=function(){return this.Fa};d.mb=function(){return k$(this)};d.Pl=function(){return"R"};d.Oa=function(){return this.Fa.Oa()}; +d.$classData=r({qab:0},!1,"scala.collection.SeqViewLike$$anon$12",{qab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,fpa:1});function Xxb(){}Xxb.prototype=new Mxb;Xxb.prototype.constructor=Xxb;d=Xxb.prototype;d.a=function(){return this};d.ga=function(){throw(new iL).e("Empty Set");};d.ta=function(){return this.vea()};d.vea=function(){throw(new iL).e("Empty Set");}; +d.$classData=r({kbb:0},!1,"scala.collection.immutable.HashSet$EmptyHashSet$",{kbb:1,sW:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,Hi:1,q:1,o:1});var Yxb=void 0;function f8(){Yxb||(Yxb=(new Xxb).a());return Yxb}function k5(){this.Bl=0;this.yf=null;this.Ls=0}k5.prototype=new Mxb;k5.prototype.constructor=k5;d=k5.prototype; +d.QW=function(a,b,c){var e=1<<(31&(b>>>c|0)),f=sK(ED(),this.Bl&(-1+e|0));if(0!==(this.Bl&e)){e=this.yf.n[f];a=e.QW(a,b,5+c|0);if(e===a)return this;b=ja(Ja(d8),[this.yf.n.length]);Pu(Gd(),this.yf,0,b,0,this.yf.n.length);b.n[f]=a;return e8(new k5,this.Bl,b,this.Ls+(a.jb()-e.jb()|0)|0)}c=ja(Ja(d8),[1+this.yf.n.length|0]);Pu(Gd(),this.yf,0,c,0,f);c.n[f]=C$(a,b);Pu(Gd(),this.yf,f,c,1+f|0,this.yf.n.length-f|0);return e8(new k5,this.Bl|e,c,1+this.Ls|0)}; +d.NW=function(a,b,c,e){if(a===this)return this;if(a instanceof D$)return this.gI(a,b);if(a instanceof k5){for(var f=this.yf,g=this.Bl,h=0,k=a.yf,l=a.Bl,m=0,p=e,t=0;0!==(g|l);){var v=g^g&(-1+g|0),A=l^l&(-1+l|0);if(v===A){var D=f.n[h].NW(k.n[m],5+b|0,c,p);t=t+D.jb()|0;c.n[p]=D;p=1+p|0;g&=~v;h=1+h|0;l&=~A;m=1+m|0}else{D=-1+v|0;var C=-1+A|0;DD!==0>C?(A=f.n[h],t=t+A.jb()|0,c.n[p]=A,p=1+p|0,g&=~v,h=1+h|0):(v=k.n[m],t=t+v.jb()|0,c.n[p]=v,p=1+p|0,l&=~A,m=1+m|0)}}if(t===this.Ls)return this;if(t===a.Ls)return a; +b=p-e|0;f=ja(Ja(d8),[b]);Ba(c,e,f,0,b);return e8(new k5,this.Bl|a.Bl,f,t)}return this};d.U=function(a){for(var b=0;b>>b|0)),e=sK(ED(),this.Bl&(-1+c|0));if(0!==(this.Bl&c)){c=this.yf.n[e];a=c.gI(a,5+b|0);if(c===a)return this;b=ja(Ja(d8),[this.yf.n.length]);Pu(Gd(),this.yf,0,b,0,this.yf.n.length);b.n[e]=a;return e8(new k5,this.Bl,b,this.Ls+(a.jb()-c.jb()|0)|0)}b=ja(Ja(d8),[1+this.yf.n.length|0]);Pu(Gd(),this.yf,0,b,0,e);b.n[e]=a;Pu(Gd(),this.yf,e,b,1+e|0,this.yf.n.length-e|0);return e8(new k5,this.Bl|c,b,this.Ls+a.jb()|0)};d.jb=function(){return this.Ls}; +d.mb=function(){var a=new pgb;h5.prototype.bla.call(a,this.yf);return a}; +d.XL=function(a,b,c){var e=1<<(31&(b>>>c|0)),f=sK(ED(),this.Bl&(-1+e|0));if(0!==(this.Bl&e)){var g=this.yf.n[f];a=g.XL(a,b,5+c|0);return g===a?this:null===a?(e^=this.Bl,0!==e?(a=ja(Ja(d8),[-1+this.yf.n.length|0]),Pu(Gd(),this.yf,0,a,0,f),Pu(Gd(),this.yf,1+f|0,a,f,-1+(this.yf.n.length-f|0)|0),f=this.Ls-g.jb()|0,1!==a.n.length||a.n[0]instanceof k5?e8(new k5,e,a,f):a.n[0]):null):1!==this.yf.n.length||a instanceof k5?(e=ja(Ja(d8),[this.yf.n.length]),Pu(Gd(),this.yf,0,e,0,this.yf.n.length),e.n[f]=a,f= +this.Ls+(a.jb()-g.jb()|0)|0,e8(new k5,this.Bl,e,f)):a}return this}; +d.ZO=function(a,b,c,e){if(a===this)return this;if(a instanceof D$)return a.ZO(this,b,c,e);if(a instanceof k5){var f=this.yf,g=this.Bl,h=0,k=a.yf,l=a.Bl,m=0;if(0===(g&l))return null;for(var p=e,t=0,v=0;0!==(g&l);){var A=g^g&(-1+g|0),D=l^l&(-1+l|0);if(A===D){var C=f.n[h].ZO(k.n[m],5+b|0,c,p);null!==C&&(t=t+C.jb()|0,v|=A,c.n[p]=C,p=1+p|0);g&=~A;h=1+h|0;l&=~D;m=1+m|0}else{C=-1+A|0;var I=-1+D|0;CC!==0>I?(g&=~A,h=1+h|0):(l&=~D,m=1+m|0)}}if(0===v)return null;if(t===this.Ls)return this;if(t===a.Ls)return a; +a=p-e|0;return 1!==a||c.n[e]instanceof k5?(b=ja(Ja(d8),[a]),Ba(c,e,b,0,a),e8(new k5,v,b,t)):c.n[e]}return null}; +d.jT=function(a,b,c,e){if(a===this)return null;if(a instanceof i5)return this.XL(a.Tk,a.Mf,b);if(a instanceof k5){for(var f=this.yf,g=this.Bl,h=0,k=a.yf,l=a.Bl,m=0,p=e,t=a=0;0!==g;){var v=g^g&(-1+g|0),A=l^l&(-1+l|0);if(v===A){var D=f.n[h].jT(k.n[m],5+b|0,c,p);null!==D&&(a=a+D.jb()|0,t|=v,c.n[p]=D,p=1+p|0);g&=~v;h=1+h|0;l&=~A;m=1+m|0}else{D=-1+v|0;var C=-1+A|0;DD!==0>C?(A=f.n[h],a=a+A.jb()|0,t|=v,c.n[p]=A,p=1+p|0,g&=~v,h=1+h|0):(l&=~A,m=1+m|0)}}if(0===t)return null;if(a===this.Ls)return this; +b=p-e|0;return 1!==b||c.n[e]instanceof k5?(f=ja(Ja(d8),[b]),Ba(c,e,f,0,b),e8(new k5,t,f,a)):c.n[e]}if(a instanceof E$)a:for(e=this,c=a.qn;;){if(c.b()||null===e){b=e;break a}t=w$(c);e=e.XL(uc(t).$a(),a.Mf,b);c=Qx(c)}else b=this;return b};function e8(a,b,c,e){a.Bl=b;a.yf=c;a.Ls=e;BKa(Gb(),sK(ED(),b)===c.n.length);return a} +d.pO=function(a,b,c,e,f){for(var g=f,h=0,k=0,l=0;l>>1|0;k=e}return e8(new k5,k,a,h)}return e.n[f]}; +d.Qx=function(a,b,c){var e=31&(b>>>c|0),f=1<c?c:224]);L7();a=a.oO(b,!0,0,c,0);return null===a?K7():a}function jyb(a,b,c){return a.lQ(b,a.JD(b),0,c,null,null)}d.wp=function(a){return nyb(this,a)};d.ls=function(){L7();return K7()};d.bW=function(){return this};d.oO=function(){return null}; +function nyb(a,b){return a.bW(b,a.JD(b),0)}d.Cb=function(a){L7();var b=6+this.jb()|0;b=ja(Ja(I7),[224>b?b:224]);L7();a=this.oO(a,!1,0,b,0);return null===a?K7():a};d.f$=function(){L7();return K7()};d.jb=function(){return 0};d.mb=function(){return $B().ce};d.Wh=function(a,b){return jyb(this,a,b)};d.uea=function(){return nyb(this,this.ga().ma())};d.Si=function(a){return pyb(this,a)};d.M$=function(a){a=a+~(a<<9)|0;a^=a>>>14|0;a=a+(a<<4)|0;return a^(a>>>10|0)}; +d.Ja=function(a){return this.zO(a,this.JD(a),0)};d.XN=function(){return!1};d.Ha=function(a){return this.XN(a,this.JD(a),0)};d.ta=function(){return this.uea()};d.w$=function(a){return pyb(this,a)};d.KB=function(){return pd(this)};d.Vh=function(){return xO(this)};d.Ru=function(a){return oyb(this,a)}; +var I7=r({rW:0},!1,"scala.collection.immutable.HashMap",{rW:1,yA:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,cx:1,$i:1,oj:1,mj:1,dx:1,q:1,o:1,Hi:1});kyb.prototype.$classData=I7;function i5(){this.Tk=null;this.Mf=0}i5.prototype=new Zxb;i5.prototype.constructor=i5;d=i5.prototype; +d.QW=function(a,b,c){if(b===this.Mf&&Va(Wa(),a,this.Tk))return this;if(b!==this.Mf)return Nnb(Pnb(),this.Mf,this,b,C$(a,b),c);c=Rnb();return K$(new E$,b,sxb(c,this.Tk).KC(a))};d.NW=function(a,b){return a.gI(this,b)};function C$(a,b){var c=new i5;c.Tk=a;c.Mf=b;return c}d.U=function(a){a.P(this.Tk)}; +d.gI=function(a,b){if(a.Mf!==this.Mf)return Nnb(Pnb(),this.Mf,this,a.Mf,a,b);if(a instanceof i5){if(Va(Wa(),this.Tk,a.Tk))return this;b=this.Mf;var c=Rnb();return K$(new E$,b,sxb(c,this.Tk).KC(a.Tk))}if(a instanceof E$)return b=a.qn.KC(this.Tk),b.jb()===a.qn.jb()?a:K$(new E$,this.Mf,b);throw(new x).d(a);};d.jb=function(){return 1};d.mb=function(){$B();var a=(new Ib).ha([this.Tk]);return qS(new rS,a,0,a.L.length|0)};d.XL=function(a,b){return b===this.Mf&&Va(Wa(),a,this.Tk)?null:this}; +d.ZO=function(a,b){return a.Qx(this.Tk,this.Mf,b)?this:null};d.jT=function(a,b){return a.Qx(this.Tk,this.Mf,b)?null:this};d.pO=function(a,b){return b!==!!a.P(this.Tk)?this:null};d.Qx=function(a,b){return b===this.Mf&&Va(Wa(),a,this.Tk)};d.DW=function(a,b){return a.Qx(this.Tk,this.Mf,b)}; +d.$classData=r({lbb:0},!1,"scala.collection.immutable.HashSet$HashSet1",{lbb:1,pbb:1,sW:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,Hi:1,q:1,o:1});function E$(){this.Mf=0;this.qn=null}E$.prototype=new Zxb;E$.prototype.constructor=E$;d=E$.prototype;d.QW=function(a,b,c){return b===this.Mf?K$(new E$,b,this.qn.KC(a)):Nnb(Pnb(),this.Mf,this,b,C$(a,b),c)}; +d.NW=function(a,b){return a instanceof D$?this.gI(a,b):a instanceof k5?a.gI(this,b):this};d.U=function(a){var b=w$(this.qn);yT(uc(b),a)};d.gI=function(a,b){if(a.Mf!==this.Mf)return Nnb(Pnb(),this.Mf,this,a.Mf,a,b);if(a instanceof i5)return a=this.qn.KC(a.Tk),a.jb()===this.qn.jb()?this:K$(new E$,this.Mf,a);if(a instanceof E$){b=txb(this.qn,a.qn);var c=b.jb();return c===this.qn.jb()?this:c===a.qn.jb()?a:K$(new E$,this.Mf,b)}throw(new x).d(a);};d.jb=function(){return this.qn.jb()}; +d.mb=function(){var a=w$(this.qn);return uc(a)};d.XL=function(a,b){if(b===this.Mf){a=this.qn.iX(a);var c=a.jb();switch(c){case 0:return null;case 1:return a=w$(a),C$(uc(a).$a(),b);default:return c===this.qn.jb()?this:K$(new E$,b,a)}}else return this}; +d.ZO=function(a,b){var c=this.qn,e=wd(new xd,Rnb());c=w$(c);for(c=uc(c);c.Ya();){var f=c.$a();!1!==a.Qx(f,this.Mf,b)&&Ad(e,f)}b=e.eb;e=b.jb();return 0===e?null:e===this.qn.jb()?this:e===a.jb()?a:1===e?(a=w$(b),C$(uc(a).$a(),this.Mf)):K$(new E$,this.Mf,b)};function K$(a,b,c){a.Mf=b;a.qn=c;return a} +d.jT=function(a,b){var c=this.qn,e=wd(new xd,Rnb());c=w$(c);for(c=uc(c);c.Ya();){var f=c.$a();!0!==a.Qx(f,this.Mf,b)&&Ad(e,f)}a=e.eb;b=a.jb();return 0===b?null:b===this.qn.jb()?this:1===b?(a=w$(a),C$(uc(a).$a(),this.Mf)):K$(new E$,this.Mf,a)};d.pO=function(a,b){a=b?D6(this.qn,a,!0):D6(this.qn,a,!1);b=a.jb();switch(b){case 0:return null;case 1:return a=w$(a),C$(uc(a).$a(),this.Mf);default:return b===this.qn.jb()?this:K$(new E$,this.Mf,a)}};d.Qx=function(a,b){return b===this.Mf&&this.qn.Ha(a)}; +d.DW=function(a,b){var c=w$(this.qn);c=uc(c);for(var e=!0;e&&c.Ya();)e=c.$a(),e=a.Qx(e,this.Mf,b);return e};d.$classData=r({mbb:0},!1,"scala.collection.immutable.HashSet$HashSetCollision1",{mbb:1,pbb:1,sW:1,Ku:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Lr:1,za:1,Kr:1,Gs:1,Is:1,Hs:1,di:1,qy:1,$i:1,oj:1,mj:1,Hi:1,q:1,o:1});function qyb(){}qyb.prototype=new ayb;qyb.prototype.constructor=qyb;qyb.prototype.a=function(){return this}; +qyb.prototype.$classData=r({xbb:0},!1,"scala.collection.immutable.ListMap$EmptyListMap$",{xbb:1,vbb:1,yA:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,cx:1,$i:1,oj:1,mj:1,dx:1,q:1,o:1});var ryb=void 0;function qgb(){ryb||(ryb=(new qyb).a());return ryb}function F$(){this.tfa=this.jI=this.Tk=null}F$.prototype=new ayb;F$.prototype.constructor=F$; +function syb(a,b){var c=H();for(;;){if(b.b())return lia(c);if(Va(Wa(),a,b.uu())){b=b.tH();for(a=c;!a.b();)c=a.ga(),b=dyb(new F$,b,c.uu(),c.Dt()),a=a.ta();return b}var e=b.tH();c=ji(b,c);b=e}}d=F$.prototype;d.P=function(a){a:{var b=this;for(;;){if(b.b())throw(new iL).e("key not found: "+a);if(Va(Wa(),a,b.uu())){a=b.Dt();break a}b=b.tH()}}return a};d.al=function(a){return syb(a,this)};d.Dt=function(){return this.jI};d.b=function(){return!1};d.cc=function(a){return this.EI(a)}; +d.wp=function(a){return syb(a,this)};d.jb=function(){a:{var a=this,b=0;for(;;){if(a.b())break a;a=a.tH();b=1+b|0}}return b};d.uu=function(){return this.Tk};d.EI=function(a){var b=syb(a.ma(),this);return dyb(new F$,b,a.ma(),a.ya())};d.Wh=function(a,b){return this.RW(a,b)};d.RW=function(a,b){var c=syb(a,this);return dyb(new F$,c,a,b)};d.hX=function(a){return syb(a,this)};d.Ja=function(a){a:{var b=this;for(;;){if(b.b()){a=y();break a}if(Va(Wa(),a,b.uu())){a=(new z).d(b.Dt());break a}b=b.tH()}}return a}; +function dyb(a,b,c,e){a.Tk=c;a.jI=e;if(null===b)throw mb(E(),null);a.tfa=b;return a}d.Ha=function(a){a:{var b=this;for(;;){if(b.b()){a=!1;break a}if(Va(Wa(),a,b.uu())){a=!0;break a}b=b.tH()}}return a};d.tH=function(){return this.tfa};d.Ru=function(a){return this.EI(a)}; +d.$classData=r({ybb:0},!1,"scala.collection.immutable.ListMap$Node",{ybb:1,vbb:1,yA:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,cx:1,$i:1,oj:1,mj:1,dx:1,q:1,o:1});function pS(){this.Xj=this.lK=this.xn=0;this.rv=!1;this.Mda=this.TE=0}pS.prototype=new V9;pS.prototype.constructor=pS;function tyb(){}d=tyb.prototype=pS.prototype;d.Hd=function(){return this};d.qE=function(){return!1}; +d.ga=function(){return this.rv?H().Z0():this.xn};d.lb=function(a){return this.ro(a)};d.P=function(a){return this.ro(a|0)};d.b=function(){return this.rv};d.Kj=function(){return this};d.ng=function(){return this};d.h=function(a){if(a instanceof pS){if(this.rv)return a.rv;if(tc(a)&&this.xn===a.xn){var b=L$(this);return b===L$(a)&&(this.xn===b||this.Xj===a.Xj)}return!1}return R4(this,a)}; +function uyb(a,b){if(a.rv)return a=a.xn,(new qa).Sc(a,a>>31);for(var c=a.xn,e=L$(a);c!==e&&b.Ep(c);)c=c+a.Xj|0;if(c===e&&b.Ep(c))return b=c,c=b>>31,e=a.Xj,a=e>>31,e=b+e|0,(new qa).Sc(e,(-2147483648^e)<(-2147483648^b)?1+(c+a|0)|0:c+a|0);a=c;return(new qa).Sc(a,a>>31)}d.ro=function(a){0>this.TE&&dLa(Axa(),this.xn,this.lK,this.Xj,this.qE());if(0>a||a>=this.TE)throw(new U).e(""+a);return this.xn+ca(this.Xj,a)|0}; +d.gl=function(a){var b=uyb(this,a);a=b.od;b=b.Ud;var c=this.xn;a===c&&b===c>>31?a=this:(a=a-this.Xj|0,a===L$(this)?(a=L$(this),a=(new pS).Fi(a,a,this.Xj)):a=(new M$).Fi(a+this.Xj|0,L$(this),this.Xj));return a}; +d.Fi=function(a,b,c){this.xn=a;this.lK=b;this.Xj=c;this.rv=a>b&&0c||a===b&&!this.qE();if(0===c)throw(new Zj).e("step cannot be 0.");if(this.rv)a=0;else{var e=vyb(this);a=e.od;var f=e.Ud,g=this.Xj,h=g>>31;e=Ea();a=Tya(e,a,f,g,h);e=e.Wj;g=this.qE()||!wyb(this)?1:0;f=g>>31;g=a+g|0;e=(new qa).Sc(g,(-2147483648^g)<(-2147483648^a)?1+(e+f|0)|0:e+f|0);a=e.od;e=e.Ud;a=(0===e?-1<(-2147483648^a):0>31,a=BWa(Ea(),a,e,c,f),b=0!==a?b-a|0:this.qE()?b:b-c|0}this.Mda=b;return this};d.t=function(){var a=this.qE()?"to":"until",b=1===this.Xj?"":" by "+this.Xj;return(this.rv?"empty ":wyb(this)?"":"inexact ")+"Range "+this.xn+" "+a+" "+this.lK+b};d.Di=function(){return hG()};d.U=function(a){if(!this.rv)for(var b=this.xn;;){a.P(b);if(b===this.Mda)break;b=b+this.Xj|0}}; +d.xl=function(a){var b=uyb(this,a);a=b.od;b=b.Ud;var c=this.xn;a===c&&b===c>>31?(a=this.xn,a=(new pS).Fi(a,a,this.Xj)):(a=a-this.Xj|0,a=a===L$(this)?this:(new M$).Fi(this.xn,a,this.Xj));return a};d.Gja=function(a,b,c){return(new pS).Fi(a,b,c)};d.st=function(){return this.rv?this:(new M$).Fi(L$(this),this.xn,-this.Xj|0)};d.jb=function(){return this.Oa()};d.Mj=function(){return n9(this)};d.mb=function(){return qS(new rS,this,0,this.Oa())}; +d.Pm=function(a){var b=uyb(this,a);a=b.od;b=b.Ud;var c=this.xn;if(a===c&&b===c>>31)return a=this.xn,(new R).M((new pS).Fi(a,a,this.Xj),this);a=a-this.Xj|0;return a===L$(this)?(a=L$(this),(new R).M(this,(new pS).Fi(a,a,this.Xj))):(new R).M((new M$).Fi(this.xn,a,this.Xj),(new M$).Fi(a+this.Xj|0,L$(this),this.Xj))};d.Oa=function(){return 0>this.TE?dLa(Axa(),this.xn,this.lK,this.Xj,this.qE()):this.TE};d.hm=function(){return this.Oa()}; +function xyb(a,b){return 0>=b||a.rv?a:b>=a.TE&&0<=a.TE?(b=a.lK,(new pS).Fi(b,b,a.Xj)):a.Gja(a.xn+ca(a.Xj,b)|0,a.lK,a.Xj)}d.Jk=function(a){0>=a||this.rv?(a=this.xn,a=(new pS).Fi(a,a,this.Xj)):a=a>=this.TE&&0<=this.TE?this:(new M$).Fi(this.xn,this.xn+ca(this.Xj,-1+a|0)|0,this.Xj);return a};function wyb(a){var b=vyb(a),c=b.od;b=b.Ud;var e=a.Xj,f=e>>31;a=Ea();c=BWa(a,c,b,e,f);b=a.Wj;return 0===c&&0===b}d.hA=function(){return L$(this)};d.Rk=function(a){return xyb(this,a)};d.ok=function(){return this}; +d.ta=function(){this.rv&&yyb(H());return xyb(this,1)};d.ke=function(){return this};function L$(a){return a.rv?(a=H(),lia(a)|0):a.Mda}d.Sa=function(a){return S4(this,a|0)};d.Vh=function(){return this};d.z=function(){return pT(this)};function vyb(a){var b=a.lK,c=b>>31,e=a.xn;a=e>>31;e=b-e|0;return(new qa).Sc(e,(-2147483648^e)>(-2147483648^b)?-1+(c-a|0)|0:c-a|0)} +d.$classData=r({Fpa:0},!1,"scala.collection.immutable.Range",{Fpa:1,Op:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,mg:1,Ea:1,za:1,fg:1,df:1,ef:1,Sda:1,VH:1,$i:1,oj:1,mj:1,bo:1,nj:1,Hi:1,q:1,o:1});function zyb(){}zyb.prototype=new V9;zyb.prototype.constructor=zyb;function Ayb(){}d=Ayb.prototype=zyb.prototype;d.Hd=function(){return this}; +function Byb(a){var b=AT();b=(new qd).d(b);for(var c=a;!c.b();){Pt();var e=tya((new cK).PG(oq(function(f,g){return function(){return g.oa}}(a,b))),c.ga());e.ta();b.oa=e;c=c.ta()}return b.oa}d.lb=function(a){return Uu(this,a)};function Cyb(a,b){if(!a.b()&&b.P(a.ga())){var c=a.ga();return dK(c,oq(function(e,f){return function(){return Cyb(e.ta(),f)}}(a,b)))}return AT()}d.Oe=function(a){return Tu(this,a)};d.P=function(a){return Uu(this,a|0)};d.fm=function(a){return Bvb(this,a)}; +d.ps=function(a){return Dyb(this,a)};d.Od=function(a){return Avb(this,a)};d.Kj=function(){return this};d.ng=function(){return this};d.h=function(a){return this===a||R4(this,a)}; +d.bd=function(a,b){if(b.en(this)instanceof K6){if(this.b())a=AT();else{b=(new qd).d(this);for(var c=a.P(b.oa.ga()).Dd();!b.oa.b()&&c.b();)b.oa=b.oa.ta(),b.oa.b()||(c=a.P(b.oa.ga()).Dd());a=b.oa.b()?(Pt(),AT()):vya(c,oq(function(e,f,g){return function(){return f.oa.ta().bd(g,(Pt(),(new Qt).a()))}}(this,b,a)))}return a}return hC(this,a,b)};function LT(a,b,c){for(;!a.b()&&!!b.P(a.ga())===c;)a=a.ta();return tc(a)?Ssb(Pt(),a,b,c):AT()}d.V9=function(a){return Eyb(this,a)}; +d.gl=function(a){for(var b=this;!b.b()&&a.P(b.ga());)b=b.ta();return b};d.Kg=function(a){return this.Zn("",a,"")};d.Zn=function(a,b,c){var e=this,f=this;for(e.b()||(e=e.ta());f!==e&&!e.b();){e=e.ta();if(e.b())break;e=e.ta();if(e===f)break;f=f.ta()}return UJ(this,a,b,c)};d.oh=function(a){return Cvb(this,a)};d.qq=function(a){return rLa(new KT,oq(function(b){return function(){return b}}(this)),a)};d.Di=function(){return Pt()};d.t=function(){return UJ(this,"Stream(",", ",")")}; +d.U=function(a){var b=this;a:for(;;){if(!b.b()){a.P(b.ga());b=b.ta();continue a}break}};d.ne=function(a,b){var c=this;for(;;){if(c.b())return a;var e=c.ta();a=b.ug(a,c.ga());c=e}};d.qs=function(a,b){return this.b()?a:b.ug(this.ga(),this.ta().qs(a,b))};d.wm=function(a,b){return Evb(this,a,b)};d.xl=function(a){return Cyb(this,a)}; +function VMa(a,b,c){for(;;){if(c.b())return c;var e=c.ga();if(b.Ha(e))c=c.ta();else return e=c.ga(),dK(e,oq(function(f,g,h){return function(){return VMa(f,g.Zj(h.ga()),h.ta())}}(a,b,c)))}}d.st=function(){return Byb(this)};d.v$=function(a,b){return LT(this,a,b)};d.fj=function(){return VMa(this,J(qe(),H()),this)};d.Vr=function(a,b){return b.en(this)instanceof K6?dK(a,oq(function(c){return function(){return c}}(this))):qub(this,a,b)};d.mb=function(){return(new y9a).w1(this)}; +d.Fb=function(a){return Fvb(this,a)};d.Pm=function(a){for(var b=this,c=this.Di().Qd();!b.b()&&a.P(b.ga());)c.jd(b.ga()),b=b.ta();return(new R).M(c.Rc(),b)};d.Oa=function(){for(var a=0,b=this;!b.b();)a=1+a|0,b=b.ta();return a};d.ia=function(a,b){return b.en(this)instanceof K6?(this.b()?a=a.Dd():(b=this.ga(),a=dK(b,oq(function(c,e){return function(){return c.ta().ia(e,(Pt(),(new Qt).a()))}}(this,a)))),a):xq(this,a,b)};d.og=function(a){var b=Pt();return this.rF(Rsb(b,0,1),a)}; +d.cm=function(){return this.Zn("","","")};d.Dm=function(a){var b=LT(this,w(function(c,e){return function(f){return!!e.P(f)}}(this,a)),!1);return(new R).M(b,LT(this,w(function(c,e){return function(f){return!!e.P(f)}}(this,a)),!0))};d.Jk=function(a){return Fyb(this,a)};d.Dd=function(){return this};d.wy=function(){return(new kxb).w1(this)}; +function Dyb(a,b){for(var c=(new qd).d(a);;)if(tc(c.oa)){var e=b.P(c.oa.ga());if(e.b())c.oa=c.oa.ta();else return e=e.Dd(),Pt(),uya((new cK).PG(oq(function(f,g,h){return function(){return Dyb(g.oa.ta(),h)}}(a,c,b))),e)}else break;Pt();return AT()}d.Rk=function(a){return Eyb(this,a)};function Eyb(a,b){for(;;){if(0>=b||a.b())return a;a=a.ta();b=-1+b|0}}d.ok=function(){return this};d.Ha=function(a){return Cg(this,a)}; +d.rm=function(a,b,c,e){Vj(a,b);if(!this.b()){Wj(a,this.ga());b=this;if(b.fF()){var f=this.ta();if(f.b())return Vj(a,e),a;if(b!==f&&(b=f,f.fF()))for(f=f.ta();b!==f&&f.fF();)Wj(Vj(a,c),b.ga()),b=b.ta(),f=f.ta(),f.fF()&&(f=f.ta());if(f.fF()){for(var g=this,h=0;g!==f;)g=g.ta(),f=f.ta(),h=1+h|0;b===f&&0=b||a.b())return Pt(),AT();if(1===b)return b=a.ga(),dK(b,oq(function(){return function(){Pt();return AT()}}(a)));var c=a.ga();return dK(c,oq(function(e,f){return function(){return Fyb(e.ta(),-1+f|0)}}(a,b)))}d.ec=function(a,b){if(b.en(this)instanceof K6){for(var c=this,e=(new qd).d(null),f=a.vA(w(function(g,h){return function(k){h.oa=k}}(this,e)));;)if(tc(c)&&!f.P(c.ga()))c=c.ta();else break;return c.b()?AT():Tsb(Pt(),e.oa,c,a,b)}return xs(this,a,b)}; +function vya(a,b){if(a.b())return Hb(b).Dd();var c=a.ga();return dK(c,oq(function(e,f){return function(){return vya(e.ta(),f)}}(a,b)))}d.Xk=function(){return"Stream"};d.rF=function(a,b){return b.en(this)instanceof K6?(this.b()||a.b()?a=AT():(b=(new R).M(this.ga(),a.ga()),a=dK(b,oq(function(c,e){return function(){return c.ta().rF(e.ta(),(Pt(),(new Qt).a()))}}(this,a)))),a):N8(this,a,b)};function xF(a,b){if(b>=a.w)throw(new U).e(""+b);return a.L.n[b]} +function uD(a,b){var c=a.L.n.length,e=c>>31,f=b>>31;if(f===e?(-2147483648^b)>(-2147483648^c):f>e){f=c<<1;for(c=c>>>31|0|e<<1;;){e=b>>31;var g=f,h=c;if(e===h?(-2147483648^b)>(-2147483648^g):e>h)c=f>>>31|0|c<<1,f<<=1;else break}b=c;if(0===b?-1<(-2147483648^f):0b;)a.w=-1+a.w|0,a.L.n[a.w]=null}function Gyb(){u$.call(this);this.Fa=this.tO=null}Gyb.prototype=new v$;Gyb.prototype.constructor=Gyb;d=Gyb.prototype; +d.lb=function(a){return this.tO.lb(a)};d.P=function(a){return this.tO.lb(a|0)};function fxb(a,b){var c=new Gyb;if(null===a)throw mb(E(),null);c.Fa=a;c.tO=Hb(b);u$.prototype.nt.call(c,a);return c}d.U=function(a){this.tO.U(a)};d.mb=function(){return this.tO.mb()};d.Pl=function(){return"C"};d.Oa=function(){return this.tO.Oa()}; +d.$classData=r({oab:0},!1,"scala.collection.SeqViewLike$$anon$1",{oab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,Bab:1,Q$a:1,Pab:1});function g$(){u$.call(this);this.Joa=this.nda=null;this.Ci=!1;this.Fa=null}g$.prototype=new v$;g$.prototype.constructor=g$;d=g$.prototype;d.lb=function(a){return yxb(this,a)};d.P=function(a){return yxb(this,a|0)};d.U=function(a){this.Hda().U(a);this.z2().U(a)}; +d.cH=function(a,b){if(null===a)throw mb(E(),null);this.Fa=a;this.nda=b;u$.prototype.nt.call(this,a);return this};d.Hda=function(){return this.Fa};d.z2=function(){return this.nda};d.mb=function(){return Ewb(this)};d.Pl=function(){return"A"};d.Oa=function(){return this.OP().Oa()+this.y2().Oa()|0};d.OP=function(){return this.Fa};d.opa=function(){return this.Fa};d.y2=function(){this.Ci||this.Ci||(this.Joa=this.nda.Vh(),this.Ci=!0);return this.Joa}; +d.$classData=r({rab:0},!1,"scala.collection.SeqViewLike$$anon$2",{rab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,zab:1,O$a:1,Nab:1});function f$(){u$.call(this);this.Oka=this.xO=null;this.Ci=!1;this.Fa=null}f$.prototype=new v$;f$.prototype.constructor=f$;d=f$.prototype;d.lb=function(a){return Jxb(this,a)};d.P=function(a){return Jxb(this,a|0)};d.I2=function(){return this.Fa}; +d.yO=function(){this.Ci||this.Ci||(this.Oka=this.xO.Vh(),this.Ci=!0);return this.Oka};d.U=function(a){this.Q0().U(a);this.Kda().U(a)};d.cH=function(a,b){if(null===a)throw mb(E(),null);this.Fa=a;this.xO=b;u$.prototype.nt.call(this,a);return this};d.Q0=function(){return this.xO};d.mb=function(){return Jwb(this)};d.Pl=function(){return"A"};d.Oa=function(){return this.yO().Oa()+this.I2().Oa()|0};d.Kda=function(){return this.Fa};d.rpa=function(){return this.Fa}; +d.$classData=r({sab:0},!1,"scala.collection.SeqViewLike$$anon$3",{sab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,Dab:1,S$a:1,Rab:1});function h$(){u$.call(this);this.Fa=this.bV=null}h$.prototype=new v$;h$.prototype.constructor=h$;d=h$.prototype;d.lb=function(a){return Ixb(this,a)};d.P=function(a){return Ixb(this,a|0)};d.U=function(a){jwb(this,a)};d.NB=function(){return this.bV}; +d.tpa=function(){return this.Fa};d.mb=function(){return Iwb(this)};d.Pl=function(){return"M"};d.Oa=function(){return this.Fa.Oa()};d.qpa=function(){return this.Fa};d.Ao=function(a,b){if(null===a)throw mb(E(),null);this.Fa=a;this.bV=b;u$.prototype.nt.call(this,a);return this};d.wpa=function(){return this.Fa}; +d.$classData=r({tab:0},!1,"scala.collection.SeqViewLike$$anon$4",{tab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,Cab:1,R$a:1,Qab:1});function e$(){u$.call(this);this.Tj=this.bV=null;this.Ci=!1;this.Fa=null}e$.prototype=new v$;e$.prototype.constructor=e$;d=e$.prototype;d.lb=function(a){return Dxb(this,a)};d.P=function(a){return Dxb(this,a|0)};d.dM=function(){return this.Fa}; +d.U=function(a){iwb(this,a)};d.NB=function(){return this.bV};d.mb=function(){return Hwb(this)};d.Pl=function(){return"N"};d.Oa=function(){return Exb(this)};d.ppa=function(){return this.Fa};d.N$=function(){this.Ci||(this.Tj=Hxb(this),this.Ci=!0);return this.Tj};d.vpa=function(){return this.Fa};d.Ao=function(a,b){if(null===a)throw mb(E(),null);this.Fa=a;this.bV=b;u$.prototype.nt.call(this,a);return this};d.Rx=function(){return this.Ci?this.Tj:this.N$()}; +d.$classData=r({uab:0},!1,"scala.collection.SeqViewLike$$anon$5",{uab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,Aab:1,P$a:1,Oab:1});function gxb(){u$.call(this);this.Tj=this.VB=null;this.Ci=!1;this.Fa=null}gxb.prototype=new v$;gxb.prototype.constructor=gxb;d=gxb.prototype;d.lb=function(a){return Bxb(this,a)};d.P=function(a){return Bxb(this,a|0)};d.Eda=function(){return this.Fa}; +d.U=function(a){hwb(this,a)};d.mb=function(){return Gwb(this)};d.Pl=function(){return"F"};d.Oa=function(){return this.Rx().n.length};d.N$=function(){this.Ci||(this.Tj=Cxb(this),this.Ci=!0);return this.Tj};d.Ao=function(a,b){if(null===a)throw mb(E(),null);this.Fa=a;this.VB=b;u$.prototype.nt.call(this,a);return this};d.Rx=function(){return this.Ci?this.Tj:this.N$()};d.Du=function(){return this.VB};d.PP=function(){return this.Fa};d.Jda=function(){return this.Fa}; +d.$classData=r({vab:0},!1,"scala.collection.SeqViewLike$$anon$6",{vab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,epa:1,Zoa:1,jpa:1});function Hyb(){u$.call(this);this.Fa=this.uka=null}Hyb.prototype=new v$;Hyb.prototype.constructor=Hyb;d=Hyb.prototype;d.lb=function(a){return Kxb(this,a)};d.P=function(a){return Kxb(this,a|0)};d.J2=function(){return this.Fa}; +d.U=function(a){var b=B$(this);yT(b,a)};d.mb=function(){return B$(this)};d.Pl=function(){return"S"};d.Oa=function(){var a=B$(this);return VJ(a)};function cxb(a,b){var c=new Hyb;if(null===a)throw mb(E(),null);c.Fa=a;c.uka=b;u$.prototype.nt.call(c,a);return c}d.nK=function(){return this.uka}; +d.$classData=r({wab:0},!1,"scala.collection.SeqViewLike$$anon$7",{wab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,gpa:1,$oa:1,kpa:1});function hxb(){u$.call(this);this.VB=null;this.$pa=0;this.Ci=!1;this.Fa=null}hxb.prototype=new v$;hxb.prototype.constructor=hxb;d=hxb.prototype;d.lb=function(a){return zxb(this,a)};d.P=function(a){return zxb(this,a|0)};d.H2=function(){return this.Fa}; +d.U=function(a){gwb(this,a)};d.Dda=function(){return this.Fa};d.mb=function(){return Fwb(this)};d.Pl=function(){return"D"};d.Oa=function(){return Axb(this)};d.Ida=function(){return this.Fa};d.Ms=function(){this.Ci||this.Ci||(this.$pa=this.Fa.jM(this.VB,0),this.Ci=!0);return this.$pa};d.Ao=function(a,b){if(null===a)throw mb(E(),null);this.Fa=a;this.VB=b;u$.prototype.nt.call(this,a);return this};d.Du=function(){return this.VB}; +d.$classData=r({xab:0},!1,"scala.collection.SeqViewLike$$anon$8",{xab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dpa:1,Yoa:1,ipa:1});function exb(){u$.call(this);this.VB=null;this.kH=0;this.Ci=!1;this.Fa=null}exb.prototype=new v$;exb.prototype.constructor=exb;d=exb.prototype;d.lb=function(a){return Lxb(this,a)};d.P=function(a){return Lxb(this,a|0)};d.Fda=function(){return this.Fa}; +d.gP=function(){this.Ci||this.Ci||(this.kH=this.Fa.jM(this.VB,0),this.Ci=!0);return this.kH};d.U=function(a){kwb(this,a)};d.Lda=function(){return this.Fa};d.mb=function(){return Kwb(this)};d.Pl=function(){return"T"};d.Oa=function(){return this.gP()};d.Gda=function(){return this.Fa};d.Ao=function(a,b){if(null===a)throw mb(E(),null);this.Fa=a;this.VB=b;u$.prototype.nt.call(this,a);return this};d.Du=function(){return this.VB}; +d.$classData=r({yab:0},!1,"scala.collection.SeqViewLike$$anon$9",{yab:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,hpa:1,apa:1,lpa:1});function Iyb(){}Iyb.prototype=new myb;Iyb.prototype.constructor=Iyb;d=Iyb.prototype;d.a=function(){return this};d.ga=function(){throw(new iL).e("Empty Map");};d.uea=function(){throw(new iL).e("Empty Map");};d.ta=function(){return this.uea()}; +d.$classData=r({dbb:0},!1,"scala.collection.immutable.HashMap$EmptyHashMap$",{dbb:1,rW:1,yA:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,cx:1,$i:1,oj:1,mj:1,dx:1,q:1,o:1,Hi:1});var Jyb=void 0;function K7(){Jyb||(Jyb=(new Iyb).a());return Jyb}function A9a(){this.Tk=null;this.Mf=0;this.I1=this.jI=null}A9a.prototype=new myb;A9a.prototype.constructor=A9a; +function ogb(a){null===a.I1&&(a.I1=(new R).M(a.Tk,a.jI));return a.I1}function J$(a,b,c,e){var f=new A9a;f.Tk=a;f.Mf=b;f.jI=c;f.I1=e;return f}d=A9a.prototype;d.lQ=function(a,b,c,e,f,g){if(b===this.Mf&&Va(Wa(),a,this.Tk)){if(null===g)return this.jI===e?this:J$(a,b,e,f);a=g.dja(ogb(this),null!==f?f:(new R).M(a,e));return J$(a.ma(),b,a.ya(),a)}if(b!==this.Mf)return a=J$(a,b,e,f),mmb(L7(),this.Mf,this,b,a,c,2);c=qgb();return Kyb(new N$,b,dyb(new F$,c,this.Tk,this.jI).RW(a,e))}; +d.zO=function(a,b){return b===this.Mf&&Va(Wa(),a,this.Tk)?(new z).d(this.jI):y()};d.U=function(a){a.P(ogb(this))};d.bW=function(a,b){return b===this.Mf&&Va(Wa(),a,this.Tk)?(L7(),K7()):this};d.oO=function(a,b){return b!==!!a.P(ogb(this))?this:null};d.jb=function(){return 1};d.mb=function(){$B();var a=[ogb(this)];a=(new Ib).ha(a);return qS(new rS,a,0,a.L.length|0)};d.XN=function(a,b){return b===this.Mf&&Va(Wa(),a,this.Tk)}; +d.$classData=r({ebb:0},!1,"scala.collection.immutable.HashMap$HashMap1",{ebb:1,rW:1,yA:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,cx:1,$i:1,oj:1,mj:1,dx:1,q:1,o:1,Hi:1});function N$(){this.Mf=0;this.ot=null}N$.prototype=new myb;N$.prototype.constructor=N$;d=N$.prototype; +d.lQ=function(a,b,c,e,f,g){if(b===this.Mf)return null!==g&&this.ot.Ha(a)?Kyb(new N$,b,this.ot.EI(g.dja((new R).M(a,this.ot.P(a)),f))):Kyb(new N$,b,this.ot.RW(a,e));a=J$(a,b,e,f);return mmb(L7(),this.Mf,this,b,a,c,1+this.ot.jb()|0)};d.zO=function(a,b){return b===this.Mf?this.ot.Ja(a):y()};d.U=function(a){var b=cyb(this.ot);yT(uc(b),a)}; +d.bW=function(a,b){if(b===this.Mf){a=this.ot.hX(a);var c=a.jb();switch(c){case 0:return L7(),K7();case 1:return a=cyb(a),a=uc(a).$a(),J$(a.ma(),b,a.ya(),a);default:return c===this.ot.jb()?this:Kyb(new N$,b,a)}}else return this};d.oO=function(a,b){a=b?R9(this.ot,a):D6(this.ot,a,!1);b=a.jb();switch(b){case 0:return null;case 1:a=cyb(a);a=uc(a).$a();if(null===a)throw(new x).d(a);b=a.ma();var c=a.ya();return J$(b,this.Mf,c,a);default:return b===this.ot.jb()?this:Kyb(new N$,this.Mf,a)}}; +d.mb=function(){var a=cyb(this.ot);return uc(a)};d.jb=function(){return this.ot.jb()};function Kyb(a,b,c){a.Mf=b;a.ot=c;return a}d.XN=function(a,b){return b===this.Mf&&this.ot.Ha(a)};d.$classData=r({fbb:0},!1,"scala.collection.immutable.HashMap$HashMapCollision1",{fbb:1,rW:1,yA:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,cx:1,$i:1,oj:1,mj:1,dx:1,q:1,o:1,Hi:1});function j5(){this.fs=0;this.hl=null;this.w=0} +j5.prototype=new myb;j5.prototype.constructor=j5;d=j5.prototype; +d.lQ=function(a,b,c,e,f,g){var h=1<<(31&(b>>>c|0)),k=sK(ED(),this.fs&(-1+h|0));if(0!==(this.fs&h)){h=this.hl.n[k];a=h.lQ(a,b,5+c|0,e,f,g);if(a===h)return this;b=ja(Ja(I7),[this.hl.n.length]);Pu(Gd(),this.hl,0,b,0,this.hl.n.length);b.n[k]=a;return J7(this.fs,b,this.w+(a.jb()-h.jb()|0)|0)}c=ja(Ja(I7),[1+this.hl.n.length|0]);Pu(Gd(),this.hl,0,c,0,k);c.n[k]=J$(a,b,e,f);Pu(Gd(),this.hl,k,c,1+k|0,this.hl.n.length-k|0);return J7(this.fs|h,c,1+this.w|0)}; +d.zO=function(a,b,c){var e=31&(b>>>c|0);if(-1===this.fs)return this.hl.n[e].zO(a,b,5+c|0);e=1<>>c|0)),f=sK(ED(),this.fs&(-1+e|0));if(0!==(this.fs&e)){var g=this.hl.n[f];a=g.bW(a,b,5+c|0);if(a===g)return this;if(0===a.jb()){e^=this.fs;if(0!==e)return a=ja(Ja(I7),[-1+this.hl.n.length|0]),Pu(Gd(),this.hl,0,a,0,f),Pu(Gd(),this.hl,1+f|0,a,f,-1+(this.hl.n.length-f|0)|0),f=this.w-g.jb()|0,1!==a.n.length||a.n[0]instanceof j5?J7(e,a,f):a.n[0];L7();return K7()}return 1!==this.hl.n.length||a instanceof j5?(e=ja(Ja(I7),[this.hl.n.length]),Pu(Gd(),this.hl,0,e,0,this.hl.n.length), +e.n[f]=a,f=this.w+(a.jb()-g.jb()|0)|0,J7(this.fs,e,f)):a}return this};d.oO=function(a,b,c,e,f){for(var g=f,h=0,k=0,l=0;l>>1|0;k=e}return J7(k,a,h)}return e.n[f]}; +d.mb=function(){var a=new ngb;h5.prototype.bla.call(a,this.hl);return a};d.jb=function(){return this.w};function J7(a,b,c){var e=new j5;e.fs=a;e.hl=b;e.w=c;return e}d.XN=function(a,b,c){var e=31&(b>>>c|0);if(-1===this.fs)return this.hl.n[e].XN(a,b,5+c|0);e=1<=a)a=H();else{for(var b=ji(this.ga(),H()),c=b,e=this.ta(),f=1;;){if(e.b()){a=this;break a}if(fe)a.Zh(Yj(a.Fl()));else if(1024>e)a.Jg(Yj(a.me())),a.me().n[31&(b>>>5|0)]=a.Fl(),a.Zh(bk(a.me(),31&(c>>>5|0)));else if(32768>e)a.Jg(Yj(a.me())),a.ui(Yj(a.Te())),a.me().n[31&(b>>>5|0)]=a.Fl(),a.Te().n[31&(b>>>10|0)]=a.me(),a.Jg(bk(a.Te(),31&(c>>>10|0))),a.Zh(bk(a.me(),31&(c>>>5|0)));else if(1048576>e)a.Jg(Yj(a.me())),a.ui(Yj(a.Te())),a.Gl(Yj(a.Eg())),a.me().n[31&(b>>>5|0)]=a.Fl(),a.Te().n[31&(b>>>10|0)]=a.me(),a.Eg().n[31&(b>>>15|0)]=a.Te(),a.ui(bk(a.Eg(),31&(c>>> +15|0))),a.Jg(bk(a.Te(),31&(c>>>10|0))),a.Zh(bk(a.me(),31&(c>>>5|0)));else if(33554432>e)a.Jg(Yj(a.me())),a.ui(Yj(a.Te())),a.Gl(Yj(a.Eg())),a.xr(Yj(a.Ej())),a.me().n[31&(b>>>5|0)]=a.Fl(),a.Te().n[31&(b>>>10|0)]=a.me(),a.Eg().n[31&(b>>>15|0)]=a.Te(),a.Ej().n[31&(b>>>20|0)]=a.Eg(),a.Gl(bk(a.Ej(),31&(c>>>20|0))),a.ui(bk(a.Eg(),31&(c>>>15|0))),a.Jg(bk(a.Te(),31&(c>>>10|0))),a.Zh(bk(a.me(),31&(c>>>5|0)));else if(1073741824>e)a.Jg(Yj(a.me())),a.ui(Yj(a.Te())),a.Gl(Yj(a.Eg())),a.xr(Yj(a.Ej())),a.rG(Yj(a.js())), +a.me().n[31&(b>>>5|0)]=a.Fl(),a.Te().n[31&(b>>>10|0)]=a.me(),a.Eg().n[31&(b>>>15|0)]=a.Te(),a.Ej().n[31&(b>>>20|0)]=a.Eg(),a.js().n[31&(b>>>25|0)]=a.Ej(),a.xr(bk(a.js(),31&(c>>>25|0))),a.Gl(bk(a.Ej(),31&(c>>>20|0))),a.ui(bk(a.Eg(),31&(c>>>15|0))),a.Jg(bk(a.Te(),31&(c>>>10|0))),a.Zh(bk(a.me(),31&(c>>>5|0)));else throw(new Zj).a();else{b=-1+a.Un()|0;switch(b){case 5:a.rG(Yj(a.js()));a.xr(bk(a.js(),31&(c>>>25|0)));a.Gl(bk(a.Ej(),31&(c>>>20|0)));a.ui(bk(a.Eg(),31&(c>>>15|0)));a.Jg(bk(a.Te(),31&(c>>>10| +0)));a.Zh(bk(a.me(),31&(c>>>5|0)));break;case 4:a.xr(Yj(a.Ej()));a.Gl(bk(a.Ej(),31&(c>>>20|0)));a.ui(bk(a.Eg(),31&(c>>>15|0)));a.Jg(bk(a.Te(),31&(c>>>10|0)));a.Zh(bk(a.me(),31&(c>>>5|0)));break;case 3:a.Gl(Yj(a.Eg()));a.ui(bk(a.Eg(),31&(c>>>15|0)));a.Jg(bk(a.Te(),31&(c>>>10|0)));a.Zh(bk(a.me(),31&(c>>>5|0)));break;case 2:a.ui(Yj(a.Te()));a.Jg(bk(a.Te(),31&(c>>>10|0)));a.Zh(bk(a.me(),31&(c>>>5|0)));break;case 1:a.Jg(Yj(a.me()));a.Zh(bk(a.me(),31&(c>>>5|0)));break;case 0:a.Zh(Yj(a.Fl()));break;default:throw(new x).d(b); +}a.El=!0}}d.ga=function(){if(0===this.Oe(0))throw(new Lu).e("empty.head");return this.lb(0)};d.lb=function(a){var b=a+this.wl|0;if(0<=a&&b>>ca(5,-1+a.Yl|0)|0;if(0!==g){if(1=e||e<(this.Oa()>>>5|0))return a=(new qd).d(this),c.U(w(function(f,g){return function(h){g.oa=g.oa.yg(h,(iG(),rw().sc))}}(this,a))),a.oa;if(this.Oa()<(e>>>5|0)&&c instanceof L6){for(a=D9a(this);a.Ya();)b=a.$a(),c=c.Vr(b,(iG(),rw().sc));return c}return xq(this,c,b)}return xq(this,a.Hd(),b)};d.xr=function(a){this.ft=a}; +function Uyb(a,b,c,e){a.El?(Mda(a,b),Kda(a,b,c,e)):(Kda(a,b,c,e),a.El=!0)}d.hm=function(){return this.Oa()};d.me=function(){return this.gn}; +d.Jk=function(a){if(0>=a)a=iG().pJ;else if(this.wl<(this.wo-a|0)){var b=this.wl+a|0,c=-32&(-1+b|0),e=Yyb(this.wl^(-1+b|0)),f=this.wl&~(-1+(1<=b)Xyb(a.Zl,b);else if(1024>=b)Xyb(a.Zl,1+(31&(-1+b|0))|0),a.gn=R$(a.gn,b>>>5|0);else if(32768>=b)Xyb(a.Zl,1+(31&(-1+b|0))|0),a.gn=R$(a.gn,1+(31&((-1+b|0)>>>5|0))|0),a.bp=R$(a.bp,b>>>10|0);else if(1048576>=b)Xyb(a.Zl,1+(31&(-1+ +b|0))|0),a.gn=R$(a.gn,1+(31&((-1+b|0)>>>5|0))|0),a.bp=R$(a.bp,1+(31&((-1+b|0)>>>10|0))|0),a.Nq=R$(a.Nq,b>>>15|0);else if(33554432>=b)Xyb(a.Zl,1+(31&(-1+b|0))|0),a.gn=R$(a.gn,1+(31&((-1+b|0)>>>5|0))|0),a.bp=R$(a.bp,1+(31&((-1+b|0)>>>10|0))|0),a.Nq=R$(a.Nq,1+(31&((-1+b|0)>>>15|0))|0),a.ft=R$(a.ft,b>>>20|0);else if(1073741824>=b)Xyb(a.Zl,1+(31&(-1+b|0))|0),a.gn=R$(a.gn,1+(31&((-1+b|0)>>>5|0))|0),a.bp=R$(a.bp,1+(31&((-1+b|0)>>>10|0))|0),a.Nq=R$(a.Nq,1+(31&((-1+b|0)>>>15|0))|0),a.ft=R$(a.ft,1+(31&((-1+ +b|0)>>>20|0))|0),a.sw=R$(a.sw,b>>>25|0);else throw(new Zj).a();}else a=this;return a};d.hA=function(){if(0===this.Oe(0))throw(new Lu).e("empty.last");return this.lb(-1+this.Oa()|0)};d.js=function(){return this.sw};d.Rk=function(a){return Zyb(this,a)};d.ok=function(){return this};d.ta=function(){if(0===this.Oe(0))throw(new Lu).e("empty.tail");return Zyb(this,1)};d.ke=function(){return this}; +function Yyb(a){if(32>a)return 1;if(1024>a)return 2;if(32768>a)return 3;if(1048576>a)return 4;if(33554432>a)return 5;if(1073741824>a)return 6;throw(new Zj).a();}d.Sa=function(a){return S4(this,a|0)};function $yb(a,b){for(var c=0;c=b))if(a.wl<(a.wo-b|0)){var c=a.wl+b|0,e=-32&c,f=Yyb(c^(-1+a.wo|0)),g=c&~(-1+(1<a)$yb(b.Zl,a);else if(1024>a)$yb(b.Zl,31&a),b.gn=S$(b.gn,a>>>5|0);else if(32768>a)$yb(b.Zl,31&a),b.gn=S$(b.gn,31&(a>>>5|0)),b.bp=S$(b.bp,a>>>10|0);else if(1048576>a)$yb(b.Zl,31&a),b.gn=S$(b.gn,31&(a>>>5|0)),b.bp=S$(b.bp,31&(a>>>10|0)),b.Nq=S$(b.Nq,a>>>15|0);else if(33554432>a)$yb(b.Zl, +31&a),b.gn=S$(b.gn,31&(a>>>5|0)),b.bp=S$(b.bp,31&(a>>>10|0)),b.Nq=S$(b.Nq,31&(a>>>15|0)),b.ft=S$(b.ft,a>>>20|0);else if(1073741824>a)$yb(b.Zl,31&a),b.gn=S$(b.gn,31&(a>>>5|0)),b.bp=S$(b.bp,31&(a>>>10|0)),b.Nq=S$(b.Nq,31&(a>>>15|0)),b.ft=S$(b.ft,31&(a>>>20|0)),b.sw=S$(b.sw,a>>>25|0);else throw(new Zj).a();a=b}else a=iG().pJ;return a} +function Wyb(a,b){if(a.wo!==a.wl){var c=-32&(-1+a.wl|0),e=31&(-1+a.wl|0);if(a.wl!==(32+c|0)){var f=(new L6).Fi(-1+a.wl|0,a.wo,c);ck(f,a,a.Yl);f.El=a.El;Ryb(f,a.Qq,c,a.Qq^c);f.Zl.n[e]=b;return f}var g=(1<>>ca(5,-1+a.Yl|0)|0;if(0!==f){if(1c)return f=(1<b?0:b;if(c<=b||b>=(a.br.length|0))return(new hK).e("");c=c>(a.br.length|0)?a.br.length|0:c;Gb();return(new hK).e((null!==a?a.br:null).substring(b,c))}d.Ol=function(){return Iu(ua(),this.br)};d.Qd=function(){Bya||(Bya=(new gK).a());return Bya.Qd()}; +d.$classData=r({Ccb:0},!1,"scala.collection.immutable.WrappedString",{Ccb:1,Op:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,mg:1,Ea:1,za:1,fg:1,df:1,ef:1,Sda:1,VH:1,$i:1,oj:1,mj:1,bo:1,nj:1,Gpa:1,Wk:1,cM:1,ym:1});function Vt(){this.Nf=this.Wn=null}Vt.prototype=new Lyb;Vt.prototype.constructor=Vt;d=Vt.prototype;d.H=function(){return"::"};d.ga=function(){return this.Wn};d.E=function(){return 2};d.b=function(){return!1}; +d.G=function(a){switch(a){case 0:return this.Wn;case 1:return this.Nf;default:throw(new U).e(""+a);}};d.ta=function(){return this.Nf};function ji(a,b){var c=new Vt;c.Wn=a;c.Nf=b;return c}d.$classData=r({Yab:0},!1,"scala.collection.immutable.$colon$colon",{Yab:1,sbb:1,Op:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,mg:1,Ea:1,za:1,fg:1,df:1,ef:1,Tda:1,VH:1,$i:1,oj:1,mj:1,kW:1,xda:1,y:1,yda:1,q:1,o:1});function bzb(){}bzb.prototype=new Lyb; +bzb.prototype.constructor=bzb;d=bzb.prototype;d.H=function(){return"Nil"};d.ga=function(){this.Z0()};d.a=function(){return this};d.E=function(){return 0};d.b=function(){return!0};function yyb(){throw(new Lu).e("tail of empty list");}d.h=function(a){return a&&a.$classData&&a.$classData.ge.fg?a.b():!1};d.G=function(a){throw(new U).e(""+a);};d.Z0=function(){throw(new iL).e("head of empty list");};d.ta=function(){return yyb()}; +d.$classData=r({Mbb:0},!1,"scala.collection.immutable.Nil$",{Mbb:1,sbb:1,Op:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,mg:1,Ea:1,za:1,fg:1,df:1,ef:1,Tda:1,VH:1,$i:1,oj:1,mj:1,kW:1,xda:1,y:1,yda:1,q:1,o:1});var czb=void 0;function H(){czb||(czb=(new bzb).a());return czb}function o$(){this.xa=!1;this.l=null}o$.prototype=new u;o$.prototype.constructor=o$;d=o$.prototype;d.Hd=function(){return this};d.so=function(a,b){ZG(this,a,b)}; +d.CE=function(a){return lxb(this,a)};d.ga=function(){return k$(this).$a()};d.lb=function(a){return j$(this,a)};d.Oe=function(a){return nub(this,a)};d.im=function(){return k$(this)};d.fm=function(a){return M8(this,a)};d.P=function(a){return j$(this,a|0)};d.ps=function(a){return(new m$).jl(this,a)};d.Od=function(a){var b=k$(this);return eLa(b,a)};d.ua=function(){var a=ii().u;return qt(this,a)};d.b=function(){return!this.mb().Ya()};d.mW=function(){return Qx(this)};d.Kj=function(){return this}; +d.vA=function(a){return WI(this,a)};d.ng=function(){return this};d.bd=function(a){return(new m$).jl(this,a)};d.h=function(a){return R4(this,a)};d.ro=function(a){return j$(this,a)|0};d.gl=function(a){return this.fy(a)};d.Kg=function(a){return Rj(this,"",a,"")};d.Zn=function(a,b,c){return Rj(this,a,b,c)};d.lW=function(){return this.l};d.qq=function(a){return this.rn(a)};d.oh=function(a){var b=k$(this);return wT(b,a)};d.yg=function(a){return Twb(this,a)};d.nk=function(a){return d$(this,a)};d.t=function(){return h9(this)}; +d.Di=function(){return K()};d.U=function(a){var b=k$(this);yT(b,a)};d.ne=function(a,b){return Tc(this,a,b)};d.xM=function(){return""+this.l.xM()+this.Pl()};d.qs=function(a,b){var c=k$(this);return hya(c,a,b)};d.qP=function(a){return(new n$).eH(this,a)};d.wm=function(a,b){return oub(this,a,b)};d.Tr=function(a){return Uwb(this,a)};d.kc=function(){return Jvb(this)};d.xl=function(a){return this.gy(a)};d.gp=function(a){return Z9(this,a)};d.pu=function(a){if(null===a)throw mb(E(),null);this.l=a;return this}; +d.Qo=function(){iG();var a=rw().sc;return qt(this,a)};d.Cb=function(a){return this.rn(a)};d.st=function(){return(new o$).pu(this)};d.jb=function(){return this.l.Oa()};d.Mj=function(){var a=b3().u;return qt(this,a)};d.fj=function(){return $9(this)};d.Vr=function(a){return Vwb(this,a)};d.Ep=function(a){return!!j$(this,a)};d.mb=function(){return k$(this)};d.Fb=function(a){var b=k$(this);return hLa(b,a)};d.Pm=function(a){return sub(this,a)};d.cq=function(a){return c$(this,a)};d.Pl=function(){return"R"}; +d.cm=function(){return Rj(this,"","","")};d.BL=function(a){return(new p$).eH(this,a)};d.ia=function(a){return tub(this,a)};d.Oa=function(){return this.l.Oa()};d.og=function(a){return uwb(this,a)};d.Si=function(a){return i9(this,a)};d.hm=function(){return-1};d.Dm=function(a){return uub(this,a)};d.gy=function(a){return(new q$).jl(this,a)};d.Jk=function(a){return Wwb(this,a)};d.Dd=function(){return k$(this).Dd()};d.wy=function(){return(new W9).aL(this)};d.Rk=function(a){return yub(this,a)}; +d.BE=function(a){return(new r$).jl(this,a)};d.Ha=function(a){return mu(this,a)};d.ok=function(){return this};d.ta=function(){return j9(this)};d.op=function(){return this};d.rm=function(a,b,c,e){return Fda(this,a,b,c,e)};d.ei=function(a,b){return b$(this,a,b)};d.ke=function(){return this};d.uK=function(a){return this.rn(a)};d.Sa=function(a){return S4(this,a|0)};d.xg=function(){var a=qe();a=re(a);return qt(this,a)};d.Zi=function(){return this};d.Ql=function(a,b){return Tc(this,a,b)}; +d.Sw=function(a){return mxb(this,a)};d.DL=function(a){return lxb(this,a)};d.Wa=function(a,b){return YI(this,a,b)};d.Pk=function(a,b,c){Psb(this,a,b,c)};d.Do=function(){return!0};d.Vh=function(){return this};d.z=function(){return pT(this)};d.am=function(a){return vub(this,a)};d.rn=function(a){return(new s$).jl(this,a)};d.Ch=function(){for(var a=UA(new VA,nu()),b=k$(this);b.Ya();){var c=b.$a();WA(a,c)}return a.eb};d.ka=function(a){return(new r$).jl(this,a)};d.jM=function(a,b){return rub(this,a,b)}; +d.Ol=function(a){return YJ(this,a)};d.Da=function(){return tc(this)};d.fy=function(a){return(new t$).jl(this,a)};d.ec=function(a){return wub(this,a)};d.Qd=function(){return xub(this)};d.CL=function(a){return mxb(this,a)};d.Xk=function(){return"StreamView"};d.jC=function(a){return a$(this,a)};d.rF=function(a){return nxb(this,a)}; +d.$classData=r({jcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$12",{jcb:1,f:1,nib:1,fpa:1,Km:1,ol:1,pl:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,ml:1,nl:1,ql:1,rl:1,sl:1,Jm:1,Lm:1,dC:1,zA:1,AA:1});function dzb(){}dzb.prototype=new Rwb;dzb.prototype.constructor=dzb;function ezb(){}d=ezb.prototype=dzb.prototype;d.Hd=function(){return this};d.Ue=function(a,b){var c=this.Ja(a);this.jm(a,b);return c};d.Kj=function(){return this}; +d.rt=function(a){var b=this.Ja(a);this.KA(a);return b};d.Di=function(){return Toa()};d.jm=function(a,b){this.Xh((new R).M(a,b))};d.zt=function(a,b){MT(this,a,b)};d.T0=function(a,b){var c=this.Ja(a);if(c instanceof z)a=c.i;else if(y()===c)b=Hb(b),this.jm(a,b),a=b;else throw(new x).d(c);return a};d.ke=function(){return Cwb(this)};d.pj=function(){};d.jh=function(a){return yi(this,a)};d.Qd=function(){return this.ls()}; +function fzb(){this.ea=this.PM=this.MI=this.WC=this.qx=this.Bx=this.Xt=this.WM=this.dz=this.bz=this.CJ=this.Lt=this.Kt=this.Wt=this.Vt=this.TI=this.rJ=this.LI=this.LJ=this.JJ=this.bu=this.Nt=this.Hy=this.AJ=this.$M=this.IJ=this.sJ=this.PI=this.yJ=this.RI=this.MJ=this.tJ=this.gz=this.Fy=this.UI=this.aJ=this.OI=this.Gq=this.JZ=this.NZ=this.NX=this.MX=this.n_=this.aY=this.nZ=this.LX=this.GX=this.xZ=this.AX=null}fzb.prototype=new u;fzb.prototype.constructor=fzb; +function Wqb(){var a=i3();if(null===i3().NX&&null===i3().NX){var b=i3(),c=new d0;if(null===a)throw mb(E(),null);c.l=a;b.NX=c}return i3().NX}d=fzb.prototype;d.a=function(){gzb=this;this.ea=nv().ea;return this};d.cS=function(){null===i3().Vt&&this.qJ();i3()};d.BJ=function(){null===i3().Wt&&(i3().Wt=(new Z_).Br(this))};d.cb=function(){null===i3().Xt&&this.fS();return i3().Xt};d.tR=function(){null===i3().qx&&(i3().qx=new xL)};d.l5=function(){null===i3().Fy&&(i3().Fy=(new L_).ep(this))}; +d.QM=function(){null===i3().Fy&&this.l5();return i3().Fy};d.Lf=function(){null===i3().Gq&&this.FJ();return i3().Gq};d.z5=function(){null===i3().WC&&(i3().WC=new zL)};function Xqb(){var a=i3();if(null===i3().MX&&null===i3().MX){var b=i3(),c=new c0;if(null===a)throw mb(E(),null);c.l=a;b.MX=c}return i3().MX}d.FJ=function(){null===i3().Gq&&(i3().Gq=(new Q_).ep(this))};d.NI=function(){null===i3().Kt&&(i3().Kt=(new W_).Br(this))};d.qJ=function(){null===i3().Vt&&(i3().Vt=(new Y_).Br(this))}; +d.Pt=function(){null===i3().Bx&&this.FR();i3()};d.fS=function(){null===i3().Xt&&(i3().Xt=new DL)};function g$a(){var a=i3();if(null===i3().n_&&null===i3().n_){var b=i3(),c=new F1;if(null===a)throw mb(E(),null);c.l=a;b.n_=c}return i3().n_}function F5(){var a=i3();if(null===i3().aY&&null===i3().aY){var b=i3(),c=new l0;if(null===a)throw mb(E(),null);c.l=a;b.aY=c}return i3().aY}d.yi=function(){null===i3().qx&&this.tR();i3()}; +function Vqb(){var a=i3();if(null===i3().NZ&&null===i3().NZ){var b=i3(),c=new R0;if(null===a)throw mb(E(),null);c.l=a;b.NZ=c}return i3().NZ}d.XC=function(){null===i3().WC&&this.z5();i3()};function Zqb(){var a=i3();if(null===i3().JZ&&null===i3().JZ){var b=i3(),c=new P0;if(null===a)throw mb(E(),null);c.l=a;b.JZ=c}return i3().JZ}d.qR=function(){null===i3().Kt&&this.NI();i3()}; +function Uqb(){var a=i3();if(null===i3().LX&&null===i3().LX){var b=i3(),c=new b0;if(null===a)throw mb(E(),null);c.l=a;b.LX=c}return i3().LX}d.eS=function(){null===i3().Wt&&this.BJ();i3()};d.FR=function(){null===i3().Bx&&(i3().Bx=new BL)}; +d.$classData=r({Cta:0},!1,"amf.client.convert.VocabulariesClientConverter$",{Cta:1,f:1,ygb:1,C6:1,ib:1,A6:1,J6:1,I6:1,D6:1,P6:1,M6:1,Q6:1,E6:1,H6:1,F6:1,U6:1,S6:1,G6:1,y6:1,O6:1,K6:1,R6:1,T6:1,L6:1,z6:1,N6:1,fgb:1,ggb:1,xfb:1,Afb:1,zfb:1,zgb:1,Gfb:1,Ufb:1,yfb:1,wfb:1,Xfb:1,rfb:1,xgb:1,B6:1});var gzb=void 0;function i3(){gzb||(gzb=(new fzb).a());return gzb}function hzb(){}hzb.prototype=new xwb;hzb.prototype.constructor=hzb;function izb(){}d=izb.prototype=hzb.prototype;d.Hd=function(){return this}; +d.Kj=function(){return this};d.b=function(){return 0===this.jb()};d.h=function(a){return r7a(this,a)};d.ro=function(a){return this.Ha(a)|0};d.t=function(){return C6(this)};d.qea=function(a){var b=this.mb();return wT(b,a)};d.Mj=function(){return Hvb(this)};d.Ep=function(a){return this.Ha(a)};d.zt=function(a,b){MT(this,a,b)};d.ke=function(){return GN(this)};d.z=function(){var a=MJ();return aya(a,this,a.Zda)};d.pj=function(){};d.ka=function(a,b){return Jd(this,a,b)}; +d.z1=function(a){return D6(this,a,!1)};d.Qd=function(){return this.lv()};d.jh=function(a){return yi(this,a)};d.Xk=function(){return"Set"};function jzb(){u$.call(this);this.tqa=this.Qna=null;this.Cg=!1;this.Sb=null}jzb.prototype=new Q$;jzb.prototype.constructor=jzb;d=jzb.prototype;d.lb=function(a){return pxb(this,a)};d.P=function(a){return pxb(this,a|0)};function nxb(a,b){var c=new jzb;if(null===a)throw mb(E(),null);c.Sb=a;c.Qna=b;P$.prototype.pu.call(c,a);return c}d.$1=function(){return this.Qna}; +d.mb=function(){return Bwb(this)};d.Pl=function(){return"Z"};d.Oa=function(){return oxb(this)};d.spa=function(){return this.Sb};d.o3=function(){this.Cg||this.Cg||(this.tqa=this.$1().Kj().ke(),this.Cg=!0);return this.tqa};d.K2=function(){return this.Sb}; +d.$classData=r({icb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$10",{icb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,qib:1,Eab:1,T$a:1});function kzb(){u$.call(this);this.Sb=this.uO=null}kzb.prototype=new Q$;kzb.prototype.constructor=kzb;d=kzb.prototype;d.lb=function(a){return this.uO.lb(a)};d.P=function(a){return this.uO.lb(a|0)};d.U=function(a){this.uO.U(a)}; +d.mb=function(){return this.uO.mb()};d.Pl=function(){return"C"};d.Oa=function(){return this.uO.Oa()};function mxb(a,b){var c=new kzb;if(null===a)throw mb(E(),null);c.Sb=a;c.uO=Hb(b);P$.prototype.pu.call(c,a);return c} +d.$classData=r({hcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$1",{hcb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,kib:1,Bab:1,Q$a:1,Pab:1});function p$(){u$.call(this);this.Koa=this.oda=null;this.Cg=!1;this.Sb=null}p$.prototype=new Q$;p$.prototype.constructor=p$;d=p$.prototype;d.lb=function(a){return yxb(this,a)}; +d.P=function(a){return yxb(this,a|0)};d.eH=function(a,b){if(null===a)throw mb(E(),null);this.Sb=a;this.oda=b;P$.prototype.pu.call(this,a);return this};d.U=function(a){this.Hda().U(a);this.z2().U(a)};d.Hda=function(){return this.Sb};d.z2=function(){return this.oda};d.mb=function(){return Ewb(this)};d.Pl=function(){return"A"};d.Oa=function(){return this.OP().Oa()+this.y2().Oa()|0};d.OP=function(){return this.Sb};d.opa=function(){return this.Sb}; +d.y2=function(){this.Cg||this.Cg||(this.Koa=this.oda.Vh(),this.Cg=!0);return this.Koa};d.$classData=r({kcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$2",{kcb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,gib:1,zab:1,O$a:1,Nab:1});function n$(){u$.call(this);this.Pka=this.D$=null;this.Cg=!1;this.Sb=null}n$.prototype=new Q$;n$.prototype.constructor=n$; +d=n$.prototype;d.lb=function(a){return Jxb(this,a)};d.P=function(a){return Jxb(this,a|0)};d.I2=function(){return this.Sb};d.yO=function(){this.Cg||this.Cg||(this.Pka=this.D$.Vh(),this.Cg=!0);return this.Pka};d.eH=function(a,b){if(null===a)throw mb(E(),null);this.Sb=a;this.D$=b;P$.prototype.pu.call(this,a);return this};d.U=function(a){this.Q0().U(a);this.Kda().U(a)};d.Q0=function(){return this.D$};d.mb=function(){return Jwb(this)};d.Pl=function(){return"A"}; +d.Oa=function(){return this.yO().Oa()+this.I2().Oa()|0};d.Kda=function(){return this.Sb};d.rpa=function(){return this.Sb};d.$classData=r({lcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$3",{lcb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,mib:1,Dab:1,S$a:1,Rab:1});function r$(){u$.call(this);this.Sb=this.cV=null}r$.prototype=new Q$; +r$.prototype.constructor=r$;d=r$.prototype;d.lb=function(a){return Ixb(this,a)};d.P=function(a){return Ixb(this,a|0)};d.U=function(a){jwb(this,a)};d.NB=function(){return this.cV};d.tpa=function(){return this.Sb};d.jl=function(a,b){if(null===a)throw mb(E(),null);this.Sb=a;this.cV=b;P$.prototype.pu.call(this,a);return this};d.mb=function(){return Iwb(this)};d.Pl=function(){return"M"};d.Oa=function(){return this.Sb.Oa()};d.qpa=function(){return this.Sb};d.wpa=function(){return this.Sb}; +d.$classData=r({mcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$4",{mcb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,lib:1,Cab:1,R$a:1,Qab:1});function m$(){u$.call(this);this.Dw=this.cV=null;this.Cg=!1;this.Sb=null}m$.prototype=new Q$;m$.prototype.constructor=m$;d=m$.prototype;d.lb=function(a){return Dxb(this,a)}; +d.P=function(a){return Dxb(this,a|0)};d.dM=function(){return this.Sb};d.VT=function(){this.Cg||(this.Dw=Hxb(this),this.Cg=!0);return this.Dw};d.U=function(a){iwb(this,a)};d.NB=function(){return this.cV};d.jl=function(a,b){if(null===a)throw mb(E(),null);this.Sb=a;this.cV=b;P$.prototype.pu.call(this,a);return this};d.mb=function(){return Hwb(this)};d.Pl=function(){return"N"};d.Oa=function(){return Exb(this)};d.ppa=function(){return this.Sb};d.vpa=function(){return this.Sb}; +d.Rx=function(){return this.Cg?this.Dw:this.VT()};d.$classData=r({ncb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$5",{ncb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,jib:1,Aab:1,P$a:1,Oab:1});function s$(){u$.call(this);this.Dw=this.Mp=null;this.Cg=!1;this.Sb=null}s$.prototype=new Q$;s$.prototype.constructor=s$;d=s$.prototype; +d.lb=function(a){return Bxb(this,a)};d.P=function(a){return Bxb(this,a|0)};d.Eda=function(){return this.Sb};d.VT=function(){this.Cg||(this.Dw=Cxb(this),this.Cg=!0);return this.Dw};d.U=function(a){hwb(this,a)};d.jl=function(a,b){if(null===a)throw mb(E(),null);this.Sb=a;this.Mp=b;P$.prototype.pu.call(this,a);return this};d.mb=function(){return Gwb(this)};d.Pl=function(){return"F"};d.Oa=function(){return this.Rx().n.length};d.Rx=function(){return this.Cg?this.Dw:this.VT()};d.Du=function(){return this.Mp}; +d.PP=function(){return this.Sb};d.Jda=function(){return this.Sb};d.$classData=r({ocb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$6",{ocb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,iib:1,epa:1,Zoa:1,jpa:1});function lzb(){u$.call(this);this.Sb=this.kO=null}lzb.prototype=new Q$;lzb.prototype.constructor=lzb;d=lzb.prototype; +d.lb=function(a){return Kxb(this,a)};d.P=function(a){return Kxb(this,a|0)};d.J2=function(){return this.Sb};d.U=function(a){var b=B$(this);yT(b,a)};d.mb=function(){return B$(this)};d.Pl=function(){return"S"};d.Oa=function(){var a=B$(this);return VJ(a)};function lxb(a,b){var c=new lzb;if(null===a)throw mb(E(),null);c.Sb=a;c.kO=b;P$.prototype.pu.call(c,a);return c}d.nK=function(){return this.kO}; +d.$classData=r({pcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$7",{pcb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,oib:1,gpa:1,$oa:1,kpa:1});function t$(){u$.call(this);this.Mp=null;this.nM=0;this.Cg=!1;this.Sb=null}t$.prototype=new Q$;t$.prototype.constructor=t$;d=t$.prototype;d.lb=function(a){return zxb(this,a)}; +d.P=function(a){return zxb(this,a|0)};d.H2=function(){return this.Sb};d.U=function(a){gwb(this,a)};d.Dda=function(){return this.Sb};d.jl=function(a,b){if(null===a)throw mb(E(),null);this.Sb=a;this.Mp=b;P$.prototype.pu.call(this,a);return this};d.mb=function(){return Fwb(this)};d.Pl=function(){return"D"};d.Oa=function(){return Axb(this)};d.Ida=function(){return this.Sb};d.Ms=function(){return this.Cg?this.nM:this.lea()};d.Du=function(){return this.Mp}; +d.lea=function(){this.Cg||(this.nM=rub(this.Sb,this.Mp,0),this.Cg=!0);return this.nM};d.$classData=r({qcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$8",{qcb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,hib:1,dpa:1,Yoa:1,ipa:1});function q$(){u$.call(this);this.Mp=null;this.lL=0;this.Cg=!1;this.Sb=null}q$.prototype=new Q$;q$.prototype.constructor=q$; +d=q$.prototype;d.lb=function(a){return Lxb(this,a)};d.P=function(a){return Lxb(this,a|0)};d.Fda=function(){return this.Sb};d.gP=function(){return this.Cg?this.lL:this.kba()};d.U=function(a){kwb(this,a)};d.Lda=function(){return this.Sb};d.jl=function(a,b){if(null===a)throw mb(E(),null);this.Sb=a;this.Mp=b;P$.prototype.pu.call(this,a);return this};d.mb=function(){return Kwb(this)};d.Pl=function(){return"T"};d.Oa=function(){return this.gP()};d.Gda=function(){return this.Sb}; +d.kba=function(){this.Cg||(this.lL=rub(this.Sb,this.Mp,0),this.Cg=!0);return this.lL};d.Du=function(){return this.Mp};d.$classData=r({rcb:0},!1,"scala.collection.immutable.StreamViewLike$$anon$9",{rcb:1,XE:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,dC:1,zA:1,AA:1,pib:1,hpa:1,apa:1,lpa:1});function T$(){}T$.prototype=new Wxb;T$.prototype.constructor=T$;function mzb(){} +mzb.prototype=T$.prototype;T$.prototype.yja=function(){return ywb(this)};T$.prototype.V4=function(a){return zwb(this,a)};T$.prototype.jh=function(a){return yi(this,a)};function Pr(){this.yf=null;this.mM=0}Pr.prototype=new ezb;Pr.prototype.constructor=Pr;d=Pr.prototype;d.a=function(){this.yf=H();this.mM=0;return this};d.KA=function(a){return nzb(this,a)};d.al=function(a){var b=(new Pr).a();return yi(b,this).KA(a)};d.ng=function(){return this};d.Kk=function(a){return Or(this,a)}; +d.wp=function(a){var b=(new Pr).a();return yi(b,this).KA(a)};d.ls=function(){return(new Pr).a()};function Or(a,b){a.yf=ozb(a,b.ma(),a.yf);a.yf=ji(b,a.yf);a.mM=1+a.mM|0;return a}d.jb=function(){return this.mM};d.Rc=function(){return this};d.mb=function(){return uc(this.yf)};function ozb(a,b,c){var e=H();for(;;){if(c.b())return e;if(Va(Wa(),c.ga().ma(),b))return a.mM=-1+a.mM|0,a=e,I8a(c.ta(),a);var f=c.ta();c=c.ga();e=ji(c,e);c=f}}d.Si=function(a){return R9(this,a)}; +d.Ja=function(a){a:{for(var b=this.yf;!b.b();){var c=b.ga();if(Va(Wa(),c.ma(),a)){a=(new z).d(b.ga());break a}b=b.ta()}a=y()}if(a.b())return y();a=a.c();return(new z).d(a.ya())};d.Xh=function(a){return Or(this,a)};d.jd=function(a){return Or(this,a)};d.Vh=function(){return Cwb(this)};d.tF=function(a){return nzb(this,a)};d.SS=function(){this.yf=H();this.mM=0};function nzb(a,b){a.yf=ozb(a,b,a.yf);return a}d.Ru=function(a){var b=(new Pr).a();return yi(b,this).Xh(a)}; +d.$classData=r({Xdb:0},!1,"scala.collection.mutable.ListMap",{Xdb:1,N2:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,T2:1,Nm:1,Om:1,Im:1,U2:1,vl:1,ul:1,tl:1,WE:1,Mm:1,em:1,Jl:1,q:1,o:1});function pzb(a,b,c){bK();var e=a.Oa();b=aK(0,b,c=this.CA?(a=c.uu(),a=NJ(OJ(),a),a=wK(this,a),dza(this,c,a)):(c.hy=this.ze.n[e],this.ze.n[e]=c,this.yn=1+this.yn|0,fza(this,e)):a.r=b;return b};d.F9=function(a,b){return(new MZa).M(a,b)};d.Ja=function(a){a=eza(this,a);return null===a?y():(new z).d(a.r)}; +d.Xh=function(a){return Mt(this,a)};d.$2=function(a){this.mp=a};d.Ha=function(a){return null!==eza(this,a)};d.j3=function(a){this.ze=a};d.IU=function(){return 16};d.KB=function(){return(new ru).Yn(this)};d.jd=function(a){return Mt(this,a)};d.Vh=function(){return Cwb(this)};d.tF=function(a){bza(this,a);return this};d.SS=function(){Xya(this)};d.d5=function(a){this.Cy=a};d.p3=function(a){this.CA=a};d.Ru=function(a){var b=(new wu).a();return yi(b,this).Xh(a)};d.qM=function(a){this.yn=a}; +d.$classData=r({Uda:0},!1,"scala.collection.mutable.HashMap",{Uda:1,N2:1,Wq:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,Yq:1,lq:1,Xq:1,Zq:1,Ea:1,za:1,di:1,T2:1,Nm:1,Om:1,Im:1,U2:1,vl:1,ul:1,tl:1,WE:1,Mm:1,em:1,Jl:1,P2:1,Q2:1,Hi:1,q:1,o:1});function Azb(){this.xa=!1;this.l=null}Azb.prototype=new u;Azb.prototype.constructor=Azb;d=Azb.prototype;d.Hd=function(){return this};d.so=function(a,b){ZG(this,a,b)};d.CE=function(a){return U$(this,a)};d.ga=function(){return zj(this)}; +d.lb=function(a){return this.l.lb(a)};d.Oe=function(a){return y9(this,a)};d.im=function(){return this.mb()};d.fm=function(a){return z9(this,a)};d.P=function(a){return this.lb(a|0)};d.ps=function(a){return(new e$).Ao(this,a)};d.Od=function(a){return A9(this,a)};d.ua=function(){return Wv(this)};d.b=function(){return XG(this)};d.mW=function(){return bi(this)};d.Kj=function(){return this};d.vA=function(a){return WI(this,a)};d.ng=function(){return this};d.bd=function(a){return(new e$).Ao(this,a)}; +d.h=function(a){return R4(this,a)};d.Mr=function(){return B6(this)};d.ro=function(a){return this.lb(a)|0};d.gl=function(a){return(new W$).Bo(this,a)};d.Kg=function(a){return Rj(this,"",a,"")};d.Zn=function(a,b,c){return Rj(this,a,b,c)};d.qq=function(a){return this.rn(a)};d.oh=function(a){return D9(this,a)};d.yg=function(a){return Twb(this,a)};d.nk=function(a){return d$(this,a)};d.t=function(){return h9(this)};d.Di=function(){return pmb()};d.U=function(a){E9(this,a)}; +d.ne=function(a,b){var c=this.Oa();return M9(this,c,a,b)};d.xM=function(){return""};d.qs=function(a,b){var c=this.Oa();return L9(this,c,a,b)};d.qP=function(a){return(new f$).cH(this,a)};d.wm=function(a,b){return F9(this,a,b)};d.Tr=function(a){return Uwb(this,a)};d.kc=function(){return Wt(this)};d.xl=function(a){return(new V$).Bo(this,a)};d.np=function(a,b){return pzb(this,a,b)};d.gp=function(a){return Z9(this,a)};d.Qo=function(){iG();var a=rw().sc;return qt(this,a)}; +d.Cb=function(a){return(new Y$).Bo(this,a)};d.st=function(){return(new Z$).IB(this)};d.jb=function(){return this.Oa()};d.Mj=function(){return n9(this)};d.xpa=function(){return j9(this)};d.fj=function(){return $9(this)};d.Vr=function(a){return Vwb(this,a)};d.Ep=function(a){return!!this.lb(a)};d.mb=function(){return this.l.mb()};d.Fb=function(a){return I9(this,a)};d.Pm=function(a){return qzb(this,a)};d.cq=function(a){return c$(this,a)}; +function vzb(a){var b=new Azb;if(null===a)throw mb(E(),null);b.l=a;return b}d.cm=function(){return Rj(this,"","","")};d.BL=function(a){return(new g$).cH(this,a)};d.ia=function(a){return tub(this,a)};d.og=function(a){return uwb(this,a)};d.Oa=function(){return this.l.Oa()};d.Or=function(){return Qx(this)};d.Nr=function(){return E6(this)};d.Si=function(a){return i9(this,a)};d.hm=function(){return this.Oa()};d.Dm=function(a){return uub(this,a)};d.Sr=function(a){return rzb(this,a)}; +d.gy=function(a){return(new V$).Bo(this,a)};d.Jk=function(a){return szb(this,a)};d.Dd=function(){return this.mb().Dd()};d.wy=function(){return vzb(this)};d.hA=function(){return Oc(this)};d.Rk=function(a){return tzb(this,a)};d.BE=function(a){return(new h$).Ao(this,a)};d.Ha=function(a){return mu(this,a)};d.ok=function(){return this};d.ta=function(){return uzb(this)};d.rm=function(a,b,c,e){return Fda(this,a,b,c,e)};d.op=function(){return this};d.ei=function(a,b){return b$(this,a,b)};d.ke=function(){return this}; +d.uK=function(a){return(new Y$).Bo(this,a)};d.Sa=function(a){return S4(this,a|0)};d.xg=function(){var a=qe();a=re(a);return qt(this,a)};d.Zi=function(){return this};d.Ql=function(a,b){var c=this.Oa();return M9(this,c,a,b)};d.Sw=function(a){return fxb(this,a)};d.DL=function(a){return U$(this,a)};d.Wa=function(a,b){return YI(this,a,b)};d.Pk=function(a,b,c){N9(this,a,b,c)};d.Do=function(){return!0};d.Vh=function(){return this};d.z=function(){return pT(this)};d.am=function(a){return vub(this,a)}; +d.rn=function(a){return(new Y$).Bo(this,a)};d.Pr=function(a,b){return N8(this,a,b)};d.Ch=function(){for(var a=UA(new VA,nu()),b=0,c=this.Oa();ba||a>=this.vu)throw(new U).e(""+a);return Uu(this.Dc,a)}; +d.Oe=function(a){return Tu(this.Dc,a)};d.fm=function(a){return Bvb(this.Dc,a)};d.P=function(a){return this.lb(a|0)};d.Od=function(a){return Avb(this.Dc,a)};d.al=function(a){return Dzb(ws((new Lf).a(),this),a)};d.ua=function(){this.rK=!this.b();return this.Dc};d.b=function(){return 0===this.vu};d.ng=function(){return this};d.h=function(a){return a instanceof Lf?this.Dc.h(a.Dc):R4(this,a)};d.Kg=function(a){return UJ(this.Dc,"",a,"")};d.Zn=function(a,b,c){return UJ(this.Dc,a,b,c)}; +d.Kk=function(a){return Dg(this,a)};d.yja=function(){return ws((new Lf).a(),this)};d.oh=function(a){return Cvb(this.Dc,a)};d.Di=function(){return Ef()};d.U=function(a){for(var b=this.Dc;!b.b();)a.P(b.ga()),b=b.ta()};d.ne=function(a,b){return Dvb(this.Dc,a,b)};d.qs=function(a,b){return this.Dc.qs(a,b)};d.wm=function(a,b){return Evb(this.Dc,a,b)};d.kc=function(){return Wt(this.Dc)};d.jb=function(){return this.vu};d.Mj=function(){var a=this.Dc,b=b3().u;return qt(a,b)};d.Rc=function(){return this.ua()}; +d.mb=function(){var a=new u5;a.dT=this.b()?H():this.Dc;return a};d.zt=function(a,b){MT(this,a,b)};d.Fb=function(a){return Fvb(this.Dc,a)};d.cm=function(){return UJ(this.Dc,"","","")};d.Oa=function(){return this.vu};d.ida=function(a){if(0>a||a>=this.vu)throw(new U).e(""+a);this.rK&&Myb(this);this.Dc.ga();if(0===a)this.Dc=this.Dc.ta();else{for(var b=this.Dc,c=1;c=a.vu&&(a.Qw=null)}d.Ha=function(a){return Cg(this.Dc,a)};d.rm=function(a,b,c,e){return XJ(this.Dc,a,b,c,e)}; +function Dg(a,b){a.rK&&Myb(a);if(a.b())a.Qw=ji(b,H()),a.Dc=a.Qw;else{var c=a.Qw;a.Qw=ji(b,H());c.Nf=a.Qw}a.vu=1+a.vu|0;return a}d.ke=function(){return this.Dc};d.Sa=function(a){return Gvb(this.Dc,a|0)};d.V4=function(a){return Dzb(this,a)};d.xg=function(){var a=this.Dc,b=qe();b=re(b);return qt(a,b)};d.Ql=function(a,b){return Dvb(this.Dc,a,b)};d.jd=function(a){return Dg(this,a)};d.$ka=function(a){return m9a(this.Dc,a,0)};d.pj=function(){};d.Pk=function(a,b,c){Psb(this.Dc,a,b,c)};d.Vh=function(){return this.Dc}; +d.Ch=function(){for(var a=this.Dc,b=UA(new VA,nu());!a.b();){var c=a.ga();WA(b,c);a=a.ta()}return b.eb};d.tF=function(a){return Dzb(this,a)};d.SS=function(){this.Dc=H();this.Qw=null;this.rK=!1;this.vu=0};d.Ol=function(a){return YJ(this.Dc,a)};d.Da=function(){return 0a||a>=(this.L.length|0))throw(new U).a();this.L.splice(a,1)}; +d.Sr=function(a){return w3(this,a)};d.Jk=function(a){return H9(this,0,a)};d.hA=function(){return Oc(this)};d.wy=function(){return vzb(this)};d.Rk=function(a){return H9(this,a,this.L.length|0)};d.ta=function(){return bi(this)};d.ok=function(){return this};d.Sa=function(a){return S4(this,a|0)};d.jd=function(a){this.L.push(a);return this};d.pj=function(){};d.Pk=function(a,b,c){N9(this,a,b,c)};d.Vh=function(){return this};d.z=function(){return pT(this)};d.Pr=function(a,b){return N8(this,a,b)}; +d.tF=function(a){return zwb(this,a)};d.ha=function(a){this.L=a;return this};d.Xk=function(){return"WrappedArray"};d.$classData=r({Deb:0},!1,"scala.scalajs.js.WrappedArray",{Deb:1,Ipa:1,ex:1,Op:1,lf:1,mf:1,f:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,Ad:1,vd:1,Tc:1,Vc:1,v:1,mg:1,Ea:1,za:1,fg:1,df:1,ef:1,$q:1,Nm:1,Om:1,Im:1,ar:1,Mm:1,em:1,Jl:1,Jpa:1,Kpa:1,ul:1,tl:1,WE:1,G2:1,di:1,Rr:1,bo:1,nj:1,Ml:1,mq:1,gm:1,Wk:1,vl:1});function Z$(){u$.call(this);this.Sb=null}Z$.prototype=new Czb; +Z$.prototype.constructor=Z$;d=Z$.prototype;d.lb=function(a){return j$(this,a)};d.P=function(a){return j$(this,a|0)};d.lW=function(){return this.Sb};d.mb=function(){return k$(this)};d.Pl=function(){return"R"};d.Oa=function(){return this.Sb.Oa()};d.IB=function(a){if(null===a)throw mb(E(),null);this.Sb=a;$$.prototype.IB.call(this,a);return this}; +d.$classData=r({Hdb:0},!1,"scala.collection.mutable.IndexedSeqView$$anon$5",{Hdb:1,R2:1,vn:1,f:1,mg:1,Ea:1,za:1,Ad:1,Bd:1,Xc:1,Yc:1,Nc:1,Qb:1,Pb:1,Uc:1,Wc:1,zd:1,Cd:1,vd:1,Tc:1,Vc:1,v:1,fg:1,df:1,ef:1,Jm:1,ml:1,nl:1,ql:1,rl:1,sl:1,Lm:1,Km:1,ol:1,pl:1,S2:1,tW:1,Rr:1,$q:1,Nm:1,Om:1,Im:1,ar:1,Mm:1,em:1,Jl:1,bo:1,nj:1,Ml:1,gm:1,Wk:1,vib:1,fpa:1});function Xj(){this.lma=0;this.L=null;this.w=0}Xj.prototype=new mzb;Xj.prototype.constructor=Xj;d=Xj.prototype;d.Hd=function(){return this}; +function pr(a,b){uD(a,1+a.w|0);a.L.n[a.w]=b;a.w=1+a.w|0;return a}d.ga=function(){return zj(this)};d.a=function(){Xj.prototype.ue.call(this,16);return this};d.lb=function(a){return xF(this,a)};d.Oe=function(a){return y9(this,a)};d.fm=function(a){return z9(this,a)};d.P=function(a){return xF(this,a|0)};d.Od=function(a){return A9(this,a)};d.al=function(a){return ywb(this).V4(a)};d.ua=function(){return Wv(this)};d.b=function(){return XG(this)};d.Kj=function(){return this};d.ng=function(){return this}; +d.Mr=function(){return B6(this)};d.gl=function(a){return B9(this,a)};d.Kk=function(a){return pr(this,a)};d.oh=function(a){return D9(this,a)};d.Di=function(){return b3()};d.U=function(a){for(var b=0,c=this.w;ba||a>(this.w-1|0))throw(new U).e("at "+a+" deleting 1");Ba(this.L,a+1|0,this.L,a,this.w-(a+1|0)|0);$G(this,this.w-1|0)};d.Sr=function(a){return w3(this,a)};d.Jk=function(a){return H9(this,0,a)};d.hA=function(){return Oc(this)};d.wy=function(){return vzb(this)};d.Rk=function(a){return H9(this,a,this.w)};d.ta=function(){return bi(this)};d.ok=function(){return this}; +function Gda(a,b){if(b&&b.$classData&&b.$classData.ge.nj){var c=b.Oa();uD(a,a.w+c|0);b.Pk(a.L,a.w,c);a.w=a.w+c|0;return a}return yi(a,b)}d.Sa=function(a){return S4(this,a|0)};d.jd=function(a){return pr(this,a)};d.pj=function(a){a>this.w&&1<=a&&(a=ja(Ja(Ha),[a]),Ba(this.L,0,a,0,this.w),this.L=a)};d.Pk=function(a,b,c){var e=SJ(W(),a)-b|0;c=c 0; +}; + +/** + * Determines whether the given value is an external JSON reference. + * + * @param {*} value - The value to inspect + * @returns {boolean} + */ +$Ref.isExternal$Ref = function (value) { + return $Ref.is$Ref(value) && value.$ref[0] !== "#"; +}; + +/** + * Determines whether the given value is a JSON reference, and whether it is allowed by the options. + * For example, if it references an external file, then options.resolve.external must be true. + * + * @param {*} value - The value to inspect + * @param {$RefParserOptions} options + * @returns {boolean} + */ +$Ref.isAllowed$Ref = function (value, options) { + if ($Ref.is$Ref(value)) { + if (value.$ref.substr(0, 2) === "#/" || value.$ref === "#") { + // It's a JSON Pointer reference, which is always allowed + return true; + } + else if (value.$ref[0] !== "#" && (!options || options.resolve.external)) { + // It's an external reference, which is allowed by the options + return true; + } + } +}; + +/** + * Determines whether the given value is a JSON reference that "extends" its resolved value. + * That is, it has extra properties (in addition to "$ref"), so rather than simply pointing to + * an existing value, this $ref actually creates a NEW value that is a shallow copy of the resolved + * value, plus the extra properties. + * + * @example: + * { + * person: { + * properties: { + * firstName: { type: string } + * lastName: { type: string } + * } + * } + * employee: { + * properties: { + * $ref: #/person/properties + * salary: { type: number } + * } + * } + * } + * + * In this example, "employee" is an extended $ref, since it extends "person" with an additional + * property (salary). The result is a NEW value that looks like this: + * + * { + * properties: { + * firstName: { type: string } + * lastName: { type: string } + * salary: { type: number } + * } + * } + * + * @param {*} value - The value to inspect + * @returns {boolean} + */ +$Ref.isExtended$Ref = function (value) { + return $Ref.is$Ref(value) && Object.keys(value).length > 1; +}; + +/** + * Returns the resolved value of a JSON Reference. + * If necessary, the resolved value is merged with the JSON Reference to create a new object + * + * @example: + * { + * person: { + * properties: { + * firstName: { type: string } + * lastName: { type: string } + * } + * } + * employee: { + * properties: { + * $ref: #/person/properties + * salary: { type: number } + * } + * } + * } + * + * When "person" and "employee" are merged, you end up with the following object: + * + * { + * properties: { + * firstName: { type: string } + * lastName: { type: string } + * salary: { type: number } + * } + * } + * + * @param {object} $ref - The JSON reference object (the one with the "$ref" property) + * @param {*} resolvedValue - The resolved value, which can be any type + * @returns {*} - Returns the dereferenced value + */ +$Ref.dereference = function ($ref, resolvedValue) { + if (resolvedValue && typeof resolvedValue === "object" && $Ref.isExtended$Ref($ref)) { + let merged = {}; + for (let key of Object.keys($ref)) { + if (key !== "$ref") { + merged[key] = $ref[key]; + } + } + + for (let key of Object.keys(resolvedValue)) { + if (!(key in merged)) { + merged[key] = resolvedValue[key]; + } + } + + return merged; + } + else { + // Completely replace the original reference with the resolved value + return resolvedValue; + } +}; + + +/***/ }), +/* 290 */, +/* 291 */, +/* 292 */ +/***/ (function(module) { + +"use strict"; + + +var KEYWORDS = [ + 'multipleOf', + 'maximum', + 'exclusiveMaximum', + 'minimum', + 'exclusiveMinimum', + 'maxLength', + 'minLength', + 'pattern', + 'additionalItems', + 'maxItems', + 'minItems', + 'uniqueItems', + 'maxProperties', + 'minProperties', + 'required', + 'additionalProperties', + 'enum', + 'format', + 'const' +]; + +module.exports = function (metaSchema, keywordsJsonPointers) { + for (var i=0; i ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 298 */, +/* 299 */, +/* 300 */, +/* 301 */, +/* 302 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var convertFromSchema = __webpack_require__(647) +var convertFromParameter = __webpack_require__(201) + +module.exports = { + fromSchema: convertFromSchema, + fromParameter: convertFromParameter +} + + +/***/ }), +/* 303 */, +/* 304 */, +/* 305 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { getMapKeyOfType, createMapOfType, addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); +const Message = __webpack_require__(212); +const Schema = __webpack_require__(671); +const SecurityScheme = __webpack_require__(759); +const ChannelParameter = __webpack_require__(749); +const CorrelationId = __webpack_require__(889); +const OperationTrait = __webpack_require__(788); +const MessageTrait = __webpack_require__(241); + +/** + * Implements functions to deal with a Components object. + * @class + * @extends Base + * @returns {Components} + */ +class Components extends Base { + /** + * @returns {Object} + */ + messages() { + return createMapOfType(this._json.messages, Message); + } + + /** + * @returns {Message} + */ + message(name) { + return getMapKeyOfType(this._json.messages, name, Message); + } + + /** + * @returns {Object} + */ + schemas() { + return createMapOfType(this._json.schemas, Schema); + } + + /** + * @returns {Schema} + */ + schema(name) { + return getMapKeyOfType(this._json.schemas, name, Schema); + } + + /** + * @returns {Object} + */ + securitySchemes() { + return createMapOfType(this._json.securitySchemes, SecurityScheme); + } + + /** + * @returns {SecurityScheme} + */ + securityScheme(name) { + return getMapKeyOfType(this._json.securitySchemes, name, SecurityScheme); + } + + /** + * @returns {Object} + */ + parameters() { + return createMapOfType(this._json.parameters, ChannelParameter); + } + + /** + * @returns {ChannelParameter} + */ + parameter(name) { + return getMapKeyOfType(this._json.parameters, name, ChannelParameter); + } + + /** + * @returns {Object} + */ + correlationIds() { + return createMapOfType(this._json.correlationIds, CorrelationId); + } + + /** + * @returns {CorrelationId} + */ + correlationId(name) { + return getMapKeyOfType(this._json.correlationIds, name, CorrelationId); + } + + /** + * @returns {Object} + */ + operationTraits() { + return createMapOfType(this._json.operationTraits, OperationTrait); + } + + /** + * @returns {OperationTrait} + */ + operationTrait(name) { + return getMapKeyOfType(this._json.operationTraits, name, OperationTrait); + } + + /** + * @returns {Object} + */ + messageTraits() { + return createMapOfType(this._json.messageTraits, MessageTrait); + } + + /** + * @returns {MessageTrait} + */ + messageTrait(name) { + return getMapKeyOfType(this._json.messageTraits, name, MessageTrait); + } +} + +module.exports = addExtensions(Components); + + +/***/ }), +/* 306 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var concatMap = __webpack_require__(896); +var balanced = __webpack_require__(621); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + + + +/***/ }), +/* 307 */, +/* 308 */, +/* 309 */, +/* 310 */, +/* 311 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 312 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var common = __webpack_require__(740); +var Type = __webpack_require__(945); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + + +/***/ }), +/* 313 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.apply = apply; +/** + * Test if a value is a plain object. + * @param {*} val - A value. + * @return {boolean} true if `val` is a plain object. + */ +var isObject = function isObject(val) { + return val != null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && Array.isArray(val) === false; +}; + +/** + * Apply a JSON merge patch. The origin is *not* modified, but unchanged + * properties will be recycled. + * + * @param {*} origin - The value to patch. + * @param {*} patch - An [RFC 7396](https://tools.ietf.org/html/rfc7396) patch. + * @return {*} The patched value. + */ +function apply(origin, patch) { + if (!isObject(patch)) { + // If the patch is not an object, it replaces the origin. + return patch; + } + + var result = !isObject(origin) ? // Non objects are being replaced. + {} : // Make sure we never modify the origin. + Object.assign({}, origin); + + Object.keys(patch).forEach(function (key) { + var patchVal = patch[key]; + if (patchVal === null) { + delete result[key]; + } else { + result[key] = apply(result[key], patchVal); + } + }); + return result; +} + +exports.default = apply; + +/***/ }), +/* 314 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} + + +/***/ }), +/* 318 */, +/* 319 */, +/* 320 */, +/* 321 */, +/* 322 */, +/* 323 */, +/* 324 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { createMapOfType, getMapKeyOfType, addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); +const Info = __webpack_require__(543); +const Server = __webpack_require__(218); +const Channel = __webpack_require__(693); +const Components = __webpack_require__(305); +const Message = __webpack_require__(212); +const Tag = __webpack_require__(620); + +/** + * Implements functions to deal with the AsyncAPI document. + * @class + * @extends Base + * @returns {AsyncAPIDocument} + */ +class AsyncAPIDocument extends Base { + constructor(...args) { + super(...args); + + assignNameToAnonymousMessages(this); + assignIdToAnonymousSchemas(this); + + assignNameToComponentMessages(this); + assignUidToComponentSchemas(this); + } + + /** + * @returns {string} + */ + version() { + return this._json.asyncapi; + } + + /** + * @returns {Info} + */ + info() { + return new Info(this._json.info); + } + + /** + * @returns {string} + */ + id() { + return this._json.id; + } + + /** + * @returns {boolean} + */ + hasServers() { + return !!this._json.servers; + } + + /** + * @returns {Object} + */ + servers() { + return createMapOfType(this._json.servers, Server); + } + + /** + * @param {string} name - Name of the server. + * @returns {Server} + */ + server(name) { + return getMapKeyOfType(this._json.servers, name, Server); + } + + /** + * @returns {boolean} + */ + hasChannels() { + return !!this._json.channels; + } + + /** + * @returns {Object} + */ + channels() { + return createMapOfType(this._json.channels, Channel, this); + } + + /** + * @returns {string[]} + */ + channelNames() { + if (!this._json.channels) return []; + return Object.keys(this._json.channels); + } + + /** + * @param {string} name - Name of the channel. + * @returns {Channel} + */ + channel(name) { + return getMapKeyOfType(this._json.channels, name, Channel, this); + } + + /** + * @returns {string} + */ + defaultContentType() { + return this._json.defaultContentType || null; + } + + /** + * @returns {boolean} + */ + hasComponents() { + return !!this._json.components; + } + + /** + * @returns {Components} + */ + components() { + if (!this._json.components) return null; + return new Components(this._json.components); + } + + /** + * @returns {boolean} + */ + hasTags() { + return !!(this._json.tags && this._json.tags.length); + } + + /** + * @returns {Tag[]} + */ + tags() { + if (!this._json.tags) return []; + return this._json.tags.map(t => new Tag(t)); + } + + /** + * @returns {Map} + */ + allMessages() { + const messages = new Map(); + + if (this.hasChannels()) { + this.channelNames().forEach(channelName => { + const channel = this.channel(channelName); + if (channel.hasPublish()) { + channel.publish().messages().forEach(m => { + messages.set(m.uid(), m); + }); + } + if (channel.hasSubscribe()) { + channel.subscribe().messages().forEach(m => { + messages.set(m.uid(), m); + }); + } + }); + } + + if (this.hasComponents()) { + Object.values(this.components().messages()).forEach(m => { + messages.set(m.uid(), m); + }); + } + + return messages; + } + + /** + * @returns {Map} + */ + allSchemas() { + const schemas = new Map(); + + if (this.hasChannels()) { + this.channelNames().forEach(channelName => { + const channel = this.channel(channelName); + + Object.values(channel.parameters()).forEach(p => { + if (p.schema()) { + schemas.set(p.schema().uid(), p.schema()); + } + }); + + if (channel.hasPublish()) { + channel.publish().messages().forEach(m => { + if (m.headers()) { + schemas.set(m.headers().uid(), m.headers()); + } + + if (m.payload()) { + schemas.set(m.payload().uid(), m.payload()); + } + }); + } + if (channel.hasSubscribe()) { + channel.subscribe().messages().forEach(m => { + if (m.headers()) { + schemas.set(m.headers().uid(), m.headers()); + } + + if (m.payload()) { + schemas.set(m.payload().uid(), m.payload()); + } + }); + } + }); + } + + if (this.hasComponents()) { + Object.values(this.components().schemas()).forEach(s => { + schemas.set(s.uid(), s); + }); + } + + return schemas; + } +} + +function assignNameToComponentMessages(doc){ + if (doc.hasComponents()) { + for(const [key, m] of Object.entries(doc.components().messages())){ + if (m.name() === undefined) { + m.json()['x-parser-message-name'] = key; + } + } + } +} +function assignUidToComponentSchemas(doc){ + if (doc.hasComponents()) { + for(const [key, s] of Object.entries(doc.components().schemas())){ + s.json()['x-parser-schema-id'] = key; + } + } +} +function assignNameToAnonymousMessages(doc) { + let anonymousMessageCounter = 0; + + if (doc.hasChannels()) { + doc.channelNames().forEach(channelName => { + const channel = doc.channel(channelName); + if (channel.hasPublish()) { + channel.publish().messages().forEach(m => { + if (m.name() === undefined) { + m.json()['x-parser-message-name'] = ``; + } + }); + } + if (channel.hasSubscribe()) { + channel.subscribe().messages().forEach(m => { + if (m.name() === undefined) { + m.json()['x-parser-message-name'] = ``; + } + }); + } + }); + } +} + +function assignIdToAnonymousSchemas(doc) { + let anonymousSchemaCounter = 0; + + if (doc.hasChannels()) { + doc.channelNames().forEach(channelName => { + const channel = doc.channel(channelName); + + Object.values(channel.parameters()).forEach(p => { + if (p.schema() && !p.schema().$id()) { + p.schema().json()['x-parser-schema-id'] = ``; + } + }); + + if (channel.hasPublish()) { + channel.publish().messages().forEach(m => { + if (m.headers() && !m.headers().$id()) { + m.headers().json()['x-parser-schema-id'] = ``; + } + + if (m.payload() && !m.payload().$id()) { + m.payload().json()['x-parser-schema-id'] = ``; + } + }); + } + if (channel.hasSubscribe()) { + channel.subscribe().messages().forEach(m => { + if (m.headers() && !m.headers().$id()) { + m.headers().json()['x-parser-schema-id'] = ``; + } + + if (m.payload() && !m.payload().$id()) { + m.payload().json()['x-parser-schema-id'] = ``; + } + }); + } + }); + } +} + +module.exports = addExtensions(AsyncAPIDocument); + + +/***/ }), +/* 325 */, +/* 326 */ +/***/ (function(module) { + +module.exports = {"title":"AsyncAPI 1.1.0 schema.","id":"http://asyncapi.hitchhq.com/v1/schema.json#","$schema":"http://json-schema.org/draft-04/schema#","type":"object","required":["asyncapi","info","topics"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"asyncapi":{"type":"string","enum":["1.0.0","1.1.0"],"description":"The AsyncAPI specification version of this document."},"info":{"$ref":"#/definitions/info"},"baseTopic":{"type":"string","pattern":"^[^/.]","description":"The base topic to the API. Example: 'hitch'.","default":""},"servers":{"type":"array","items":{"$ref":"#/definitions/server"},"uniqueItems":true},"topics":{"$ref":"#/definitions/topics"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string","format":"uri"}}},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It's encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","scheme"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"scheme":{"type":"string","description":"The transfer protocol.","enum":["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms"]},"schemeVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","minProperties":1,"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"}}},"topics":{"type":"object","description":"Relative paths to the individual topics. They must be relative to the 'baseTopic'.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"},"^[^.]":{"$ref":"#/definitions/topicItem"}},"additionalProperties":false},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\.\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"schema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":2,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":2,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/xml"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"xml":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}}},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"topicItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"minProperties":1,"properties":{"$ref":{"type":"string"},"parameters":{"type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"#/definitions/parameter"}},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"schema":{"$ref":"#/definitions/schema"}}},"operation":{"oneOf":[{"$ref":"#/definitions/message"},{"type":"object","required":["oneOf"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"oneOf":{"type":"array","minItems":2,"items":{"$ref":"#/definitions/message"}}}}]},"message":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"headers":{"$ref":"#/definitions/schema"},"payload":{"$ref":"#/definitions/schema"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"example":{}}},"vendorExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"}}}; + +/***/ }), +/* 327 */, +/* 328 */, +/* 329 */, +/* 330 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(359); +var callBind = __webpack_require__(722); + +var implementation = __webpack_require__(476); +var getPolyfill = __webpack_require__(137); +var shim = __webpack_require__(906); + +var flagsBound = callBind(implementation); + +define(flagsBound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = flagsBound; + + +/***/ }), +/* 331 */, +/* 332 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + // A simple class system, more documentation to come + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var EventEmitter = __webpack_require__(614); + +var lib = __webpack_require__(388); + +function parentWrap(parent, prop) { + if (typeof parent !== 'function' || typeof prop !== 'function') { + return prop; + } + + return function wrap() { + // Save the current parent method + var tmp = this.parent; // Set parent to the previous method, call, and restore + + this.parent = parent; + var res = prop.apply(this, arguments); + this.parent = tmp; + return res; + }; +} + +function extendClass(cls, name, props) { + props = props || {}; + lib.keys(props).forEach(function (k) { + props[k] = parentWrap(cls.prototype[k], props[k]); + }); + + var subclass = /*#__PURE__*/function (_cls) { + _inheritsLoose(subclass, _cls); + + function subclass() { + return _cls.apply(this, arguments) || this; + } + + _createClass(subclass, [{ + key: "typename", + get: function get() { + return name; + } + }]); + + return subclass; + }(cls); + + lib._assign(subclass.prototype, props); + + return subclass; +} + +var Obj = /*#__PURE__*/function () { + function Obj() { + // Unfortunately necessary for backwards compatibility + this.init.apply(this, arguments); + } + + var _proto = Obj.prototype; + + _proto.init = function init() {}; + + Obj.extend = function extend(name, props) { + if (typeof name === 'object') { + props = name; + name = 'anonymous'; + } + + return extendClass(this, name, props); + }; + + _createClass(Obj, [{ + key: "typename", + get: function get() { + return this.constructor.name; + } + }]); + + return Obj; +}(); + +var EmitterObj = /*#__PURE__*/function (_EventEmitter) { + _inheritsLoose(EmitterObj, _EventEmitter); + + function EmitterObj() { + var _this2; + + var _this; + + _this = _EventEmitter.call(this) || this; // Unfortunately necessary for backwards compatibility + + (_this2 = _this).init.apply(_this2, arguments); + + return _this; + } + + var _proto2 = EmitterObj.prototype; + + _proto2.init = function init() {}; + + EmitterObj.extend = function extend(name, props) { + if (typeof name === 'object') { + props = name; + name = 'anonymous'; + } + + return extendClass(this, name, props); + }; + + _createClass(EmitterObj, [{ + key: "typename", + get: function get() { + return this.constructor.name; + } + }]); + + return EmitterObj; +}(EventEmitter); + +module.exports = { + Obj: Obj, + EmitterObj: EmitterObj +}; + +/***/ }), +/* 333 */, +/* 334 */, +/* 335 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const http = __webpack_require__(605); +const https = __webpack_require__(211); +const { ono } = __webpack_require__(114); +const url = __webpack_require__(639); + +module.exports = { + /** + * The order that this resolver will run, in relation to other resolvers. + * + * @type {number} + */ + order: 200, + + /** + * HTTP headers to send when downloading files. + * + * @example: + * { + * "User-Agent": "JSON Schema $Ref Parser", + * Accept: "application/json" + * } + * + * @type {object} + */ + headers: null, + + /** + * HTTP request timeout (in milliseconds). + * + * @type {number} + */ + timeout: 5000, // 5 seconds + + /** + * The maximum number of HTTP redirects to follow. + * To disable automatic following of redirects, set this to zero. + * + * @type {number} + */ + redirects: 5, + + /** + * The `withCredentials` option of XMLHttpRequest. + * Set this to `true` if you're downloading files from a CORS-enabled server that requires authentication + * + * @type {boolean} + */ + withCredentials: false, + + /** + * Determines whether this resolver can read a given file reference. + * Resolvers that return true will be tried in order, until one successfully resolves the file. + * Resolvers that return false will not be given a chance to resolve the file. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {boolean} + */ + canRead (file) { + return url.isHttp(file.url); + }, + + /** + * Reads the given URL and returns its raw contents as a Buffer. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {Promise} + */ + read (file) { + let u = url.parse(file.url); + + if (process.browser && !u.protocol) { + // Use the protocol of the current page + u.protocol = url.parse(location.href).protocol; + } + + return download(u, this); + } +}; + +/** + * Downloads the given file. + * + * @param {Url|string} u - The url to download (can be a parsed {@link Url} object) + * @param {object} httpOptions - The `options.resolve.http` object + * @param {number} [redirects] - The redirect URLs that have already been followed + * + * @returns {Promise} + * The promise resolves with the raw downloaded data, or rejects if there is an HTTP error. + */ +function download (u, httpOptions, redirects) { + return new Promise(((resolve, reject) => { + u = url.parse(u); + redirects = redirects || []; + redirects.push(u.href); + + get(u, httpOptions) + .then((res) => { + if (res.statusCode >= 400) { + throw ono({ status: res.statusCode }, `HTTP ERROR ${res.statusCode}`); + } + else if (res.statusCode >= 300) { + if (redirects.length > httpOptions.redirects) { + reject(ono({ status: res.statusCode }, + `Error downloading ${redirects[0]}. \nToo many redirects: \n ${redirects.join(" \n ")}`)); + } + else if (!res.headers.location) { + throw ono({ status: res.statusCode }, `HTTP ${res.statusCode} redirect with no location header`); + } + else { + // console.log('HTTP %d redirect %s -> %s', res.statusCode, u.href, res.headers.location); + let redirectTo = url.resolve(u, res.headers.location); + download(redirectTo, httpOptions, redirects).then(resolve, reject); + } + } + else { + resolve(res.body || Buffer.alloc(0)); + } + }) + .catch((err) => { + reject(ono(err, `Error downloading ${u.href}`)); + }); + })); +} + +/** + * Sends an HTTP GET request. + * + * @param {Url} u - A parsed {@link Url} object + * @param {object} httpOptions - The `options.resolve.http` object + * + * @returns {Promise} + * The promise resolves with the HTTP Response object. + */ +function get (u, httpOptions) { + return new Promise(((resolve, reject) => { + // console.log('GET', u.href); + + let protocol = u.protocol === "https:" ? https : http; + let req = protocol.get({ + hostname: u.hostname, + port: u.port, + path: u.path, + auth: u.auth, + protocol: u.protocol, + headers: httpOptions.headers || {}, + withCredentials: httpOptions.withCredentials + }); + + if (typeof req.setTimeout === "function") { + req.setTimeout(httpOptions.timeout); + } + + req.on("timeout", () => { + req.abort(); + }); + + req.on("error", reject); + + req.once("response", (res) => { + res.body = Buffer.alloc(0); + + res.on("data", (data) => { + res.body = Buffer.concat([res.body, Buffer.from(data)]); + }); + + res.on("error", reject); + + res.on("end", () => { + resolve(res); + }); + }); + })); +} + + +/***/ }), +/* 336 */, +/* 337 */ +/***/ (function(module) { + +module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}; + +/***/ }), +/* 338 */, +/* 339 */ +/***/ (function(module) { + +module.exports = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}; + +/***/ }), +/* 340 */ +/***/ (function(module) { + +"use strict"; + + +var traverse = module.exports = function (schema, opts, cb) { + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + _traverse(opts, cb, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 342 */, +/* 343 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 344 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +(function () { + "use strict"; + + var oldFs = __webpack_require__(747) + , extraFs = __webpack_require__(226) + , fs = {} + ; + + Object.keys(extraFs).forEach(function (key) { + fs[key] = extraFs[key]; + }); + + Object.keys(oldFs).forEach(function (key) { + fs[key] = oldFs[key]; + }); + + fs.copy = __webpack_require__(112); + fs.copyRecursive = __webpack_require__(974); + + fs.move = __webpack_require__(715); + + fs.mkdirp = __webpack_require__(626); + fs.mkdirpSync = fs.mkdirp.sync; + // Alias + fs.mkdirRecursive = fs.mkdirp; + fs.mkdirRecursiveSync = fs.mkdirp.sync; + + fs.remove = extraFs.remove; + fs.removeSync = extraFs.removeSync; + // Alias + fs.rmrf = extraFs.remove; + fs.rmrfSync = extraFs.removeSync; + fs.rmRecursive = extraFs.rmrf; + fs.rmRecursiveSync = extraFs.rmrfSync; + + fs.walk = __webpack_require__(191).walk; + + module.exports = fs; +}()); + + +/***/ }), +/* 345 */, +/* 346 */ +/***/ (function(module) { + +"use strict"; + + +var traverse = module.exports = function (schema, opts, cb) { + // Legacy support for v0.3.1 and earlier. + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + + cb = opts.cb || cb; + var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; + var post = cb.post || function() {}; + + _traverse(opts, pre, post, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), +/* 360 */, +/* 361 */, +/* 362 */, +/* 363 */ +/***/ (function(module) { + +"use strict"; + + + +var Cache = module.exports = function Cache() { + this._cache = {}; +}; + + +Cache.prototype.put = function Cache_put(key, value) { + this._cache[key] = value; +}; + + +Cache.prototype.get = function Cache_get(key) { + return this._cache[key]; +}; + + +Cache.prototype.del = function Cache_del(key) { + delete this._cache[key]; +}; + + +Cache.prototype.clear = function Cache_clear() { + this._cache = {}; +}; + + +/***/ }), +/* 364 */ +/***/ (function(module) { + +"use strict"; + +module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + + +/***/ }), +/* 365 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(747); +const { Readable } = __webpack_require__(413); +const sysPath = __webpack_require__(622); +const { promisify } = __webpack_require__(669); +const picomatch = __webpack_require__(827); + +const readdir = promisify(fs.readdir); +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); + +/** + * @typedef {Object} EntryInfo + * @property {String} path + * @property {String} fullPath + * @property {fs.Stats=} stats + * @property {fs.Dirent=} dirent + * @property {String} basename + */ + +const BANG = '!'; +const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP']); +const FILE_TYPE = 'files'; +const DIR_TYPE = 'directories'; +const FILE_DIR_TYPE = 'files_directories'; +const EVERYTHING_TYPE = 'all'; +const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; + +const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); + +const normalizeFilter = filter => { + if (filter === undefined) return; + if (typeof filter === 'function') return filter; + + if (typeof filter === 'string') { + const glob = picomatch(filter.trim()); + return entry => glob(entry.basename); + } + + if (Array.isArray(filter)) { + const positive = []; + const negative = []; + for (const item of filter) { + const trimmed = item.trim(); + if (trimmed.charAt(0) === BANG) { + negative.push(picomatch(trimmed.slice(1))); + } else { + positive.push(picomatch(trimmed)); + } + } + + if (negative.length > 0) { + if (positive.length > 0) { + return entry => + positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); + } + return entry => !negative.some(f => f(entry.basename)); + } + return entry => positive.some(f => f(entry.basename)); + } +}; + +class ReaddirpStream extends Readable { + static get defaultOptions() { + return { + root: '.', + /* eslint-disable no-unused-vars */ + fileFilter: (path) => true, + directoryFilter: (path) => true, + /* eslint-enable no-unused-vars */ + type: FILE_TYPE, + lstat: false, + depth: 2147483648, + alwaysStat: false + }; + } + + constructor(options = {}) { + super({ + objectMode: true, + autoDestroy: true, + highWaterMark: options.highWaterMark || 4096 + }); + const opts = { ...ReaddirpStream.defaultOptions, ...options }; + const { root, type } = opts; + + this._fileFilter = normalizeFilter(opts.fileFilter); + this._directoryFilter = normalizeFilter(opts.directoryFilter); + + const statMethod = opts.lstat ? lstat : stat; + // Use bigint stats if it's windows and stat() supports options (node 10+). + if (process.platform === 'win32' && stat.length === 3) { + this._stat = path => statMethod(path, { bigint: true }); + } else { + this._stat = statMethod; + } + + this._maxDepth = opts.depth; + this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsEverything = type === EVERYTHING_TYPE; + this._root = sysPath.resolve(root); + this._isDirent = ('Dirent' in fs) && !opts.alwaysStat; + this._statsProp = this._isDirent ? 'dirent' : 'stats'; + this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; + + // Launch stream with one parent, the root dir. + try { + this.parents = [this._exploreDir(root, 1)]; + } catch (error) { + this.destroy(error); + } + this.reading = false; + this.parent = undefined; + } + + async _read(batch) { + if (this.reading) return; + this.reading = true; + + try { + while (!this.destroyed && batch > 0) { + const { path, depth, files = [] } = this.parent || {}; + + if (files.length > 0) { + const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); + for (const entry of await Promise.all(slice)) { + if (this._isDirAndMatchesFilter(entry)) { + if (depth <= this._maxDepth) { + this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); + } + + if (this._wantsDir) { + this.push(entry); + batch--; + } + } else if (this._isFileAndMatchesFilter(entry)) { + if (this._wantsFile) { + this.push(entry); + batch--; + } + } + } + } else { + const parent = this.parents.pop(); + if (!parent) { + this.push(null); + break; + } + this.parent = await parent; + } + } + } catch (error) { + this.destroy(error); + } finally { + this.reading = false; + } + } + + async _exploreDir(path, depth) { + let files; + try { + files = await readdir(path, this._rdOptions); + } catch (error) { + this._onError(error); + } + return {files, depth, path}; + } + + async _formatEntry(dirent, path) { + const basename = this._isDirent ? dirent.name : dirent; + const fullPath = sysPath.resolve(sysPath.join(path, basename)); + const entry = {path: sysPath.relative(this._root, fullPath), fullPath, basename}; + try { + entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); + } catch (err) { + this._onError(err); + } + return entry; + } + + _onError(err) { + if (isNormalFlowError(err) && !this.destroyed) { + this.emit('warn', err); + } else { + throw err; + } + } + + _isDirAndMatchesFilter(entry) { + // entry may be undefined, because a warning or an error were emitted + // and the statsProp is undefined + const stats = entry && entry[this._statsProp]; + return stats && stats.isDirectory() && this._directoryFilter(entry); + } + + _isFileAndMatchesFilter(entry) { + const stats = entry && entry[this._statsProp]; + const isFileType = stats && ( + (this._wantsEverything && !stats.isDirectory()) || + (stats.isFile() || stats.isSymbolicLink()) + ); + return isFileType && this._fileFilter(entry); + } +} + +/** + * @typedef {Object} ReaddirpArguments + * @property {Function=} fileFilter + * @property {Function=} directoryFilter + * @property {String=} type + * @property {Number=} depth + * @property {String=} root + * @property {Boolean=} lstat + * @property {Boolean=} bigint + */ + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param {String} root Root directory + * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth + */ +const readdirp = (root, options = {}) => { + let type = options.entryType || options.type; + if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility + if (type) options.type = type; + if (!root) { + throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); + } else if (typeof root !== 'string') { + throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); + } else if (type && !ALL_TYPES.includes(type)) { + throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); + } + + options.root = root; + return new ReaddirpStream(options); +}; + +const readdirpPromise = (root, options = {}) => { + return new Promise((resolve, reject) => { + const files = []; + readdirp(root, options) + .on('data', entry => files.push(entry)) + .on('end', () => resolve(files)) + .on('error', error => reject(error)); + }); +}; + +readdirp.promise = readdirpPromise; +readdirp.ReaddirpStream = ReaddirpStream; +readdirp.default = readdirp; + +module.exports = readdirp; + + +/***/ }), +/* 366 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var rimraf = __webpack_require__(569) + , fs = __webpack_require__(747); + +function rmrfSync(dir) { + return rimraf.sync(dir); +} + +function rmrf(dir, cb) { + if (cb != null) { + return rimraf(dir, cb); + } else { + return rimraf(dir, (function() {})); + } +} + +module.exports.remove = rmrf; +module.exports.removeSync = rmrfSync; + + +/***/ }), +/* 367 */, +/* 368 */, +/* 369 */, +/* 370 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +/* globals + Atomics, + SharedArrayBuffer, +*/ + +var undefined; + +var $TypeError = TypeError; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { throw new $TypeError(); }; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(559)(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var generator; // = function * () {}; +var generatorFunction = generator ? getProto(generator) : undefined; +var asyncFn; // async function() {}; +var asyncFunction = asyncFn ? asyncFn.constructor : undefined; +var asyncGen; // async function * () {}; +var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined; +var asyncGenIterator = asyncGen ? asyncGen() : undefined; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%ArrayPrototype%': Array.prototype, + '%ArrayProto_entries%': Array.prototype.entries, + '%ArrayProto_forEach%': Array.prototype.forEach, + '%ArrayProto_keys%': Array.prototype.keys, + '%ArrayProto_values%': Array.prototype.values, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': asyncFunction, + '%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, + '%AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined, + '%AsyncGeneratorFunction%': asyncGenFunction, + '%AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined, + '%AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%Boolean%': Boolean, + '%BooleanPrototype%': Boolean.prototype, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, + '%Date%': Date, + '%DatePrototype%': Date.prototype, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%ErrorPrototype%': Error.prototype, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%EvalErrorPrototype%': EvalError.prototype, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, + '%Function%': Function, + '%FunctionPrototype%': Function.prototype, + '%Generator%': generator ? getProto(generator()) : undefined, + '%GeneratorFunction%': generatorFunction, + '%GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, + '%Math%': Math, + '%Number%': Number, + '%NumberPrototype%': Number.prototype, + '%Object%': Object, + '%ObjectPrototype%': Object.prototype, + '%ObjProto_toString%': Object.prototype.toString, + '%ObjProto_valueOf%': Object.prototype.valueOf, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, + '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, + '%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, + '%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, + '%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%RangeErrorPrototype%': RangeError.prototype, + '%ReferenceError%': ReferenceError, + '%ReferenceErrorPrototype%': ReferenceError.prototype, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%RegExpPrototype%': RegExp.prototype, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%StringPrototype%': String.prototype, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, + '%SyntaxError%': SyntaxError, + '%SyntaxErrorPrototype%': SyntaxError.prototype, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, + '%TypeError%': $TypeError, + '%TypeErrorPrototype%': $TypeError.prototype, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, + '%URIError%': URIError, + '%URIErrorPrototype%': URIError.prototype, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype +}; + +var bind = __webpack_require__(739); +var $replace = bind.call(Function.call, String.prototype.replace); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match); + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + if (!(name in INTRINSICS)) { + throw new SyntaxError('intrinsic ' + name + ' does not exist!'); + } + + // istanbul ignore if // hopefully this is impossible to test :-) + if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return INTRINSICS[name]; +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new TypeError('"allowMissing" argument must be a boolean'); + } + + var parts = stringToPath(name); + + var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing); + for (var i = 1; i < parts.length; i += 1) { + if (value != null) { + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, parts[i]); + if (!allowMissing && !(parts[i] in value)) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + value = desc ? (desc.get || desc.value) : value[parts[i]]; + } else { + value = value[parts[i]]; + } + } + } + return value; +}; + + +/***/ }), +/* 371 */ +/***/ (function(module) { + +module.exports = {"title":"AsyncAPI 1.0 schema.","id":"http://asyncapi.hitchhq.com/v1/schema.json#","$schema":"http://json-schema.org/draft-04/schema#","type":"object","required":["asyncapi","info","topics"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"asyncapi":{"type":"string","enum":["1.0.0"],"description":"The AsyncAPI specification version of this document."},"info":{"$ref":"#/definitions/info"},"baseTopic":{"type":"string","pattern":"^[^/.]","description":"The base topic to the API. Example: 'hitch'.","default":""},"servers":{"type":"array","items":{"$ref":"#/definitions/server"},"uniqueItems":true},"topics":{"$ref":"#/definitions/topics"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string","format":"uri"}}},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It's encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","scheme"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"scheme":{"type":"string","description":"The transfer protocol.","enum":["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps"]},"schemeVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","minProperties":1,"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"}}},"topics":{"type":"object","description":"Relative paths to the individual topics. They must be relative to the 'baseTopic'.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"},"^[^.]":{"$ref":"#/definitions/topicItem"}},"additionalProperties":false},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\.\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"schema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/xml"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"xml":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}}},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"topicItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"minProperties":1,"properties":{"$ref":{"type":"string"},"publish":{"$ref":"#/definitions/message"},"subscribe":{"$ref":"#/definitions/message"},"deprecated":{"type":"boolean","default":false}}},"message":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"headers":{"$ref":"#/definitions/schema"},"payload":{"$ref":"#/definitions/schema"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"example":{}}},"vendorExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"}}}; + +/***/ }), +/* 372 */, +/* 373 */, +/* 374 */, +/* 375 */, +/* 376 */, +/* 377 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var parser = __webpack_require__(950); + +var transformer = __webpack_require__(503); + +var nodes = __webpack_require__(690); + +var _require = __webpack_require__(388), + TemplateError = _require.TemplateError; + +var _require2 = __webpack_require__(575), + Frame = _require2.Frame; + +var _require3 = __webpack_require__(332), + Obj = _require3.Obj; // These are all the same for now, but shouldn't be passed straight +// through + + +var compareOps = { + '==': '==', + '===': '===', + '!=': '!=', + '!==': '!==', + '<': '<', + '>': '>', + '<=': '<=', + '>=': '>=' +}; + +var Compiler = /*#__PURE__*/function (_Obj) { + _inheritsLoose(Compiler, _Obj); + + function Compiler() { + return _Obj.apply(this, arguments) || this; + } + + var _proto = Compiler.prototype; + + _proto.init = function init(templateName, throwOnUndefined) { + this.templateName = templateName; + this.codebuf = []; + this.lastId = 0; + this.buffer = null; + this.bufferStack = []; + this._scopeClosers = ''; + this.inBlock = false; + this.throwOnUndefined = throwOnUndefined; + }; + + _proto.fail = function fail(msg, lineno, colno) { + if (lineno !== undefined) { + lineno += 1; + } + + if (colno !== undefined) { + colno += 1; + } + + throw new TemplateError(msg, lineno, colno); + }; + + _proto._pushBuffer = function _pushBuffer() { + var id = this._tmpid(); + + this.bufferStack.push(this.buffer); + this.buffer = id; + + this._emit("var " + this.buffer + " = \"\";"); + + return id; + }; + + _proto._popBuffer = function _popBuffer() { + this.buffer = this.bufferStack.pop(); + }; + + _proto._emit = function _emit(code) { + this.codebuf.push(code); + }; + + _proto._emitLine = function _emitLine(code) { + this._emit(code + '\n'); + }; + + _proto._emitLines = function _emitLines() { + var _this = this; + + for (var _len = arguments.length, lines = new Array(_len), _key = 0; _key < _len; _key++) { + lines[_key] = arguments[_key]; + } + + lines.forEach(function (line) { + return _this._emitLine(line); + }); + }; + + _proto._emitFuncBegin = function _emitFuncBegin(node, name) { + this.buffer = 'output'; + this._scopeClosers = ''; + + this._emitLine("function " + name + "(env, context, frame, runtime, cb) {"); + + this._emitLine("var lineno = " + node.lineno + ";"); + + this._emitLine("var colno = " + node.colno + ";"); + + this._emitLine("var " + this.buffer + " = \"\";"); + + this._emitLine('try {'); + }; + + _proto._emitFuncEnd = function _emitFuncEnd(noReturn) { + if (!noReturn) { + this._emitLine('cb(null, ' + this.buffer + ');'); + } + + this._closeScopeLevels(); + + this._emitLine('} catch (e) {'); + + this._emitLine(' cb(runtime.handleError(e, lineno, colno));'); + + this._emitLine('}'); + + this._emitLine('}'); + + this.buffer = null; + }; + + _proto._addScopeLevel = function _addScopeLevel() { + this._scopeClosers += '})'; + }; + + _proto._closeScopeLevels = function _closeScopeLevels() { + this._emitLine(this._scopeClosers + ';'); + + this._scopeClosers = ''; + }; + + _proto._withScopedSyntax = function _withScopedSyntax(func) { + var _scopeClosers = this._scopeClosers; + this._scopeClosers = ''; + func.call(this); + + this._closeScopeLevels(); + + this._scopeClosers = _scopeClosers; + }; + + _proto._makeCallback = function _makeCallback(res) { + var err = this._tmpid(); + + return 'function(' + err + (res ? ',' + res : '') + ') {\n' + 'if(' + err + ') { cb(' + err + '); return; }'; + }; + + _proto._tmpid = function _tmpid() { + this.lastId++; + return 't_' + this.lastId; + }; + + _proto._templateName = function _templateName() { + return this.templateName == null ? 'undefined' : JSON.stringify(this.templateName); + }; + + _proto._compileChildren = function _compileChildren(node, frame) { + var _this2 = this; + + node.children.forEach(function (child) { + _this2.compile(child, frame); + }); + }; + + _proto._compileAggregate = function _compileAggregate(node, frame, startChar, endChar) { + var _this3 = this; + + if (startChar) { + this._emit(startChar); + } + + node.children.forEach(function (child, i) { + if (i > 0) { + _this3._emit(','); + } + + _this3.compile(child, frame); + }); + + if (endChar) { + this._emit(endChar); + } + }; + + _proto._compileExpression = function _compileExpression(node, frame) { + // TODO: I'm not really sure if this type check is worth it or + // not. + this.assertType(node, nodes.Literal, nodes.Symbol, nodes.Group, nodes.Array, nodes.Dict, nodes.FunCall, nodes.Caller, nodes.Filter, nodes.LookupVal, nodes.Compare, nodes.InlineIf, nodes.In, nodes.Is, nodes.And, nodes.Or, nodes.Not, nodes.Add, nodes.Concat, nodes.Sub, nodes.Mul, nodes.Div, nodes.FloorDiv, nodes.Mod, nodes.Pow, nodes.Neg, nodes.Pos, nodes.Compare, nodes.NodeList); + this.compile(node, frame); + }; + + _proto.assertType = function assertType(node) { + for (var _len2 = arguments.length, types = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + types[_key2 - 1] = arguments[_key2]; + } + + if (!types.some(function (t) { + return node instanceof t; + })) { + this.fail("assertType: invalid type: " + node.typename, node.lineno, node.colno); + } + }; + + _proto.compileCallExtension = function compileCallExtension(node, frame, async) { + var _this4 = this; + + var args = node.args; + var contentArgs = node.contentArgs; + var autoescape = typeof node.autoescape === 'boolean' ? node.autoescape : true; + + if (!async) { + this._emit(this.buffer + " += runtime.suppressValue("); + } + + this._emit("env.getExtension(\"" + node.extName + "\")[\"" + node.prop + "\"]("); + + this._emit('context'); + + if (args || contentArgs) { + this._emit(','); + } + + if (args) { + if (!(args instanceof nodes.NodeList)) { + this.fail('compileCallExtension: arguments must be a NodeList, ' + 'use `parser.parseSignature`'); + } + + args.children.forEach(function (arg, i) { + // Tag arguments are passed normally to the call. Note + // that keyword arguments are turned into a single js + // object as the last argument, if they exist. + _this4._compileExpression(arg, frame); + + if (i !== args.children.length - 1 || contentArgs.length) { + _this4._emit(','); + } + }); + } + + if (contentArgs.length) { + contentArgs.forEach(function (arg, i) { + if (i > 0) { + _this4._emit(','); + } + + if (arg) { + _this4._emitLine('function(cb) {'); + + _this4._emitLine('if(!cb) { cb = function(err) { if(err) { throw err; }}}'); + + var id = _this4._pushBuffer(); + + _this4._withScopedSyntax(function () { + _this4.compile(arg, frame); + + _this4._emitLine("cb(null, " + id + ");"); + }); + + _this4._popBuffer(); + + _this4._emitLine("return " + id + ";"); + + _this4._emitLine('}'); + } else { + _this4._emit('null'); + } + }); + } + + if (async) { + var res = this._tmpid(); + + this._emitLine(', ' + this._makeCallback(res)); + + this._emitLine(this.buffer + " += runtime.suppressValue(" + res + ", " + autoescape + " && env.opts.autoescape);"); + + this._addScopeLevel(); + } else { + this._emit(')'); + + this._emit(", " + autoescape + " && env.opts.autoescape);\n"); + } + }; + + _proto.compileCallExtensionAsync = function compileCallExtensionAsync(node, frame) { + this.compileCallExtension(node, frame, true); + }; + + _proto.compileNodeList = function compileNodeList(node, frame) { + this._compileChildren(node, frame); + }; + + _proto.compileLiteral = function compileLiteral(node) { + if (typeof node.value === 'string') { + var val = node.value.replace(/\\/g, '\\\\'); + val = val.replace(/"/g, '\\"'); + val = val.replace(/\n/g, '\\n'); + val = val.replace(/\r/g, '\\r'); + val = val.replace(/\t/g, '\\t'); + val = val.replace(/\u2028/g, "\\u2028"); + + this._emit("\"" + val + "\""); + } else if (node.value === null) { + this._emit('null'); + } else { + this._emit(node.value.toString()); + } + }; + + _proto.compileSymbol = function compileSymbol(node, frame) { + var name = node.value; + var v = frame.lookup(name); + + if (v) { + this._emit(v); + } else { + this._emit('runtime.contextOrFrameLookup(' + 'context, frame, "' + name + '")'); + } + }; + + _proto.compileGroup = function compileGroup(node, frame) { + this._compileAggregate(node, frame, '(', ')'); + }; + + _proto.compileArray = function compileArray(node, frame) { + this._compileAggregate(node, frame, '[', ']'); + }; + + _proto.compileDict = function compileDict(node, frame) { + this._compileAggregate(node, frame, '{', '}'); + }; + + _proto.compilePair = function compilePair(node, frame) { + var key = node.key; + var val = node.value; + + if (key instanceof nodes.Symbol) { + key = new nodes.Literal(key.lineno, key.colno, key.value); + } else if (!(key instanceof nodes.Literal && typeof key.value === 'string')) { + this.fail('compilePair: Dict keys must be strings or names', key.lineno, key.colno); + } + + this.compile(key, frame); + + this._emit(': '); + + this._compileExpression(val, frame); + }; + + _proto.compileInlineIf = function compileInlineIf(node, frame) { + this._emit('('); + + this.compile(node.cond, frame); + + this._emit('?'); + + this.compile(node.body, frame); + + this._emit(':'); + + if (node.else_ !== null) { + this.compile(node.else_, frame); + } else { + this._emit('""'); + } + + this._emit(')'); + }; + + _proto.compileIn = function compileIn(node, frame) { + this._emit('runtime.inOperator('); + + this.compile(node.left, frame); + + this._emit(','); + + this.compile(node.right, frame); + + this._emit(')'); + }; + + _proto.compileIs = function compileIs(node, frame) { + // first, we need to try to get the name of the test function, if it's a + // callable (i.e., has args) and not a symbol. + var right = node.right.name ? node.right.name.value // otherwise go with the symbol value + : node.right.value; + + this._emit('env.getTest("' + right + '").call(context, '); + + this.compile(node.left, frame); // compile the arguments for the callable if they exist + + if (node.right.args) { + this._emit(','); + + this.compile(node.right.args, frame); + } + + this._emit(') === true'); + }; + + _proto._binOpEmitter = function _binOpEmitter(node, frame, str) { + this.compile(node.left, frame); + + this._emit(str); + + this.compile(node.right, frame); + } // ensure concatenation instead of addition + // by adding empty string in between + ; + + _proto.compileOr = function compileOr(node, frame) { + return this._binOpEmitter(node, frame, ' || '); + }; + + _proto.compileAnd = function compileAnd(node, frame) { + return this._binOpEmitter(node, frame, ' && '); + }; + + _proto.compileAdd = function compileAdd(node, frame) { + return this._binOpEmitter(node, frame, ' + '); + }; + + _proto.compileConcat = function compileConcat(node, frame) { + return this._binOpEmitter(node, frame, ' + "" + '); + }; + + _proto.compileSub = function compileSub(node, frame) { + return this._binOpEmitter(node, frame, ' - '); + }; + + _proto.compileMul = function compileMul(node, frame) { + return this._binOpEmitter(node, frame, ' * '); + }; + + _proto.compileDiv = function compileDiv(node, frame) { + return this._binOpEmitter(node, frame, ' / '); + }; + + _proto.compileMod = function compileMod(node, frame) { + return this._binOpEmitter(node, frame, ' % '); + }; + + _proto.compileNot = function compileNot(node, frame) { + this._emit('!'); + + this.compile(node.target, frame); + }; + + _proto.compileFloorDiv = function compileFloorDiv(node, frame) { + this._emit('Math.floor('); + + this.compile(node.left, frame); + + this._emit(' / '); + + this.compile(node.right, frame); + + this._emit(')'); + }; + + _proto.compilePow = function compilePow(node, frame) { + this._emit('Math.pow('); + + this.compile(node.left, frame); + + this._emit(', '); + + this.compile(node.right, frame); + + this._emit(')'); + }; + + _proto.compileNeg = function compileNeg(node, frame) { + this._emit('-'); + + this.compile(node.target, frame); + }; + + _proto.compilePos = function compilePos(node, frame) { + this._emit('+'); + + this.compile(node.target, frame); + }; + + _proto.compileCompare = function compileCompare(node, frame) { + var _this5 = this; + + this.compile(node.expr, frame); + node.ops.forEach(function (op) { + _this5._emit(" " + compareOps[op.type] + " "); + + _this5.compile(op.expr, frame); + }); + }; + + _proto.compileLookupVal = function compileLookupVal(node, frame) { + this._emit('runtime.memberLookup(('); + + this._compileExpression(node.target, frame); + + this._emit('),'); + + this._compileExpression(node.val, frame); + + this._emit(')'); + }; + + _proto._getNodeName = function _getNodeName(node) { + switch (node.typename) { + case 'Symbol': + return node.value; + + case 'FunCall': + return 'the return value of (' + this._getNodeName(node.name) + ')'; + + case 'LookupVal': + return this._getNodeName(node.target) + '["' + this._getNodeName(node.val) + '"]'; + + case 'Literal': + return node.value.toString(); + + default: + return '--expression--'; + } + }; + + _proto.compileFunCall = function compileFunCall(node, frame) { + // Keep track of line/col info at runtime by settings + // variables within an expression. An expression in javascript + // like (x, y, z) returns the last value, and x and y can be + // anything + this._emit('(lineno = ' + node.lineno + ', colno = ' + node.colno + ', '); + + this._emit('runtime.callWrap('); // Compile it as normal. + + + this._compileExpression(node.name, frame); // Output the name of what we're calling so we can get friendly errors + // if the lookup fails. + + + this._emit(', "' + this._getNodeName(node.name).replace(/"/g, '\\"') + '", context, '); + + this._compileAggregate(node.args, frame, '[', '])'); + + this._emit(')'); + }; + + _proto.compileFilter = function compileFilter(node, frame) { + var name = node.name; + this.assertType(name, nodes.Symbol); + + this._emit('env.getFilter("' + name.value + '").call(context, '); + + this._compileAggregate(node.args, frame); + + this._emit(')'); + }; + + _proto.compileFilterAsync = function compileFilterAsync(node, frame) { + var name = node.name; + var symbol = node.symbol.value; + this.assertType(name, nodes.Symbol); + frame.set(symbol, symbol); + + this._emit('env.getFilter("' + name.value + '").call(context, '); + + this._compileAggregate(node.args, frame); + + this._emitLine(', ' + this._makeCallback(symbol)); + + this._addScopeLevel(); + }; + + _proto.compileKeywordArgs = function compileKeywordArgs(node, frame) { + this._emit('runtime.makeKeywordArgs('); + + this.compileDict(node, frame); + + this._emit(')'); + }; + + _proto.compileSet = function compileSet(node, frame) { + var _this6 = this; + + var ids = []; // Lookup the variable names for each identifier and create + // new ones if necessary + + node.targets.forEach(function (target) { + var name = target.value; + var id = frame.lookup(name); + + if (id === null || id === undefined) { + id = _this6._tmpid(); // Note: This relies on js allowing scope across + // blocks, in case this is created inside an `if` + + _this6._emitLine('var ' + id + ';'); + } + + ids.push(id); + }); + + if (node.value) { + this._emit(ids.join(' = ') + ' = '); + + this._compileExpression(node.value, frame); + + this._emitLine(';'); + } else { + this._emit(ids.join(' = ') + ' = '); + + this.compile(node.body, frame); + + this._emitLine(';'); + } + + node.targets.forEach(function (target, i) { + var id = ids[i]; + var name = target.value; // We are running this for every var, but it's very + // uncommon to assign to multiple vars anyway + + _this6._emitLine("frame.set(\"" + name + "\", " + id + ", true);"); + + _this6._emitLine('if(frame.topLevel) {'); + + _this6._emitLine("context.setVariable(\"" + name + "\", " + id + ");"); + + _this6._emitLine('}'); + + if (name.charAt(0) !== '_') { + _this6._emitLine('if(frame.topLevel) {'); + + _this6._emitLine("context.addExport(\"" + name + "\", " + id + ");"); + + _this6._emitLine('}'); + } + }); + }; + + _proto.compileSwitch = function compileSwitch(node, frame) { + var _this7 = this; + + this._emit('switch ('); + + this.compile(node.expr, frame); + + this._emit(') {'); + + node.cases.forEach(function (c, i) { + _this7._emit('case '); + + _this7.compile(c.cond, frame); + + _this7._emit(': '); + + _this7.compile(c.body, frame); // preserve fall-throughs + + + if (c.body.children.length) { + _this7._emitLine('break;'); + } + }); + + if (node.default) { + this._emit('default:'); + + this.compile(node.default, frame); + } + + this._emit('}'); + }; + + _proto.compileIf = function compileIf(node, frame, async) { + var _this8 = this; + + this._emit('if('); + + this._compileExpression(node.cond, frame); + + this._emitLine(') {'); + + this._withScopedSyntax(function () { + _this8.compile(node.body, frame); + + if (async) { + _this8._emit('cb()'); + } + }); + + if (node.else_) { + this._emitLine('}\nelse {'); + + this._withScopedSyntax(function () { + _this8.compile(node.else_, frame); + + if (async) { + _this8._emit('cb()'); + } + }); + } else if (async) { + this._emitLine('}\nelse {'); + + this._emit('cb()'); + } + + this._emitLine('}'); + }; + + _proto.compileIfAsync = function compileIfAsync(node, frame) { + this._emit('(function(cb) {'); + + this.compileIf(node, frame, true); + + this._emit('})(' + this._makeCallback()); + + this._addScopeLevel(); + }; + + _proto._emitLoopBindings = function _emitLoopBindings(node, arr, i, len) { + var _this9 = this; + + var bindings = [{ + name: 'index', + val: i + " + 1" + }, { + name: 'index0', + val: i + }, { + name: 'revindex', + val: len + " - " + i + }, { + name: 'revindex0', + val: len + " - " + i + " - 1" + }, { + name: 'first', + val: i + " === 0" + }, { + name: 'last', + val: i + " === " + len + " - 1" + }, { + name: 'length', + val: len + }]; + bindings.forEach(function (b) { + _this9._emitLine("frame.set(\"loop." + b.name + "\", " + b.val + ");"); + }); + }; + + _proto.compileFor = function compileFor(node, frame) { + var _this10 = this; + + // Some of this code is ugly, but it keeps the generated code + // as fast as possible. ForAsync also shares some of this, but + // not much. + var i = this._tmpid(); + + var len = this._tmpid(); + + var arr = this._tmpid(); + + frame = frame.push(); + + this._emitLine('frame = frame.push();'); + + this._emit("var " + arr + " = "); + + this._compileExpression(node.arr, frame); + + this._emitLine(';'); + + this._emit("if(" + arr + ") {"); + + this._emitLine(arr + ' = runtime.fromIterator(' + arr + ');'); // If multiple names are passed, we need to bind them + // appropriately + + + if (node.name instanceof nodes.Array) { + this._emitLine("var " + i + ";"); // The object could be an arroy or object. Note that the + // body of the loop is duplicated for each condition, but + // we are optimizing for speed over size. + + + this._emitLine("if(runtime.isArray(" + arr + ")) {"); + + this._emitLine("var " + len + " = " + arr + ".length;"); + + this._emitLine("for(" + i + "=0; " + i + " < " + arr + ".length; " + i + "++) {"); // Bind each declared var + + + node.name.children.forEach(function (child, u) { + var tid = _this10._tmpid(); + + _this10._emitLine("var " + tid + " = " + arr + "[" + i + "][" + u + "];"); + + _this10._emitLine("frame.set(\"" + child + "\", " + arr + "[" + i + "][" + u + "]);"); + + frame.set(node.name.children[u].value, tid); + }); + + this._emitLoopBindings(node, arr, i, len); + + this._withScopedSyntax(function () { + _this10.compile(node.body, frame); + }); + + this._emitLine('}'); + + this._emitLine('} else {'); // Iterate over the key/values of an object + + + var _node$name$children = node.name.children, + key = _node$name$children[0], + val = _node$name$children[1]; + + var k = this._tmpid(); + + var v = this._tmpid(); + + frame.set(key.value, k); + frame.set(val.value, v); + + this._emitLine(i + " = -1;"); + + this._emitLine("var " + len + " = runtime.keys(" + arr + ").length;"); + + this._emitLine("for(var " + k + " in " + arr + ") {"); + + this._emitLine(i + "++;"); + + this._emitLine("var " + v + " = " + arr + "[" + k + "];"); + + this._emitLine("frame.set(\"" + key.value + "\", " + k + ");"); + + this._emitLine("frame.set(\"" + val.value + "\", " + v + ");"); + + this._emitLoopBindings(node, arr, i, len); + + this._withScopedSyntax(function () { + _this10.compile(node.body, frame); + }); + + this._emitLine('}'); + + this._emitLine('}'); + } else { + // Generate a typical array iteration + var _v = this._tmpid(); + + frame.set(node.name.value, _v); + + this._emitLine("var " + len + " = " + arr + ".length;"); + + this._emitLine("for(var " + i + "=0; " + i + " < " + arr + ".length; " + i + "++) {"); + + this._emitLine("var " + _v + " = " + arr + "[" + i + "];"); + + this._emitLine("frame.set(\"" + node.name.value + "\", " + _v + ");"); + + this._emitLoopBindings(node, arr, i, len); + + this._withScopedSyntax(function () { + _this10.compile(node.body, frame); + }); + + this._emitLine('}'); + } + + this._emitLine('}'); + + if (node.else_) { + this._emitLine('if (!' + len + ') {'); + + this.compile(node.else_, frame); + + this._emitLine('}'); + } + + this._emitLine('frame = frame.pop();'); + }; + + _proto._compileAsyncLoop = function _compileAsyncLoop(node, frame, parallel) { + var _this11 = this; + + // This shares some code with the For tag, but not enough to + // worry about. This iterates across an object asynchronously, + // but not in parallel. + var i = this._tmpid(); + + var len = this._tmpid(); + + var arr = this._tmpid(); + + var asyncMethod = parallel ? 'asyncAll' : 'asyncEach'; + frame = frame.push(); + + this._emitLine('frame = frame.push();'); + + this._emit('var ' + arr + ' = runtime.fromIterator('); + + this._compileExpression(node.arr, frame); + + this._emitLine(');'); + + if (node.name instanceof nodes.Array) { + var arrayLen = node.name.children.length; + + this._emit("runtime." + asyncMethod + "(" + arr + ", " + arrayLen + ", function("); + + node.name.children.forEach(function (name) { + _this11._emit(name.value + ","); + }); + + this._emit(i + ',' + len + ',next) {'); + + node.name.children.forEach(function (name) { + var id = name.value; + frame.set(id, id); + + _this11._emitLine("frame.set(\"" + id + "\", " + id + ");"); + }); + } else { + var id = node.name.value; + + this._emitLine("runtime." + asyncMethod + "(" + arr + ", 1, function(" + id + ", " + i + ", " + len + ",next) {"); + + this._emitLine('frame.set("' + id + '", ' + id + ');'); + + frame.set(id, id); + } + + this._emitLoopBindings(node, arr, i, len); + + this._withScopedSyntax(function () { + var buf; + + if (parallel) { + buf = _this11._pushBuffer(); + } + + _this11.compile(node.body, frame); + + _this11._emitLine('next(' + i + (buf ? ',' + buf : '') + ');'); + + if (parallel) { + _this11._popBuffer(); + } + }); + + var output = this._tmpid(); + + this._emitLine('}, ' + this._makeCallback(output)); + + this._addScopeLevel(); + + if (parallel) { + this._emitLine(this.buffer + ' += ' + output + ';'); + } + + if (node.else_) { + this._emitLine('if (!' + arr + '.length) {'); + + this.compile(node.else_, frame); + + this._emitLine('}'); + } + + this._emitLine('frame = frame.pop();'); + }; + + _proto.compileAsyncEach = function compileAsyncEach(node, frame) { + this._compileAsyncLoop(node, frame); + }; + + _proto.compileAsyncAll = function compileAsyncAll(node, frame) { + this._compileAsyncLoop(node, frame, true); + }; + + _proto._compileMacro = function _compileMacro(node, frame) { + var _this12 = this; + + var args = []; + var kwargs = null; + + var funcId = 'macro_' + this._tmpid(); + + var keepFrame = frame !== undefined; // Type check the definition of the args + + node.args.children.forEach(function (arg, i) { + if (i === node.args.children.length - 1 && arg instanceof nodes.Dict) { + kwargs = arg; + } else { + _this12.assertType(arg, nodes.Symbol); + + args.push(arg); + } + }); + var realNames = [].concat(args.map(function (n) { + return "l_" + n.value; + }), ['kwargs']); // Quoted argument names + + var argNames = args.map(function (n) { + return "\"" + n.value + "\""; + }); + var kwargNames = (kwargs && kwargs.children || []).map(function (n) { + return "\"" + n.key.value + "\""; + }); // We pass a function to makeMacro which destructures the + // arguments so support setting positional args with keywords + // args and passing keyword args as positional args + // (essentially default values). See runtime.js. + + var currFrame; + + if (keepFrame) { + currFrame = frame.push(true); + } else { + currFrame = new Frame(); + } + + this._emitLines("var " + funcId + " = runtime.makeMacro(", "[" + argNames.join(', ') + "], ", "[" + kwargNames.join(', ') + "], ", "function (" + realNames.join(', ') + ") {", 'var callerFrame = frame;', 'frame = ' + (keepFrame ? 'frame.push(true);' : 'new runtime.Frame();'), 'kwargs = kwargs || {};', 'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {', 'frame.set("caller", kwargs.caller); }'); // Expose the arguments to the template. Don't need to use + // random names because the function + // will create a new run-time scope for us + + + args.forEach(function (arg) { + _this12._emitLine("frame.set(\"" + arg.value + "\", l_" + arg.value + ");"); + + currFrame.set(arg.value, "l_" + arg.value); + }); // Expose the keyword arguments + + if (kwargs) { + kwargs.children.forEach(function (pair) { + var name = pair.key.value; + + _this12._emit("frame.set(\"" + name + "\", "); + + _this12._emit("Object.prototype.hasOwnProperty.call(kwargs, \"" + name + "\")"); + + _this12._emit(" ? kwargs[\"" + name + "\"] : "); + + _this12._compileExpression(pair.value, currFrame); + + _this12._emit(');'); + }); + } + + var bufferId = this._pushBuffer(); + + this._withScopedSyntax(function () { + _this12.compile(node.body, currFrame); + }); + + this._emitLine('frame = ' + (keepFrame ? 'frame.pop();' : 'callerFrame;')); + + this._emitLine("return new runtime.SafeString(" + bufferId + ");"); + + this._emitLine('});'); + + this._popBuffer(); + + return funcId; + }; + + _proto.compileMacro = function compileMacro(node, frame) { + var funcId = this._compileMacro(node); // Expose the macro to the templates + + + var name = node.name.value; + frame.set(name, funcId); + + if (frame.parent) { + this._emitLine("frame.set(\"" + name + "\", " + funcId + ");"); + } else { + if (node.name.value.charAt(0) !== '_') { + this._emitLine("context.addExport(\"" + name + "\");"); + } + + this._emitLine("context.setVariable(\"" + name + "\", " + funcId + ");"); + } + }; + + _proto.compileCaller = function compileCaller(node, frame) { + // basically an anonymous "macro expression" + this._emit('(function (){'); + + var funcId = this._compileMacro(node, frame); + + this._emit("return " + funcId + ";})()"); + }; + + _proto._compileGetTemplate = function _compileGetTemplate(node, frame, eagerCompile, ignoreMissing) { + var parentTemplateId = this._tmpid(); + + var parentName = this._templateName(); + + var cb = this._makeCallback(parentTemplateId); + + var eagerCompileArg = eagerCompile ? 'true' : 'false'; + var ignoreMissingArg = ignoreMissing ? 'true' : 'false'; + + this._emit('env.getTemplate('); + + this._compileExpression(node.template, frame); + + this._emitLine(", " + eagerCompileArg + ", " + parentName + ", " + ignoreMissingArg + ", " + cb); + + return parentTemplateId; + }; + + _proto.compileImport = function compileImport(node, frame) { + var target = node.target.value; + + var id = this._compileGetTemplate(node, frame, false, false); + + this._addScopeLevel(); + + this._emitLine(id + '.getExported(' + (node.withContext ? 'context.getVariables(), frame, ' : '') + this._makeCallback(id)); + + this._addScopeLevel(); + + frame.set(target, id); + + if (frame.parent) { + this._emitLine("frame.set(\"" + target + "\", " + id + ");"); + } else { + this._emitLine("context.setVariable(\"" + target + "\", " + id + ");"); + } + }; + + _proto.compileFromImport = function compileFromImport(node, frame) { + var _this13 = this; + + var importedId = this._compileGetTemplate(node, frame, false, false); + + this._addScopeLevel(); + + this._emitLine(importedId + '.getExported(' + (node.withContext ? 'context.getVariables(), frame, ' : '') + this._makeCallback(importedId)); + + this._addScopeLevel(); + + node.names.children.forEach(function (nameNode) { + var name; + var alias; + + var id = _this13._tmpid(); + + if (nameNode instanceof nodes.Pair) { + name = nameNode.key.value; + alias = nameNode.value.value; + } else { + name = nameNode.value; + alias = name; + } + + _this13._emitLine("if(Object.prototype.hasOwnProperty.call(" + importedId + ", \"" + name + "\")) {"); + + _this13._emitLine("var " + id + " = " + importedId + "." + name + ";"); + + _this13._emitLine('} else {'); + + _this13._emitLine("cb(new Error(\"cannot import '" + name + "'\")); return;"); + + _this13._emitLine('}'); + + frame.set(alias, id); + + if (frame.parent) { + _this13._emitLine("frame.set(\"" + alias + "\", " + id + ");"); + } else { + _this13._emitLine("context.setVariable(\"" + alias + "\", " + id + ");"); + } + }); + }; + + _proto.compileBlock = function compileBlock(node) { + var id = this._tmpid(); // If we are executing outside a block (creating a top-level + // block), we really don't want to execute its code because it + // will execute twice: once when the child template runs and + // again when the parent template runs. Note that blocks + // within blocks will *always* execute immediately *and* + // wherever else they are invoked (like used in a parent + // template). This may have behavioral differences from jinja + // because blocks can have side effects, but it seems like a + // waste of performance to always execute huge top-level + // blocks twice + + + if (!this.inBlock) { + this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '); + } + + this._emit("context.getBlock(\"" + node.name.value + "\")"); + + if (!this.inBlock) { + this._emit(')'); + } + + this._emitLine('(env, context, frame, runtime, ' + this._makeCallback(id)); + + this._emitLine(this.buffer + " += " + id + ";"); + + this._addScopeLevel(); + }; + + _proto.compileSuper = function compileSuper(node, frame) { + var name = node.blockName.value; + var id = node.symbol.value; + + var cb = this._makeCallback(id); + + this._emitLine("context.getSuper(env, \"" + name + "\", b_" + name + ", frame, runtime, " + cb); + + this._emitLine(id + " = runtime.markSafe(" + id + ");"); + + this._addScopeLevel(); + + frame.set(id, id); + }; + + _proto.compileExtends = function compileExtends(node, frame) { + var k = this._tmpid(); + + var parentTemplateId = this._compileGetTemplate(node, frame, true, false); // extends is a dynamic tag and can occur within a block like + // `if`, so if this happens we need to capture the parent + // template in the top-level scope + + + this._emitLine("parentTemplate = " + parentTemplateId); + + this._emitLine("for(var " + k + " in parentTemplate.blocks) {"); + + this._emitLine("context.addBlock(" + k + ", parentTemplate.blocks[" + k + "]);"); + + this._emitLine('}'); + + this._addScopeLevel(); + }; + + _proto.compileInclude = function compileInclude(node, frame) { + this._emitLine('var tasks = [];'); + + this._emitLine('tasks.push('); + + this._emitLine('function(callback) {'); + + var id = this._compileGetTemplate(node, frame, false, node.ignoreMissing); + + this._emitLine("callback(null," + id + ");});"); + + this._emitLine('});'); + + var id2 = this._tmpid(); + + this._emitLine('tasks.push('); + + this._emitLine('function(template, callback){'); + + this._emitLine('template.render(context.getVariables(), frame, ' + this._makeCallback(id2)); + + this._emitLine('callback(null,' + id2 + ');});'); + + this._emitLine('});'); + + this._emitLine('tasks.push('); + + this._emitLine('function(result, callback){'); + + this._emitLine(this.buffer + " += result;"); + + this._emitLine('callback(null);'); + + this._emitLine('});'); + + this._emitLine('env.waterfall(tasks, function(){'); + + this._addScopeLevel(); + }; + + _proto.compileTemplateData = function compileTemplateData(node, frame) { + this.compileLiteral(node, frame); + }; + + _proto.compileCapture = function compileCapture(node, frame) { + var _this14 = this; + + // we need to temporarily override the current buffer id as 'output' + // so the set block writes to the capture output instead of the buffer + var buffer = this.buffer; + this.buffer = 'output'; + + this._emitLine('(function() {'); + + this._emitLine('var output = "";'); + + this._withScopedSyntax(function () { + _this14.compile(node.body, frame); + }); + + this._emitLine('return output;'); + + this._emitLine('})()'); // and of course, revert back to the old buffer id + + + this.buffer = buffer; + }; + + _proto.compileOutput = function compileOutput(node, frame) { + var _this15 = this; + + var children = node.children; + children.forEach(function (child) { + // TemplateData is a special case because it is never + // autoescaped, so simply output it for optimization + if (child instanceof nodes.TemplateData) { + if (child.value) { + _this15._emit(_this15.buffer + " += "); + + _this15.compileLiteral(child, frame); + + _this15._emitLine(';'); + } + } else { + _this15._emit(_this15.buffer + " += runtime.suppressValue("); + + if (_this15.throwOnUndefined) { + _this15._emit('runtime.ensureDefined('); + } + + _this15.compile(child, frame); + + if (_this15.throwOnUndefined) { + _this15._emit("," + node.lineno + "," + node.colno + ")"); + } + + _this15._emit(', env.opts.autoescape);\n'); + } + }); + }; + + _proto.compileRoot = function compileRoot(node, frame) { + var _this16 = this; + + if (frame) { + this.fail('compileRoot: root node can\'t have frame'); + } + + frame = new Frame(); + + this._emitFuncBegin(node, 'root'); + + this._emitLine('var parentTemplate = null;'); + + this._compileChildren(node, frame); + + this._emitLine('if(parentTemplate) {'); + + this._emitLine('parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);'); + + this._emitLine('} else {'); + + this._emitLine("cb(null, " + this.buffer + ");"); + + this._emitLine('}'); + + this._emitFuncEnd(true); + + this.inBlock = true; + var blockNames = []; + var blocks = node.findAll(nodes.Block); + blocks.forEach(function (block, i) { + var name = block.name.value; + + if (blockNames.indexOf(name) !== -1) { + throw new Error("Block \"" + name + "\" defined more than once."); + } + + blockNames.push(name); + + _this16._emitFuncBegin(block, "b_" + name); + + var tmpFrame = new Frame(); + + _this16._emitLine('var frame = frame.push(true);'); + + _this16.compile(block.body, tmpFrame); + + _this16._emitFuncEnd(); + }); + + this._emitLine('return {'); + + blocks.forEach(function (block, i) { + var blockName = "b_" + block.name.value; + + _this16._emitLine(blockName + ": " + blockName + ","); + }); + + this._emitLine('root: root\n};'); + }; + + _proto.compile = function compile(node, frame) { + var _compile = this['compile' + node.typename]; + + if (_compile) { + _compile.call(this, node, frame); + } else { + this.fail("compile: Cannot compile node: " + node.typename, node.lineno, node.colno); + } + }; + + _proto.getCode = function getCode() { + return this.codebuf.join(''); + }; + + return Compiler; +}(Obj); + +module.exports = { + compile: function compile(src, asyncFilters, extensions, name, opts) { + if (opts === void 0) { + opts = {}; + } + + var c = new Compiler(name, opts.throwOnUndefined); // Run the extension preprocessors against the source. + + var preprocessors = (extensions || []).map(function (ext) { + return ext.preprocess; + }).filter(function (f) { + return !!f; + }); + var processedSrc = preprocessors.reduce(function (s, processor) { + return processor(s); + }, src); + c.compile(transformer.transform(parser.parse(processedSrc, extensions, opts), asyncFilters, name)); + return c.getCode(); + }, + Compiler: Compiler +}; + +/***/ }), +/* 378 */, +/* 379 */, +/* 380 */, +/* 381 */ +/***/ (function(module) { + +/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true*/ +(function () { + "use strict"; + + // "FIFO" isn't easy to convert to camelCase and back reliably + var isFnodeTypes = [ + "isFile", "isDirectory", "isSymbolicLink", "isBlockDevice", "isCharacterDevice", "isFIFO", "isSocket" + ], + fnodeTypes = [ + "file", "directory", "symbolicLink", "blockDevice", "characterDevice", "FIFO", "socket" + ], + fnodeTypesPlural = [ + "files", "directories", "symbolicLinks", "blockDevices", "characterDevices", "FIFOs", "sockets" + ]; + + + // + function createNodeGroups() { + var nodeGroups = {}; + fnodeTypesPlural.concat("nodes", "errors").forEach(function (fnodeTypePlural) { + nodeGroups[fnodeTypePlural] = []; + }); + return nodeGroups; + } + + + // Determine each file node's type + // + function sortFnodesByType(stat, fnodes) { + var i, isType; + + for (i = 0; i < isFnodeTypes.length; i += 1) { + isType = isFnodeTypes[i]; + if (stat[isType]()) { + stat.type = fnodeTypes[i]; + fnodes[fnodeTypesPlural[i]].push(stat); + return; + } + } + } + + + // Get the current number of listeners (which may change) + // Emit events to each listener + // Wait for all listeners to `next()` before continueing + // (in theory this may avoid disk thrashing) + function emitSingleEvents(emitter, path, stats, next, self) { + var num = 1 + emitter.listeners(stats.type).length + emitter.listeners("node").length; + + function nextWhenReady(flag) { + if (flag) { + stats.flag = flag; + } + num -= 1; + if (0 === num) { next.call(self); } + } + + emitter.emit(stats.type, path, stats, nextWhenReady); + emitter.emit("node", path, stats, nextWhenReady); + nextWhenReady(); + } + + + // Since the risk for disk thrashing among anything + // other than files is relatively low, all types are + // emitted at once, but all must complete before advancing + function emitPluralEvents(emitter, path, nodes, next, self) { + var num = 1; + + function nextWhenReady() { + num -= 1; + if (0 === num) { next.call(self); } + } + + fnodeTypesPlural.concat(["nodes", "errors"]).forEach(function (fnodeType) { + if (0 === nodes[fnodeType].length) { return; } + num += emitter.listeners(fnodeType).length; + emitter.emit(fnodeType, path, nodes[fnodeType], nextWhenReady); + }); + nextWhenReady(); + } + + module.exports = { + emitNodeType: emitSingleEvents, + emitNodeTypeGroups: emitPluralEvents, + isFnodeTypes: isFnodeTypes, + fnodeTypes: fnodeTypes, + fnodeTypesPlural: fnodeTypesPlural, + sortFnodesByType: sortFnodesByType, + createNodeGroups: createNodeGroups + }; +}()); + + +/***/ }), +/* 382 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const utils = __webpack_require__(225); + +module.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + + + +/***/ }), +/* 383 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': __webpack_require__(266), + allOf: __webpack_require__(107), + anyOf: __webpack_require__(902), + '$comment': __webpack_require__(28), + const: __webpack_require__(662), + contains: __webpack_require__(154), + dependencies: __webpack_require__(233), + 'enum': __webpack_require__(281), + format: __webpack_require__(687), + 'if': __webpack_require__(658), + items: __webpack_require__(643), + maximum: __webpack_require__(341), + minimum: __webpack_require__(341), + maxItems: __webpack_require__(85), + minItems: __webpack_require__(85), + maxLength: __webpack_require__(772), + minLength: __webpack_require__(772), + maxProperties: __webpack_require__(560), + minProperties: __webpack_require__(560), + multipleOf: __webpack_require__(397), + not: __webpack_require__(673), + oneOf: __webpack_require__(653), + pattern: __webpack_require__(542), + properties: __webpack_require__(343), + propertyNames: __webpack_require__(566), + required: __webpack_require__(858), + uniqueItems: __webpack_require__(899), + validate: __webpack_require__(967) +}; + + +/***/ }), +/* 384 */, +/* 385 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 386 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var Type = __webpack_require__(945); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); + + +/***/ }), +/* 387 */, +/* 388 */ +/***/ (function(module) { + +"use strict"; + + +var ArrayProto = Array.prototype; +var ObjProto = Object.prototype; +var escapeMap = { + '&': '&', + '"': '"', + '\'': ''', + '<': '<', + '>': '>' +}; +var escapeRegex = /[&"'<>]/g; + +var _exports = module.exports = {}; + +function hasOwnProp(obj, k) { + return ObjProto.hasOwnProperty.call(obj, k); +} + +_exports.hasOwnProp = hasOwnProp; + +function lookupEscape(ch) { + return escapeMap[ch]; +} + +function _prettifyError(path, withInternals, err) { + if (!err.Update) { + // not one of ours, cast it + err = new _exports.TemplateError(err); + } + + err.Update(path); // Unless they marked the dev flag, show them a trace from here + + if (!withInternals) { + var old = err; + err = new Error(old.message); + err.name = old.name; + } + + return err; +} + +_exports._prettifyError = _prettifyError; + +function TemplateError(message, lineno, colno) { + var err; + var cause; + + if (message instanceof Error) { + cause = message; + message = cause.name + ": " + cause.message; + } + + if (Object.setPrototypeOf) { + err = new Error(message); + Object.setPrototypeOf(err, TemplateError.prototype); + } else { + err = this; + Object.defineProperty(err, 'message', { + enumerable: false, + writable: true, + value: message + }); + } + + Object.defineProperty(err, 'name', { + value: 'Template render error' + }); + + if (Error.captureStackTrace) { + Error.captureStackTrace(err, this.constructor); + } + + var getStack; + + if (cause) { + var stackDescriptor = Object.getOwnPropertyDescriptor(cause, 'stack'); + + getStack = stackDescriptor && (stackDescriptor.get || function () { + return stackDescriptor.value; + }); + + if (!getStack) { + getStack = function getStack() { + return cause.stack; + }; + } + } else { + var stack = new Error(message).stack; + + getStack = function getStack() { + return stack; + }; + } + + Object.defineProperty(err, 'stack', { + get: function get() { + return getStack.call(err); + } + }); + Object.defineProperty(err, 'cause', { + value: cause + }); + err.lineno = lineno; + err.colno = colno; + err.firstUpdate = true; + + err.Update = function Update(path) { + var msg = '(' + (path || 'unknown path') + ')'; // only show lineno + colno next to path of template + // where error occurred + + if (this.firstUpdate) { + if (this.lineno && this.colno) { + msg += " [Line " + this.lineno + ", Column " + this.colno + "]"; + } else if (this.lineno) { + msg += " [Line " + this.lineno + "]"; + } + } + + msg += '\n '; + + if (this.firstUpdate) { + msg += ' '; + } + + this.message = msg + (this.message || ''); + this.firstUpdate = false; + return this; + }; + + return err; +} + +if (Object.setPrototypeOf) { + Object.setPrototypeOf(TemplateError.prototype, Error.prototype); +} else { + TemplateError.prototype = Object.create(Error.prototype, { + constructor: { + value: TemplateError + } + }); +} + +_exports.TemplateError = TemplateError; + +function escape(val) { + return val.replace(escapeRegex, lookupEscape); +} + +_exports.escape = escape; + +function isFunction(obj) { + return ObjProto.toString.call(obj) === '[object Function]'; +} + +_exports.isFunction = isFunction; + +function isArray(obj) { + return ObjProto.toString.call(obj) === '[object Array]'; +} + +_exports.isArray = isArray; + +function isString(obj) { + return ObjProto.toString.call(obj) === '[object String]'; +} + +_exports.isString = isString; + +function isObject(obj) { + return ObjProto.toString.call(obj) === '[object Object]'; +} + +_exports.isObject = isObject; + +function groupBy(obj, val) { + var result = {}; + var iterator = isFunction(val) ? val : function (o) { + return o[val]; + }; + + for (var i = 0; i < obj.length; i++) { + var value = obj[i]; + var key = iterator(value, i); + (result[key] || (result[key] = [])).push(value); + } + + return result; +} + +_exports.groupBy = groupBy; + +function toArray(obj) { + return Array.prototype.slice.call(obj); +} + +_exports.toArray = toArray; + +function without(array) { + var result = []; + + if (!array) { + return result; + } + + var length = array.length; + var contains = toArray(arguments).slice(1); + var index = -1; + + while (++index < length) { + if (indexOf(contains, array[index]) === -1) { + result.push(array[index]); + } + } + + return result; +} + +_exports.without = without; + +function repeat(char_, n) { + var str = ''; + + for (var i = 0; i < n; i++) { + str += char_; + } + + return str; +} + +_exports.repeat = repeat; + +function each(obj, func, context) { + if (obj == null) { + return; + } + + if (ArrayProto.forEach && obj.forEach === ArrayProto.forEach) { + obj.forEach(func, context); + } else if (obj.length === +obj.length) { + for (var i = 0, l = obj.length; i < l; i++) { + func.call(context, obj[i], i, obj); + } + } +} + +_exports.each = each; + +function map(obj, func) { + var results = []; + + if (obj == null) { + return results; + } + + if (ArrayProto.map && obj.map === ArrayProto.map) { + return obj.map(func); + } + + for (var i = 0; i < obj.length; i++) { + results[results.length] = func(obj[i], i); + } + + if (obj.length === +obj.length) { + results.length = obj.length; + } + + return results; +} + +_exports.map = map; + +function asyncIter(arr, iter, cb) { + var i = -1; + + function next() { + i++; + + if (i < arr.length) { + iter(arr[i], i, next, cb); + } else { + cb(); + } + } + + next(); +} + +_exports.asyncIter = asyncIter; + +function asyncFor(obj, iter, cb) { + var keys = keys_(obj || {}); + var len = keys.length; + var i = -1; + + function next() { + i++; + var k = keys[i]; + + if (i < len) { + iter(k, obj[k], i, len, next); + } else { + cb(); + } + } + + next(); +} + +_exports.asyncFor = asyncFor; + +function indexOf(arr, searchElement, fromIndex) { + return Array.prototype.indexOf.call(arr || [], searchElement, fromIndex); +} + +_exports.indexOf = indexOf; + +function keys_(obj) { + /* eslint-disable no-restricted-syntax */ + var arr = []; + + for (var k in obj) { + if (hasOwnProp(obj, k)) { + arr.push(k); + } + } + + return arr; +} + +_exports.keys = keys_; + +function _entries(obj) { + return keys_(obj).map(function (k) { + return [k, obj[k]]; + }); +} + +_exports._entries = _entries; + +function _values(obj) { + return keys_(obj).map(function (k) { + return obj[k]; + }); +} + +_exports._values = _values; + +function extend(obj1, obj2) { + obj1 = obj1 || {}; + keys_(obj2).forEach(function (k) { + obj1[k] = obj2[k]; + }); + return obj1; +} + +_exports._assign = _exports.extend = extend; + +function inOperator(key, val) { + if (isArray(val) || isString(val)) { + return val.indexOf(key) !== -1; + } else if (isObject(val)) { + return key in val; + } + + throw new Error('Cannot use "in" operator to search for "' + key + '" in unexpected types.'); +} + +_exports.inOperator = inOperator; + +/***/ }), +/* 389 */, +/* 390 */, +/* 391 */, +/* 392 */, +/* 393 */, +/* 394 */, +/* 395 */, +/* 396 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;'; + var $currentBaseId = $it.baseId; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), +/* 397 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 398 */, +/* 399 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; +/* + ** © 2018 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + ** Licensed under MIT License. + */ + +/* jshint node:true */ + + +if (process.platform !== 'darwin') { + throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`); +} + +const Native = __webpack_require__(654); +const events = Native.constants; + +function watch(path, handler) { + if (typeof path !== 'string') { + throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`); + } + if (typeof handler !== 'function') { + throw new TypeError(`fsevents argument 2 must be a function and not a ${typeof handler}`); + } + + let instance = Native.start(path, handler); + if (!instance) throw new Error(`could not watch: ${path}`); + return () => { + const result = instance + ? Promise.resolve(instance).then(Native.stop) + : Promise.resolve(undefined); + instance = undefined; + return result; + }; +} + +function getInfo(path, flags) { + return { + path, + flags, + event: getEventType(flags), + type: getFileType(flags), + changes: getFileChanges(flags) + }; +} + +function getFileType(flags) { + if (events.ItemIsFile & flags) return 'file'; + if (events.ItemIsDir & flags) return 'directory'; + if (events.ItemIsSymlink & flags) return 'symlink'; +} +function anyIsTrue(obj) { + for (let key in obj) { + if (obj[key]) return true; + } + return false; +} +function getEventType(flags) { + if (events.ItemRemoved & flags) return 'deleted'; + if (events.ItemRenamed & flags) return 'moved'; + if (events.ItemCreated & flags) return 'created'; + if (events.ItemModified & flags) return 'modified'; + if (events.RootChanged & flags) return 'root-changed'; + if (events.ItemCloned & flags) return 'cloned'; + if (anyIsTrue(flags)) return 'modified'; + return 'unknown'; +} +function getFileChanges(flags) { + return { + inode: !!(events.ItemInodeMetaMod & flags), + finder: !!(events.ItemFinderInfoMod & flags), + access: !!(events.ItemChangeOwner & flags), + xattrs: !!(events.ItemXattrMod & flags) + }; +} + +exports.watch = watch; +exports.getInfo = getInfo; +exports.constants = events; + + +/***/ }), +/* 400 */, +/* 401 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_ref(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $async, $refCode; + if ($schema == '#' || $schema == '#/') { + if (it.isRoot) { + $async = it.async; + $refCode = 'validate'; + } else { + $async = it.root.schema.$async === true; + $refCode = 'root.refVal[0]'; + } + } else { + var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); + if ($refVal === undefined) { + var $message = it.MissingRefError.message(it.baseId, $schema); + if (it.opts.missingRefs == 'fail') { + it.logger.error($message); + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; + } + if (it.opts.verbose) { + out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + if ($breakOnError) { + out += ' if (false) { '; + } + } else if (it.opts.missingRefs == 'ignore') { + it.logger.warn($message); + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + throw new it.MissingRefError(it.baseId, $schema, $message); + } + } else if ($refVal.inline) { + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $refVal.schema; + $it.schemaPath = ''; + $it.errSchemaPath = $schema; + var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); + out += ' ' + ($code) + ' '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + } + } else { + $async = $refVal.$async === true || (it.async && $refVal.$async !== false); + $refCode = $refVal.code; + } + } + if ($refCode) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + if (it.opts.passContext) { + out += ' ' + ($refCode) + '.call(this, '; + } else { + out += ' ' + ($refCode) + '( '; + } + out += ' ' + ($data) + ', (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; + var __callValidate = out; + out = $$outStack.pop(); + if ($async) { + if (!it.async) throw new Error('async schema referenced by sync schema'); + if ($breakOnError) { + out += ' var ' + ($valid) + '; '; + } + out += ' try { await ' + (__callValidate) + '; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = true; '; + } + out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = false; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + } + } else { + out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; + if ($breakOnError) { + out += ' else { '; + } + } + } + return out; +} + + +/***/ }), +/* 402 */, +/* 403 */ +/***/ (function(module) { + +"use strict"; + + +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; + +module.exports = function (ajv) { + var defaultMeta = ajv._opts.defaultMeta; + var metaSchemaRef = typeof defaultMeta == 'string' + ? { $ref: defaultMeta } + : ajv.getSchema(META_SCHEMA_ID) + ? { $ref: META_SCHEMA_ID } + : {}; + + ajv.addKeyword('patternGroups', { + // implemented in properties.jst + metaSchema: { + type: 'object', + additionalProperties: { + type: 'object', + required: [ 'schema' ], + properties: { + maximum: { + type: 'integer', + minimum: 0 + }, + minimum: { + type: 'integer', + minimum: 0 + }, + schema: metaSchemaRef + }, + additionalProperties: false + } + } + }); + ajv.RULES.all.properties.implements.push('patternGroups'); +}; + + +/***/ }), +/* 404 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': __webpack_require__(401), + allOf: __webpack_require__(35), + anyOf: __webpack_require__(76), + '$comment': __webpack_require__(464), + const: __webpack_require__(519), + contains: __webpack_require__(981), + dependencies: __webpack_require__(532), + 'enum': __webpack_require__(220), + format: __webpack_require__(385), + 'if': __webpack_require__(516), + items: __webpack_require__(118), + maximum: __webpack_require__(468), + minimum: __webpack_require__(468), + maxItems: __webpack_require__(646), + minItems: __webpack_require__(646), + maxLength: __webpack_require__(561), + minLength: __webpack_require__(561), + maxProperties: __webpack_require__(190), + minProperties: __webpack_require__(190), + multipleOf: __webpack_require__(905), + not: __webpack_require__(588), + oneOf: __webpack_require__(533), + pattern: __webpack_require__(311), + properties: __webpack_require__(153), + propertyNames: __webpack_require__(803), + required: __webpack_require__(847), + uniqueItems: __webpack_require__(146), + validate: __webpack_require__(650) +}; + + +/***/ }), +/* 405 */, +/* 406 */, +/* 407 */, +/* 408 */, +/* 409 */, +/* 410 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var lib = __webpack_require__(388); + +var whitespaceChars = " \n\t\r\xA0"; +var delimChars = '()[]{}%*-+~/#,:|.<>=!'; +var intChars = '0123456789'; +var BLOCK_START = '{%'; +var BLOCK_END = '%}'; +var VARIABLE_START = '{{'; +var VARIABLE_END = '}}'; +var COMMENT_START = '{#'; +var COMMENT_END = '#}'; +var TOKEN_STRING = 'string'; +var TOKEN_WHITESPACE = 'whitespace'; +var TOKEN_DATA = 'data'; +var TOKEN_BLOCK_START = 'block-start'; +var TOKEN_BLOCK_END = 'block-end'; +var TOKEN_VARIABLE_START = 'variable-start'; +var TOKEN_VARIABLE_END = 'variable-end'; +var TOKEN_COMMENT = 'comment'; +var TOKEN_LEFT_PAREN = 'left-paren'; +var TOKEN_RIGHT_PAREN = 'right-paren'; +var TOKEN_LEFT_BRACKET = 'left-bracket'; +var TOKEN_RIGHT_BRACKET = 'right-bracket'; +var TOKEN_LEFT_CURLY = 'left-curly'; +var TOKEN_RIGHT_CURLY = 'right-curly'; +var TOKEN_OPERATOR = 'operator'; +var TOKEN_COMMA = 'comma'; +var TOKEN_COLON = 'colon'; +var TOKEN_TILDE = 'tilde'; +var TOKEN_PIPE = 'pipe'; +var TOKEN_INT = 'int'; +var TOKEN_FLOAT = 'float'; +var TOKEN_BOOLEAN = 'boolean'; +var TOKEN_NONE = 'none'; +var TOKEN_SYMBOL = 'symbol'; +var TOKEN_SPECIAL = 'special'; +var TOKEN_REGEX = 'regex'; + +function token(type, value, lineno, colno) { + return { + type: type, + value: value, + lineno: lineno, + colno: colno + }; +} + +var Tokenizer = /*#__PURE__*/function () { + function Tokenizer(str, opts) { + this.str = str; + this.index = 0; + this.len = str.length; + this.lineno = 0; + this.colno = 0; + this.in_code = false; + opts = opts || {}; + var tags = opts.tags || {}; + this.tags = { + BLOCK_START: tags.blockStart || BLOCK_START, + BLOCK_END: tags.blockEnd || BLOCK_END, + VARIABLE_START: tags.variableStart || VARIABLE_START, + VARIABLE_END: tags.variableEnd || VARIABLE_END, + COMMENT_START: tags.commentStart || COMMENT_START, + COMMENT_END: tags.commentEnd || COMMENT_END + }; + this.trimBlocks = !!opts.trimBlocks; + this.lstripBlocks = !!opts.lstripBlocks; + } + + var _proto = Tokenizer.prototype; + + _proto.nextToken = function nextToken() { + var lineno = this.lineno; + var colno = this.colno; + var tok; + + if (this.in_code) { + // Otherwise, if we are in a block parse it as code + var cur = this.current(); + + if (this.isFinished()) { + // We have nothing else to parse + return null; + } else if (cur === '"' || cur === '\'') { + // We've hit a string + return token(TOKEN_STRING, this._parseString(cur), lineno, colno); + } else if (tok = this._extract(whitespaceChars)) { + // We hit some whitespace + return token(TOKEN_WHITESPACE, tok, lineno, colno); + } else if ((tok = this._extractString(this.tags.BLOCK_END)) || (tok = this._extractString('-' + this.tags.BLOCK_END))) { + // Special check for the block end tag + // + // It is a requirement that start and end tags are composed of + // delimiter characters (%{}[] etc), and our code always + // breaks on delimiters so we can assume the token parsing + // doesn't consume these elsewhere + this.in_code = false; + + if (this.trimBlocks) { + cur = this.current(); + + if (cur === '\n') { + // Skip newline + this.forward(); + } else if (cur === '\r') { + // Skip CRLF newline + this.forward(); + cur = this.current(); + + if (cur === '\n') { + this.forward(); + } else { + // Was not a CRLF, so go back + this.back(); + } + } + } + + return token(TOKEN_BLOCK_END, tok, lineno, colno); + } else if ((tok = this._extractString(this.tags.VARIABLE_END)) || (tok = this._extractString('-' + this.tags.VARIABLE_END))) { + // Special check for variable end tag (see above) + this.in_code = false; + return token(TOKEN_VARIABLE_END, tok, lineno, colno); + } else if (cur === 'r' && this.str.charAt(this.index + 1) === '/') { + // Skip past 'r/'. + this.forwardN(2); // Extract until the end of the regex -- / ends it, \/ does not. + + var regexBody = ''; + + while (!this.isFinished()) { + if (this.current() === '/' && this.previous() !== '\\') { + this.forward(); + break; + } else { + regexBody += this.current(); + this.forward(); + } + } // Check for flags. + // The possible flags are according to https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/RegExp) + + + var POSSIBLE_FLAGS = ['g', 'i', 'm', 'y']; + var regexFlags = ''; + + while (!this.isFinished()) { + var isCurrentAFlag = POSSIBLE_FLAGS.indexOf(this.current()) !== -1; + + if (isCurrentAFlag) { + regexFlags += this.current(); + this.forward(); + } else { + break; + } + } + + return token(TOKEN_REGEX, { + body: regexBody, + flags: regexFlags + }, lineno, colno); + } else if (delimChars.indexOf(cur) !== -1) { + // We've hit a delimiter (a special char like a bracket) + this.forward(); + var complexOps = ['==', '===', '!=', '!==', '<=', '>=', '//', '**']; + var curComplex = cur + this.current(); + var type; + + if (lib.indexOf(complexOps, curComplex) !== -1) { + this.forward(); + cur = curComplex; // See if this is a strict equality/inequality comparator + + if (lib.indexOf(complexOps, curComplex + this.current()) !== -1) { + cur = curComplex + this.current(); + this.forward(); + } + } + + switch (cur) { + case '(': + type = TOKEN_LEFT_PAREN; + break; + + case ')': + type = TOKEN_RIGHT_PAREN; + break; + + case '[': + type = TOKEN_LEFT_BRACKET; + break; + + case ']': + type = TOKEN_RIGHT_BRACKET; + break; + + case '{': + type = TOKEN_LEFT_CURLY; + break; + + case '}': + type = TOKEN_RIGHT_CURLY; + break; + + case ',': + type = TOKEN_COMMA; + break; + + case ':': + type = TOKEN_COLON; + break; + + case '~': + type = TOKEN_TILDE; + break; + + case '|': + type = TOKEN_PIPE; + break; + + default: + type = TOKEN_OPERATOR; + } + + return token(type, cur, lineno, colno); + } else { + // We are not at whitespace or a delimiter, so extract the + // text and parse it + tok = this._extractUntil(whitespaceChars + delimChars); + + if (tok.match(/^[-+]?[0-9]+$/)) { + if (this.current() === '.') { + this.forward(); + + var dec = this._extract(intChars); + + return token(TOKEN_FLOAT, tok + '.' + dec, lineno, colno); + } else { + return token(TOKEN_INT, tok, lineno, colno); + } + } else if (tok.match(/^(true|false)$/)) { + return token(TOKEN_BOOLEAN, tok, lineno, colno); + } else if (tok === 'none') { + return token(TOKEN_NONE, tok, lineno, colno); + /* + * Added to make the test `null is null` evaluate truthily. + * Otherwise, Nunjucks will look up null in the context and + * return `undefined`, which is not what we want. This *may* have + * consequences is someone is using null in their templates as a + * variable. + */ + } else if (tok === 'null') { + return token(TOKEN_NONE, tok, lineno, colno); + } else if (tok) { + return token(TOKEN_SYMBOL, tok, lineno, colno); + } else { + throw new Error('Unexpected value while parsing: ' + tok); + } + } + } else { + // Parse out the template text, breaking on tag + // delimiters because we need to look for block/variable start + // tags (don't use the full delimChars for optimization) + var beginChars = this.tags.BLOCK_START.charAt(0) + this.tags.VARIABLE_START.charAt(0) + this.tags.COMMENT_START.charAt(0) + this.tags.COMMENT_END.charAt(0); + + if (this.isFinished()) { + return null; + } else if ((tok = this._extractString(this.tags.BLOCK_START + '-')) || (tok = this._extractString(this.tags.BLOCK_START))) { + this.in_code = true; + return token(TOKEN_BLOCK_START, tok, lineno, colno); + } else if ((tok = this._extractString(this.tags.VARIABLE_START + '-')) || (tok = this._extractString(this.tags.VARIABLE_START))) { + this.in_code = true; + return token(TOKEN_VARIABLE_START, tok, lineno, colno); + } else { + tok = ''; + var data; + var inComment = false; + + if (this._matches(this.tags.COMMENT_START)) { + inComment = true; + tok = this._extractString(this.tags.COMMENT_START); + } // Continually consume text, breaking on the tag delimiter + // characters and checking to see if it's a start tag. + // + // We could hit the end of the template in the middle of + // our looping, so check for the null return value from + // _extractUntil + + + while ((data = this._extractUntil(beginChars)) !== null) { + tok += data; + + if ((this._matches(this.tags.BLOCK_START) || this._matches(this.tags.VARIABLE_START) || this._matches(this.tags.COMMENT_START)) && !inComment) { + if (this.lstripBlocks && this._matches(this.tags.BLOCK_START) && this.colno > 0 && this.colno <= tok.length) { + var lastLine = tok.slice(-this.colno); + + if (/^\s+$/.test(lastLine)) { + // Remove block leading whitespace from beginning of the string + tok = tok.slice(0, -this.colno); + + if (!tok.length) { + // All data removed, collapse to avoid unnecessary nodes + // by returning next token (block start) + return this.nextToken(); + } + } + } // If it is a start tag, stop looping + + + break; + } else if (this._matches(this.tags.COMMENT_END)) { + if (!inComment) { + throw new Error('unexpected end of comment'); + } + + tok += this._extractString(this.tags.COMMENT_END); + break; + } else { + // It does not match any tag, so add the character and + // carry on + tok += this.current(); + this.forward(); + } + } + + if (data === null && inComment) { + throw new Error('expected end of comment, got end of file'); + } + + return token(inComment ? TOKEN_COMMENT : TOKEN_DATA, tok, lineno, colno); + } + } + }; + + _proto._parseString = function _parseString(delimiter) { + this.forward(); + var str = ''; + + while (!this.isFinished() && this.current() !== delimiter) { + var cur = this.current(); + + if (cur === '\\') { + this.forward(); + + switch (this.current()) { + case 'n': + str += '\n'; + break; + + case 't': + str += '\t'; + break; + + case 'r': + str += '\r'; + break; + + default: + str += this.current(); + } + + this.forward(); + } else { + str += cur; + this.forward(); + } + } + + this.forward(); + return str; + }; + + _proto._matches = function _matches(str) { + if (this.index + str.length > this.len) { + return null; + } + + var m = this.str.slice(this.index, this.index + str.length); + return m === str; + }; + + _proto._extractString = function _extractString(str) { + if (this._matches(str)) { + this.forwardN(str.length); + return str; + } + + return null; + }; + + _proto._extractUntil = function _extractUntil(charString) { + // Extract all non-matching chars, with the default matching set + // to everything + return this._extractMatching(true, charString || ''); + }; + + _proto._extract = function _extract(charString) { + // Extract all matching chars (no default, so charString must be + // explicit) + return this._extractMatching(false, charString); + }; + + _proto._extractMatching = function _extractMatching(breakOnMatch, charString) { + // Pull out characters until a breaking char is hit. + // If breakOnMatch is false, a non-matching char stops it. + // If breakOnMatch is true, a matching char stops it. + if (this.isFinished()) { + return null; + } + + var first = charString.indexOf(this.current()); // Only proceed if the first character doesn't meet our condition + + if (breakOnMatch && first === -1 || !breakOnMatch && first !== -1) { + var t = this.current(); + this.forward(); // And pull out all the chars one at a time until we hit a + // breaking char + + var idx = charString.indexOf(this.current()); + + while ((breakOnMatch && idx === -1 || !breakOnMatch && idx !== -1) && !this.isFinished()) { + t += this.current(); + this.forward(); + idx = charString.indexOf(this.current()); + } + + return t; + } + + return ''; + }; + + _proto._extractRegex = function _extractRegex(regex) { + var matches = this.currentStr().match(regex); + + if (!matches) { + return null; + } // Move forward whatever was matched + + + this.forwardN(matches[0].length); + return matches; + }; + + _proto.isFinished = function isFinished() { + return this.index >= this.len; + }; + + _proto.forwardN = function forwardN(n) { + for (var i = 0; i < n; i++) { + this.forward(); + } + }; + + _proto.forward = function forward() { + this.index++; + + if (this.previous() === '\n') { + this.lineno++; + this.colno = 0; + } else { + this.colno++; + } + }; + + _proto.backN = function backN(n) { + for (var i = 0; i < n; i++) { + this.back(); + } + }; + + _proto.back = function back() { + this.index--; + + if (this.current() === '\n') { + this.lineno--; + var idx = this.src.lastIndexOf('\n', this.index - 1); + + if (idx === -1) { + this.colno = this.index; + } else { + this.colno = this.index - idx; + } + } else { + this.colno--; + } + } // current returns current character + ; + + _proto.current = function current() { + if (!this.isFinished()) { + return this.str.charAt(this.index); + } + + return ''; + } // currentStr returns what's left of the unparsed string + ; + + _proto.currentStr = function currentStr() { + if (!this.isFinished()) { + return this.str.substr(this.index); + } + + return ''; + }; + + _proto.previous = function previous() { + return this.str.charAt(this.index - 1); + }; + + return Tokenizer; +}(); + +module.exports = { + lex: function lex(src, opts) { + return new Tokenizer(src, opts); + }, + TOKEN_STRING: TOKEN_STRING, + TOKEN_WHITESPACE: TOKEN_WHITESPACE, + TOKEN_DATA: TOKEN_DATA, + TOKEN_BLOCK_START: TOKEN_BLOCK_START, + TOKEN_BLOCK_END: TOKEN_BLOCK_END, + TOKEN_VARIABLE_START: TOKEN_VARIABLE_START, + TOKEN_VARIABLE_END: TOKEN_VARIABLE_END, + TOKEN_COMMENT: TOKEN_COMMENT, + TOKEN_LEFT_PAREN: TOKEN_LEFT_PAREN, + TOKEN_RIGHT_PAREN: TOKEN_RIGHT_PAREN, + TOKEN_LEFT_BRACKET: TOKEN_LEFT_BRACKET, + TOKEN_RIGHT_BRACKET: TOKEN_RIGHT_BRACKET, + TOKEN_LEFT_CURLY: TOKEN_LEFT_CURLY, + TOKEN_RIGHT_CURLY: TOKEN_RIGHT_CURLY, + TOKEN_OPERATOR: TOKEN_OPERATOR, + TOKEN_COMMA: TOKEN_COMMA, + TOKEN_COLON: TOKEN_COLON, + TOKEN_TILDE: TOKEN_TILDE, + TOKEN_PIPE: TOKEN_PIPE, + TOKEN_INT: TOKEN_INT, + TOKEN_FLOAT: TOKEN_FLOAT, + TOKEN_BOOLEAN: TOKEN_BOOLEAN, + TOKEN_NONE: TOKEN_NONE, + TOKEN_SYMBOL: TOKEN_SYMBOL, + TOKEN_SPECIAL: TOKEN_SPECIAL, + TOKEN_REGEX: TOKEN_REGEX +}; + +/***/ }), +/* 411 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: __webpack_require__(832), + ucs2length: __webpack_require__(435), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i new Tag(t)); + } + + /** + * @returns {ExternalDocs} + */ + externalDocs() { + if (!this._json.externalDocs) return null; + return new ExternalDocs(this._json.externalDocs); + } + + /** + * @returns {Object} + */ + bindings() { + return this._json.bindings || null; + } + + /** + * @param {string} name - Name of the binding. + * @returns {Object} + */ + binding(name) { + return this._json.bindings ? this._json.bindings[name] : null; + } +} + +module.exports = addExtensions(OperationTraitable); + + +/***/ }), +/* 417 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var ruleModules = __webpack_require__(383) + , toHash = __webpack_require__(855).toHash; + +module.exports = function rules() { + var RULES = [ + { type: 'number', + rules: [ { 'maximum': ['exclusiveMaximum'] }, + { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, + { type: 'string', + rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, + { type: 'array', + rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, + { type: 'object', + rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', + { 'properties': ['additionalProperties', 'patternProperties'] } ] }, + { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } + ]; + + var ALL = [ 'type', '$comment' ]; + var KEYWORDS = [ + '$schema', '$id', 'id', '$data', '$async', 'title', + 'description', 'default', 'definitions', + 'examples', 'readOnly', 'writeOnly', + 'contentMediaType', 'contentEncoding', + 'additionalItems', 'then', 'else' + ]; + var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; + RULES.all = toHash(ALL); + RULES.types = toHash(TYPES); + + RULES.forEach(function (group) { + group.rules = group.rules.map(function (keyword) { + var implKeywords; + if (typeof keyword == 'object') { + var key = Object.keys(keyword)[0]; + implKeywords = keyword[key]; + keyword = key; + implKeywords.forEach(function (k) { + ALL.push(k); + RULES.all[k] = true; + }); + } + ALL.push(keyword); + var rule = RULES.all[keyword] = { + keyword: keyword, + code: ruleModules[keyword], + implements: implKeywords + }; + return rule; + }); + + RULES.all.$comment = { + keyword: '$comment', + code: ruleModules.$comment + }; + + if (group.type) RULES.types[group.type] = group; + }); + + RULES.keywords = toHash(ALL.concat(KEYWORDS)); + RULES.custom = {}; + + return RULES; +}; + + +/***/ }), +/* 418 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const $Ref = __webpack_require__(289); +const Pointer = __webpack_require__(709); +const parse = __webpack_require__(756); +const url = __webpack_require__(639); + +module.exports = resolveExternal; + +/** + * Crawls the JSON schema, finds all external JSON references, and resolves their values. + * This method does not mutate the JSON schema. The resolved values are added to {@link $RefParser#$refs}. + * + * NOTE: We only care about EXTERNAL references here. INTERNAL references are only relevant when dereferencing. + * + * @param {$RefParser} parser + * @param {$RefParserOptions} options + * + * @returns {Promise} + * The promise resolves once all JSON references in the schema have been resolved, + * including nested references that are contained in externally-referenced files. + */ +function resolveExternal (parser, options) { + if (!options.resolve.external) { + // Nothing to resolve, so exit early + return Promise.resolve(); + } + + try { + // console.log('Resolving $ref pointers in %s', parser.$refs._root$Ref.path); + let promises = crawl(parser.schema, parser.$refs._root$Ref.path + "#", parser.$refs, options); + return Promise.all(promises); + } + catch (e) { + return Promise.reject(e); + } +} + +/** + * Recursively crawls the given value, and resolves any external JSON references. + * + * @param {*} obj - The value to crawl. If it's not an object or array, it will be ignored. + * @param {string} path - The full path of `obj`, possibly with a JSON Pointer in the hash + * @param {$Refs} $refs + * @param {$RefParserOptions} options + * + * @returns {Promise[]} + * Returns an array of promises. There will be one promise for each JSON reference in `obj`. + * If `obj` does not contain any JSON references, then the array will be empty. + * If any of the JSON references point to files that contain additional JSON references, + * then the corresponding promise will internally reference an array of promises. + */ +function crawl (obj, path, $refs, options) { + let promises = []; + + if (obj && typeof obj === "object") { + if ($Ref.isExternal$Ref(obj)) { + promises.push(resolve$Ref(obj, path, $refs, options)); + } + else { + for (let key of Object.keys(obj)) { + let keyPath = Pointer.join(path, key); + let value = obj[key]; + + if ($Ref.isExternal$Ref(value)) { + promises.push(resolve$Ref(value, keyPath, $refs, options)); + } + else { + promises = promises.concat(crawl(value, keyPath, $refs, options)); + } + } + } + } + + return promises; +} + +/** + * Resolves the given JSON Reference, and then crawls the resulting value. + * + * @param {{$ref: string}} $ref - The JSON Reference to resolve + * @param {string} path - The full path of `$ref`, possibly with a JSON Pointer in the hash + * @param {$Refs} $refs + * @param {$RefParserOptions} options + * + * @returns {Promise} + * The promise resolves once all JSON references in the object have been resolved, + * including nested references that are contained in externally-referenced files. + */ +async function resolve$Ref ($ref, path, $refs, options) { + // console.log('Resolving $ref pointer "%s" at %s', $ref.$ref, path); + + let resolvedPath = url.resolve(path, $ref.$ref); + let withoutHash = url.stripHash(resolvedPath); + + // Do we already have this $ref? + $ref = $refs._$refs[withoutHash]; + if ($ref) { + // We've already parsed this $ref, so use the existing value + return Promise.resolve($ref.value); + } + + // Parse the $referenced file/url + const result = await parse(resolvedPath, $refs, options); + + // Crawl the parsed value + // console.log('Resolving $ref pointers in %s', withoutHash); + let promises = crawl(result, withoutHash + "#", $refs, options); + + return Promise.all(promises); +} + + +/***/ }), +/* 419 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const $Ref = __webpack_require__(289); +const Pointer = __webpack_require__(709); +const { ono } = __webpack_require__(114); +const url = __webpack_require__(639); + +module.exports = dereference; + +/** + * Crawls the JSON schema, finds all JSON references, and dereferences them. + * This method mutates the JSON schema object, replacing JSON references with their resolved value. + * + * @param {$RefParser} parser + * @param {$RefParserOptions} options + */ +function dereference (parser, options) { + // console.log('Dereferencing $ref pointers in %s', parser.$refs._root$Ref.path); + let dereferenced = crawl(parser.schema, parser.$refs._root$Ref.path, "#", [], parser.$refs, options); + parser.$refs.circular = dereferenced.circular; + parser.schema = dereferenced.value; +} + +/** + * Recursively crawls the given value, and dereferences any JSON references. + * + * @param {*} obj - The value to crawl. If it's not an object or array, it will be ignored. + * @param {string} path - The full path of `obj`, possibly with a JSON Pointer in the hash + * @param {string} pathFromRoot - The path of `obj` from the schema root + * @param {object[]} parents - An array of the parent objects that have already been dereferenced + * @param {$Refs} $refs + * @param {$RefParserOptions} options + * @returns {{value: object, circular: boolean}} + */ +function crawl (obj, path, pathFromRoot, parents, $refs, options) { + let dereferenced; + let result = { + value: obj, + circular: false + }; + + if (obj && typeof obj === "object") { + parents.push(obj); + + if ($Ref.isAllowed$Ref(obj, options)) { + dereferenced = dereference$Ref(obj, path, pathFromRoot, parents, $refs, options); + result.circular = dereferenced.circular; + result.value = dereferenced.value; + } + else { + for (let key of Object.keys(obj)) { + let keyPath = Pointer.join(path, key); + let keyPathFromRoot = Pointer.join(pathFromRoot, key); + let value = obj[key]; + let circular = false; + + if ($Ref.isAllowed$Ref(value, options)) { + dereferenced = dereference$Ref(value, keyPath, keyPathFromRoot, parents, $refs, options); + circular = dereferenced.circular; + obj[key] = dereferenced.value; + } + else { + if (parents.indexOf(value) === -1) { + dereferenced = crawl(value, keyPath, keyPathFromRoot, parents, $refs, options); + circular = dereferenced.circular; + obj[key] = dereferenced.value; + } + else { + circular = foundCircularReference(keyPath, $refs, options); + } + } + + // Set the "isCircular" flag if this or any other property is circular + result.circular = result.circular || circular; + } + } + + parents.pop(); + } + + return result; +} + +/** + * Dereferences the given JSON Reference, and then crawls the resulting value. + * + * @param {{$ref: string}} $ref - The JSON Reference to resolve + * @param {string} path - The full path of `$ref`, possibly with a JSON Pointer in the hash + * @param {string} pathFromRoot - The path of `$ref` from the schema root + * @param {object[]} parents - An array of the parent objects that have already been dereferenced + * @param {$Refs} $refs + * @param {$RefParserOptions} options + * @returns {{value: object, circular: boolean}} + */ +function dereference$Ref ($ref, path, pathFromRoot, parents, $refs, options) { + // console.log('Dereferencing $ref pointer "%s" at %s', $ref.$ref, path); + + let $refPath = url.resolve(path, $ref.$ref); + let pointer = $refs._resolve($refPath, options); + + // Check for circular references + let directCircular = pointer.circular; + let circular = directCircular || parents.indexOf(pointer.value) !== -1; + circular && foundCircularReference(path, $refs, options); + + // Dereference the JSON reference + let dereferencedValue = $Ref.dereference($ref, pointer.value); + + // Crawl the dereferenced value (unless it's circular) + if (!circular) { + // Determine if the dereferenced value is circular + let dereferenced = crawl(dereferencedValue, pointer.path, pathFromRoot, parents, $refs, options); + circular = dereferenced.circular; + dereferencedValue = dereferenced.value; + } + + if (circular && !directCircular && options.dereference.circular === "ignore") { + // The user has chosen to "ignore" circular references, so don't change the value + dereferencedValue = $ref; + } + + if (directCircular) { + // The pointer is a DIRECT circular reference (i.e. it references itself). + // So replace the $ref path with the absolute path from the JSON Schema root + dereferencedValue.$ref = pathFromRoot; + } + + return { + circular, + value: dereferencedValue + }; +} + +/** + * Called when a circular reference is found. + * It sets the {@link $Refs#circular} flag, and throws an error if options.dereference.circular is false. + * + * @param {string} keyPath - The JSON Reference path of the circular reference + * @param {$Refs} $refs + * @param {$RefParserOptions} options + * @returns {boolean} - always returns true, to indicate that a circular reference was found + */ +function foundCircularReference (keyPath, $refs, options) { + $refs.circular = true; + if (!options.dereference.circular) { + throw ono.reference(`Circular $ref pointer found at ${keyPath}`); + } + return true; +} + + +/***/ }), +/* 420 */, +/* 421 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const fs = __webpack_require__(747); +const readdirp = __webpack_require__(131); + +const paramParser = function(input) { + const params = {}; + + if (!input) return params; + if (!input.includes('=')) throw new Error(`Invalid param ${input}. It must be in the format of name=value.`); + + input.split(' ').forEach(el => { + const chunks = el.split('='); + const paramName = chunks[0]; + const paramValue = chunks[1]; + params[paramName] = paramValue; + }); + + return params; +}; + +const createOutputDir = function(dir) { + if (typeof dir === 'string' && !fs.existsSync(dir)) { + fs.mkdirSync(dir); + } + return dir; +}; + +const listOutputFiles = async function(dir) { + let files = ''; + for await (const file of readdirp(dir)) { + files += `${file.path};`; + } + return files; +}; + +module.exports = { + paramParser, + createOutputDir, + listOutputFiles +}; + + +/***/ }), +/* 422 */, +/* 423 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var asap = __webpack_require__(927); + +var _waterfall = __webpack_require__(730); + +var lib = __webpack_require__(388); + +var compiler = __webpack_require__(377); + +var filters = __webpack_require__(891); + +var _require = __webpack_require__(224), + FileSystemLoader = _require.FileSystemLoader, + WebLoader = _require.WebLoader, + PrecompiledLoader = _require.PrecompiledLoader; + +var tests = __webpack_require__(812); + +var globals = __webpack_require__(125); + +var _require2 = __webpack_require__(332), + Obj = _require2.Obj, + EmitterObj = _require2.EmitterObj; + +var globalRuntime = __webpack_require__(575); + +var handleError = globalRuntime.handleError, + Frame = globalRuntime.Frame; + +var expressApp = __webpack_require__(149); // If the user is using the async API, *always* call it +// asynchronously even if the template was synchronous. + + +function callbackAsap(cb, err, res) { + asap(function () { + cb(err, res); + }); +} +/** + * A no-op template, for use with {% include ignore missing %} + */ + + +var noopTmplSrc = { + type: 'code', + obj: { + root: function root(env, context, frame, runtime, cb) { + try { + cb(null, ''); + } catch (e) { + cb(handleError(e, null, null)); + } + } + } +}; + +var Environment = /*#__PURE__*/function (_EmitterObj) { + _inheritsLoose(Environment, _EmitterObj); + + function Environment() { + return _EmitterObj.apply(this, arguments) || this; + } + + var _proto = Environment.prototype; + + _proto.init = function init(loaders, opts) { + var _this = this; + + // The dev flag determines the trace that'll be shown on errors. + // If set to true, returns the full trace from the error point, + // otherwise will return trace starting from Template.render + // (the full trace from within nunjucks may confuse developers using + // the library) + // defaults to false + opts = this.opts = opts || {}; + this.opts.dev = !!opts.dev; // The autoescape flag sets global autoescaping. If true, + // every string variable will be escaped by default. + // If false, strings can be manually escaped using the `escape` filter. + // defaults to true + + this.opts.autoescape = opts.autoescape != null ? opts.autoescape : true; // If true, this will make the system throw errors if trying + // to output a null or undefined value + + this.opts.throwOnUndefined = !!opts.throwOnUndefined; + this.opts.trimBlocks = !!opts.trimBlocks; + this.opts.lstripBlocks = !!opts.lstripBlocks; + this.loaders = []; + + if (!loaders) { + // The filesystem loader is only available server-side + if (FileSystemLoader) { + this.loaders = [new FileSystemLoader('views')]; + } else if (WebLoader) { + this.loaders = [new WebLoader('/views')]; + } + } else { + this.loaders = lib.isArray(loaders) ? loaders : [loaders]; + } // It's easy to use precompiled templates: just include them + // before you configure nunjucks and this will automatically + // pick it up and use it + + + if (typeof window !== 'undefined' && window.nunjucksPrecompiled) { + this.loaders.unshift(new PrecompiledLoader(window.nunjucksPrecompiled)); + } + + this._initLoaders(); + + this.globals = globals(); + this.filters = {}; + this.tests = {}; + this.asyncFilters = []; + this.extensions = {}; + this.extensionsList = []; + + lib._entries(filters).forEach(function (_ref) { + var name = _ref[0], + filter = _ref[1]; + return _this.addFilter(name, filter); + }); + + lib._entries(tests).forEach(function (_ref2) { + var name = _ref2[0], + test = _ref2[1]; + return _this.addTest(name, test); + }); + }; + + _proto._initLoaders = function _initLoaders() { + var _this2 = this; + + this.loaders.forEach(function (loader) { + // Caching and cache busting + loader.cache = {}; + + if (typeof loader.on === 'function') { + loader.on('update', function (name, fullname) { + loader.cache[name] = null; + + _this2.emit('update', name, fullname, loader); + }); + loader.on('load', function (name, source) { + _this2.emit('load', name, source, loader); + }); + } + }); + }; + + _proto.invalidateCache = function invalidateCache() { + this.loaders.forEach(function (loader) { + loader.cache = {}; + }); + }; + + _proto.addExtension = function addExtension(name, extension) { + extension.__name = name; + this.extensions[name] = extension; + this.extensionsList.push(extension); + return this; + }; + + _proto.removeExtension = function removeExtension(name) { + var extension = this.getExtension(name); + + if (!extension) { + return; + } + + this.extensionsList = lib.without(this.extensionsList, extension); + delete this.extensions[name]; + }; + + _proto.getExtension = function getExtension(name) { + return this.extensions[name]; + }; + + _proto.hasExtension = function hasExtension(name) { + return !!this.extensions[name]; + }; + + _proto.addGlobal = function addGlobal(name, value) { + this.globals[name] = value; + return this; + }; + + _proto.getGlobal = function getGlobal(name) { + if (typeof this.globals[name] === 'undefined') { + throw new Error('global not found: ' + name); + } + + return this.globals[name]; + }; + + _proto.addFilter = function addFilter(name, func, async) { + var wrapped = func; + + if (async) { + this.asyncFilters.push(name); + } + + this.filters[name] = wrapped; + return this; + }; + + _proto.getFilter = function getFilter(name) { + if (!this.filters[name]) { + throw new Error('filter not found: ' + name); + } + + return this.filters[name]; + }; + + _proto.addTest = function addTest(name, func) { + this.tests[name] = func; + return this; + }; + + _proto.getTest = function getTest(name) { + if (!this.tests[name]) { + throw new Error('test not found: ' + name); + } + + return this.tests[name]; + }; + + _proto.resolveTemplate = function resolveTemplate(loader, parentName, filename) { + var isRelative = loader.isRelative && parentName ? loader.isRelative(filename) : false; + return isRelative && loader.resolve ? loader.resolve(parentName, filename) : filename; + }; + + _proto.getTemplate = function getTemplate(name, eagerCompile, parentName, ignoreMissing, cb) { + var _this3 = this; + + var that = this; + var tmpl = null; + + if (name && name.raw) { + // this fixes autoescape for templates referenced in symbols + name = name.raw; + } + + if (lib.isFunction(parentName)) { + cb = parentName; + parentName = null; + eagerCompile = eagerCompile || false; + } + + if (lib.isFunction(eagerCompile)) { + cb = eagerCompile; + eagerCompile = false; + } + + if (name instanceof Template) { + tmpl = name; + } else if (typeof name !== 'string') { + throw new Error('template names must be a string: ' + name); + } else { + for (var i = 0; i < this.loaders.length; i++) { + var loader = this.loaders[i]; + tmpl = loader.cache[this.resolveTemplate(loader, parentName, name)]; + + if (tmpl) { + break; + } + } + } + + if (tmpl) { + if (eagerCompile) { + tmpl.compile(); + } + + if (cb) { + cb(null, tmpl); + return undefined; + } else { + return tmpl; + } + } + + var syncResult; + + var createTemplate = function createTemplate(err, info) { + if (!info && !err && !ignoreMissing) { + err = new Error('template not found: ' + name); + } + + if (err) { + if (cb) { + cb(err); + return; + } else { + throw err; + } + } + + var newTmpl; + + if (!info) { + newTmpl = new Template(noopTmplSrc, _this3, '', eagerCompile); + } else { + newTmpl = new Template(info.src, _this3, info.path, eagerCompile); + + if (!info.noCache) { + info.loader.cache[name] = newTmpl; + } + } + + if (cb) { + cb(null, newTmpl); + } else { + syncResult = newTmpl; + } + }; + + lib.asyncIter(this.loaders, function (loader, i, next, done) { + function handle(err, src) { + if (err) { + done(err); + } else if (src) { + src.loader = loader; + done(null, src); + } else { + next(); + } + } // Resolve name relative to parentName + + + name = that.resolveTemplate(loader, parentName, name); + + if (loader.async) { + loader.getSource(name, handle); + } else { + handle(null, loader.getSource(name)); + } + }, createTemplate); + return syncResult; + }; + + _proto.express = function express(app) { + return expressApp(this, app); + }; + + _proto.render = function render(name, ctx, cb) { + if (lib.isFunction(ctx)) { + cb = ctx; + ctx = null; + } // We support a synchronous API to make it easier to migrate + // existing code to async. This works because if you don't do + // anything async work, the whole thing is actually run + // synchronously. + + + var syncResult = null; + this.getTemplate(name, function (err, tmpl) { + if (err && cb) { + callbackAsap(cb, err); + } else if (err) { + throw err; + } else { + syncResult = tmpl.render(ctx, cb); + } + }); + return syncResult; + }; + + _proto.renderString = function renderString(src, ctx, opts, cb) { + if (lib.isFunction(opts)) { + cb = opts; + opts = {}; + } + + opts = opts || {}; + var tmpl = new Template(src, this, opts.path); + return tmpl.render(ctx, cb); + }; + + _proto.waterfall = function waterfall(tasks, callback, forceAsync) { + return _waterfall(tasks, callback, forceAsync); + }; + + return Environment; +}(EmitterObj); + +var Context = /*#__PURE__*/function (_Obj) { + _inheritsLoose(Context, _Obj); + + function Context() { + return _Obj.apply(this, arguments) || this; + } + + var _proto2 = Context.prototype; + + _proto2.init = function init(ctx, blocks, env) { + var _this4 = this; + + // Has to be tied to an environment so we can tap into its globals. + this.env = env || new Environment(); // Make a duplicate of ctx + + this.ctx = lib.extend({}, ctx); + this.blocks = {}; + this.exported = []; + lib.keys(blocks).forEach(function (name) { + _this4.addBlock(name, blocks[name]); + }); + }; + + _proto2.lookup = function lookup(name) { + // This is one of the most called functions, so optimize for + // the typical case where the name isn't in the globals + if (name in this.env.globals && !(name in this.ctx)) { + return this.env.globals[name]; + } else { + return this.ctx[name]; + } + }; + + _proto2.setVariable = function setVariable(name, val) { + this.ctx[name] = val; + }; + + _proto2.getVariables = function getVariables() { + return this.ctx; + }; + + _proto2.addBlock = function addBlock(name, block) { + this.blocks[name] = this.blocks[name] || []; + this.blocks[name].push(block); + return this; + }; + + _proto2.getBlock = function getBlock(name) { + if (!this.blocks[name]) { + throw new Error('unknown block "' + name + '"'); + } + + return this.blocks[name][0]; + }; + + _proto2.getSuper = function getSuper(env, name, block, frame, runtime, cb) { + var idx = lib.indexOf(this.blocks[name] || [], block); + var blk = this.blocks[name][idx + 1]; + var context = this; + + if (idx === -1 || !blk) { + throw new Error('no super block available for "' + name + '"'); + } + + blk(env, context, frame, runtime, cb); + }; + + _proto2.addExport = function addExport(name) { + this.exported.push(name); + }; + + _proto2.getExported = function getExported() { + var _this5 = this; + + var exported = {}; + this.exported.forEach(function (name) { + exported[name] = _this5.ctx[name]; + }); + return exported; + }; + + return Context; +}(Obj); + +var Template = /*#__PURE__*/function (_Obj2) { + _inheritsLoose(Template, _Obj2); + + function Template() { + return _Obj2.apply(this, arguments) || this; + } + + var _proto3 = Template.prototype; + + _proto3.init = function init(src, env, path, eagerCompile) { + this.env = env || new Environment(); + + if (lib.isObject(src)) { + switch (src.type) { + case 'code': + this.tmplProps = src.obj; + break; + + case 'string': + this.tmplStr = src.obj; + break; + + default: + throw new Error("Unexpected template object type " + src.type + "; expected 'code', or 'string'"); + } + } else if (lib.isString(src)) { + this.tmplStr = src; + } else { + throw new Error('src must be a string or an object describing the source'); + } + + this.path = path; + + if (eagerCompile) { + try { + this._compile(); + } catch (err) { + throw lib._prettifyError(this.path, this.env.opts.dev, err); + } + } else { + this.compiled = false; + } + }; + + _proto3.render = function render(ctx, parentFrame, cb) { + var _this6 = this; + + if (typeof ctx === 'function') { + cb = ctx; + ctx = {}; + } else if (typeof parentFrame === 'function') { + cb = parentFrame; + parentFrame = null; + } // If there is a parent frame, we are being called from internal + // code of another template, and the internal system + // depends on the sync/async nature of the parent template + // to be inherited, so force an async callback + + + var forceAsync = !parentFrame; // Catch compile errors for async rendering + + try { + this.compile(); + } catch (e) { + var err = lib._prettifyError(this.path, this.env.opts.dev, e); + + if (cb) { + return callbackAsap(cb, err); + } else { + throw err; + } + } + + var context = new Context(ctx || {}, this.blocks, this.env); + var frame = parentFrame ? parentFrame.push(true) : new Frame(); + frame.topLevel = true; + var syncResult = null; + var didError = false; + this.rootRenderFunc(this.env, context, frame, globalRuntime, function (err, res) { + if (didError) { + // prevent multiple calls to cb + if (cb) { + return; + } else { + throw err; + } + } + + if (err) { + err = lib._prettifyError(_this6.path, _this6.env.opts.dev, err); + didError = true; + } + + if (cb) { + if (forceAsync) { + callbackAsap(cb, err, res); + } else { + cb(err, res); + } + } else { + if (err) { + throw err; + } + + syncResult = res; + } + }); + return syncResult; + }; + + _proto3.getExported = function getExported(ctx, parentFrame, cb) { + // eslint-disable-line consistent-return + if (typeof ctx === 'function') { + cb = ctx; + ctx = {}; + } + + if (typeof parentFrame === 'function') { + cb = parentFrame; + parentFrame = null; + } // Catch compile errors for async rendering + + + try { + this.compile(); + } catch (e) { + if (cb) { + return cb(e); + } else { + throw e; + } + } + + var frame = parentFrame ? parentFrame.push() : new Frame(); + frame.topLevel = true; // Run the rootRenderFunc to populate the context with exported vars + + var context = new Context(ctx || {}, this.blocks, this.env); + this.rootRenderFunc(this.env, context, frame, globalRuntime, function (err) { + if (err) { + cb(err, null); + } else { + cb(null, context.getExported()); + } + }); + }; + + _proto3.compile = function compile() { + if (!this.compiled) { + this._compile(); + } + }; + + _proto3._compile = function _compile() { + var props; + + if (this.tmplProps) { + props = this.tmplProps; + } else { + var source = compiler.compile(this.tmplStr, this.env.asyncFilters, this.env.extensionsList, this.path, this.env.opts); + var func = new Function(source); // eslint-disable-line no-new-func + + props = func(); + } + + this.blocks = this._getBlocks(props); + this.rootRenderFunc = props.root; + this.compiled = true; + }; + + _proto3._getBlocks = function _getBlocks(props) { + var blocks = {}; + lib.keys(props).forEach(function (k) { + if (k.slice(0, 2) === 'b_') { + blocks[k.slice(2)] = props[k]; + } + }); + return blocks; + }; + + return Template; +}(Obj); + +module.exports = { + Environment: Environment, + Template: Template +}; + +/***/ }), +/* 424 */, +/* 425 */, +/* 426 */ +/***/ (function(module) { + +"use strict"; + + + +var Cache = module.exports = function Cache() { + this._cache = {}; +}; + + +Cache.prototype.put = function Cache_put(key, value) { + this._cache[key] = value; +}; + + +Cache.prototype.get = function Cache_get(key) { + return this._cache[key]; +}; + + +Cache.prototype.del = function Cache_del(key) { + delete this._cache[key]; +}; + + +Cache.prototype.clear = function Cache_clear() { + this._cache = {}; +}; + + +/***/ }), +/* 427 */, +/* 428 */, +/* 429 */, +/* 430 */, +/* 431 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = __importStar(__webpack_require__(87)); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return (s || '') + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return (s || '') + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), +/* 432 */, +/* 433 */, +/* 434 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 435 */ +/***/ (function(module) { + +"use strict"; + + +// https://mathiasbynens.be/notes/javascript-encoding +// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode +module.exports = function ucs2length(str) { + var length = 0 + , len = str.length + , pos = 0 + , value; + while (pos < len) { + length++; + value = str.charCodeAt(pos++); + if (value >= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + + +/***/ }), +/* 436 */, +/* 437 */, +/* 438 */, +/* 439 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_dependencies(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $schemaDeps = {}, + $propertyDeps = {}, + $ownProperties = it.opts.ownProperties; + for ($property in $schema) { + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } + out += 'var ' + ($errs) + ' = errors;'; + var $currentErrorPath = it.errorPath; + out += 'var missing' + ($lvl) + ';'; + for (var $property in $propertyDeps) { + $deps = $propertyDeps[$property]; + if ($deps.length) { + out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + if ($breakOnError) { + out += ' && ( '; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ')) { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + out += ' ) { '; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + } + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; + for (var $property in $schemaDeps) { + var $sch = $schemaDeps[$property]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 440 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var MissingRefError = __webpack_require__(77).MissingRef; + +module.exports = compileAsync; + + +/** + * Creates validating function for passed schema with asynchronous loading of missing schemas. + * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped + * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function. + * @return {Promise} promise that resolves with a validating function. + */ +function compileAsync(schema, meta, callback) { + /* eslint no-shadow: 0 */ + /* global Promise */ + /* jshint validthis: true */ + var self = this; + if (typeof this._opts.loadSchema != 'function') + throw new Error('options.loadSchema should be a function'); + + if (typeof meta == 'function') { + callback = meta; + meta = undefined; + } + + var p = loadMetaSchemaOf(schema).then(function () { + var schemaObj = self._addSchema(schema, undefined, meta); + return schemaObj.validate || _compileAsync(schemaObj); + }); + + if (callback) { + p.then( + function(v) { callback(null, v); }, + callback + ); + } + + return p; + + + function loadMetaSchemaOf(sch) { + var $schema = sch.$schema; + return $schema && !self.getSchema($schema) + ? compileAsync.call(self, { $ref: $schema }, true) + : Promise.resolve(); + } + + + function _compileAsync(schemaObj) { + try { return self._compile(schemaObj); } + catch(e) { + if (e instanceof MissingRefError) return loadMissingSchema(e); + throw e; + } + + + function loadMissingSchema(e) { + var ref = e.missingSchema; + if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'); + + var schemaPromise = self._loadingSchemas[ref]; + if (!schemaPromise) { + schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref); + schemaPromise.then(removePromise, removePromise); + } + + return schemaPromise.then(function (sch) { + if (!added(ref)) { + return loadMetaSchemaOf(sch).then(function () { + if (!added(ref)) self.addSchema(sch, ref, undefined, meta); + }); + } + }).then(function() { + return _compileAsync(schemaObj); + }); + + function removePromise() { + delete self._loadingSchemas[ref]; + } + + function added(ref) { + return self._refs[ref] || self._schemas[ref]; + } + } + } +} + + +/***/ }), +/* 441 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const fill = __webpack_require__(460); +const stringify = __webpack_require__(382); +const utils = __webpack_require__(225); + +const append = (queue = '', stash = '', enclose = false) => { + let result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; + + let walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; + + +/***/ }), +/* 442 */, +/* 443 */, +/* 444 */, +/* 445 */, +/* 446 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const path = __webpack_require__(622); +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + SEP: path.sep, + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; + + +/***/ }), +/* 447 */, +/* 448 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + +var escapeStringRegexp = __webpack_require__(138); + +module.exports = function (str, sub) { + if (typeof str !== 'string' || typeof sub !== 'string') { + throw new TypeError(); + } + + sub = escapeStringRegexp(sub); + return str.replace(new RegExp('^' + sub + '|' + sub + '$', 'g'), ''); +}; + + +/***/ }), +/* 449 */, +/* 450 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const wap = __webpack_require__(284).WebApiParser +const yaml = __webpack_require__(414) +const utils = __webpack_require__(199) + +/** + * Convert JSON schema to RAML Library. + * + * @param {string} jsonData - JSON file content. + * @param {string} typeName - Name of RAML data type to hold converted data. + * @param {object} options - Options to use in conversion: + * basePath: Resolve references relative to this path. + * validate: Validate output RAML with webapi-parser. + * @return {object} RAML 1.0 Library containing converted type. + */ +async function js2dt (jsonData, typeName, options = {}) { + const schema = { + swagger: '2.0', + definitions: {}, + paths: {} + } + schema.paths[`/for/conversion/${typeName}`] = { + get: { + responses: { + 200: { + schema: { + $ref: `#/definitions/${typeName}` + } + } + } + } + } + schema.definitions[typeName] = JSON.parse(jsonData) + const schemaString = JSON.stringify(schema) + + let model + if (options.basePath) { + const location = utils.genBasePathLocation(options.basePath, 'json') + model = await wap.oas20.parse(schemaString, location) + } else { + model = await wap.oas20.parse(schemaString) + } + + const resolved = await wap.oas20.resolve(model) + const raml = getDeclarationByName(resolved, typeName) + if (options.validate) { + await validateRaml(raml) + } + return yaml.safeLoad(raml) +} + +/* Wrapper function to ease testing */ +function getDeclarationByName (model, typeName) { + try { + return model.getDeclarationByName(typeName).toRamlDatatype + } catch (err) { + throw new Error( + `Failed to convert to RAML Library: ${err.toString()}`) + } +} + +/** + * Validates RAML. + * + * @param {string} ramlStr - RAML 1.0 Library string. + * @throws {Error} Invalid RAML Data Type. + */ +async function validateRaml (ramlStr) { + const model = await wap.raml10.parse(ramlStr) + const report = await wap.raml10.validate(model) + if (!report.conforms) { + throw new Error(`Invalid RAML: ${report.results[0].message}`) + } +} + +module.exports.js2dt = js2dt + + +/***/ }), +/* 451 */ +/***/ (function(module) { + +"use strict"; + + +var KEYWORDS = [ + 'multipleOf', + 'maximum', + 'exclusiveMaximum', + 'minimum', + 'exclusiveMinimum', + 'maxLength', + 'minLength', + 'pattern', + 'additionalItems', + 'maxItems', + 'minItems', + 'uniqueItems', + 'maxProperties', + 'minProperties', + 'required', + 'additionalProperties', + 'enum', + 'format', + 'const' +]; + +module.exports = function (metaSchema, keywordsJsonPointers) { + for (var i=0; i 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; + + +/***/ }), +/* 455 */, +/* 456 */, +/* 457 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +/*eslint-disable max-len,no-use-before-define*/ + +var common = __webpack_require__(740); +var YAMLException = __webpack_require__(556); +var Mark = __webpack_require__(180); +var DEFAULT_SAFE_SCHEMA = __webpack_require__(570); +var DEFAULT_FULL_SCHEMA = __webpack_require__(910); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only assigned to plain scalars. So, it isn't + // needed to check for 'kind' conformity. + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + var documents = loadDocuments(input, options), index, length; + + if (typeof iterator !== 'function') { + return documents; + } + + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, output, options) { + if (typeof output === 'function') { + loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } else { + return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } +} + + +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; + + +/***/ }), +/* 458 */, +/* 459 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 460 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +const util = __webpack_require__(669); +const toRegexRange = __webpack_require__(789); + +const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); + +const transform = toNumber => { + return value => toNumber === true ? Number(value) : String(value); +}; + +const isValidValue = value => { + return typeof value === 'number' || (typeof value === 'string' && value !== ''); +}; + +const isNumber = num => Number.isInteger(+num); + +const zeros = input => { + let value = `${input}`; + let index = -1; + if (value[0] === '-') value = value.slice(1); + if (value === '0') return false; + while (value[++index] === '0'); + return index > 0; +}; + +const stringify = (start, end, options) => { + if (typeof start === 'string' || typeof end === 'string') { + return true; + } + return options.stringify === true; +}; + +const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === '-' ? '-' : ''; + if (dash) input = input.slice(1); + input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); + } + if (toNumber === false) { + return String(input); + } + return input; +}; + +const toMaxLen = (input, maxLength) => { + let negative = input[0] === '-' ? '-' : ''; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = '0' + input; + return negative ? ('-' + input) : input; +}; + +const toSequence = (parts, options) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + + let prefix = options.capture ? '' : '?:'; + let positives = ''; + let negatives = ''; + let result; + + if (parts.positives.length) { + positives = parts.positives.join('|'); + } + + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.join('|')})`; + } + + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + + if (options.wrap) { + return `(${prefix}${result})`; + } + + return result; +}; + +const toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange(a, b, { wrap: false, ...options }); + } + + let start = String.fromCharCode(a); + if (a === b) return start; + + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; +}; + +const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? '' : '?:'; + return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); + } + return toRegexRange(start, end, options); +}; + +const rangeError = (...args) => { + return new RangeError('Invalid range arguments: ' + util.inspect(...args)); +}; + +const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; +}; + +const invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; +}; + +const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + + // fix negative zero + if (a === 0) a = 0; + if (b === 0) b = 0; + + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + + let parts = { negatives: [], positives: [] }; + let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return step > 1 + ? toSequence(parts, options) + : toRegex(range, null, { wrap: false, ...options }); + } + + return range; +}; + +const fillLetters = (start, end, step = 1, options = {}) => { + if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { + return invalidRange(start, end, options); + } + + + let format = options.transform || (val => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + + return range; +}; + +const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + + if (typeof step === 'function') { + return fill(start, end, 1, { transform: step }); + } + + if (isObject(step)) { + return fill(start, end, 0, step); + } + + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + + if (!isNumber(step)) { + if (step != null && !isObject(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + + if (isNumber(start) && isNumber(end)) { + return fillNumbers(start, end, step, opts); + } + + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); +}; + +module.exports = fill; + + +/***/ }), +/* 461 */, +/* 462 */, +/* 463 */, +/* 464 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + + +/***/ }), +/* 465 */, +/* 466 */ +/***/ (function(module) { + + +module.exports = MoveSummary; + +/** + * The MoveSummary is returned as a response to getting `git().status()` + * + * @constructor + */ +function MoveSummary () { + this.moves = []; + this.sources = {}; +} + +MoveSummary.SUMMARY_REGEX = /^Renaming (.+) to (.+)$/; + +MoveSummary.parse = function (text) { + var lines = text.split('\n'); + var summary = new MoveSummary(); + + for (var i = 0, iMax = lines.length, line; i < iMax; i++) { + line = MoveSummary.SUMMARY_REGEX.exec(lines[i].trim()); + + if (line) { + summary.moves.push({ + from: line[1], + to: line[2] + }); + } + } + + return summary; +}; + + +/***/ }), +/* 467 */, +/* 468 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 469 */, +/* 470 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const command_1 = __webpack_require__(431); +const os = __importStar(__webpack_require__(87)); +const path = __importStar(__webpack_require__(622)); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable + */ +function exportVariable(name, val) { + process.env[name] = val; + command_1.issueCommand('set-env', { name }, val); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + command_1.issueCommand('add-path', {}, inputPath); + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store + */ +function setOutput(name, value) { + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message + */ +function error(message) { + command_1.issue('error', message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message + */ +function warning(message) { + command_1.issue('warning', message); +} +exports.warning = warning; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store + */ +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +//# sourceMappingURL=core.js.map + +/***/ }), +/* 471 */, +/* 472 */, +/* 473 */, +/* 474 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const parser = __webpack_require__(903); + +const noop = () => {}; // No operation + +parser.registerSchemaParser([ + 'application/vnd.aai.asyncapi;version=2.0.0', + 'application/vnd.aai.asyncapi+json;version=2.0.0', + 'application/vnd.aai.asyncapi+yaml;version=2.0.0', + 'application/schema;version=draft-07', + 'application/schema+json;version=draft-07', + 'application/schema+yaml;version=draft-07', +], noop); + +module.exports = parser; + + +/***/ }), +/* 475 */, +/* 476 */ +/***/ (function(module) { + +"use strict"; + + +var $Object = Object; +var $TypeError = TypeError; + +module.exports = function flags() { + if (this != null && this !== $Object(this)) { + throw new $TypeError('RegExp.prototype.flags getter called on non-object'); + } + var result = ''; + if (this.global) { + result += 'g'; + } + if (this.ignoreCase) { + result += 'i'; + } + if (this.multiline) { + result += 'm'; + } + if (this.dotAll) { + result += 's'; + } + if (this.unicode) { + result += 'u'; + } + if (this.sticky) { + result += 'y'; + } + return result; +}; + + +/***/ }), +/* 477 */, +/* 478 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +(function () { + + 'use strict'; + + var debug = __webpack_require__(784)('simple-git'); + var deferred = __webpack_require__(25); + var exists = __webpack_require__(726); + var NOOP = function () {}; + var responses = __webpack_require__(898); + + /** + * Git handling for node. All public functions can be chained and all `then` handlers are optional. + * + * @param {string} baseDir base directory for all processes to run + * + * @param {Object} ChildProcess The ChildProcess module + * @param {Function} Buffer The Buffer implementation to use + * + * @constructor + */ + function Git (baseDir, ChildProcess, Buffer) { + this._baseDir = baseDir; + this._runCache = []; + + this.ChildProcess = ChildProcess; + this.Buffer = Buffer; + } + + /** + * @type {string} The command to use to reference the git binary + */ + Git.prototype._command = 'git'; + + /** + * @type {[key: string]: string} An object of key=value pairs to be passed as environment variables to the + * spawned child process. + */ + Git.prototype._env = null; + + /** + * @type {Function} An optional handler to use when a child process is created + */ + Git.prototype._outputHandler = null; + + /** + * @type {boolean} Property showing whether logging will be silenced - defaults to true in a production environment + */ + Git.prototype._silentLogging = /prod/.test(process.env.NODE_ENV); + + /** + * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on + * the system path, or a fully qualified path to the executable. + * + * @param {string} command + * @returns {Git} + */ + Git.prototype.customBinary = function (command) { + this._command = command; + return this; + }; + + /** + * Sets an environment variable for the spawned child process, either supply both a name and value as strings or + * a single object to entirely replace the current environment variables. + * + * @param {string|Object} name + * @param {string} [value] + * @returns {Git} + */ + Git.prototype.env = function (name, value) { + if (arguments.length === 1 && typeof name === 'object') { + this._env = name; + } + else { + (this._env = this._env || {})[name] = value; + } + + return this; + }; + + /** + * Sets the working directory of the subsequent commands. + * + * @param {string} workingDirectory + * @param {Function} [then] + * @returns {Git} + */ + Git.prototype.cwd = function (workingDirectory, then) { + var git = this; + var next = Git.trailingFunctionArgument(arguments); + + return this.exec(function () { + git._baseDir = workingDirectory; + if (!exists(workingDirectory, exists.FOLDER)) { + Git.exception(git, 'Git.cwd: cannot change to non-directory "' + workingDirectory + '"', next); + } + else { + next && next(null, workingDirectory); + } + }); + }; + + /** + * Sets a handler function to be called whenever a new child process is created, the handler function will be called + * with the name of the command being run and the stdout & stderr streams used by the ChildProcess. + * + * @example + * require('simple-git') + * .outputHandler(function (command, stdout, stderr) { + * stdout.pipe(process.stdout); + * }) + * .checkout('https://github.com/user/repo.git'); + * + * @see https://nodejs.org/api/child_process.html#child_process_class_childprocess + * @see https://nodejs.org/api/stream.html#stream_class_stream_readable + * @param {Function} outputHandler + * @returns {Git} + */ + Git.prototype.outputHandler = function (outputHandler) { + this._outputHandler = outputHandler; + return this; + }; + + /** + * Initialize a git repo + * + * @param {Boolean} [bare=false] + * @param {Function} [then] + */ + Git.prototype.init = function (bare, then) { + var commands = ['init']; + var next = Git.trailingFunctionArgument(arguments); + + if (bare === true) { + commands.push('--bare'); + } + + return this._run(commands, function (err) { + next && next(err); + }); + }; + + /** + * Check the status of the local repo + * + * @param {Function} [then] + */ + Git.prototype.status = function (then) { + return this._run( + ['status', '--porcelain', '-b', '-u'], + Git._responseHandler(then, 'StatusSummary') + ); + }; + + /** + * List the stash(s) of the local repo + * + * @param {Object|Array} [options] + * @param {Function} [then] + */ + Git.prototype.stashList = function (options, then) { + var handler = Git.trailingFunctionArgument(arguments); + var opt = (handler === then ? options : null) || {}; + + var splitter = opt.splitter || requireResponseHandler('ListLogSummary').SPLITTER; + var command = ["stash", "list", "--pretty=format:" + + requireResponseHandler('ListLogSummary').START_BOUNDARY + + "%H %ai %s%d %aN %ae".replace(/\s+/g, splitter) + + requireResponseHandler('ListLogSummary').COMMIT_BOUNDARY + ]; + + if (Array.isArray(opt)) { + command = command.concat(opt); + } + + return this._run(command, + Git._responseHandler(handler, 'ListLogSummary', splitter) + ); + }; + + /** + * Stash the local repo + * + * @param {Object|Array} [options] + * @param {Function} [then] + */ + Git.prototype.stash = function (options, then) { + var command = ['stash']; + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + command.push.apply(command, Git.trailingArrayArgument(arguments)); + + return this._run(command, Git._responseHandler(Git.trailingFunctionArgument(arguments))); + }; + + /** + * Clone a git repo + * + * @param {string} repoPath + * @param {string} localPath + * @param {String[]} [options] Optional array of options to pass through to the clone command + * @param {Function} [then] + */ + Git.prototype.clone = function (repoPath, localPath, options, then) { + var next = Git.trailingFunctionArgument(arguments); + var command = ['clone'].concat(Git.trailingArrayArgument(arguments)); + + for (var i = 0, iMax = arguments.length; i < iMax; i++) { + if (typeof arguments[i] === 'string') { + command.push(arguments[i]); + } + } + + return this._run(command, function (err, data) { + next && next(err, data); + }); + }; + + /** + * Mirror a git repo + * + * @param {string} repoPath + * @param {string} localPath + * @param {Function} [then] + */ + Git.prototype.mirror = function (repoPath, localPath, then) { + return this.clone(repoPath, localPath, ['--mirror'], then); + }; + + /** + * Moves one or more files to a new destination. + * + * @see https://git-scm.com/docs/git-mv + * + * @param {string|string[]} from + * @param {string} to + * @param {Function} [then] + */ + Git.prototype.mv = function (from, to, then) { + var handler = Git.trailingFunctionArgument(arguments); + + var command = [].concat(from); + command.unshift('mv', '-v'); + command.push(to); + + this._run(command, Git._responseHandler(handler, 'MoveSummary')) + }; + + /** + * Internally uses pull and tags to get the list of tags then checks out the latest tag. + * + * @param {Function} [then] + */ + Git.prototype.checkoutLatestTag = function (then) { + var git = this; + return this.pull(function () { + git.tags(function (err, tags) { + git.checkout(tags.latest, then); + }); + }); + }; + + /** + * Adds one or more files to source control + * + * @param {string|string[]} files + * @param {Function} [then] + */ + Git.prototype.add = function (files, then) { + return this._run(['add'].concat(files), function (err, data) { + then && then(err); + }); + }; + + /** + * Commits changes in the current working directory - when specific file paths are supplied, only changes on those + * files will be committed. + * + * @param {string|string[]} message + * @param {string|string[]} [files] + * @param {Object} [options] + * @param {Function} [then] + */ + Git.prototype.commit = function (message, files, options, then) { + var handler = Git.trailingFunctionArgument(arguments); + + var command = ['commit']; + + [].concat(message).forEach(function (message) { + command.push('-m', message); + }); + + [].push.apply(command, [].concat(typeof files === "string" || Array.isArray(files) ? files : [])); + + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + + return this._run( + command, + Git._responseHandler(handler, 'CommitSummary') + ); + }; + + /** + * Gets a function to be used for logging. + * + * @param {string} level + * @param {string} [message] + * + * @returns {Function} + * @private + */ + Git.prototype._getLog = function (level, message) { + var log = this._silentLogging ? NOOP : console[level].bind(console); + if (arguments.length > 1) { + log(message); + } + return log; + }; + + /** + * Pull the updated contents of the current repo + * + * @param {string} [remote] When supplied must also include the branch + * @param {string} [branch] When supplied must also include the remote + * @param {Object} [options] Optionally include set of options to merge into the command + * @param {Function} [then] + */ + Git.prototype.pull = function (remote, branch, options, then) { + var command = ["pull"]; + var handler = Git.trailingFunctionArgument(arguments); + + if (typeof remote === 'string' && typeof branch === 'string') { + command.push(remote, branch); + } + + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + + return this._run(command, Git._responseHandler(handler, 'PullSummary')); + }; + + /** + * Fetch the updated contents of the current repo. + * + * @example + * .fetch('upstream', 'master') // fetches from master on remote named upstream + * .fetch(function () {}) // runs fetch against default remote and branch and calls function + * + * @param {string} [remote] + * @param {string} [branch] + * @param {Function} [then] + */ + Git.prototype.fetch = function (remote, branch, then) { + var command = ["fetch"]; + var next = Git.trailingFunctionArgument(arguments); + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + + if (typeof remote === 'string' && typeof branch === 'string') { + command.push(remote, branch); + } + + if (Array.isArray(remote)) { + command = command.concat(remote); + } + + return this._run( + command, + Git._responseHandler(next, 'FetchSummary'), + { + concatStdErr: true + } + ); + }; + + /** + * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in + * a production environment. + * + * @param {boolean} silence + * @returns {Git} + */ + Git.prototype.silent = function (silence) { + this._silentLogging = !!silence; + return this; + }; + + /** + * List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to + * sort the tags by that property instead of using the default semantic versioning sort. + * + * Note, supplying this option when it is not supported by your Git version will cause the operation to fail. + * + * @param {Object} [options] + * @param {Function} [then] + */ + Git.prototype.tags = function (options, then) { + var next = Git.trailingFunctionArgument(arguments); + + var command = ['-l']; + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + + var hasCustomSort = command.some(function (option) { + return /^--sort=/.test(option); + }); + + return this.tag( + command, + Git._responseHandler(next, 'TagList', [hasCustomSort]) + ); + }; + + /** + * Rebases the current working copy. Options can be supplied either as an array of string parameters + * to be sent to the `git rebase` command, or a standard options object. + * + * @param {Object|String[]} [options] + * @param {Function} [then] + * @returns {Git} + */ + Git.prototype.rebase = function (options, then) { + var command = ['rebase']; + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + command.push.apply(command, Git.trailingArrayArgument(arguments)); + + + return this._run(command, Git._responseHandler(Git.trailingFunctionArgument(arguments))); + }; + + /** + * Reset a repo + * + * @param {string|string[]} [mode=soft] Either an array of arguments supported by the 'git reset' command, or the + * string value 'soft' or 'hard' to set the reset mode. + * @param {Function} [then] + */ + Git.prototype.reset = function (mode, then) { + var command = ['reset']; + var next = Git.trailingFunctionArgument(arguments); + if (next === mode || typeof mode === 'string' || !mode) { + var modeStr = ['mixed', 'soft', 'hard'].includes(mode) ? mode : 'soft'; + command.push('--' + modeStr); + } + else if (Array.isArray(mode)) { + command.push.apply(command, mode); + } + + return this._run(command, function (err) { + next && next(err || null); + }); + }; + + /** + * Revert one or more commits in the local working copy + * + * @param {string} commit The commit to revert. Can be any hash, offset (eg: `HEAD~2`) or range (eg: `master~5..master~2`) + * @param {Object} [options] Optional options object + * @param {Function} [then] + */ + Git.prototype.revert = function (commit, options, then) { + var next = Git.trailingFunctionArgument(arguments); + var command = ['revert']; + + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + + if (typeof commit !== 'string') { + return this.exec(function () { + next && next(new TypeError("Commit must be a string")); + }); + } + + command.push(commit); + return this._run(command, function (err) { + next && next(err || null); + }); + }; + + /** + * Add a lightweight tag to the head of the current branch + * + * @param {string} name + * @param {Function} [then] + */ + Git.prototype.addTag = function (name, then) { + if (typeof name !== "string") { + return this.exec(function () { + then && then(new TypeError("Git.addTag requires a tag name")); + }); + } + + var command = [name]; + return then ? this.tag(command, then) : this.tag(command); + }; + + /** + * Add an annotated tag to the head of the current branch + * + * @param {string} tagName + * @param {string} tagMessage + * @param {Function} [then] + */ + Git.prototype.addAnnotatedTag = function (tagName, tagMessage, then) { + return this.tag(['-a', '-m', tagMessage, tagName], function (err) { + then && then(err); + }); + }; + + /** + * Check out a tag or revision, any number of additional arguments can be passed to the `git checkout` command + * by supplying either a string or array of strings as the `what` parameter. + * + * @param {string|string[]} what One or more commands to pass to `git checkout` + * @param {Function} [then] + */ + Git.prototype.checkout = function (what, then) { + var command = ['checkout']; + command = command.concat(what); + + return this._run(command, function (err, data) { + then && then(err, !err && this._parseCheckout(data)); + }); + }; + + /** + * Check out a remote branch + * + * @param {string} branchName name of branch + * @param {string} startPoint (e.g origin/development) + * @param {Function} [then] + */ + Git.prototype.checkoutBranch = function (branchName, startPoint, then) { + return this.checkout(['-b', branchName, startPoint], then); + }; + + /** + * Check out a local branch + * + * @param {string} branchName of branch + * @param {Function} [then] + */ + Git.prototype.checkoutLocalBranch = function (branchName, then) { + return this.checkout(['-b', branchName], then); + }; + + /** + * Delete a local branch + * + * @param {string} branchName name of branch + * @param {Function} [then] + */ + Git.prototype.deleteLocalBranch = function (branchName, then) { + return this.branch(['-d', branchName], then); + }; + + /** + * List all branches + * + * @param {Object | string[]} [options] + * @param {Function} [then] + */ + Git.prototype.branch = function (options, then) { + var isDelete, responseHandler; + var next = Git.trailingFunctionArgument(arguments); + var command = ['branch']; + + command.push.apply(command, Git.trailingArrayArgument(arguments)); + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + + if (!arguments.length || next === options) { + command.push('-a'); + } + + isDelete = ['-d', '-D', '--delete'].reduce(function (isDelete, flag) { + return isDelete || command.indexOf(flag) > 0; + }, false); + + if (command.indexOf('-v') < 0) { + command.splice(1, 0, '-v'); + } + + responseHandler = isDelete + ? Git._responseHandler(next, 'BranchDeleteSummary', false) + : Git._responseHandler(next, 'BranchSummary'); + + return this._run(command, responseHandler); + }; + + /** + * Return list of local branches + * + * @param {Function} [then] + */ + Git.prototype.branchLocal = function (then) { + return this.branch(['-v'], then); + }; + + /** + * Add config to local git instance + * + * @param {string} key configuration key (e.g user.name) + * @param {string} value for the given key (e.g your name) + * @param {Function} [then] + */ + Git.prototype.addConfig = function (key, value, then) { + return this._run(['config', '--local', key, value], function (err, data) { + then && then(err, !err && data); + }); + }; + + /** + * Executes any command against the git binary. + * + * @param {string[]|Object} commands + * @param {Function} [then] + * + * @returns {Git} + */ + Git.prototype.raw = function (commands, then) { + var command = []; + if (Array.isArray(commands)) { + command = commands.slice(0); + } + else { + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + } + + var next = Git.trailingFunctionArgument(arguments); + + if (!command.length) { + return this.exec(function () { + next && next(new Error('Raw: must supply one or more command to execute'), null); + }); + } + + return this._run(command, function (err, data) { + next && next(err, !err && data || null); + }); + }; + + /** + * Add a submodule + * + * @param {string} repo + * @param {string} path + * @param {Function} [then] + */ + Git.prototype.submoduleAdd = function (repo, path, then) { + return this._run(['submodule', 'add', repo, path], function (err) { + then && then(err); + }); + }; + + /** + * Update submodules + * + * @param {string[]} [args] + * @param {Function} [then] + */ + Git.prototype.submoduleUpdate = function (args, then) { + if (typeof args === 'string') { + this._getLog('warn', 'Git#submoduleUpdate: args should be supplied as an array of individual arguments'); + } + + var next = Git.trailingFunctionArgument(arguments); + var command = (args !== next) ? args : []; + + return this.subModule(['update'].concat(command), function (err, args) { + next && next(err, args); + }); + }; + + /** + * Initialize submodules + * + * @param {string[]} [args] + * @param {Function} [then] + */ + Git.prototype.submoduleInit = function (args, then) { + if (typeof args === 'string') { + this._getLog('warn', 'Git#submoduleInit: args should be supplied as an array of individual arguments'); + } + + var next = Git.trailingFunctionArgument(arguments); + var command = (args !== next) ? args : []; + + return this.subModule(['init'].concat(command), function (err, args) { + next && next(err, args); + }); + }; + + /** + * Call any `git submodule` function with arguments passed as an array of strings. + * + * @param {string[]} options + * @param {Function} [then] + */ + Git.prototype.subModule = function (options, then) { + if (!Array.isArray(options)) { + return this.exec(function () { + then && then(new TypeError("Git.subModule requires an array of arguments")); + }); + } + + if (options[0] !== 'submodule') { + options.unshift('submodule'); + } + + return this._run(options, function (err, data) { + then && then(err || null, err ? null : data); + }); + }; + + /** + * List remote + * + * @param {string[]} [args] + * @param {Function} [then] + */ + Git.prototype.listRemote = function (args, then) { + var next = Git.trailingFunctionArgument(arguments); + var data = next === args || args === undefined ? [] : args; + + if (typeof data === 'string') { + this._getLog('warn', 'Git#listRemote: args should be supplied as an array of individual arguments'); + } + + return this._run(['ls-remote'].concat(data), function (err, data) { + next && next(err, data); + }); + }; + + /** + * Adds a remote to the list of remotes. + * + * @param {string} remoteName Name of the repository - eg "upstream" + * @param {string} remoteRepo Fully qualified SSH or HTTP(S) path to the remote repo + * @param {Function} [then] + * @returns {*} + */ + Git.prototype.addRemote = function (remoteName, remoteRepo, then) { + return this._run(['remote', 'add', remoteName, remoteRepo], function (err) { + then && then(err); + }); + }; + + /** + * Removes an entry from the list of remotes. + * + * @param {string} remoteName Name of the repository - eg "upstream" + * @param {Function} [then] + * @returns {*} + */ + Git.prototype.removeRemote = function (remoteName, then) { + return this._run(['remote', 'remove', remoteName], function (err) { + then && then(err); + }); + }; + + /** + * Gets the currently available remotes, setting the optional verbose argument to true includes additional + * detail on the remotes themselves. + * + * @param {boolean} [verbose=false] + * @param {Function} [then] + */ + Git.prototype.getRemotes = function (verbose, then) { + var next = Git.trailingFunctionArgument(arguments); + var args = verbose === true ? ['-v'] : []; + + return this.remote(args, function (err, data) { + next && next(err, !err && function () { + return data.trim().split('\n').filter(Boolean).reduce(function (remotes, remote) { + var detail = remote.trim().split(/\s+/); + var name = detail.shift(); + + if (!remotes[name]) { + remotes[name] = remotes[remotes.length] = { + name: name, + refs: {} + }; + } + + if (detail.length) { + remotes[name].refs[detail.pop().replace(/[^a-z]/g, '')] = detail.pop(); + } + + return remotes; + }, []).slice(0); + }()); + }); + }; + + /** + * Call any `git remote` function with arguments passed as an array of strings. + * + * @param {string[]} options + * @param {Function} [then] + */ + Git.prototype.remote = function (options, then) { + if (!Array.isArray(options)) { + return this.exec(function () { + then && then(new TypeError("Git.remote requires an array of arguments")); + }); + } + + if (options[0] !== 'remote') { + options.unshift('remote'); + } + + return this._run(options, function (err, data) { + then && then(err || null, err ? null : data); + }); + }; + + /** + * Merges from one branch to another, equivalent to running `git merge ${from} $[to}`, the `options` argument can + * either be an array of additional parameters to pass to the command or null / omitted to be ignored. + * + * @param {string} from + * @param {string} to + * @param {string[]} [options] + * @param {Function} [then] + */ + Git.prototype.mergeFromTo = function (from, to, options, then) { + var commands = [ + from, + to + ]; + var callback = Git.trailingFunctionArgument(arguments); + + if (Array.isArray(options)) { + commands = commands.concat(options); + } + + return this.merge(commands, callback); + }; + + /** + * Runs a merge, `options` can be either an array of arguments + * supported by the [`git merge`](https://git-scm.com/docs/git-merge) + * or an options object. + * + * Conflicts during the merge result in an error response, + * the response type whether it was an error or success will be a MergeSummary instance. + * When successful, the MergeSummary has all detail from a the PullSummary + * + * @param {Object | string[]} [options] + * @param {Function} [then] + * @returns {*} + * + * @see ./responses/MergeSummary.js + * @see ./responses/PullSummary.js + */ + Git.prototype.merge = function (options, then) { + var self = this; + var userHandler = Git.trailingFunctionArgument(arguments) || NOOP; + var mergeHandler = function (err, mergeSummary) { + if (!err && mergeSummary.failed) { + return Git.fail(self, mergeSummary, userHandler); + } + + userHandler(err, mergeSummary); + }; + + var command = []; + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + command.push.apply(command, Git.trailingArrayArgument(arguments)); + + if (command[0] !== 'merge') { + command.unshift('merge'); + } + + if (command.length === 1) { + return this.exec(function () { + then && then(new TypeError("Git.merge requires at least one option")); + }); + } + + return this._run(command, Git._responseHandler(mergeHandler, 'MergeSummary'), { + concatStdErr: true + }); + }; + + /** + * Call any `git tag` function with arguments passed as an array of strings. + * + * @param {string[]} options + * @param {Function} [then] + */ + Git.prototype.tag = function (options, then) { + var command = []; + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + command.push.apply(command, Git.trailingArrayArgument(arguments)); + + if (command[0] !== 'tag') { + command.unshift('tag'); + } + + return this._run(command, Git._responseHandler(Git.trailingFunctionArgument(arguments))); + }; + + /** + * Updates repository server info + * + * @param {Function} [then] + */ + Git.prototype.updateServerInfo = function (then) { + return this._run(["update-server-info"], function (err, data) { + then && then(err, !err && data); + }); + }; + + /** + * Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use + * when pushing. Supply multiple options as an array of strings in the first argument - see examples below. + * + * @param {string|string[]} [remote] + * @param {string} [branch] + * @param {Function} [then] + */ + Git.prototype.push = function (remote, branch, then) { + var command = []; + var handler = Git.trailingFunctionArgument(arguments); + + if (typeof remote === 'string' && typeof branch === 'string') { + command.push(remote, branch); + } + + if (Array.isArray(remote)) { + command = command.concat(remote); + } + + Git._appendOptions(command, Git.trailingOptionsArgument(arguments)); + + if (command[0] !== 'push') { + command.unshift('push'); + } + + return this._run(command, function (err, data) { + handler && handler(err, !err && data); + }); + }; + + /** + * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the + * default configured remote spec. + * + * @param {string} [remote] + * @param {Function} [then] + */ + Git.prototype.pushTags = function (remote, then) { + var command = ['push']; + if (typeof remote === "string") { + command.push(remote); + } + command.push('--tags'); + + then = typeof arguments[arguments.length - 1] === "function" ? arguments[arguments.length - 1] : null; + + return this._run(command, function (err, data) { + then && then(err, !err && data); + }); + }; + + /** + * Removes the named files from source control. + * + * @param {string|string[]} files + * @param {Function} [then] + */ + Git.prototype.rm = function (files, then) { + return this._rm(files, '-f', then); + }; + + /** + * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To + * completely remove the files, use `rm`. + * + * @param {string|string[]} files + * @param {Function} [then] + */ + Git.prototype.rmKeepLocal = function (files, then) { + return this._rm(files, '--cached', then); + }; + + /** + * Returns a list of objects in a tree based on commit hash. Passing in an object hash returns the object's content, + * size, and type. + * + * Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents. + * + * @param {string[]} [options] + * @param {Function} [then] + */ + Git.prototype.catFile = function (options, then) { + return this._catFile('utf-8', arguments); + }; + + /** + * Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout. + * + * @param {string[]} options + * @param then + */ + Git.prototype.binaryCatFile = function (options, then) { + return this._catFile('buffer', arguments); + }; + + Git.prototype._catFile = function (format, args) { + var handler = Git.trailingFunctionArgument(args); + var command = ['cat-file']; + var options = args[0]; + + if (typeof options === 'string') { + throw new TypeError('Git#catFile: options must be supplied as an array of strings'); + } + else if (Array.isArray(options)) { + command.push.apply(command, options); + } + + return this._run(command, function (err, data) { + handler && handler(err, data); + }, { + format: format + }); + }; + + /** + * Return repository changes. + * + * @param {string[]} [options] + * @param {Function} [then] + */ + Git.prototype.diff = function (options, then) { + var command = ['diff']; + + if (typeof options === 'string') { + command[0] += ' ' + options; + this._getLog('warn', + 'Git#diff: supplying options as a single string is now deprecated, switch to an array of strings'); + } + else if (Array.isArray(options)) { + command.push.apply(command, options); + } + + if (typeof arguments[arguments.length - 1] === 'function') { + then = arguments[arguments.length - 1]; + } + + return this._run(command, function (err, data) { + then && then(err, data); + }); + }; + + Git.prototype.diffSummary = function (options, then) { + var next = Git.trailingFunctionArgument(arguments); + var command = ['--stat=4096']; + + if (options && options !== next) { + command.push.apply(command, [].concat(options)); + } + + return this.diff(command, Git._responseHandler(next, 'DiffSummary')); + }; + + /** + * Wraps `git rev-parse`. Primarily used to convert friendly commit references (ie branch names) to SHA1 hashes. + * + * Options should be an array of string options compatible with the `git rev-parse` + * + * @param {string|string[]} [options] + * @param {Function} [then] + * + * @see https://git-scm.com/docs/git-rev-parse + */ + Git.prototype.revparse = function (options, then) { + var command = ['rev-parse']; + + if (typeof options === 'string') { + command = command + ' ' + options; + this._getLog('warn', + 'Git#revparse: supplying options as a single string is now deprecated, switch to an array of strings'); + } + else if (Array.isArray(options)) { + command.push.apply(command, options); + } + + if (typeof arguments[arguments.length - 1] === 'function') { + then = arguments[arguments.length - 1]; + } + + return this._run(command, function (err, data) { + then && then(err, err ? null : String(data).trim()); + }); + }; + + /** + * Show various types of objects, for example the file at a certain commit + * + * @param {string[]} [options] + * @param {Function} [then] + */ + Git.prototype.show = function (options, then) { + var args = [].slice.call(arguments, 0); + var handler = typeof args[args.length - 1] === "function" ? args.pop() : null; + var command = ['show']; + if (typeof options === 'string') { + command = command + ' ' + options; + this._getLog('warn', + 'Git#show: supplying options as a single string is now deprecated, switch to an array of strings'); + } + else if (Array.isArray(options)) { + command.push.apply(command, options); + } + + return this._run(command, function (err, data) { + handler && handler(err, !err && data); + }); + }; + + /** + * @param {string} mode Required parameter "n" or "f" + * @param {string[]} options + * @param {Function} [then] + */ + Git.prototype.clean = function (mode, options, then) { + var handler = Git.trailingFunctionArgument(arguments); + + if (typeof mode !== 'string' || !/[nf]/.test(mode)) { + return this.exec(function () { + handler && handler(new TypeError('Git clean mode parameter ("n" or "f") is required')); + }); + } + + if (/[^dfinqxX]/.test(mode)) { + return this.exec(function () { + handler && handler(new TypeError('Git clean unknown option found in ' + JSON.stringify(mode))); + }); + } + + var command = ['clean', '-' + mode]; + if (Array.isArray(options)) { + command = command.concat(options); + } + + if (command.some(interactiveMode)) { + return this.exec(function () { + handler && handler(new TypeError('Git clean interactive mode is not supported')); + }); + } + + return this._run(command, function (err, data) { + handler && handler(err, !err && data); + }); + + function interactiveMode (option) { + if (/^-[^\-]/.test(option)) { + return option.indexOf('i') > 0; + } + + return option === '--interactive'; + } + }; + + /** + * Call a simple function at the next step in the chain. + * @param {Function} [then] + */ + Git.prototype.exec = function (then) { + this._run([], function () { + typeof then === 'function' && then(); + }); + return this; + }; + + /** + * Deprecated means of adding a regular function call at the next step in the chain. Use the replacement + * Git#exec, the Git#then method will be removed in version 2.x + * + * @see exec + * @deprecated + */ + Git.prototype.then = function (then) { + this._getLog( + 'error', ` +Git#then is deprecated after version 1.72 and will be removed in version 2.x +To use promises switch to importing 'simple-git/promise'.`); + + return this.exec(then); + }; + + /** + * Show commit logs from `HEAD` to the first commit. + * If provided between `options.from` and `options.to` tags or branch. + * + * Additionally you can provide options.file, which is the path to a file in your repository. Then only this file will be considered. + * + * To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on. + * + * Options can also be supplied as a standard options object for adding custom properties supported by the git log command. + * For any other set of options, supply options as an array of strings to be appended to the git log command. + * + * @param {Object|string[]} [options] + * @param {string} [options.from] The first commit to include + * @param {string} [options.to] The most recent commit to include + * @param {string} [options.file] A single file to include in the result + * @param {boolean} [options.multiLine] Optionally include multi-line commit messages + * + * @param {Function} [then] + */ + Git.prototype.log = function (options, then) { + var handler = Git.trailingFunctionArgument(arguments); + var opt = (handler === then ? options : null) || {}; + + var splitter = opt.splitter || requireResponseHandler('ListLogSummary').SPLITTER; + var format = opt.format || { + hash: '%H', + date: '%ai', + message: '%s', + refs: '%D', + body: opt.multiLine ? '%B' : '%b', + author_name: '%aN', + author_email: '%ae' + }; + var rangeOperator = (opt.symmetric !== false) ? '...' : '..'; + + var fields = Object.keys(format); + var formatstr = fields.map(function (k) { + return format[k]; + }).join(splitter); + var suffix = []; + var command = ["log", "--pretty=format:" + + requireResponseHandler('ListLogSummary').START_BOUNDARY + + formatstr + + requireResponseHandler('ListLogSummary').COMMIT_BOUNDARY + ]; + + if (Array.isArray(opt)) { + command = command.concat(opt); + opt = {}; + } + else if (typeof arguments[0] === "string" || typeof arguments[1] === "string") { + this._getLog('warn', + 'Git#log: supplying to or from as strings is now deprecated, switch to an options configuration object'); + opt = { + from: arguments[0], + to: arguments[1] + }; + } + + if (opt.n || opt['max-count']) { + command.push("--max-count=" + (opt.n || opt['max-count'])); + } + + if (opt.from && opt.to) { + command.push(opt.from + rangeOperator + opt.to); + } + + if (opt.file) { + suffix.push("--follow", options.file); + } + + 'splitter n max-count file from to --pretty format symmetric multiLine'.split(' ').forEach(function (key) { + delete opt[key]; + }); + + Git._appendOptions(command, opt); + + return this._run( + command.concat(suffix), + Git._responseHandler(handler, 'ListLogSummary', [splitter, fields]) + ); + }; + + /** + * Clears the queue of pending commands and returns the wrapper instance for chaining. + * + * @returns {Git} + */ + Git.prototype.clearQueue = function () { + this._runCache.length = 0; + return this; + }; + + /** + * Check if a pathname or pathnames are excluded by .gitignore + * + * @param {string|string[]} pathnames + * @param {Function} [then] + */ + Git.prototype.checkIgnore = function (pathnames, then) { + var handler = Git.trailingFunctionArgument(arguments); + var command = ["check-ignore"]; + + if (handler !== pathnames) { + command = command.concat(pathnames); + } + + return this._run(command, function (err, data) { + handler && handler(err, !err && this._parseCheckIgnore(data)); + }); + }; + + /** + * Validates that the current repo is a Git repo. + * + * @param {Function} [then] + */ + Git.prototype.checkIsRepo = function (then) { + function onError (exitCode, stdErr, done, fail) { + if (exitCode === 128 && /(Not a git repository|Kein Git-Repository)/i.test(stdErr)) { + return done(false); + } + + fail(stdErr); + } + + function handler (err, isRepo) { + then && then(err, String(isRepo).trim() === 'true'); + } + + return this._run(['rev-parse', '--is-inside-work-tree'], handler, {onError: onError}); + }; + + Git.prototype._rm = function (_files, options, then) { + var files = [].concat(_files); + var args = ['rm', options]; + args.push.apply(args, files); + + return this._run(args, function (err) { + then && then(err); + }); + }; + + Git.prototype._parseCheckout = function (checkout) { + // TODO + }; + + /** + * Parser for the `check-ignore` command - returns each + * @param {string} [files] + * @returns {string[]} + */ + Git.prototype._parseCheckIgnore = function (files) { + return files.split(/\n/g).filter(Boolean).map(function (file) { + return file.trim() + }); + }; + + /** + * Schedules the supplied command to be run, the command should not include the name of the git binary and should + * be an array of strings passed as the arguments to the git binary. + * + * @param {string[]} command + * @param {Function} then + * @param {Object} [opt] + * @param {boolean} [opt.concatStdErr=false] Optionally concatenate stderr output into the stdout + * @param {boolean} [opt.format="utf-8"] The format to use when reading the content of stdout + * @param {Function} [opt.onError] Optional error handler for this command - can be used to allow non-clean exits + * without killing the remaining stack of commands + * @param {number} [opt.onError.exitCode] + * @param {string} [opt.onError.stdErr] + * + * @returns {Git} + */ + Git.prototype._run = function (command, then, opt) { + if (typeof command === "string") { + command = command.split(" "); + } + this._runCache.push([command, then, opt || {}]); + this._schedule(); + + return this; + }; + + Git.prototype._schedule = function () { + if (!this._childProcess && this._runCache.length) { + var git = this; + var Buffer = git.Buffer; + var task = git._runCache.shift(); + + var command = task[0]; + var then = task[1]; + var options = task[2]; + + debug(command); + + var result = deferred(); + + var attempted = false; + var attemptClose = function attemptClose (e) { + + // closing when there is content, terminate immediately + if (attempted || stdErr.length || stdOut.length) { + result.resolve(e); + attempted = true; + } + + // first attempt at closing but no content yet, wait briefly for the close/exit that may follow + if (!attempted) { + attempted = true; + setTimeout(attemptClose.bind(this, e), 50); + } + + }; + + var stdOut = []; + var stdErr = []; + var spawned = git.ChildProcess.spawn(git._command, command.slice(0), { + cwd: git._baseDir, + env: git._env, + windowsHide: true + }); + + spawned.stdout.on('data', function (buffer) { + stdOut.push(buffer); + }); + + spawned.stderr.on('data', function (buffer) { + stdErr.push(buffer); + }); + + spawned.on('error', function (err) { + stdErr.push(Buffer.from(err.stack, 'ascii')); + }); + + spawned.on('close', attemptClose); + spawned.on('exit', attemptClose); + + result.promise.then(function (exitCode) { + function done (output) { + then.call(git, null, output); + } + + function fail (error) { + Git.fail(git, error, then); + } + + delete git._childProcess; + + if (exitCode && stdErr.length && options.onError) { + options.onError(exitCode, Buffer.concat(stdErr).toString('utf-8'), done, fail); + } + else if (exitCode && stdErr.length) { + fail(Buffer.concat(stdErr).toString('utf-8')); + } + else { + if (options.concatStdErr) { + [].push.apply(stdOut, stdErr); + } + + var stdOutput = Buffer.concat(stdOut); + if (options.format !== 'buffer') { + stdOutput = stdOutput.toString(options.format || 'utf-8'); + } + + done(stdOutput); + } + + process.nextTick(git._schedule.bind(git)); + }); + + git._childProcess = spawned; + + if (git._outputHandler) { + git._outputHandler(command[0], git._childProcess.stdout, git._childProcess.stderr); + } + } + }; + + /** + * Handles an exception in the processing of a command. + */ + Git.fail = function (git, error, handler) { + git._getLog('error', error); + git._runCache.length = 0; + if (typeof handler === 'function') { + handler.call(git, error, null); + } + }; + + /** + * Given any number of arguments, returns the last argument if it is a function, otherwise returns null. + * @returns {Function|null} + */ + Git.trailingFunctionArgument = function (args) { + var trailing = args[args.length - 1]; + return (typeof trailing === "function") ? trailing : null; + }; + + /** + * Given any number of arguments, returns the trailing options argument, ignoring a trailing function argument + * if there is one. When not found, the return value is null. + * @returns {Object|null} + */ + Git.trailingOptionsArgument = function (args) { + var options = args[(args.length - (Git.trailingFunctionArgument(args) ? 2 : 1))]; + return Object.prototype.toString.call(options) === '[object Object]' ? options : null; + }; + + /** + * Given any number of arguments, returns the trailing options array argument, ignoring a trailing function argument + * if there is one. When not found, the return value is an empty array. + * @returns {Array} + */ + Git.trailingArrayArgument = function (args) { + var options = args[(args.length - (Git.trailingFunctionArgument(args) ? 2 : 1))]; + return Object.prototype.toString.call(options) === '[object Array]' ? options : []; + }; + + /** + * Mutates the supplied command array by merging in properties in the options object. When the + * value of the item in the options object is a string it will be concatenated to the key as + * a single `name=value` item, otherwise just the name will be used. + * + * @param {string[]} command + * @param {Object} options + * @private + */ + Git._appendOptions = function (command, options) { + if (options === null) { + return; + } + + Object.keys(options).forEach(function (key) { + var value = options[key]; + if (typeof value === 'string') { + command.push(key + '=' + value); + } + else { + command.push(key); + } + }); + }; + + /** + * Given the type of response and the callback to receive the parsed response, + * uses the correct parser and calls back the callback. + * + * @param {Function} callback + * @param {string} [type] + * @param {Object[]} [args] + * + * @private + */ + Git._responseHandler = function (callback, type, args) { + return function (error, data) { + if (typeof callback !== 'function') { + return; + } + + if (error) { + return callback(error, null); + } + + if (!type) { + return callback(null, data); + } + + var handler = requireResponseHandler(type); + var result = handler.parse.apply(handler, [data].concat(args === undefined ? [] : args)); + + callback(null, result); + }; + + }; + + /** + * Marks the git instance as having had a fatal exception by clearing the pending queue of tasks and + * logging to the console. + * + * @param git + * @param error + * @param callback + */ + Git.exception = function (git, error, callback) { + git._runCache.length = 0; + if (typeof callback === 'function') { + callback(error instanceof Error ? error : new Error(error)); + } + + git._getLog('error', error); + }; + + module.exports = Git; + + /** + * Requires and returns a response handler based on its named type + * @param {string} type + */ + function requireResponseHandler (type) { + return responses[type]; + } + +}()); + + +/***/ }), +/* 479 */, +/* 480 */, +/* 481 */, +/* 482 */, +/* 483 */, +/* 484 */, +/* 485 */, +/* 486 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isExtglob = __webpack_require__(888); +var chars = { '{': '}', '(': ')', '[': ']'}; +var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; +var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; + +module.exports = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var regex = strictRegex; + var match; + + // optionally relax regex + if (options && options.strict === false) { + regex = relaxedRegex; + } + + while ((match = regex.exec(str))) { + if (match[2]) return true; + var idx = match.index + match[0].length; + + // if an open bracket/brace/paren is escaped, + // set the index to the next closing character + var open = match[1]; + var close = open ? chars[open] : null; + if (open && close) { + var n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + + str = str.slice(idx); + } + return false; +}; + + +/***/ }), +/* 487 */, +/* 488 */, +/* 489 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' -1) opts.rootDepth = dir.split(path.sep).length + 1 + } + const paths = opts.fs.readdirSync(dir).map(p => dir + path.sep + p) + for (var i = 0; i < paths.length; i += 1) { + const pi = paths[i] + const st = opts.fs.statSync(pi) + const item = {path: pi, stats: st} + const isUnderDepthLimit = (!opts.rootDepth || pi.split(path.sep).length - opts.rootDepth < opts.depthLimit) + const filterResult = opts.filter ? opts.filter(item) : true + const isDir = st.isDirectory() + const shouldAdd = filterResult && (isDir ? !opts.nodir : !opts.nofile) + const shouldTraverse = isDir && isUnderDepthLimit && (opts.traverseAll || filterResult) + if (shouldAdd) ls.push(item) + if (shouldTraverse) ls = klawSync(pi, opts, ls) + } + return ls +} + +module.exports = klawSync + + +/***/ }), +/* 503 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var nodes = __webpack_require__(690); + +var lib = __webpack_require__(388); + +var sym = 0; + +function gensym() { + return 'hole_' + sym++; +} // copy-on-write version of map + + +function mapCOW(arr, func) { + var res = null; + + for (var i = 0; i < arr.length; i++) { + var item = func(arr[i]); + + if (item !== arr[i]) { + if (!res) { + res = arr.slice(); + } + + res[i] = item; + } + } + + return res || arr; +} + +function walk(ast, func, depthFirst) { + if (!(ast instanceof nodes.Node)) { + return ast; + } + + if (!depthFirst) { + var astT = func(ast); + + if (astT && astT !== ast) { + return astT; + } + } + + if (ast instanceof nodes.NodeList) { + var children = mapCOW(ast.children, function (node) { + return walk(node, func, depthFirst); + }); + + if (children !== ast.children) { + ast = new nodes[ast.typename](ast.lineno, ast.colno, children); + } + } else if (ast instanceof nodes.CallExtension) { + var args = walk(ast.args, func, depthFirst); + var contentArgs = mapCOW(ast.contentArgs, function (node) { + return walk(node, func, depthFirst); + }); + + if (args !== ast.args || contentArgs !== ast.contentArgs) { + ast = new nodes[ast.typename](ast.extName, ast.prop, args, contentArgs); + } + } else { + var props = ast.fields.map(function (field) { + return ast[field]; + }); + var propsT = mapCOW(props, function (prop) { + return walk(prop, func, depthFirst); + }); + + if (propsT !== props) { + ast = new nodes[ast.typename](ast.lineno, ast.colno); + propsT.forEach(function (prop, i) { + ast[ast.fields[i]] = prop; + }); + } + } + + return depthFirst ? func(ast) || ast : ast; +} + +function depthWalk(ast, func) { + return walk(ast, func, true); +} + +function _liftFilters(node, asyncFilters, prop) { + var children = []; + var walked = depthWalk(prop ? node[prop] : node, function (descNode) { + var symbol; + + if (descNode instanceof nodes.Block) { + return descNode; + } else if (descNode instanceof nodes.Filter && lib.indexOf(asyncFilters, descNode.name.value) !== -1 || descNode instanceof nodes.CallExtensionAsync) { + symbol = new nodes.Symbol(descNode.lineno, descNode.colno, gensym()); + children.push(new nodes.FilterAsync(descNode.lineno, descNode.colno, descNode.name, descNode.args, symbol)); + } + + return symbol; + }); + + if (prop) { + node[prop] = walked; + } else { + node = walked; + } + + if (children.length) { + children.push(node); + return new nodes.NodeList(node.lineno, node.colno, children); + } else { + return node; + } +} + +function liftFilters(ast, asyncFilters) { + return depthWalk(ast, function (node) { + if (node instanceof nodes.Output) { + return _liftFilters(node, asyncFilters); + } else if (node instanceof nodes.Set) { + return _liftFilters(node, asyncFilters, 'value'); + } else if (node instanceof nodes.For) { + return _liftFilters(node, asyncFilters, 'arr'); + } else if (node instanceof nodes.If) { + return _liftFilters(node, asyncFilters, 'cond'); + } else if (node instanceof nodes.CallExtension) { + return _liftFilters(node, asyncFilters, 'args'); + } else { + return undefined; + } + }); +} + +function liftSuper(ast) { + return walk(ast, function (blockNode) { + if (!(blockNode instanceof nodes.Block)) { + return; + } + + var hasSuper = false; + var symbol = gensym(); + blockNode.body = walk(blockNode.body, function (node) { + // eslint-disable-line consistent-return + if (node instanceof nodes.FunCall && node.name.value === 'super') { + hasSuper = true; + return new nodes.Symbol(node.lineno, node.colno, symbol); + } + }); + + if (hasSuper) { + blockNode.body.children.unshift(new nodes.Super(0, 0, blockNode.name, new nodes.Symbol(0, 0, symbol))); + } + }); +} + +function convertStatements(ast) { + return depthWalk(ast, function (node) { + if (!(node instanceof nodes.If) && !(node instanceof nodes.For)) { + return undefined; + } + + var async = false; + walk(node, function (child) { + if (child instanceof nodes.FilterAsync || child instanceof nodes.IfAsync || child instanceof nodes.AsyncEach || child instanceof nodes.AsyncAll || child instanceof nodes.CallExtensionAsync) { + async = true; // Stop iterating by returning the node + + return child; + } + + return undefined; + }); + + if (async) { + if (node instanceof nodes.If) { + return new nodes.IfAsync(node.lineno, node.colno, node.cond, node.body, node.else_); + } else if (node instanceof nodes.For && !(node instanceof nodes.AsyncAll)) { + return new nodes.AsyncEach(node.lineno, node.colno, node.arr, node.name, node.body, node.else_); + } + } + + return undefined; + }); +} + +function cps(ast, asyncFilters) { + return convertStatements(liftSuper(liftFilters(ast, asyncFilters))); +} + +function transform(ast, asyncFilters) { + return cps(ast, asyncFilters || []); +} // var parser = require('./parser'); +// var src = 'hello {% foo %}{% endfoo %} end'; +// var ast = transform(parser.parse(src, [new FooExtension()]), ['bar']); +// nodes.printNodes(ast); + + +module.exports = { + transform: transform +}; + +/***/ }), +/* 504 */, +/* 505 */, +/* 506 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const ParserError = __webpack_require__(59); + +class ParserErrorNoJS extends ParserError { +} + +module.exports = ParserErrorNoJS; + + +/***/ }), +/* 507 */, +/* 508 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = __webpack_require__(240); + + +/***/ }), +/* 509 */, +/* 510 */, +/* 511 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var compileSchema = __webpack_require__(954) + , resolve = __webpack_require__(545) + , Cache = __webpack_require__(426) + , SchemaObject = __webpack_require__(785) + , stableStringify = __webpack_require__(741) + , formats = __webpack_require__(838) + , rules = __webpack_require__(540) + , $dataMetaSchema = __webpack_require__(451) + , patternGroups = __webpack_require__(403) + , util = __webpack_require__(411) + , co = __webpack_require__(987); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = __webpack_require__(440); +var customKeyword = __webpack_require__(40); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; + +var errorClasses = __webpack_require__(77); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; + this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + addDraft6MetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + addInitialSchemas(this); + if (opts.patternGroups) patternGroups(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async === true) + return this._opts.async == '*' ? co(valid) : valid; + this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i { + if (val instanceof Set) { + val.forEach(fn); + } else { + fn(val); + } +}; + +const addAndConvert = (main, prop, item) => { + let container = main[prop]; + if (!(container instanceof Set)) { + main[prop] = container = new Set([container]); + } + container.add(item); +}; + +const clearItem = cont => key => { + const set = cont[key]; + if (set instanceof Set) { + set.clear(); + } else { + delete cont[key]; + } +}; + +const delFromSet = (main, prop, item) => { + const container = main[prop]; + if (container instanceof Set) { + container.delete(item); + } else if (container === item) { + delete main[prop]; + } +}; + +const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val; + +/** + * @typedef {String} Path + */ + +// fs_watch helpers + +// object to hold per-process fs_watch instances +// (may be shared across chokidar FSWatcher instances) + +/** + * @typedef {Object} FsWatchContainer + * @property {Set} listeners + * @property {Set} errHandlers + * @property {Set} rawEmitters + * @property {fs.FSWatcher=} watcher + * @property {Boolean=} watcherUnusable + */ + +/** + * @type {Map} + */ +const FsWatchInstances = new Map(); + +/** + * Instantiates the fs_watch interface + * @param {String} path to be watched + * @param {Object} options to be passed to fs_watch + * @param {Function} listener main event handler + * @param {Function} errHandler emits info about errors + * @param {Function} emitRaw emits raw event data + * @returns {fs.FSWatcher} new fsevents instance + */ +function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { + const handleEvent = (rawEvent, evPath) => { + listener(path); + emitRaw(rawEvent, evPath, {watchedPath: path}); + + // emit based on events occurring for files from a directory's watcher in + // case the file's watcher misses it (and rely on throttling to de-dupe) + if (evPath && path !== evPath) { + fsWatchBroadcast( + sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath) + ); + } + }; + try { + return fs.watch(path, options, handleEvent); + } catch (error) { + errHandler(error); + } +} + +/** + * Helper for passing fs_watch event data to a collection of listeners + * @param {Path} fullPath absolute path bound to fs_watch instance + * @param {String} type listener type + * @param {*=} val1 arguments to be passed to listeners + * @param {*=} val2 + * @param {*=} val3 + */ +const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => { + const cont = FsWatchInstances.get(fullPath); + if (!cont) return; + foreach(cont[type], (listener) => { + listener(val1, val2, val3); + }); +}; + +/** + * Instantiates the fs_watch interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path + * @param {String} fullPath absolute path + * @param {Object} options to be passed to fs_watch + * @param {Object} handlers container for event listener functions + */ +const setFsWatchListener = (path, fullPath, options, handlers) => { + const {listener, errHandler, rawEmitter} = handlers; + let cont = FsWatchInstances.get(fullPath); + + /** @type {fs.FSWatcher=} */ + let watcher; + if (!options.persistent) { + watcher = createFsWatchInstance( + path, options, listener, errHandler, rawEmitter + ); + return watcher.close.bind(watcher); + } + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_ERR, errHandler); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + watcher = createFsWatchInstance( + path, + options, + fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), + errHandler, // no need to use broadcast here + fsWatchBroadcast.bind(null, fullPath, KEY_RAW) + ); + if (!watcher) return; + watcher.on(EV_ERROR, async (error) => { + const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR); + cont.watcherUnusable = true; // documented since Node 10.4.1 + // Workaround for https://github.com/joyent/node/issues/4337 + if (isWindows && error.code === 'EPERM') { + try { + const fd = await open(path, 'r'); + await close(fd); + broadcastErr(error); + } catch (err) {} + } else { + broadcastErr(error); + } + }); + cont = { + listeners: listener, + errHandlers: errHandler, + rawEmitters: rawEmitter, + watcher + }; + FsWatchInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // removes this instance's listeners and closes the underlying fs_watch + // instance if there are no more listeners left + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_ERR, errHandler); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + // Check to protect against issue gh-730. + // if (cont.watcherUnusable) { + cont.watcher.close(); + // } + FsWatchInstances.delete(fullPath); + HANDLER_KEYS.forEach(clearItem(cont)); + cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +// fs_watchFile helpers + +// object to hold per-process fs_watchFile instances +// (may be shared across chokidar FSWatcher instances) +const FsWatchFileInstances = new Map(); + +/** + * Instantiates the fs_watchFile interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path to be watched + * @param {String} fullPath absolute path + * @param {Object} options options to be passed to fs_watchFile + * @param {Object} handlers container for event listener functions + * @returns {Function} closer + */ +const setFsWatchFileListener = (path, fullPath, options, handlers) => { + const {listener, rawEmitter} = handlers; + let cont = FsWatchFileInstances.get(fullPath); + + /* eslint-disable no-unused-vars, prefer-destructuring */ + let listeners = new Set(); + let rawEmitters = new Set(); + + const copts = cont && cont.options; + if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) { + // "Upgrade" the watcher to persistence or a quicker interval. + // This creates some unlikely edge case issues if the user mixes + // settings in a very weird way, but solving for those cases + // doesn't seem worthwhile for the added complexity. + listeners = cont.listeners; + rawEmitters = cont.rawEmitters; + fs.unwatchFile(fullPath); + cont = undefined; + } + + /* eslint-enable no-unused-vars, prefer-destructuring */ + + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + // TODO + // listeners.add(listener); + // rawEmitters.add(rawEmitter); + cont = { + listeners: listener, + rawEmitters: rawEmitter, + options, + watcher: fs.watchFile(fullPath, options, (curr, prev) => { + foreach(cont.rawEmitters, (rawEmitter) => { + rawEmitter(EV_CHANGE, fullPath, {curr, prev}); + }); + const currmtime = curr.mtimeMs; + if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) { + foreach(cont.listeners, (listener) => listener(path, curr)); + } + }) + }; + FsWatchFileInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // Removes this instance's listeners and closes the underlying fs_watchFile + // instance if there are no more listeners left. + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + FsWatchFileInstances.delete(fullPath); + fs.unwatchFile(fullPath); + cont.options = cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +/** + * @mixin + */ +class NodeFsHandler { + +/** + * @param {import("../index").FSWatcher} fsW + */ +constructor(fsW) { + this.fsw = fsW; + this._boundHandleError = (error) => fsW._handleError(error); +} + +/** + * Watch file for changes with fs_watchFile or fs_watch. + * @param {String} path to file or dir + * @param {Function} listener on fs change + * @returns {Function} closer for the watcher instance + */ +_watchWithNodeFs(path, listener) { + const opts = this.fsw.options; + const directory = sysPath.dirname(path); + const basename = sysPath.basename(path); + const parent = this.fsw._getWatchedDir(directory); + parent.add(basename); + const absolutePath = sysPath.resolve(path); + const options = {persistent: opts.persistent}; + if (!listener) listener = EMPTY_FN; + + let closer; + if (opts.usePolling) { + options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? + opts.binaryInterval : opts.interval; + closer = setFsWatchFileListener(path, absolutePath, options, { + listener, + rawEmitter: this.fsw._emitRaw + }); + } else { + closer = setFsWatchListener(path, absolutePath, options, { + listener, + errHandler: this._boundHandleError, + rawEmitter: this.fsw._emitRaw + }); + } + return closer; +} + +/** + * Watch a file and emit add event if warranted. + * @param {Path} file Path + * @param {fs.Stats} stats result of fs_stat + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @returns {Function} closer for the watcher instance + */ +_handleFile(file, stats, initialAdd) { + if (this.fsw.closed) { + return; + } + const dirname = sysPath.dirname(file); + const basename = sysPath.basename(file); + const parent = this.fsw._getWatchedDir(dirname); + // stats is always present + let prevStats = stats; + + // if the file is already being watched, do nothing + if (parent.has(basename)) return; + + // kick off the watcher + const closer = this._watchWithNodeFs(file, async (path, newStats) => { + if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; + if (!newStats || newStats.mtimeMs === 0) { + try { + const newStats = await stat(file); + if (this.fsw.closed) return; + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + prevStats = newStats; + } catch (error) { + // Fix issues where mtime is null but file is still present + this.fsw._remove(dirname, basename); + } + // add is about to be emitted if file not already tracked in parent + } else if (parent.has(basename)) { + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + prevStats = newStats; + } + }); + + // emit an add event if we're supposed to + if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { + if (!this.fsw._throttle(EV_ADD, file, 0)) return; + this.fsw._emit(EV_ADD, file, stats); + } + + return closer; +} + +/** + * Handle symlinks encountered while reading a dir. + * @param {Object} entry returned by readdirp + * @param {String} directory path of dir being read + * @param {String} path of this item + * @param {String} item basename of this item + * @returns {Promise} true if no more processing is needed for this entry. + */ +async _handleSymlink(entry, directory, path, item) { + if (this.fsw.closed) { + return; + } + const full = entry.fullPath; + const dir = this.fsw._getWatchedDir(directory); + + if (!this.fsw.options.followSymlinks) { + // watch symlink directly (don't follow) and detect changes + this.fsw._incrReadyCount(); + const linkPath = await fsrealpath(path); + if (this.fsw.closed) return; + if (dir.has(item)) { + if (this.fsw._symlinkPaths.get(full) !== linkPath) { + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_CHANGE, path, entry.stats); + } + } else { + dir.add(item); + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_ADD, path, entry.stats); + } + this.fsw._emitReady(); + return true; + } + + // don't follow the same symlink more than once + if (this.fsw._symlinkPaths.has(full)) { + return true; + } + + this.fsw._symlinkPaths.set(full, true); +} + +_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { + // Normalize the directory name on Windows + directory = sysPath.join(directory, EMPTY_STR); + + if (!wh.hasGlob) { + throttler = this.fsw._throttle('readdir', directory, 1000); + if (!throttler) return; + } + + const previous = this.fsw._getWatchedDir(wh.path); + const current = new Set(); + + let stream = this.fsw._readdirp(directory, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + depth: 0 + }).on(STR_DATA, async (entry) => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const item = entry.path; + let path = sysPath.join(directory, item); + current.add(item); + + if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) { + return; + } + + if (this.fsw.closed) { + stream = undefined; + return; + } + // Files that present in current directory snapshot + // but absent in previous are added to watch list and + // emit `add` event. + if (item === target || !target && !previous.has(item)) { + this.fsw._incrReadyCount(); + + // ensure relativeness of path is preserved in case of watcher reuse + path = sysPath.join(dir, sysPath.relative(dir, path)); + + this._addToNodeFs(path, initialAdd, wh, depth + 1); + } + }).on(EV_ERROR, this._boundHandleError); + + return new Promise(resolve => + stream.once(STR_END, () => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const wasThrottled = throttler ? throttler.clear() : false; + + resolve(); + + // Files that absent in current directory snapshot + // but present in previous emit `remove` event + // and are removed from @watched[directory]. + previous.getChildren().filter((item) => { + return item !== directory && + !current.has(item) && + // in case of intersecting globs; + // a path may have been filtered out of this readdir, but + // shouldn't be removed because it matches a different glob + (!wh.hasGlob || wh.filterPath({ + fullPath: sysPath.resolve(directory, item) + })); + }).forEach((item) => { + this.fsw._remove(directory, item); + }); + + stream = undefined; + + // one more time for any missed in case changes came in extremely quickly + if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler); + }) + ); +} + +/** + * Read directory to add / remove files from `@watched` list and re-read it on change. + * @param {String} dir fs path + * @param {fs.Stats} stats + * @param {Boolean} initialAdd + * @param {Number} depth relative to user-supplied path + * @param {String} target child path targeted for watch + * @param {Object} wh Common watch helpers for this path + * @param {String} realpath + * @returns {Promise} closer for the watcher instance. + */ +async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { + const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir)); + const tracked = parentDir.has(sysPath.basename(dir)); + if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { + if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats); + } + + // ensure dir is tracked (harmless if redundant) + parentDir.add(sysPath.basename(dir)); + this.fsw._getWatchedDir(dir); + let throttler; + let closer; + + const oDepth = this.fsw.options.depth; + if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) { + if (!target) { + await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler); + if (this.fsw.closed) return; + } + + closer = this._watchWithNodeFs(dir, (dirPath, stats) => { + // if current directory is removed, do nothing + if (stats && stats.mtimeMs === 0) return; + + this._handleRead(dirPath, false, wh, target, dir, depth, throttler); + }); + } + return closer; +} + +/** + * Handle added file, directory, or glob pattern. + * Delegates call to _handleFile / _handleDir after checks. + * @param {String} path to file or ir + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @param {Object} priorWh depth relative to user-supplied path + * @param {Number} depth Child path actually targeted for watch + * @param {String=} target Child path actually targeted for watch + * @returns {Promise} + */ +async _addToNodeFs(path, initialAdd, priorWh, depth, target) { + const ready = this.fsw._emitReady; + if (this.fsw._isIgnored(path) || this.fsw.closed) { + ready(); + return false; + } + + const wh = this.fsw._getWatchHelpers(path, depth); + if (!wh.hasGlob && priorWh) { + wh.hasGlob = priorWh.hasGlob; + wh.globFilter = priorWh.globFilter; + wh.filterPath = entry => priorWh.filterPath(entry); + wh.filterDir = entry => priorWh.filterDir(entry); + } + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + ready(); + return false; + } + + const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START); + let closer; + if (stats.isDirectory()) { + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); + if (this.fsw.closed) return; + // preserve this symlink's target path + if (path !== targetPath && targetPath !== undefined) { + this.fsw._symlinkPaths.set(targetPath, true); + } + } else if (stats.isSymbolicLink()) { + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + const parent = sysPath.dirname(wh.watchPath); + this.fsw._getWatchedDir(parent).add(wh.watchPath); + this.fsw._emit(EV_ADD, wh.watchPath, stats); + closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); + if (this.fsw.closed) return; + + // preserve this symlink's target path + if (targetPath !== undefined) { + this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath); + } + } else { + closer = this._handleFile(wh.watchPath, stats, initialAdd); + } + ready(); + + this.fsw._addPathCloser(path, closer); + return false; + + } catch (error) { + if (this.fsw._handleError(error)) { + ready(); + return path; + } + } +} + +} + +module.exports = NodeFsHandler; + + +/***/ }), +/* 521 */, +/* 522 */ +/***/ (function(module) { + +module.exports = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}; + +/***/ }), +/* 523 */, +/* 524 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + +const fs = __webpack_require__(747); +const { ono } = __webpack_require__(114); +const url = __webpack_require__(639); + +module.exports = { + /** + * The order that this resolver will run, in relation to other resolvers. + * + * @type {number} + */ + order: 100, + + /** + * Determines whether this resolver can read a given file reference. + * Resolvers that return true will be tried, in order, until one successfully resolves the file. + * Resolvers that return false will not be given a chance to resolve the file. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {boolean} + */ + canRead (file) { + return url.isFileSystemPath(file.url); + }, + + /** + * Reads the given file and returns its raw contents as a Buffer. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {Promise} + */ + read (file) { + return new Promise(((resolve, reject) => { + let path; + try { + path = url.toFileSystemPath(file.url); + } + catch (err) { + reject(ono.uri(err, `Malformed URI: ${file.url}`)); + } + + // console.log('Opening file: %s', path); + + try { + fs.readFile(path, (err, data) => { + if (err) { + reject(ono(err, `Error opening file "${path}"`)); + } + else { + resolve(data); + } + }); + } + catch (err) { + reject(ono(err, `Error opening file "${path}"`)); + } + })); + } +}; + + +/***/ }), +/* 525 */, +/* 526 */ +/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) { + +const core = __webpack_require__(470); +const Generator = __webpack_require__(585); +const path = __webpack_require__(622); +const { paramParser, createOutputDir, listOutputFiles } = __webpack_require__(421); + +const DEFAULT_TEMPLATE = '@asyncapi/markdown-template'; +const DEFAULT_FILEPATH = 'asyncapi.yml'; +const DEFAULT_OUTPUT = 'output'; + +async function run() { + try { + const template = core.getInput('template') || DEFAULT_TEMPLATE; + const filepath = core.getInput('filepath') || DEFAULT_FILEPATH; + const parameters = paramParser(core.getInput('parameters')); + const output = core.getInput('output') || DEFAULT_OUTPUT; + const workdir = process.env.GITHUB_WORKSPACE || __dirname; + const absoluteOutputPath = path.resolve(workdir, output); + + createOutputDir(absoluteOutputPath); + + const generator = new Generator(template, absoluteOutputPath, { + templateParams: parameters, + forceWrite: true + }); + + await generator.generateFromFile(path.resolve(workdir,filepath)); + + core.setOutput('files', await listOutputFiles(absoluteOutputPath)); + } catch (e) { + core.setFailed(e.message); + } +} + +run(); + + +/***/ }), +/* 527 */, +/* 528 */, +/* 529 */, +/* 530 */, +/* 531 */, +/* 532 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_dependencies(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $schemaDeps = {}, + $propertyDeps = {}, + $ownProperties = it.opts.ownProperties; + for ($property in $schema) { + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } + out += 'var ' + ($errs) + ' = errors;'; + var $currentErrorPath = it.errorPath; + out += 'var missing' + ($lvl) + ';'; + for (var $property in $propertyDeps) { + $deps = $propertyDeps[$property]; + if ($deps.length) { + out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + if ($breakOnError) { + out += ' && ( '; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ')) { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + out += ' ) { '; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + } + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; + for (var $property in $schemaDeps) { + var $sch = $schemaDeps[$property]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 533 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), +/* 534 */, +/* 535 */, +/* 536 */, +/* 537 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +const utils = __webpack_require__(265); +const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ +} = __webpack_require__(446); + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), and `negated` (true if the path starts with `!`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + } + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +module.exports = scan; + + +/***/ }), +/* 538 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var compileSchema = __webpack_require__(717) + , resolve = __webpack_require__(246) + , Cache = __webpack_require__(908) + , SchemaObject = __webpack_require__(925) + , stableStringify = __webpack_require__(741) + , formats = __webpack_require__(995) + , rules = __webpack_require__(216) + , $dataMetaSchema = __webpack_require__(292) + , util = __webpack_require__(676); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = __webpack_require__(727); +var customKeyword = __webpack_require__(893); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; + +var errorClasses = __webpack_require__(837); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; + this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + addDraft6MetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i extensions.has(path.extname(filePath).slice(1).toLowerCase()); + + +/***/ }), +/* 548 */, +/* 549 */, +/* 550 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var domain; // The domain module is executed on demand +var hasSetImmediate = typeof setImmediate === "function"; + +// Use the fastest means possible to execute a task in its own turn, with +// priority over other events including network IO events in Node.js. +// +// An exception thrown by a task will permanently interrupt the processing of +// subsequent tasks. The higher level `asap` function ensures that if an +// exception is thrown by a task, that the task queue will continue flushing as +// soon as possible, but if you use `rawAsap` directly, you are responsible to +// either ensure that no exceptions are thrown from your task, or to manually +// call `rawAsap.requestFlush` if an exception is thrown. +module.exports = rawAsap; +function rawAsap(task) { + if (!queue.length) { + requestFlush(); + flushing = true; + } + // Avoids a function call + queue[queue.length] = task; +} + +var queue = []; +// Once a flush has been requested, no further calls to `requestFlush` are +// necessary until the next `flush` completes. +var flushing = false; +// The position of the next task to execute in the task queue. This is +// preserved between calls to `flush` so that it can be resumed if +// a task throws an exception. +var index = 0; +// If a task schedules additional tasks recursively, the task queue can grow +// unbounded. To prevent memory excaustion, the task queue will periodically +// truncate already-completed tasks. +var capacity = 1024; + +// The flush function processes all tasks that have been scheduled with +// `rawAsap` unless and until one of those tasks throws an exception. +// If a task throws an exception, `flush` ensures that its state will remain +// consistent and will resume where it left off when called again. +// However, `flush` does not make any arrangements to be called again if an +// exception is thrown. +function flush() { + while (index < queue.length) { + var currentIndex = index; + // Advance the index before calling the task. This ensures that we will + // begin flushing on the next task the task throws an error. + index = index + 1; + queue[currentIndex].call(); + // Prevent leaking memory for long chains of recursive calls to `asap`. + // If we call `asap` within tasks scheduled by `asap`, the queue will + // grow, but to avoid an O(n) walk for every task we execute, we don't + // shift tasks off the queue after they have been executed. + // Instead, we periodically shift 1024 tasks off the queue. + if (index > capacity) { + // Manually shift all values starting at the index back to the + // beginning of the queue. + for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { + queue[scan] = queue[scan + index]; + } + queue.length -= index; + index = 0; + } + } + queue.length = 0; + index = 0; + flushing = false; +} + +rawAsap.requestFlush = requestFlush; +function requestFlush() { + // Ensure flushing is not bound to any domain. + // It is not sufficient to exit the domain, because domains exist on a stack. + // To execute code outside of any domain, the following dance is necessary. + var parentDomain = process.domain; + if (parentDomain) { + if (!domain) { + // Lazy execute the domain module. + // Only employed if the user elects to use domains. + domain = __webpack_require__(923); + } + domain.active = process.domain = null; + } + + // `setImmediate` is slower that `process.nextTick`, but `process.nextTick` + // cannot handle recursion. + // `requestFlush` will only be called recursively from `asap.js`, to resume + // flushing after an error is thrown into a domain. + // Conveniently, `setImmediate` was introduced in the same version + // `process.nextTick` started throwing recursion errors. + if (flushing && hasSetImmediate) { + setImmediate(flush); + } else { + process.nextTick(flush); + } + + if (parentDomain) { + domain.active = process.domain = parentDomain; + } +} + + +/***/ }), +/* 551 */, +/* 552 */, +/* 553 */, +/* 554 */, +/* 555 */, +/* 556 */ +/***/ (function(module) { + +"use strict"; +// YAML error class. http://stackoverflow.com/questions/8458984 +// + + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +module.exports = YAMLException; + + +/***/ }), +/* 557 */, +/* 558 */, +/* 559 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var origSymbol = global.Symbol; +var hasSymbolSham = __webpack_require__(826); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), +/* 560 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 561 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 562 */, +/* 563 */, +/* 564 */, +/* 565 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var lib = __webpack_require__(388); + +var _require = __webpack_require__(423), + Environment = _require.Environment, + Template = _require.Template; + +var Loader = __webpack_require__(857); + +var loaders = __webpack_require__(224); + +var precompile = __webpack_require__(270); + +var compiler = __webpack_require__(377); + +var parser = __webpack_require__(950); + +var lexer = __webpack_require__(410); + +var runtime = __webpack_require__(575); + +var nodes = __webpack_require__(690); + +var installJinjaCompat = __webpack_require__(684); // A single instance of an environment, since this is so commonly used + + +var e; + +function configure(templatesPath, opts) { + opts = opts || {}; + + if (lib.isObject(templatesPath)) { + opts = templatesPath; + templatesPath = null; + } + + var TemplateLoader; + + if (loaders.FileSystemLoader) { + TemplateLoader = new loaders.FileSystemLoader(templatesPath, { + watch: opts.watch, + noCache: opts.noCache + }); + } else if (loaders.WebLoader) { + TemplateLoader = new loaders.WebLoader(templatesPath, { + useCache: opts.web && opts.web.useCache, + async: opts.web && opts.web.async + }); + } + + e = new Environment(TemplateLoader, opts); + + if (opts && opts.express) { + e.express(opts.express); + } + + return e; +} + +module.exports = { + Environment: Environment, + Template: Template, + Loader: Loader, + FileSystemLoader: loaders.FileSystemLoader, + NodeResolveLoader: loaders.NodeResolveLoader, + PrecompiledLoader: loaders.PrecompiledLoader, + WebLoader: loaders.WebLoader, + compiler: compiler, + parser: parser, + lexer: lexer, + runtime: runtime, + lib: lib, + nodes: nodes, + installJinjaCompat: installJinjaCompat, + configure: configure, + reset: function reset() { + e = undefined; + }, + compile: function compile(src, env, path, eagerCompile) { + if (!e) { + configure(); + } + + return new Template(src, env, path, eagerCompile); + }, + render: function render(name, ctx, cb) { + if (!e) { + configure(); + } + + return e.render(name, ctx, cb); + }, + renderString: function renderString(src, ctx, cb) { + if (!e) { + configure(); + } + + return e.renderString(src, ctx, cb); + }, + precompile: precompile ? precompile.precompile : undefined, + precompileString: precompile ? precompile.precompileString : undefined +}; + +/***/ }), +/* 566 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + if (er.code === "EISDIR") + return rmdir(p, options, er, cb) + } + return cb(er) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) + assert(er instanceof Error) + + options.chmod(p, 666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, options, er, cb) + else + options.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, options, er) { + assert(p) + assert(options) + if (er) + assert(er instanceof Error) + + try { + options.chmodSync(p, 666) + } catch (er2) { + if (er2.code === "ENOENT") + return + else + throw er + } + + try { + var stats = options.statSync(p) + } catch (er3) { + if (er3.code === "ENOENT") + return + else + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, options, er) + else + options.unlinkSync(p) +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return options.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), options, function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + options.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + options = options || {} + defaults(options) + + assert(p) + assert(options) + + try { + options.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + if (er.code !== "EISDIR") + throw er + rmdirSync(p, options, er) + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options) + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f), options) + }) + options.rmdirSync(p, options) +} + + +/***/ }), +/* 570 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + + + + +var Schema = __webpack_require__(43); + + +module.exports = new Schema({ + include: [ + __webpack_require__(611) + ], + implicit: [ + __webpack_require__(82), + __webpack_require__(633) + ], + explicit: [ + __webpack_require__(913), + __webpack_require__(842), + __webpack_require__(947), + __webpack_require__(100) + ] +}); + + +/***/ }), +/* 571 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 572 */, +/* 573 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const OperationTraitable = __webpack_require__(416); +const Message = __webpack_require__(212); + +/** + * Implements functions to deal with an Operation object. + * @class + * @extends OperationTraitable + * @returns {Operation} + */ +class Operation extends OperationTraitable { + /** + * @returns {boolean} + */ + hasMultipleMessages() { + if (this._json.message && this._json.message.oneOf && this._json.message.oneOf.length > 1) return true; + if (!this._json.message) return false; + return false; + } + + /** + * @returns {Message[]} + */ + messages() { + if (!this._json.message) return []; + if (this._json.message.oneOf) return this._json.message.oneOf.map(m => new Message(m)); + return [new Message(this._json.message)]; + } + + /** + * @returns {Message} + */ + message(index) { + if (!this._json.message) return null; + if (!this._json.message.oneOf) return new Message(this._json.message); + if (index > this._json.message.oneOf.length - 1) return null; + return new Message(this._json.message.oneOf[index]); + } +} + +module.exports = Operation; + + +/***/ }), +/* 574 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var Type = __webpack_require__(945); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + + +/***/ }), +/* 575 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var lib = __webpack_require__(388); + +var arrayFrom = Array.from; +var supportsIterators = typeof Symbol === 'function' && Symbol.iterator && typeof arrayFrom === 'function'; // Frames keep track of scoping both at compile-time and run-time so +// we know how to access variables. Block tags can introduce special +// variables, for example. + +var Frame = /*#__PURE__*/function () { + function Frame(parent, isolateWrites) { + this.variables = {}; + this.parent = parent; + this.topLevel = false; // if this is true, writes (set) should never propagate upwards past + // this frame to its parent (though reads may). + + this.isolateWrites = isolateWrites; + } + + var _proto = Frame.prototype; + + _proto.set = function set(name, val, resolveUp) { + // Allow variables with dots by automatically creating the + // nested structure + var parts = name.split('.'); + var obj = this.variables; + var frame = this; + + if (resolveUp) { + if (frame = this.resolve(parts[0], true)) { + frame.set(name, val); + return; + } + } + + for (var i = 0; i < parts.length - 1; i++) { + var id = parts[i]; + + if (!obj[id]) { + obj[id] = {}; + } + + obj = obj[id]; + } + + obj[parts[parts.length - 1]] = val; + }; + + _proto.get = function get(name) { + var val = this.variables[name]; + + if (val !== undefined) { + return val; + } + + return null; + }; + + _proto.lookup = function lookup(name) { + var p = this.parent; + var val = this.variables[name]; + + if (val !== undefined) { + return val; + } + + return p && p.lookup(name); + }; + + _proto.resolve = function resolve(name, forWrite) { + var p = forWrite && this.isolateWrites ? undefined : this.parent; + var val = this.variables[name]; + + if (val !== undefined) { + return this; + } + + return p && p.resolve(name); + }; + + _proto.push = function push(isolateWrites) { + return new Frame(this, isolateWrites); + }; + + _proto.pop = function pop() { + return this.parent; + }; + + return Frame; +}(); + +function makeMacro(argNames, kwargNames, func) { + var _this = this; + + return function () { + for (var _len = arguments.length, macroArgs = new Array(_len), _key = 0; _key < _len; _key++) { + macroArgs[_key] = arguments[_key]; + } + + var argCount = numArgs(macroArgs); + var args; + var kwargs = getKeywordArgs(macroArgs); + + if (argCount > argNames.length) { + args = macroArgs.slice(0, argNames.length); // Positional arguments that should be passed in as + // keyword arguments (essentially default values) + + macroArgs.slice(args.length, argCount).forEach(function (val, i) { + if (i < kwargNames.length) { + kwargs[kwargNames[i]] = val; + } + }); + args.push(kwargs); + } else if (argCount < argNames.length) { + args = macroArgs.slice(0, argCount); + + for (var i = argCount; i < argNames.length; i++) { + var arg = argNames[i]; // Keyword arguments that should be passed as + // positional arguments, i.e. the caller explicitly + // used the name of a positional arg + + args.push(kwargs[arg]); + delete kwargs[arg]; + } + + args.push(kwargs); + } else { + args = macroArgs; + } + + return func.apply(_this, args); + }; +} + +function makeKeywordArgs(obj) { + obj.__keywords = true; + return obj; +} + +function isKeywordArgs(obj) { + return obj && Object.prototype.hasOwnProperty.call(obj, '__keywords'); +} + +function getKeywordArgs(args) { + var len = args.length; + + if (len) { + var lastArg = args[len - 1]; + + if (isKeywordArgs(lastArg)) { + return lastArg; + } + } + + return {}; +} + +function numArgs(args) { + var len = args.length; + + if (len === 0) { + return 0; + } + + var lastArg = args[len - 1]; + + if (isKeywordArgs(lastArg)) { + return len - 1; + } else { + return len; + } +} // A SafeString object indicates that the string should not be +// autoescaped. This happens magically because autoescaping only +// occurs on primitive string objects. + + +function SafeString(val) { + if (typeof val !== 'string') { + return val; + } + + this.val = val; + this.length = val.length; +} + +SafeString.prototype = Object.create(String.prototype, { + length: { + writable: true, + configurable: true, + value: 0 + } +}); + +SafeString.prototype.valueOf = function valueOf() { + return this.val; +}; + +SafeString.prototype.toString = function toString() { + return this.val; +}; + +function copySafeness(dest, target) { + if (dest instanceof SafeString) { + return new SafeString(target); + } + + return target.toString(); +} + +function markSafe(val) { + var type = typeof val; + + if (type === 'string') { + return new SafeString(val); + } else if (type !== 'function') { + return val; + } else { + return function wrapSafe(args) { + var ret = val.apply(this, arguments); + + if (typeof ret === 'string') { + return new SafeString(ret); + } + + return ret; + }; + } +} + +function suppressValue(val, autoescape) { + val = val !== undefined && val !== null ? val : ''; + + if (autoescape && !(val instanceof SafeString)) { + val = lib.escape(val.toString()); + } + + return val; +} + +function ensureDefined(val, lineno, colno) { + if (val === null || val === undefined) { + throw new lib.TemplateError('attempted to output null or undefined value', lineno + 1, colno + 1); + } + + return val; +} + +function memberLookup(obj, val) { + if (obj === undefined || obj === null) { + return undefined; + } + + if (typeof obj[val] === 'function') { + return function () { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return obj[val].apply(obj, args); + }; + } + + return obj[val]; +} + +function callWrap(obj, name, context, args) { + if (!obj) { + throw new Error('Unable to call `' + name + '`, which is undefined or falsey'); + } else if (typeof obj !== 'function') { + throw new Error('Unable to call `' + name + '`, which is not a function'); + } + + return obj.apply(context, args); +} + +function contextOrFrameLookup(context, frame, name) { + var val = frame.lookup(name); + return val !== undefined ? val : context.lookup(name); +} + +function handleError(error, lineno, colno) { + if (error.lineno) { + return error; + } else { + return new lib.TemplateError(error, lineno, colno); + } +} + +function asyncEach(arr, dimen, iter, cb) { + if (lib.isArray(arr)) { + var len = arr.length; + lib.asyncIter(arr, function iterCallback(item, i, next) { + switch (dimen) { + case 1: + iter(item, i, len, next); + break; + + case 2: + iter(item[0], item[1], i, len, next); + break; + + case 3: + iter(item[0], item[1], item[2], i, len, next); + break; + + default: + item.push(i, len, next); + iter.apply(this, item); + } + }, cb); + } else { + lib.asyncFor(arr, function iterCallback(key, val, i, len, next) { + iter(key, val, i, len, next); + }, cb); + } +} + +function asyncAll(arr, dimen, func, cb) { + var finished = 0; + var len; + var outputArr; + + function done(i, output) { + finished++; + outputArr[i] = output; + + if (finished === len) { + cb(null, outputArr.join('')); + } + } + + if (lib.isArray(arr)) { + len = arr.length; + outputArr = new Array(len); + + if (len === 0) { + cb(null, ''); + } else { + for (var i = 0; i < arr.length; i++) { + var item = arr[i]; + + switch (dimen) { + case 1: + func(item, i, len, done); + break; + + case 2: + func(item[0], item[1], i, len, done); + break; + + case 3: + func(item[0], item[1], item[2], i, len, done); + break; + + default: + item.push(i, len, done); + func.apply(this, item); + } + } + } + } else { + var keys = lib.keys(arr || {}); + len = keys.length; + outputArr = new Array(len); + + if (len === 0) { + cb(null, ''); + } else { + for (var _i = 0; _i < keys.length; _i++) { + var k = keys[_i]; + func(k, arr[k], _i, len, done); + } + } + } +} + +function fromIterator(arr) { + if (typeof arr !== 'object' || arr === null || lib.isArray(arr)) { + return arr; + } else if (supportsIterators && Symbol.iterator in arr) { + return arrayFrom(arr); + } else { + return arr; + } +} + +module.exports = { + Frame: Frame, + makeMacro: makeMacro, + makeKeywordArgs: makeKeywordArgs, + numArgs: numArgs, + suppressValue: suppressValue, + ensureDefined: ensureDefined, + memberLookup: memberLookup, + contextOrFrameLookup: contextOrFrameLookup, + callWrap: callWrap, + handleError: handleError, + isArray: lib.isArray, + keys: lib.keys, + SafeString: SafeString, + copySafeness: copySafeness, + markSafe: markSafe, + asyncEach: asyncEach, + asyncAll: asyncAll, + inOperator: lib.inOperator, + fromIterator: fromIterator +}; + +/***/ }), +/* 576 */, +/* 577 */, +/* 578 */, +/* 579 */, +/* 580 */, +/* 581 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + + + + +var Schema = __webpack_require__(43); + + +module.exports = new Schema({ + explicit: [ + __webpack_require__(574), + __webpack_require__(921), + __webpack_require__(988) + ] +}); + + +/***/ }), +/* 582 */, +/* 583 */, +/* 584 */, +/* 585 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const path = __webpack_require__(622); +const fs = __webpack_require__(747); +const xfs = __webpack_require__(344); +const walkSync = __webpack_require__(502); +const minimatch = __webpack_require__(723); +const parser = __webpack_require__(474); +const { parse, AsyncAPIDocument } = parser; +const ramlDtParser = __webpack_require__(260); +const openapiSchemaParser = __webpack_require__(694); +const Nunjucks = __webpack_require__(565); +const jmespath = __webpack_require__(802); +const Ajv = __webpack_require__(514); +const filenamify = __webpack_require__(83); +const git = __webpack_require__(57); +const npmi = __webpack_require__(234); +const { + convertMapToObject, + isFileSystemPath, + beautifyNpmiResult, + isLocalTemplate, + getLocalTemplateDetails, + readFile, + readDir, + writeFile, + copyFile, + exists, +} = __webpack_require__(278); + +const ajv = new Ajv({ allErrors: true }); + +parser.registerSchemaParser([ + 'application/vnd.oai.openapi;version=3.0.0', + 'application/vnd.oai.openapi+json;version=3.0.0', + 'application/vnd.oai.openapi+yaml;version=3.0.0', +], openapiSchemaParser); + +parser.registerSchemaParser([ + 'application/raml+yaml;version=1.0', +], ramlDtParser); + +const FILTERS_DIRNAME = '.filters'; +const PARTIALS_DIRNAME = '.partials'; +const HOOKS_DIRNAME = '.hooks'; +const NODE_MODULES_DIRNAME = 'node_modules'; +const CONFIG_FILENAME = '.tp-config.json'; +const PACKAGE_JSON_FILENAME = 'package.json'; +const PACKAGE_LOCK_FILENAME = 'package-lock.json'; +const ROOT_DIR = path.resolve(__dirname, '..'); +const DEFAULT_TEMPLATES_DIR = path.resolve(ROOT_DIR, 'node_modules'); + +const shouldIgnoreFile = filePath => + filePath.startsWith(`.git${path.sep}`) + || filePath.startsWith(`${PARTIALS_DIRNAME}${path.sep}`) + || filePath.startsWith(`${FILTERS_DIRNAME}${path.sep}`) + || filePath.startsWith(`${HOOKS_DIRNAME}${path.sep}`) + || path.basename(filePath) === CONFIG_FILENAME + || path.basename(filePath) === PACKAGE_JSON_FILENAME + || path.basename(filePath) === PACKAGE_LOCK_FILENAME + || filePath.startsWith(`${NODE_MODULES_DIRNAME}${path.sep}`); + +const shouldIgnoreDir = dirPath => + dirPath === '.git' + || dirPath.startsWith(`.git${path.sep}`) + || dirPath === PARTIALS_DIRNAME + || dirPath.startsWith(`${PARTIALS_DIRNAME}${path.sep}`) + || dirPath === FILTERS_DIRNAME + || dirPath.startsWith(`${FILTERS_DIRNAME}${path.sep}`) + || dirPath === HOOKS_DIRNAME + || dirPath.startsWith(`${HOOKS_DIRNAME}${path.sep}`) + || dirPath === NODE_MODULES_DIRNAME + || dirPath.startsWith(`${NODE_MODULES_DIRNAME}${path.sep}`); + +class Generator { + /** + * Instantiates a new Generator object. + * + * @example + * const path = require('path'); + * const generator = new Generator('html', path.resolve(__dirname, 'example')); + * + * @example Passing custom params to the template + * const path = require('path'); + * const generator = new Generator('html', path.resolve(__dirname, 'example'), { + * templateParams: { + * sidebarOrganization: 'byTags' + * } + * }); + * + * @param {String} templateName Name of the template to generate. + * @param {String} targetDir Path to the directory where the files will be generated. + * @param {Object} options + * @param {String} [options.templateParams] Optional parameters to pass to the template. Each template define their own params. + * @param {String} [options.entrypoint] Name of the file to use as the entry point for the rendering process. Use in case you want to use only a specific template file. Note: this potentially avoids rendering every file in the template. + * @param {String[]} [options.noOverwriteGlobs] List of globs to skip when regenerating the template. + * @param {String[]} [options.disabledHooks] List of hooks to disable. + * @param {String} [options.output='fs'] Type of output. Can be either 'fs' (default) or 'string'. Only available when entrypoint is set. + * @param {Boolean} [options.forceWrite=false] Force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir. Default is set to false. + * @param {Boolean} [options.install=false] Install the template and its dependencies, even when the template has already been installed. + */ + constructor(templateName, targetDir, { templateParams = {}, entrypoint, noOverwriteGlobs, disabledHooks, output = 'fs', forceWrite = false, install = false } = {}) { + if (!templateName) throw new Error('No template name has been specified.'); + if (!entrypoint && !targetDir) throw new Error('No target directory has been specified.'); + if (!['fs', 'string'].includes(output)) throw new Error(`Invalid output type ${output}. Valid values are 'fs' and 'string'.`); + + this.templateName = templateName; + this.targetDir = targetDir; + this.entrypoint = entrypoint; + this.noOverwriteGlobs = noOverwriteGlobs || []; + this.disabledHooks = disabledHooks || []; + this.output = output; + this.forceWrite = forceWrite; + this.install = install; + + // Load template configuration + this.templateParams = {}; + Object.keys(templateParams).forEach(key => { + const self = this; + Object.defineProperty(this.templateParams, key, { + get() { + if (!self.templateConfig.parameters || !self.templateConfig.parameters[key]) { + throw new Error(`Template parameter "${key}" has not been defined in the .tp-config.json file. Please make sure it's listed there before you use it in your template.`); + } + return templateParams[key]; + } + }); + }); + } + + /** + * Generates files from a given template and an AsyncAPIDocument object. + * + * @example + * generator + * .generate(myAsyncAPIdocument) + * .then(() => { + * console.log('Done!'); + * }) + * .catch(console.error); + * + * @example Using async/await + * try { + * await generator.generate(myAsyncAPIdocument); + * console.log('Done!'); + * } catch (e) { + * console.error(e); + * } + * + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPIDocument object to use as source. + * @return {Promise} + */ + async generate(asyncapiDocument) { + if (!(asyncapiDocument instanceof AsyncAPIDocument)) throw new Error('Parameter "asyncapiDocument" must be an AsyncAPIDocument object.'); + + try { + if (!this.forceWrite) await this.verifyTargetDir(this.targetDir); + const { name: templatePkgName, path: templatePkgPath } = await this.installTemplate(this.install); + this.templateDir = templatePkgPath; + this.templateName = templatePkgName; + this.configNunjucks(); + await this.loadTemplateConfig(); + this.registerHooks(); + await this.registerFilters(); + + if (this.entrypoint) { + const entrypointPath = path.resolve(this.templateDir, this.entrypoint); + if (!(await exists(entrypointPath))) throw new Error(`Template entrypoint "${entrypointPath}" couldn't be found.`); + if (this.output === 'fs') { + await this.generateFile(asyncapiDocument, path.basename(entrypointPath), path.dirname(entrypointPath)); + await this.launchHook('generate:after'); + return; + } else if (this.output === 'string') { + return this.renderString(asyncapiDocument, await readFile(entrypointPath, { encoding: 'utf8' }), entrypointPath); + } + } + await this.validateTemplateConfig(asyncapiDocument); + await this.generateDirectoryStructure(asyncapiDocument); + await this.launchHook('generate:after'); + } catch (e) { + throw e; + } + } + + /** + * Generates files from a given template and AsyncAPI string. + * + * @example + * const asyncapiString = ` + * asyncapi: '2.0.0' + * info: + * title: Example + * version: 1.0.0 + * ... + * `; + * generator + * .generateFromString(asyncapiString) + * .then(() => { + * console.log('Done!'); + * }) + * .catch(console.error); + * + * @example Using async/await + * const asyncapiString = ` + * asyncapi: '2.0.0' + * info: + * title: Example + * version: 1.0.0 + * ... + * `; + * + * try { + * await generator.generateFromString(asyncapiString); + * console.log('Done!'); + * } catch (e) { + * console.error(e); + * } + * + * @param {String} asyncapiString AsyncAPI string to use as source. + * @param {String} [asyncApiFileLocation] AsyncAPI file location, used by the @asyncapi/parser for references. + * @return {Promise} + */ + async generateFromString(asyncapiString, asyncApiFileLocation) { + if (!asyncapiString || typeof asyncapiString !== 'string') throw new Error('Parameter "asyncapiString" must be a non-empty string.'); + + this.originalAsyncAPI = asyncapiString; + const parseOptions = {}; + + if (asyncApiFileLocation) { + parseOptions.path = asyncApiFileLocation; + } + + try { + this.asyncapi = await parse(asyncapiString, parseOptions); + return this.generate(this.asyncapi); + } catch (e) { + throw e; + } + } + + /** + * Generates files from a given template and AsyncAPI file. + * + * @example + * generator + * .generateFromFile('asyncapi.yaml') + * .then(() => { + * console.log('Done!'); + * }) + * .catch(console.error); + * + * @example Using async/await + * try { + * await generator.generateFromFile('asyncapi.yaml'); + * console.log('Done!'); + * } catch (e) { + * console.error(e); + * } + * + * @param {String} asyncapiFile AsyncAPI file to use as source. + * @return {Promise} + */ + async generateFromFile(asyncapiFile) { + try { + const doc = await readFile(asyncapiFile, { encoding: 'utf8' }); + return this.generateFromString(doc, asyncapiFile); + } catch (e) { + throw e; + } + } + + /** + * Returns the content of a given template file. + * + * @example + * const Generator = require('asyncapi-generator'); + * const content = await Generator.getTemplateFile('html', '.partials/content.html'); + * + * @static + * @param {String} templateName Name of the template to generate. + * @param {String} filePath Path to the file to render. Relative to the template directory. + * @param {Object} options + * @return {Promise} + */ + static async getTemplateFile(templateName, filePath) { + return await readFile(path.resolve(DEFAULT_TEMPLATES_DIR, templateName, filePath), 'utf8'); + } + + /** + * Downloads and installs a template and its dependencies. + * + * @param {Boolean} [force=false] Whether to force installation (and skip cache) or not. + */ + installTemplate(force = false) { + return new Promise(async (resolve, reject) => { + if (!force) { + try { + let installedPkg; + + if (isFileSystemPath(this.templateName)) { + const pkg = require(path.resolve(this.templateName, PACKAGE_JSON_FILENAME)); + installedPkg = require(path.resolve(DEFAULT_TEMPLATES_DIR, pkg.name, PACKAGE_JSON_FILENAME)); + } else { // Template is not a filesystem path... + const templatePath = path.resolve(DEFAULT_TEMPLATES_DIR, this.templateName); + if (await isLocalTemplate(templatePath)) { + const { resolvedLink } = await getLocalTemplateDetails(templatePath); + console.info(`This template has already been installed and it's pointing to your filesystem at ${resolvedLink}.`); + } + installedPkg = require(path.resolve(templatePath, PACKAGE_JSON_FILENAME)); + } + + + return resolve({ + name: installedPkg.name, + version: installedPkg.version, + path: path.resolve(DEFAULT_TEMPLATES_DIR, installedPkg.name), + }); + } catch (e) { + // We did our best. Proceed with installation... + } + } + + npmi({ + name: this.templateName, + install: force, + pkgName: 'dummy value so it does not force installation always', + npmLoad: { + loglevel: 'http', + save: false, + audit: false, + progress: false, + }, + }, (err, result) => { + if (err) return reject(err); + resolve(beautifyNpmiResult(result)); + }); + }); + } + + /** + * Registers the template filters. + * @private + */ + registerFilters() { + return new Promise((resolve, reject) => { + this.helpersDir = path.resolve(this.templateDir, FILTERS_DIRNAME); + if (!fs.existsSync(this.helpersDir)) return resolve(); + + const walker = xfs.walk(this.helpersDir, { + followLinks: false + }); + + walker.on('file', async (root, stats, next) => { + try { + const filePath = path.resolve(this.templateDir, path.resolve(root, stats.name)); + // If it's a module constructor, inject dependencies to ensure consistent usage in remote templates in other projects or plain directories. + const mod = require(filePath); + if (typeof mod === 'function') { + mod({ Nunjucks: this.nunjucks }); + } + next(); + } catch (e) { + reject(e); + } + }); + + walker.on('errors', (root, nodeStatsArray) => { + reject(nodeStatsArray); + }); + + walker.on('end', async () => { + resolve(); + }); + }); + } + + /** + * Returns all the parameters on the AsyncAPI document. + * + * @private + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to use as the source. + */ + getAllParameters(asyncapiDocument) { + const parameters = new Map(); + + if (asyncapiDocument.hasChannels()) { + asyncapiDocument.channelNames().forEach(channelName => { + const channel = asyncapiDocument.channel(channelName); + for (const [key, value] of Object.entries(channel.parameters())) { + parameters.set(key, value); + } + }); + } + + if (asyncapiDocument.hasComponents()) { + for (const [key, value] of Object.entries(asyncapiDocument.components().parameters())) { + parameters.set(key, value); + } + } + + return parameters; + } + + /** + * Generates the directory structure. + * + * @private + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to use as the source. + * @return {Promise} + */ + generateDirectoryStructure(asyncapiDocument) { + const fileNamesForSeparation = { + channel: asyncapiDocument.channels(), + message: convertMapToObject(asyncapiDocument.allMessages()), + securityScheme: asyncapiDocument.components() ? asyncapiDocument.components().securitySchemes() : {}, + schema: asyncapiDocument.components() ? asyncapiDocument.components().schemas() : {}, + parameter: convertMapToObject(this.getAllParameters(asyncapiDocument)), + everySchema: convertMapToObject(asyncapiDocument.allSchemas()), + }; + + return new Promise((resolve, reject) => { + xfs.mkdirpSync(this.targetDir); + + const walker = xfs.walk(this.templateDir, { + followLinks: false + }); + + walker.on('file', async (root, stats, next) => { + try { + // Check if the filename dictates it should be separated + let wasSeparated = false; + for (const prop in fileNamesForSeparation) { + if (Object.prototype.hasOwnProperty.call(fileNamesForSeparation, prop)) { + if (stats.name.includes(`$$${prop}$$`)) { + await this.generateSeparateFiles(asyncapiDocument, fileNamesForSeparation[prop], prop, stats.name, root); + const templateFilePath = path.relative(this.templateDir, path.resolve(root, stats.name)); + fs.unlink(path.resolve(this.targetDir, templateFilePath), next); + wasSeparated = true; + //The filename can only contain 1 specifier (message, scheme etc) + break; + } + } + } + // If it was not separated process normally + if (!wasSeparated) { + await this.generateFile(asyncapiDocument, stats.name, root); + next(); + } + } catch (e) { + reject(e); + } + }); + + walker.on('directory', async (root, stats, next) => { + try { + const relativeDir = path.relative(this.templateDir, path.resolve(root, stats.name)); + const dirPath = path.resolve(this.targetDir, relativeDir); + if (!shouldIgnoreDir(relativeDir)) { + xfs.mkdirpSync(dirPath); + } + next(); + } catch (e) { + reject(e); + } + }); + + walker.on('errors', (root, nodeStatsArray) => { + reject(nodeStatsArray); + }); + + walker.on('end', async () => { + resolve(); + }); + }); + } + + /** + * Generates all the files for each in array + * + * @private + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to use as the source. + * @param {Array} array The components/channels to generate the separeted files for. + * @param {String} template The template filename to replace. + * @param {String} fileName Name of the file to generate for each security schema. + * @param {String} baseDir Base directory of the given file name. + * @returns {Promise} + */ + generateSeparateFiles(asyncapiDocument, array, template, fileName, baseDir) { + const promises = []; + + Object.keys(array).forEach((name) => { + const component = array[name]; + promises.push(this.generateSeparateFile(asyncapiDocument, name, component, template, fileName, baseDir)); + }); + + return Promise.all(promises); + } + + /** + * Generates a file for a component/channel + * + * @private + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to use as the source. + * @param {String} name The name of the component (filename to use) + * @param {Object} component The component/channel object used to generate the file. + * @param {String} template The template filename to replace. + * @param {String} fileName Name of the file to generate for each security schema. + * @param {String} baseDir Base directory of the given file name. + * @returns {Promise} + */ + async generateSeparateFile(asyncapiDocument, name, component, template, fileName, baseDir) { + try { + const relativeBaseDir = path.relative(this.templateDir, baseDir); + const newFileName = fileName.replace(`\$\$${template}\$\$`, filenamify(name, { replacement: '-', maxLength: 255 })); + const targetFile = path.resolve(this.targetDir, relativeBaseDir, newFileName); + const relativeTargetFile = path.relative(this.targetDir, targetFile); + + const shouldOverwriteFile = await this.shouldOverwriteFile(relativeTargetFile); + if (!shouldOverwriteFile) return; + //Ensure the same object are parsed to the renderFile method as before. + const temp = {}; + const key = template === 'everySchema' ? 'schema' : template; + temp[`${key}Name`] = name; + temp[key] = component; + const content = await this.renderFile(asyncapiDocument, path.resolve(baseDir, fileName), temp); + + await writeFile(targetFile, content, 'utf8'); + } catch (e) { + throw e; + } + } + + /** + * Generates a file. + * + * @private + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to use as the source. + * @param {String} fileName Name of the file to generate for each channel. + * @param {String} baseDir Base directory of the given file name. + * @return {Promise} + */ + async generateFile(asyncapiDocument, fileName, baseDir) { + try { + const sourceFile = path.resolve(baseDir, fileName); + const relativeSourceFile = path.relative(this.templateDir, sourceFile); + const targetFile = path.resolve(this.targetDir, relativeSourceFile); + const relativeTargetFile = path.relative(this.targetDir, targetFile); + + if (shouldIgnoreFile(relativeSourceFile)) return; + + if (this.isNonRenderableFile(relativeSourceFile)) { + return await copyFile(sourceFile, targetFile); + } + + const shouldOverwriteFile = await this.shouldOverwriteFile(relativeTargetFile); + if (!shouldOverwriteFile) return; + + if (this.templateConfig.conditionalFiles && this.templateConfig.conditionalFiles[relativeSourceFile]) { + const server = this.templateParams.server && asyncapiDocument.server(this.templateParams.server); + const source = jmespath.search({ + ...asyncapiDocument.json(), + ...{ + server: server ? server.json() : undefined, + }, + }, this.templateConfig.conditionalFiles[relativeSourceFile].subject); + + if (source) { + const validate = this.templateConfig.conditionalFiles[relativeSourceFile].validate; + const valid = validate(source); + if (!valid) return; + } + } + + const parsedContent = await this.renderFile(asyncapiDocument, sourceFile); + const stats = fs.statSync(sourceFile); + await writeFile(targetFile, parsedContent, { encoding: 'utf8', mode: stats.mode }); + } catch (e) { + throw e; + } + } + + /** + * Renders a template string and outputs it. + * + * @private + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to pass to the template. + * @param {String} templateString String containing the template. + * @param {String} filePath Path to the file being rendered. + * @param {Object} [extraTemplateData] Extra data to pass to the template. + * @return {Promise} + */ + renderString(asyncapiDocument, templateString, filePath, extraTemplateData = {}) { + return new Promise((resolve, reject) => { + this.nunjucks.renderString(templateString, { + asyncapi: asyncapiDocument, + params: this.templateParams, + originalAsyncAPI: this.originalAsyncAPI, + ...extraTemplateData + }, { path: filePath }, (err, result) => { + if (err) return reject(err); + resolve(result); + }); + }); + } + + /** + * Renders the content of a file and outputs it. + * + * @private + * @param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to pass to the template. + * @param {String} filePath Path to the file you want to render. + * @param {Object} [extraTemplateData] Extra data to pass to the template. + * @return {Promise} + */ + async renderFile(asyncapiDocument, filePath, extraTemplateData = {}) { + try { + const content = await readFile(filePath, 'utf8'); + return this.renderString(asyncapiDocument, content, filePath, extraTemplateData); + } catch (e) { + throw e; + } + } + + /** + * Checks if a given file name matches the list of non-renderable files. + * + * @private + * @param {string} fileName Name of the file to check against a list of glob patterns. + * @return {boolean} + */ + isNonRenderableFile(fileName) { + if (!Array.isArray(this.templateConfig.nonRenderableFiles)) return false; + + return this.templateConfig.nonRenderableFiles.some(globExp => minimatch(fileName, globExp)); + } + + /** + * Checks if a given file should be overwritten. + * + * @private + * @param {string} filePath Path to the file to check against a list of glob patterns. + * @return {boolean} + */ + async shouldOverwriteFile(filePath) { + if (!Array.isArray(this.noOverwriteGlobs)) return true; + const fileExists = await exists(path.resolve(this.targetDir, filePath)); + if (!fileExists) return true; + + return !this.noOverwriteGlobs.some(globExp => minimatch(filePath, globExp)); + } + + /** + * Configures Nunjucks templating system + * @private + */ + configNunjucks() { + this.nunjucks = new Nunjucks.Environment(new Nunjucks.FileSystemLoader(this.templateDir)); + this.nunjucks.addFilter('log', console.log); + } + + /** + * Loads the template configuration. + * @private + */ + async loadTemplateConfig() { + try { + const configPath = path.resolve(this.templateDir, CONFIG_FILENAME); + if (!fs.existsSync(configPath)) { + this.templateConfig = {}; + return; + } + + const json = fs.readFileSync(configPath, { encoding: 'utf8' }); + this.templateConfig = JSON.parse(json); + } catch (e) { + this.templateConfig = {}; + } + + await this.validateTemplateConfig(); + } + + /** + * Validates the template configuration. + * + * @private + * @param {AsyncAPIDocument} [asyncapiDocument] AsyncAPIDocument object to use as source. + * @return {Promise} + */ + async validateTemplateConfig(asyncapiDocument) { + const { parameters, supportedProtocols, conditionalFiles } = this.templateConfig; + let server; + + const requiredParams = []; + Object.keys(parameters || {}).forEach(key => { + if (parameters[key].required === true) requiredParams.push(key); + }); + + if (Array.isArray(requiredParams)) { + const missingParams = requiredParams.filter(rp => this.templateParams[rp] === undefined); + if (missingParams.length) { + throw new Error(`This template requires the following missing params: ${missingParams}.`); + } + } + + if (typeof conditionalFiles === 'object') { + const fileNames = Object.keys(conditionalFiles) || []; + fileNames.forEach(fileName => { + const def = conditionalFiles[fileName]; + if (typeof def.subject !== 'string') throw new Error(`Invalid conditional file subject for ${fileName}: ${def.subject}.`); + if (typeof def.validation !== 'object') throw new Error(`Invalid conditional file validation object for ${fileName}: ${def.validation}.`); + conditionalFiles[fileName].validate = ajv.compile(conditionalFiles[fileName].validation); + }); + } + + if (asyncapiDocument) { + if (typeof this.templateParams.server === 'string') { + server = asyncapiDocument.server(this.templateParams.server); + if (!server) throw new Error(`Couldn't find server with name ${this.templateParams.server}.`); + } + + if (server && Array.isArray(supportedProtocols)) { + if (!supportedProtocols.includes(server.protocol())) { + throw new Error(`Server "${this.templateParams.server}" uses the ${server.protocol()} protocol but this template only supports the following ones: ${supportedProtocols}.`); + } + } + } + } + + /** + * Loads the template hooks. + * @private + */ + registerHooks() { + try { + this.hooks = {}; + const hooksPath = path.resolve(this.templateDir, HOOKS_DIRNAME); + if (!fs.existsSync(hooksPath)) return this.hooks; + + const files = walkSync(hooksPath, { nodir: true }); + files.forEach(file => { + require(file.path)((when, hook) => { + this.hooks[when] = this.hooks[when] || []; + this.hooks[when].push(hook); + }); + }); + } catch (e) { + e.message = `There was a problem registering the hooks: ${e.message}`; + throw e; + } + } + + /** + * Launches all the hooks registered at a given hook point/name. + * @private + */ + async launchHook(hookName) { + if (this.disabledHooks.includes(hookName)) return; + if (!Array.isArray(this.hooks[hookName])) return; + + const promises = this.hooks[hookName].map(async (hook) => { + if (typeof hook !== 'function') return; + await hook(this); + }); + + return Promise.all(promises); + } + + /** + * Check if given directory is a git repo with unstaged changes and is not in .gitignore or is not empty + * @private + * @param {String} dir Directory that needs to be tested for a given condition. + */ + async verifyTargetDir(dir) { + try { + const isGitRepo = await git(dir).checkIsRepo(); + + if (isGitRepo) { + //Need to figure out root of the repository to properly verify .gitignore + const root = await git(dir).revparse(['--show-toplevel']); + const gitInfo = git(root); + + //Skipping verification if workDir inside repo is declared in .gitignore + const workDir = path.relative(root, dir); + if (workDir) { + const checkGitIgnore = await gitInfo.checkIgnore(workDir); + if (checkGitIgnore.length !== 0) return; + } + + const gitStatus = await gitInfo.status(); + //New files are not tracked and not visible as modified + const hasUntrackedUnstagedFiles = gitStatus.not_added.length !== 0; + + const stagedFiles = gitStatus.staged; + const modifiedFiles = gitStatus.modified; + const hasModifiedUstagedFiles = (modifiedFiles.filter(e => stagedFiles.indexOf(e) === -1)).length !== 0; + + if (hasModifiedUstagedFiles || hasUntrackedUnstagedFiles) throw new Error(`"${this.targetDir}" is in a git repository with unstaged changes. Please commit your changes before proceeding or add proper directory to .gitignore file. You can also use the --force-write flag to skip this rule (not recommended).`); + } else { + const isDirEmpty = (await readDir(dir)).length === 0; + + if (!isDirEmpty) throw new Error(`"${this.targetDir}" is not an empty directory. You might override your work. To skip this rule, please make your code a git repository or use the --force-write flag (not recommended).`); + } + } catch (e) { + throw e; + } + } +} + +Generator.DEFAULT_TEMPLATES_DIR = DEFAULT_TEMPLATES_DIR; + +module.exports = Generator; + + +/***/ }), +/* 586 */, +/* 587 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = isexe +isexe.sync = sync + +var fs = __webpack_require__(747) + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} + + +/***/ }), +/* 588 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + + +/***/ }), +/* 589 */, +/* 590 */, +/* 591 */, +/* 592 */, +/* 593 */, +/* 594 */, +/* 595 */, +/* 596 */, +/* 597 */, +/* 598 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var fs = __webpack_require__(747) +var polyfills = __webpack_require__(250) +var legacy = __webpack_require__(93) +var clone = __webpack_require__(608) + +var util = __webpack_require__(669) + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!global[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = [] + Object.defineProperty(global, gracefulQueue, { + get: function() { + return queue + } + }) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + retry() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + retry() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(global[gracefulQueue]) + __webpack_require__(357).equal(global[gracefulQueue].length, 0) + }) + } +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, options, cb) { + var args = [path] + if (typeof options !== 'function') { + args.push(options) + } else { + cb = options + } + args.push(go$readdir$cb) + + return go$readdir(args) + + function go$readdir$cb (err, files) { + if (files && files.sort) + files.sort() + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [args]]) + + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + } + } + + function go$readdir (args) { + return fs$readdir.apply(fs, args) + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + global[gracefulQueue].push(elem) +} + +function retry () { + var elem = global[gracefulQueue].shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} + + +/***/ }), +/* 599 */ +/***/ (function(module) { + +module.exports = {"$schema":"http://json-schema.org/draft-04/hyper-schema#","id":"http://json-schema.org/draft-04/hyper-schema#","title":"JSON Hyper-Schema","allOf":[{"$ref":"http://json-schema.org/draft-04/schema#"}],"properties":{"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}]},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}]},"dependencies":{"additionalProperties":{"anyOf":[{"$ref":"#"},{"type":"array"}]}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}]},"definitions":{"additionalProperties":{"$ref":"#"}},"patternProperties":{"additionalProperties":{"$ref":"#"}},"properties":{"additionalProperties":{"$ref":"#"}},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"},"links":{"type":"array","items":{"$ref":"#/definitions/linkDescription"}},"fragmentResolution":{"type":"string"},"media":{"type":"object","properties":{"type":{"description":"A media type, as described in RFC 2046","type":"string"},"binaryEncoding":{"description":"A content encoding scheme, as described in RFC 2045","type":"string"}}},"pathStart":{"description":"Instances' URIs must start with this value for this schema to apply to them","type":"string","format":"uri"}},"definitions":{"schemaArray":{"type":"array","items":{"$ref":"#"}},"linkDescription":{"title":"Link Description Object","type":"object","required":["href","rel"],"properties":{"href":{"description":"a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing","type":"string"},"rel":{"description":"relation to the target resource of the link","type":"string"},"title":{"description":"a title for the link","type":"string"},"targetSchema":{"description":"JSON Schema describing the link target","$ref":"#"},"mediaType":{"description":"media type (as defined by RFC 2046) describing the link target","type":"string"},"method":{"description":"method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")","type":"string"},"encType":{"description":"The media type in which to submit data along with the request","type":"string","default":"application/json"},"schema":{"description":"Schema describing the data to submit along with the request","$ref":"#"}}}},"links":[{"rel":"self","href":"{+id}"},{"rel":"full","href":"{+($ref)}"}]}; + +/***/ }), +/* 600 */, +/* 601 */, +/* 602 */, +/* 603 */, +/* 604 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { getMapKeyOfType, addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); +const Tag = __webpack_require__(620); +const ExternalDocs = __webpack_require__(625); +const Schema = __webpack_require__(671); +const CorrelationId = __webpack_require__(889); + +/** + * Implements functions to deal with a the common properties that Message and MessageTrait objects have. + * @class + * @extends Base + * @returns {MessageTraitable} + */ +class MessageTraitable extends Base { + /** + * @returns {Schema} + */ + headers() { + if (!this._json.headers) return null; + return new Schema(this._json.headers); + } + + /** + * @param {string} name - Name of the header. + * @returns {Schema} + */ + header(name) { + if (!this._json.headers) return null; + return getMapKeyOfType(this._json.headers.properties, name, Schema); + } + + /** + * @returns {CorrelationId} + */ + correlationId() { + if (!this._json.correlationId) return null; + return new CorrelationId(this._json.correlationId); + } + + /** + * @returns {string} + */ + schemaFormat() { + return 'application/schema+json;version=draft-07'; + } + + /** + * @returns {string} + */ + contentType() { + return this._json.contentType; + } + + /** + * @returns {string} + */ + name() { + return this._json.name; + } + + /** + * @returns {string} + */ + title() { + return this._json.title; + } + + /** + * @returns {string} + */ + summary() { + return this._json.summary; + } + + /** + * @returns {string} + */ + description() { + return this._json.description; + } + + /** + * @returns {ExternalDocs} + */ + externalDocs() { + if (!this._json.externalDocs) return null; + return new ExternalDocs(this._json.externalDocs); + } + + /** + * @returns {boolean} + */ + hasTags() { + return !!(this._json.tags && this._json.tags.length); + } + + /** + * @returns {Tag[]} + */ + tags() { + if (!this._json.tags) return []; + return this._json.tags.map(t => new Tag(t)); + } + + /** + * @returns {Object} + */ + bindings() { + return this._json.bindings || null; + } + + /** + * @param {string} name - Name of the binding. + * @returns {Object} + */ + binding(name) { + return this._json.bindings ? this._json.bindings[name] : null; + } + + /** + * @returns {any[]} + */ + examples() { + return this._json.examples; + } +} + +module.exports = addExtensions(MessageTraitable); + + +/***/ }), +/* 605 */ +/***/ (function(module) { + +module.exports = require("http"); + +/***/ }), +/* 606 */, +/* 607 */, +/* 608 */ +/***/ (function(module) { + +"use strict"; + + +module.exports = clone + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} + + +/***/ }), +/* 609 */, +/* 610 */, +/* 611 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + + + + +var Schema = __webpack_require__(43); + + +module.exports = new Schema({ + include: [ + __webpack_require__(23) + ] +}); + + +/***/ }), +/* 612 */, +/* 613 */, +/* 614 */ +/***/ (function(module) { + +module.exports = require("events"); + +/***/ }), +/* 615 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 616 */, +/* 617 */, +/* 618 */, +/* 619 */ +/***/ (function(module) { + +module.exports = require("constants"); + +/***/ }), +/* 620 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); +const ExternalDocs = __webpack_require__(625); + +/** + * Implements functions to deal with a Tag object. + * @class + * @extends Base + * @returns {Tag} + */ +class Tag extends Base { + /** + * @returns {string} + */ + name() { + return this._json.name; + } + + /** + * @returns {string} + */ + description() { + return this._json.description; + } + + /** + * @returns {ExternalDocs} + */ + externalDocs() { + if (!this._json.externalDocs) return null; + return new ExternalDocs(this._json.externalDocs); + } +} + +module.exports = addExtensions(Tag); + + +/***/ }), +/* 621 */ +/***/ (function(module) { + +"use strict"; + +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + + +/***/ }), +/* 622 */ +/***/ (function(module) { + +module.exports = require("path"); + +/***/ }), +/* 623 */, +/* 624 */, +/* 625 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); + +/** + * Implements functions to deal with an ExternalDocs object. + * @class + * @extends Base + * @returns {ExternalDocs} + */ +class ExternalDocs extends Base { + /** + * @returns {string} + */ + description() { + return this._json.description; + } + + /** + * @returns {string} + */ + url() { + return this._json.url; + } +} + +module.exports = addExtensions(ExternalDocs); + + +/***/ }), +/* 626 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var path = __webpack_require__(622); +var fs = __webpack_require__(747); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, mode, f, made) { + if (typeof mode === 'function' || mode === undefined) { + f = mode; + mode = 0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + if (typeof mode === 'string') mode = parseInt(mode, 8); + p = path.resolve(p); + + fs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), mode, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, mode, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + fs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, mode, made) { + if (mode === undefined) { + mode = 0777 & (~process.umask()); + } + if (!made) made = null; + + if (typeof mode === 'string') mode = parseInt(mode, 8); + p = path.resolve(p); + + try { + fs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), mode, made); + sync(p, mode, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = fs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; + + +/***/ }), +/* 627 */, +/* 628 */ +/***/ (function(module) { + +"use strict"; + + +var KEYWORDS = [ + 'multipleOf', + 'maximum', + 'exclusiveMaximum', + 'minimum', + 'exclusiveMinimum', + 'maxLength', + 'minLength', + 'pattern', + 'additionalItems', + 'maxItems', + 'minItems', + 'uniqueItems', + 'maxProperties', + 'minProperties', + 'required', + 'additionalProperties', + 'enum', + 'format', + 'const' +]; + +module.exports = function (metaSchema, keywordsJsonPointers) { + for (var i=0; i 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); + + +/***/ }), +/* 630 */, +/* 631 */ +/***/ (function(module) { + + +module.exports = CommitSummary; + +function CommitSummary () { + this.branch = ''; + this.commit = ''; + this.summary = { + changes: 0, + insertions: 0, + deletions: 0 + }; + this.author = null; +} + +var COMMIT_BRANCH_MESSAGE_REGEX = /\[([^\s]+) ([^\]]+)/; +var COMMIT_AUTHOR_MESSAGE_REGEX = /\s*Author:\s(.+)/i; + +function setBranchFromCommit (commitSummary, commitData) { + if (commitData) { + commitSummary.branch = commitData[1]; + commitSummary.commit = commitData[2]; + } +} + +function setSummaryFromCommit (commitSummary, commitData) { + if (commitSummary.branch && commitData) { + commitSummary.summary.changes = commitData[1] || 0; + commitSummary.summary.insertions = commitData[2] || 0; + commitSummary.summary.deletions = commitData[3] || 0; + } +} + +function setAuthorFromCommit (commitSummary, commitData) { + var parts = commitData[1].split('<'); + var email = parts.pop(); + + if (email.indexOf('@') <= 0) { + return; + } + + commitSummary.author = { + email: email.substr(0, email.length - 1), + name: parts.join('<').trim() + }; +} + +CommitSummary.parse = function (commit) { + var lines = commit.trim().split('\n'); + var commitSummary = new CommitSummary(); + + setBranchFromCommit(commitSummary, COMMIT_BRANCH_MESSAGE_REGEX.exec(lines.shift())); + + if (COMMIT_AUTHOR_MESSAGE_REGEX.test(lines[0])) { + setAuthorFromCommit(commitSummary, COMMIT_AUTHOR_MESSAGE_REGEX.exec(lines.shift())); + } + + setSummaryFromCommit(commitSummary, /(\d+)[^,]*(?:,\s*(\d+)[^,]*)?(?:,\s*(\d+))?/g.exec(lines.shift())); + + return commitSummary; +}; + + +/***/ }), +/* 632 */, +/* 633 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var Type = __webpack_require__(945); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + + +/***/ }), +/* 634 */ +/***/ (function(module) { + +"use strict"; + +/* eslint-disable no-control-regex */ +// TODO: remove parens when Node.js 6 is targeted. Node.js 4 barfs at it. +module.exports = () => (/[<>:"\/\\|?*\x00-\x1F]/g); +module.exports.windowsNames = () => (/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i); + + +/***/ }), +/* 635 */, +/* 636 */, +/* 637 */, +/* 638 */, +/* 639 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +let isWindows = /^win/.test(process.platform), + forwardSlashPattern = /\//g, + protocolPattern = /^(\w{2,}):\/\//i, + url = module.exports; + +// RegExp patterns to URL-encode special characters in local filesystem paths +let urlEncodePatterns = [ + /\?/g, "%3F", + /\#/g, "%23", +]; + +// RegExp patterns to URL-decode special characters for local filesystem paths +let urlDecodePatterns = [ + /\%23/g, "#", + /\%24/g, "$", + /\%26/g, "&", + /\%2C/g, ",", + /\%40/g, "@" +]; + +exports.parse = __webpack_require__(835).parse; +exports.resolve = __webpack_require__(835).resolve; + +/** + * Returns the current working directory (in Node) or the current page URL (in browsers). + * + * @returns {string} + */ +exports.cwd = function cwd () { + if (process.browser) { + return location.href; + } + + let path = process.cwd(); + + let lastChar = path.slice(-1); + if (lastChar === "/" || lastChar === "\\") { + return path; + } + else { + return path + "/"; + } +}; + +/** + * Returns the protocol of the given URL, or `undefined` if it has no protocol. + * + * @param {string} path + * @returns {?string} + */ +exports.getProtocol = function getProtocol (path) { + let match = protocolPattern.exec(path); + if (match) { + return match[1].toLowerCase(); + } +}; + +/** + * Returns the lowercased file extension of the given URL, + * or an empty string if it has no extension. + * + * @param {string} path + * @returns {string} + */ +exports.getExtension = function getExtension (path) { + let lastDot = path.lastIndexOf("."); + if (lastDot >= 0) { + return path.substr(lastDot).toLowerCase(); + } + return ""; +}; + +/** + * Returns the hash (URL fragment), of the given path. + * If there is no hash, then the root hash ("#") is returned. + * + * @param {string} path + * @returns {string} + */ +exports.getHash = function getHash (path) { + let hashIndex = path.indexOf("#"); + if (hashIndex >= 0) { + return path.substr(hashIndex); + } + return "#"; +}; + +/** + * Removes the hash (URL fragment), if any, from the given path. + * + * @param {string} path + * @returns {string} + */ +exports.stripHash = function stripHash (path) { + let hashIndex = path.indexOf("#"); + if (hashIndex >= 0) { + path = path.substr(0, hashIndex); + } + return path; +}; + +/** + * Determines whether the given path is an HTTP(S) URL. + * + * @param {string} path + * @returns {boolean} + */ +exports.isHttp = function isHttp (path) { + let protocol = url.getProtocol(path); + if (protocol === "http" || protocol === "https") { + return true; + } + else if (protocol === undefined) { + // There is no protocol. If we're running in a browser, then assume it's HTTP. + return process.browser; + } + else { + // It's some other protocol, such as "ftp://", "mongodb://", etc. + return false; + } +}; + +/** + * Determines whether the given path is a filesystem path. + * This includes "file://" URLs. + * + * @param {string} path + * @returns {boolean} + */ +exports.isFileSystemPath = function isFileSystemPath (path) { + if (process.browser) { + // We're running in a browser, so assume that all paths are URLs. + // This way, even relative paths will be treated as URLs rather than as filesystem paths + return false; + } + + let protocol = url.getProtocol(path); + return protocol === undefined || protocol === "file"; +}; + +/** + * Converts a filesystem path to a properly-encoded URL. + * + * This is intended to handle situations where JSON Schema $Ref Parser is called + * with a filesystem path that contains characters which are not allowed in URLs. + * + * @example + * The following filesystem paths would be converted to the following URLs: + * + * <"!@#$%^&*+=?'>.json ==> %3C%22!@%23$%25%5E&*+=%3F\'%3E.json + * C:\\My Documents\\File (1).json ==> C:/My%20Documents/File%20(1).json + * file://Project #42/file.json ==> file://Project%20%2342/file.json + * + * @param {string} path + * @returns {string} + */ +exports.fromFileSystemPath = function fromFileSystemPath (path) { + // Step 1: On Windows, replace backslashes with forward slashes, + // rather than encoding them as "%5C" + if (isWindows) { + path = path.replace(/\\/g, "/"); + } + + // Step 2: `encodeURI` will take care of MOST characters + path = encodeURI(path); + + // Step 3: Manually encode characters that are not encoded by `encodeURI`. + // This includes characters such as "#" and "?", which have special meaning in URLs, + // but are just normal characters in a filesystem path. + for (let i = 0; i < urlEncodePatterns.length; i += 2) { + path = path.replace(urlEncodePatterns[i], urlEncodePatterns[i + 1]); + } + + return path; +}; + +/** + * Converts a URL to a local filesystem path. + * + * @param {string} path + * @param {boolean} [keepFileProtocol] - If true, then "file://" will NOT be stripped + * @returns {string} + */ +exports.toFileSystemPath = function toFileSystemPath (path, keepFileProtocol) { + // Step 1: `decodeURI` will decode characters such as Cyrillic characters, spaces, etc. + path = decodeURI(path); + + // Step 2: Manually decode characters that are not decoded by `decodeURI`. + // This includes characters such as "#" and "?", which have special meaning in URLs, + // but are just normal characters in a filesystem path. + for (let i = 0; i < urlDecodePatterns.length; i += 2) { + path = path.replace(urlDecodePatterns[i], urlDecodePatterns[i + 1]); + } + + // Step 3: If it's a "file://" URL, then format it consistently + // or convert it to a local filesystem path + let isFileUrl = path.substr(0, 7).toLowerCase() === "file://"; + if (isFileUrl) { + // Strip-off the protocol, and the initial "/", if there is one + path = path[7] === "/" ? path.substr(8) : path.substr(7); + + // insert a colon (":") after the drive letter on Windows + if (isWindows && path[1] === "/") { + path = path[0] + ":" + path.substr(1); + } + + if (keepFileProtocol) { + // Return the consistently-formatted "file://" URL + path = "file:///" + path; + } + else { + // Convert the "file://" URL to a local filesystem path. + // On Windows, it will start with something like "C:/". + // On Posix, it will start with "/" + isFileUrl = false; + path = isWindows ? path : "/" + path; + } + } + + // Step 4: Normalize Windows paths (unless it's a "file://" URL) + if (isWindows && !isFileUrl) { + // Replace forward slashes with backslashes + path = path.replace(forwardSlashPattern, "\\"); + + // Capitalize the drive letter + if (path.substr(1, 2) === ":\\") { + path = path[0].toUpperCase() + path.substr(1); + } + } + + return path; +}; + + +/***/ }), +/* 640 */, +/* 641 */, +/* 642 */, +/* 643 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 644 */, +/* 645 */, +/* 646 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 647 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var isObject = __webpack_require__(823).isObject +var InvalidTypeError = __webpack_require__(247) + +module.exports = convertFromSchema + +// Convert from OpenAPI 3.0 `SchemaObject` to JSON schema v4 +function convertFromSchema (schema, options) { + schema = convertSchema(schema, options) + + schema.$schema = 'http://json-schema.org/draft-04/schema#' + + return schema +} + +function convertSchema (schema, options) { + var structs = options._structs; + var notSupported = options._notSupported; + var strictMode = options.strictMode; + var i = 0; + var j = 0; + var struct = null; + + for (i; i < structs.length; i++) { + struct = structs[i] + + if (Array.isArray(schema[struct])) { + for (j; j < schema[struct].length; j++) { + if (!isObject(schema[struct][j])) { + schema[struct].splice(j, 1) + j-- + continue + } + + schema[struct][j] = convertSchema(schema[struct][j], options) + } + } else if (schema[struct] === null) { + delete schema[struct] + } else if (typeof schema[struct] === 'object') { + schema[struct] = convertSchema(schema[struct], options) + } + } + + if ('properties' in schema) { + schema.properties = convertProperties(schema.properties, options) + + if (Array.isArray(schema.required)) { + schema.required = cleanRequired(schema.required, schema.properties) + + if (schema.required.length === 0) { + delete schema.required + } + } + if (Object.keys(schema.properties).length === 0) { + delete schema.properties + } + } + + if (strictMode) { + validateType(schema.type) + } + + schema = convertTypes(schema) + schema = convertFormat(schema, options) + + if ('x-patternProperties' in schema && options.supportPatternProperties) { + schema = convertPatternProperties(schema, options.patternPropertiesHandler) + } + + for (i = 0; i < notSupported.length; i++) { + delete schema[notSupported[i]] + } + + return schema +} + +function validateType (type) { + var validTypes = ['integer', 'number', 'string', 'boolean', 'object', 'array', 'null'] + + if (validTypes.indexOf(type) < 0 && type !== undefined) { + throw new InvalidTypeError('Type ' + JSON.stringify(type) + ' is not a valid type') + } +} + +function convertProperties (properties, options) { + var key; + var property; + var props = {}; + var removeProp; + + if (!isObject(properties)) { + return props + } + + for (key in properties) { + removeProp = false + property = properties[key] + + if (!isObject(property)) { + continue + } + + options._removeProps.forEach(function (prop) { + if (property[prop] === true) { + removeProp = true + } + }) + + if (removeProp) { + continue + } + + props[key] = convertSchema(property, options) + } + + return props +} + +function convertTypes (schema) { + if (schema.type !== undefined && schema.nullable === true) { + schema.type = [schema.type, 'null'] + + if (Array.isArray(schema.enum)) { + schema.enum = schema.enum.concat([null]) + } + } + + return schema +} + +function convertFormat (schema, options) { + var format = schema.format + var settings = { + MIN_INT_32: 0 - Math.pow(2, 31), + MAX_INT_32: Math.pow(2, 31) - 1, + MIN_INT_64: 0 - Math.pow(2, 63), + MAX_INT_64: Math.pow(2, 63) - 1, + MIN_FLOAT: 0 - Math.pow(2, 128), + MAX_FLOAT: Math.pow(2, 128) - 1, + MIN_DOUBLE: 0 - Number.MAX_VALUE, + MAX_DOUBLE: Number.MAX_VALUE, + + // Matches base64 (RFC 4648) + // Matches `standard` base64 not `base64url`. The specification does not + // exclude it but current ongoing OpenAPI plans will distinguish btoh. + BYTE_PATTERN: '^[\\w\\d+\\/=]*$' + } + + // Valid JSON schema v4 formats + var FORMATS = ['date-time', 'email', 'hostname', 'ipv4', 'ipv6', 'uri', 'uri-reference'] + + if (format === undefined || FORMATS.indexOf(format) !== -1) { + return schema + } + + if (format === 'date' && options.dateToDateTime === true) { + return convertFormatDate(schema) + } + + var formatConverters = { + int32: convertFormatInt32, + int64: convertFormatInt64, + float: convertFormatFloat, + double: convertFormatDouble, + byte: convertFormatByte + } + + var converter = formatConverters[format] + + if (converter === undefined) { return schema } + + return converter(schema, settings) +} + +function convertFormatInt32 (schema, settings) { + schema.minimum = settings.MIN_INT_32 + schema.maximum = settings.MAX_INT_32 + return schema +} + +function convertFormatInt64 (schema, settings) { + schema.minimum = settings.MIN_INT_64 + schema.maximum = settings.MAX_INT_64 + return schema +} + +function convertFormatFloat (schema, settings) { + schema.minimum = settings.MIN_FLOAT + schema.maximum = settings.MAX_FLOAT + return schema +} + +function convertFormatDouble (schema, settings) { + schema.minimum = settings.MIN_DOUBLE + schema.maximum = settings.MAX_DOUBLE + return schema +} + +function convertFormatDate (schema) { + schema.format = 'date-time' + return schema +} + +function convertFormatByte (schema, settings) { + schema.pattern = settings.BYTE_PATTERN + return schema +} + +function convertPatternProperties (schema, handler) { + if (isObject(schema['x-patternProperties'])) { + schema.patternProperties = schema['x-patternProperties'] + } + + delete schema['x-patternProperties'] + + return handler(schema) +} + +function cleanRequired (required, properties) { + var i = 0 + + required = required || [] + properties = properties || {} + + for (i; i < required.length; i++) { + if (properties[required[i]] === undefined) { + required.splice(i, 1) + } + } + + return required +} + + +/***/ }), +/* 648 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const nonJsonTypes = ["function", "symbol", "undefined"]; +const protectedProps = ["constructor", "prototype", "__proto__"]; +const objectPrototype = Object.getPrototypeOf({}); +/** + * Custom JSON serializer for Error objects. + * Returns all built-in error properties, as well as extended properties. + */ +function toJSON() { + // HACK: We have to cast the objects to `any` so we can use symbol indexers. + // see https://github.com/Microsoft/TypeScript/issues/1863 + // tslint:disable: no-any no-unsafe-any + let pojo = {}; + let error = this; + for (let key of getDeepKeys(error)) { + if (typeof key === "string") { + let value = error[key]; + let type = typeof value; + if (!nonJsonTypes.includes(type)) { + pojo[key] = value; + } + } + } + // tslint:enable: no-any no-unsafe-any + return pojo; +} +exports.toJSON = toJSON; +/** + * Returns own, inherited, enumerable, non-enumerable, string, and symbol keys of `obj`. + * Does NOT return members of the base Object prototype, or the specified omitted keys. + */ +function getDeepKeys(obj, omit = []) { + let keys = []; + // Crawl the prototype chain, finding all the string and symbol keys + while (obj && obj !== objectPrototype) { + keys = keys.concat(Object.getOwnPropertyNames(obj), Object.getOwnPropertySymbols(obj)); + obj = Object.getPrototypeOf(obj); + } + // De-duplicate the list of keys + let uniqueKeys = new Set(keys); + // Remove any omitted keys + for (let key of omit.concat(protectedProps)) { + uniqueKeys.delete(key); + } + return uniqueKeys; +} +exports.getDeepKeys = getDeepKeys; +//# sourceMappingURL=to-json.js.map + +/***/ }), +/* 649 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __webpack_require__(317); + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * Active `debug` instances. + */ + createDebug.instances = []; + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + + // env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + + return debug; + } + + function destroy() { + const index = createDebug.instances.indexOf(this); + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + return false; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + const instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; + + +/***/ }), +/* 650 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + + +/***/ }), +/* 651 */, +/* 652 */, +/* 653 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), +/* 654 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = require(__webpack_require__.ab + "fsevents.node") + +/***/ }), +/* 655 */, +/* 656 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = MergeSummary; +module.exports.MergeConflict = MergeConflict; + +var PullSummary = __webpack_require__(39); + +function MergeConflict (reason, file, meta) { + this.reason = reason; + this.file = file; + if (meta) { + this.meta = meta; + } +} + +MergeConflict.prototype.meta = null; + +MergeConflict.prototype.toString = function () { + return this.file + ':' + this.reason; +}; + +function MergeSummary () { + PullSummary.call(this); + + this.conflicts = []; + this.merges = []; +} + +MergeSummary.prototype = Object.create(PullSummary.prototype); + +MergeSummary.prototype.result = 'success'; + +MergeSummary.prototype.toString = function () { + if (this.conflicts.length) { + return 'CONFLICTS: ' + this.conflicts.join(', '); + } + return 'OK'; +}; + +Object.defineProperty(MergeSummary.prototype, 'failed', { + get: function () { + return this.conflicts.length > 0; + } +}); + +MergeSummary.parsers = [ + { + test: /^Auto-merging\s+(.+)$/, + handle: function (result, mergeSummary) { + mergeSummary.merges.push(result[1]); + } + }, + { + // Parser for standard merge conflicts + test: /^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, + handle: function (result, mergeSummary) { + mergeSummary.conflicts.push(new MergeConflict(result[1], result[2])); + } + }, + { + // Parser for modify/delete merge conflicts (modified by us/them, deleted by them/us) + test: /^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, + handle: function (result, mergeSummary) { + mergeSummary.conflicts.push( + new MergeConflict(result[1], result[2], {deleteRef: result[3]}) + ); + } + }, + { + // Catch-all parser for unknown/unparsed conflicts + test: /^CONFLICT\s+\((.+)\):/, + handle: function (result, mergeSummary) { + mergeSummary.conflicts.push(new MergeConflict(result[1], null)); + } + }, + { + test: /^Automatic merge failed;\s+(.+)$/, + handle: function (result, mergeSummary) { + mergeSummary.reason = mergeSummary.result = result[1]; + } + } +]; + +MergeSummary.parse = function (output) { + let mergeSummary = new MergeSummary(); + + output.trim().split('\n').forEach(function (line) { + for (var i = 0, iMax = MergeSummary.parsers.length; i < iMax; i++) { + let parser = MergeSummary.parsers[i]; + + var result = parser.test.exec(line); + if (result) { + parser.handle(result, mergeSummary); + break; + } + } + }); + + let pullSummary = PullSummary.parse(output); + if (pullSummary.summary.changes) { + Object.assign(mergeSummary, pullSummary); + } + + return mergeSummary; +}; + + +/***/ }), +/* 657 */, +/* 658 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), +/* 659 */, +/* 660 */, +/* 661 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const isomorphic_node_1 = __webpack_require__(665); +/** + * Normalizes Ono options, accounting for defaults and optional options. + */ +function normalizeOptions(options) { + options = options || {}; + return { + concatMessages: options.concatMessages === undefined ? true : Boolean(options.concatMessages), + format: options.format === undefined ? isomorphic_node_1.format + : (typeof options.format === "function" ? options.format : false), + }; +} +exports.normalizeOptions = normalizeOptions; +/** + * Normalizes the Ono arguments, accounting for defaults, options, and optional arguments. + */ +function normalizeArgs(args, options) { + let originalError; + let props; + let formatArgs; + let message = ""; + // Determine which arguments were actually specified + if (typeof args[0] === "string") { + formatArgs = args; + } + else if (typeof args[1] === "string") { + if (args[0] instanceof Error) { + originalError = args[0]; + } + else { + props = args[0]; + } + formatArgs = args.slice(1); + } + else { + originalError = args[0]; + props = args[1]; + formatArgs = args.slice(2); + } + // If there are any format arguments, then format the error message + if (formatArgs.length > 0) { + if (options.format) { + message = options.format.apply(undefined, formatArgs); + } + else { + message = formatArgs.join(" "); + } + } + if (options.concatMessages && originalError && originalError.message) { + // The inner-error's message will be added to the new message + message += (message ? " \n" : "") + originalError.message; + } + return { originalError, props, message }; +} +exports.normalizeArgs = normalizeArgs; +//# sourceMappingURL=normalize.js.map + +/***/ }), +/* 662 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 663 */, +/* 664 */, +/* 665 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const util = __webpack_require__(669); +const to_json_1 = __webpack_require__(648); +// The `inspect()` method is actually a Symbol, not a string key. +// https://nodejs.org/api/util.html#util_util_inspect_custom +const inspectMethod = util.inspect.custom || Symbol.for("nodejs.util.inspect.custom"); +/** + * Ono supports Node's `util.format()` formatting for error messages. + * + * @see https://nodejs.org/api/util.html#util_util_format_format_args + */ +exports.format = util.format; +/** + * Adds an `inspect()` method to support Node's `util.inspect()` function. + * + * @see https://nodejs.org/api/util.html#util_util_inspect_custom + */ +function addInspectMethod(newError) { + // @ts-ignore + newError[inspectMethod] = inspect; +} +exports.addInspectMethod = addInspectMethod; +/** + * Returns a representation of the error for Node's `util.inspect()` method. + * + * @see https://nodejs.org/api/util.html#util_custom_inspection_functions_on_objects + */ +function inspect() { + // HACK: We have to cast the objects to `any` so we can use symbol indexers. + // see https://github.com/Microsoft/TypeScript/issues/1863 + // tslint:disable: no-any no-unsafe-any + let pojo = {}; + let error = this; + for (let key of to_json_1.getDeepKeys(error)) { + let value = error[key]; + pojo[key] = value; + } + // Don't include the `inspect()` method on the output object, + // otherwise it will cause `util.inspect()` to go into an infinite loop + delete pojo[inspectMethod]; // tslint:disable-line: no-dynamic-delete + // tslint:enable: no-any no-unsafe-any + return pojo; +} +//# sourceMappingURL=isomorphic.node.js.map + +/***/ }), +/* 666 */, +/* 667 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + if (it.opts.patternGroups) { + var $pgProperties = it.schema.patternGroups || {}, + $pgPropertyKeys = Object.keys($pgProperties); + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 5) { + out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr3 = $pgPropertyKeys; + if (arr3) { + var $pgProperty, $i = -1, + l3 = arr3.length - 1; + while ($i < l3) { + $pgProperty = arr3[$i += 1]; + out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have additional properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr4 = $schemaKeys; + if (arr4) { + var $propertyKey, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $propertyKey = arr4[i4 += 1]; + var $sch = $schema[$propertyKey]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr5 = $pPropertyKeys; + if (arr5) { + var $pProperty, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $pProperty = arr5[i5 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr6 = $pgPropertyKeys; + if (arr6) { + var $pgProperty, i6 = -1, + l6 = arr6.length - 1; + while (i6 < l6) { + $pgProperty = arr6[i6 += 1]; + var $pgSchema = $pgProperties[$pgProperty], + $sch = $pgSchema.schema; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; + $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema'; + out += ' var pgPropCount' + ($lvl) + ' = 0; '; + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + var $pgMin = $pgSchema.minimum, + $pgMax = $pgSchema.maximum; + if ($pgMin !== undefined || $pgMax !== undefined) { + out += ' var ' + ($valid) + ' = true; '; + var $currErrSchemaPath = $errSchemaPath; + if ($pgMin !== undefined) { + var $limit = $pgMin, + $reason = 'minimum', + $moreOrLess = 'less'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($pgMax !== undefined) { + out += ' else '; + } + } + if ($pgMax !== undefined) { + var $limit = $pgMax, + $reason = 'maximum', + $moreOrLess = 'more'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 668 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); + +/** + * Implements functions to deal with a OAuthFlow object. + * @class + * @extends Base + * @returns {OAuthFlow} + */ +class OAuthFlow extends Base { + /** + * @returns {string} + */ + authorizationUrl() { + return this._json.authorizationUrl; + } + + /** + * @returns {string} + */ + tokenUrl() { + return this._json.tokenUrl; + } + + /** + * @returns {string} + */ + refreshUrl() { + return this._json.refreshUrl; + } + + /** + * @returns {Object} + */ + scopes() { + return this._json.scopes; + } +} + +module.exports = addExtensions(OAuthFlow); + + +/***/ }), +/* 669 */ +/***/ (function(module) { + +module.exports = require("util"); + +/***/ }), +/* 670 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var fs = __webpack_require__(747), + path = __webpack_require__(622); + +module.exports = ncp +ncp.ncp = ncp + +function ncp (source, dest, options, callback) { + if (!callback) { + callback = options; + options = {}; + } + + var basePath = process.cwd(), + currentPath = path.resolve(basePath, source), + targetPath = path.resolve(basePath, dest), + filter = options.filter, + transform = options.transform, + clobber = options.clobber !== false, + errs = null, + started = 0, + finished = 0, + running = 0, + limit = options.limit || ncp.limit || 16; + + limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit; + + startCopy(currentPath); + + function startCopy(source) { + started++; + if (filter) { + if (filter instanceof RegExp) { + if (!filter.test(source)) { + return cb(true); + } + } + else if (typeof filter === 'function') { + if (!filter(source)) { + return cb(true); + } + } + } + return getStats(source); + } + + function defer(fn) { + if (typeof(setImmediate) === 'function') + return setImmediate(fn); + return process.nextTick(fn); + } + + function getStats(source) { + if (running >= limit) { + return defer(function () { + getStats(source); + }); + } + running++; + fs.lstat(source, function (err, stats) { + var item = {}; + if (err) { + return onError(err); + } + + // We need to get the mode from the stats object and preserve it. + item.name = source; + item.mode = stats.mode; + + if (stats.isDirectory()) { + return onDir(item); + } + else if (stats.isFile()) { + return onFile(item); + } + else if (stats.isSymbolicLink()) { + // Symlinks don't really need to know about the mode. + return onLink(source); + } + }); + } + + function onFile(file) { + var target = file.name.replace(currentPath, targetPath); + isWritable(target, function (writable) { + if (writable) { + return copyFile(file, target); + } + if(clobber) + rmFile(target, function () { + copyFile(file, target); + }); + }); + } + + function copyFile(file, target) { + var readStream = fs.createReadStream(file.name), + writeStream = fs.createWriteStream(target, { mode: file.mode }); + if(transform) { + transform(readStream, writeStream,file); + } else { + readStream.pipe(writeStream); + } + readStream.once('end', cb); + } + + function rmFile(file, done) { + fs.unlink(file, function (err) { + if (err) { + return onError(err); + } + return done(); + }); + } + + function onDir(dir) { + var target = dir.name.replace(currentPath, targetPath); + isWritable(target, function (writable) { + if (writable) { + return mkDir(dir, target); + } + copyDir(dir.name); + }); + } + + function mkDir(dir, target) { + fs.mkdir(target, dir.mode, function (err) { + if (err) { + return onError(err); + } + copyDir(dir.name); + }); + } + + function copyDir(dir) { + fs.readdir(dir, function (err, items) { + if (err) { + return onError(err); + } + items.forEach(function (item) { + startCopy(dir + '/' + item); + }); + return cb(); + }); + } + + function onLink(link) { + var target = link.replace(currentPath, targetPath); + fs.readlink(link, function (err, resolvedPath) { + if (err) { + return onError(err); + } + checkLink(resolvedPath, target); + }); + } + + function checkLink(resolvedPath, target) { + isWritable(target, function (writable) { + if (writable) { + return makeLink(resolvedPath, target); + } + fs.readlink(target, function (err, targetDest) { + if (err) { + return onError(err); + } + if (targetDest === resolvedPath) { + return cb(); + } + return rmFile(target, function () { + makeLink(resolvedPath, target); + }); + }); + }); + } + + function makeLink(linkPath, target) { + fs.symlink(linkPath, target, function (err) { + if (err) { + return onError(err); + } + return cb(); + }); + } + + function isWritable(path, done) { + fs.lstat(path, function (err, stats) { + if (err) { + if (err.code === 'ENOENT') return done(true); + return done(false); + } + return done(false); + }); + } + + function onError(err) { + if (options.stopOnError) { + return callback(err); + } + else if (!errs && options.errs) { + errs = fs.createWriteStream(options.errs); + } + else if (!errs) { + errs = []; + } + if (typeof errs.write === 'undefined') { + errs.push(err); + } + else { + errs.write(err.stack + '\n\n'); + } + return cb(); + } + + function cb(skipped) { + if (!skipped) running--; + finished++; + if ((started === finished) && (running === 0)) { + return errs ? callback(errs) : callback(null); + } + } +}; + + + + +/***/ }), +/* 671 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); + +/** + * Implements functions to deal with a Schema object. + * @class + * @extends Base + * @returns {Schema} + */ +class Schema extends Base { + /** + * @returns {string} + */ + uid() { + return this.$id() || this.ext('x-parser-schema-id'); + } + + /** + * @returns {string} + */ + $id() { + return this._json.$id; + } + + /** + * @returns {number} + */ + multipleOf() { + return this._json.multipleOf; + } + + /** + * @returns {number} + */ + maximum() { + return this._json.maximum; + } + + /** + * @returns {number} + */ + exclusiveMaximum() { + return this._json.exclusiveMaximum; + } + + /** + * @returns {number} + */ + minimum() { + return this._json.minimum; + } + + /** + * @returns {number} + */ + exclusiveMinimum() { + return this._json.exclusiveMinimum; + } + + /** + * @returns {number} + */ + maxLength() { + return this._json.maxLength; + } + + /** + * @returns {number} + */ + minLength() { + return this._json.minLength; + } + + /** + * @returns {string} + */ + pattern() { + return this._json.pattern; + } + + /** + * @returns {number} + */ + maxItems() { + return this._json.maxItems; + } + + /** + * @returns {number} + */ + minItems() { + return this._json.minItems; + } + + /** + * @returns {boolean} + */ + uniqueItems() { + return !!this._json.uniqueItems; + } + + /** + * @returns {number} + */ + maxProperties() { + return this._json.maxProperties; + } + + /** + * @returns {number} + */ + minProperties() { + return this._json.minProperties; + } + + /** + * @returns {string[]} + */ + required() { + return this._json.required; + } + + /** + * @returns {any[]} + */ + enum() { + return this._json.enum; + } + + /** + * @returns {string} + */ + type() { + return this._json.type; + } + + /** + * @returns {Schema[]} + */ + allOf() { + if (!this._json.allOf) return null; + return this._json.allOf.map(s => new Schema(s)); + } + + /** + * @returns {Schema[]} + */ + oneOf() { + if (!this._json.oneOf) return null; + return this._json.oneOf.map(s => new Schema(s)); + } + + /** + * @returns {Schema[]} + */ + anyOf() { + if (!this._json.anyOf) return null; + return this._json.anyOf.map(s => new Schema(s)); + } + + /** + * @returns {Schema} + */ + not() { + if (!this._json.not) return null; + return new Schema(this._json.not); + } + + /** + * @returns {Schema|Schema[]} + */ + items() { + if (!this._json.items) return null; + if (Array.isArray(this._json.items)) { + return this._json.items.map(s => new Schema(s)); + } + return new Schema(this._json.items); + } + + /** + * @returns {Object} + */ + properties() { + if (!this._json.properties) return null; + const result = {}; + Object.keys(this._json.properties).forEach(k => { + result[k] = new Schema(this._json.properties[k]); + }); + return result; + } + + /** + * @returns {boolean|Schema} + */ + additionalProperties() { + const ap = this._json.additionalProperties; + if (ap === undefined || ap === null) return; + if (typeof ap === 'boolean') return ap; + return new Schema(ap); + } + + /** + * @returns {Schema} + */ + additionalItems() { + const ai = this._json.additionalItems; + if (ai === undefined || ai === null) return; + return new Schema(ai); + } + + /** + * @returns {Object} + */ + patternProperties() { + if (!this._json.patternProperties) return null; + const result = {}; + Object.keys(this._json.patternProperties).map(k => { + result[k] = new Schema(this._json.patternProperties[k]); + }); + return result; + } + + /** + * @returns {any} + */ + const() { + return this._json.const; + } + + /** + * @returns {Schema} + */ + contains() { + if (!this._json.contains) return null; + return new Schema(this._json.contains); + } + + /** + * @returns {Object} + */ + dependencies() { + if (!this._json.dependencies) return null; + const result = {}; + Object.keys(this._json.dependencies).forEach(k => { + if (!Array.isArray(this._json.dependencies[k])) { + result[k] = new Schema(this._json.dependencies[k]); + } else { + result[k] = this._json.dependencies[k]; + } + }); + return result; + } + + /** + * @returns {Schema} + */ + propertyNames() { + if (!this._json.propertyNames) return null; + return new Schema(this._json.propertyNames); + } + + /** + * @returns {Schema} + */ + if() { + if (!this._json.if) return null; + return new Schema(this._json.if); + } + + /** + * @returns {Schema} + */ + then() { + if (!this._json.then) return null; + return new Schema(this._json.then); + } + + /** + * @returns {Schema} + */ + else() { + if (!this._json.else) return null; + return new Schema(this._json.else); + } + + /** + * @returns {string} + */ + format() { + return this._json.format; + } + + /** + * @returns {string} + */ + contentEncoding() { + return this._json.contentEncoding; + } + + /** + * @returns {string} + */ + contentMediaType() { + return this._json.contentMediaType; + } + + /** + * @returns {Object} + */ + definitions() { + if (!this._json.definitions) return null; + const result = {}; + Object.keys(this._json.definitions).map(k => { + result[k] = new Schema(this._json.definitions[k]); + }); + return result; + } + + /** + * @returns {string} + */ + description() { + return this._json.description; + } + + /** + * @returns {string} + */ + title() { + return this._json.title; + } + + /** + * @returns {any} + */ + default() { + return this._json.default; + } + + /** + * @returns {boolean} + */ + readOnly() { + return !!this._json.readOnly; + } + + /** + * @returns {boolean} + */ + writeOnly() { + return !!this._json.writeOnly; + } + + /** + * @returns {any[]} + */ + examples() { + return this._json.examples; + } +} + +module.exports = addExtensions(Schema); + + +/***/ }), +/* 672 */, +/* 673 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + + +/***/ }), +/* 674 */, +/* 675 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 676 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: __webpack_require__(194), + ucs2length: __webpack_require__(798), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i {}; +exports.IDENTITY_FN = val => val; + +exports.isWindows = platform === 'win32'; +exports.isMacos = platform === 'darwin'; + + +/***/ }), +/* 678 */ +/***/ (function(module) { + + +module.exports = TagList; + +function TagList (tagList, latest) { + this.latest = latest; + this.all = tagList +} + +TagList.parse = function (data, customSort) { + var number = function (input) { + if (typeof input === 'string') { + return parseInt(input.replace(/^\D+/g, ''), 10) || 0; + } + + return 0; + }; + + var tags = data + .trim() + .split('\n') + .map(function (item) { return item.trim(); }) + .filter(Boolean); + + if (!customSort) { + tags.sort(function (tagA, tagB) { + var partsA = tagA.split('.'); + var partsB = tagB.split('.'); + + if (partsA.length === 1 || partsB.length === 1) { + return tagA - tagB > 0 ? 1 : -1; + } + + for (var i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) { + var a = number(partsA[i]); + var b = number(partsB[i]); + + var diff = a - b; + if (diff) { + return diff > 0 ? 1 : -1; + } + } + + return 0; + }); + } + + var latest = customSort ? tags[0] : tags.filter(function (tag) { return tag.indexOf('.') >= 0; }).pop(); + + return new TagList(tags, latest); +}; + + +/***/ }), +/* 679 */, +/* 680 */, +/* 681 */, +/* 682 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var has = __webpack_require__(174); +var regexExec = RegExp.prototype.exec; +var gOPD = Object.getOwnPropertyDescriptor; + +var tryRegexExecCall = function tryRegexExec(value) { + try { + var lastIndex = value.lastIndex; + value.lastIndex = 0; // eslint-disable-line no-param-reassign + + regexExec.call(value); + return true; + } catch (e) { + return false; + } finally { + value.lastIndex = lastIndex; // eslint-disable-line no-param-reassign + } +}; +var toStr = Object.prototype.toString; +var regexClass = '[object RegExp]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + if (!hasToStringTag) { + return toStr.call(value) === regexClass; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + return tryRegexExecCall(value); +}; + + +/***/ }), +/* 683 */, +/* 684 */ +/***/ (function(module) { + +"use strict"; + + +function installCompat() { + 'use strict'; + /* eslint-disable camelcase */ + // This must be called like `nunjucks.installCompat` so that `this` + // references the nunjucks instance + + var runtime = this.runtime; + var lib = this.lib; // Handle slim case where these 'modules' are excluded from the built source + + var Compiler = this.compiler.Compiler; + var Parser = this.parser.Parser; + var nodes = this.nodes; + var lexer = this.lexer; + var orig_contextOrFrameLookup = runtime.contextOrFrameLookup; + var orig_memberLookup = runtime.memberLookup; + var orig_Compiler_assertType; + var orig_Parser_parseAggregate; + + if (Compiler) { + orig_Compiler_assertType = Compiler.prototype.assertType; + } + + if (Parser) { + orig_Parser_parseAggregate = Parser.prototype.parseAggregate; + } + + function uninstall() { + runtime.contextOrFrameLookup = orig_contextOrFrameLookup; + runtime.memberLookup = orig_memberLookup; + + if (Compiler) { + Compiler.prototype.assertType = orig_Compiler_assertType; + } + + if (Parser) { + Parser.prototype.parseAggregate = orig_Parser_parseAggregate; + } + } + + runtime.contextOrFrameLookup = function contextOrFrameLookup(context, frame, key) { + var val = orig_contextOrFrameLookup.apply(this, arguments); + + if (val !== undefined) { + return val; + } + + switch (key) { + case 'True': + return true; + + case 'False': + return false; + + case 'None': + return null; + + default: + return undefined; + } + }; + + function getTokensState(tokens) { + return { + index: tokens.index, + lineno: tokens.lineno, + colno: tokens.colno + }; + } + + if (process.env.BUILD_TYPE !== 'SLIM' && nodes && Compiler && Parser) { + // i.e., not slim mode + var Slice = nodes.Node.extend('Slice', { + fields: ['start', 'stop', 'step'], + init: function init(lineno, colno, start, stop, step) { + start = start || new nodes.Literal(lineno, colno, null); + stop = stop || new nodes.Literal(lineno, colno, null); + step = step || new nodes.Literal(lineno, colno, 1); + this.parent(lineno, colno, start, stop, step); + } + }); + + Compiler.prototype.assertType = function assertType(node) { + if (node instanceof Slice) { + return; + } + + orig_Compiler_assertType.apply(this, arguments); + }; + + Compiler.prototype.compileSlice = function compileSlice(node, frame) { + this._emit('('); + + this._compileExpression(node.start, frame); + + this._emit('),('); + + this._compileExpression(node.stop, frame); + + this._emit('),('); + + this._compileExpression(node.step, frame); + + this._emit(')'); + }; + + Parser.prototype.parseAggregate = function parseAggregate() { + var _this = this; + + var origState = getTokensState(this.tokens); // Set back one accounting for opening bracket/parens + + origState.colno--; + origState.index--; + + try { + return orig_Parser_parseAggregate.apply(this); + } catch (e) { + var errState = getTokensState(this.tokens); + + var rethrow = function rethrow() { + lib._assign(_this.tokens, errState); + + return e; + }; // Reset to state before original parseAggregate called + + + lib._assign(this.tokens, origState); + + this.peeked = false; + var tok = this.peekToken(); + + if (tok.type !== lexer.TOKEN_LEFT_BRACKET) { + throw rethrow(); + } else { + this.nextToken(); + } + + var node = new Slice(tok.lineno, tok.colno); // If we don't encounter a colon while parsing, this is not a slice, + // so re-raise the original exception. + + var isSlice = false; + + for (var i = 0; i <= node.fields.length; i++) { + if (this.skip(lexer.TOKEN_RIGHT_BRACKET)) { + break; + } + + if (i === node.fields.length) { + if (isSlice) { + this.fail('parseSlice: too many slice components', tok.lineno, tok.colno); + } else { + break; + } + } + + if (this.skip(lexer.TOKEN_COLON)) { + isSlice = true; + } else { + var field = node.fields[i]; + node[field] = this.parseExpression(); + isSlice = this.skip(lexer.TOKEN_COLON) || isSlice; + } + } + + if (!isSlice) { + throw rethrow(); + } + + return new nodes.Array(tok.lineno, tok.colno, [node]); + } + }; + } + + function sliceLookup(obj, start, stop, step) { + obj = obj || []; + + if (start === null) { + start = step < 0 ? obj.length - 1 : 0; + } + + if (stop === null) { + stop = step < 0 ? -1 : obj.length; + } else if (stop < 0) { + stop += obj.length; + } + + if (start < 0) { + start += obj.length; + } + + var results = []; + + for (var i = start;; i += step) { + if (i < 0 || i > obj.length) { + break; + } + + if (step > 0 && i >= stop) { + break; + } + + if (step < 0 && i <= stop) { + break; + } + + results.push(runtime.memberLookup(obj, i)); + } + + return results; + } + + function hasOwnProp(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); + } + + var ARRAY_MEMBERS = { + pop: function pop(index) { + if (index === undefined) { + return this.pop(); + } + + if (index >= this.length || index < 0) { + throw new Error('KeyError'); + } + + return this.splice(index, 1); + }, + append: function append(element) { + return this.push(element); + }, + remove: function remove(element) { + for (var i = 0; i < this.length; i++) { + if (this[i] === element) { + return this.splice(i, 1); + } + } + + throw new Error('ValueError'); + }, + count: function count(element) { + var count = 0; + + for (var i = 0; i < this.length; i++) { + if (this[i] === element) { + count++; + } + } + + return count; + }, + index: function index(element) { + var i; + + if ((i = this.indexOf(element)) === -1) { + throw new Error('ValueError'); + } + + return i; + }, + find: function find(element) { + return this.indexOf(element); + }, + insert: function insert(index, elem) { + return this.splice(index, 0, elem); + } + }; + var OBJECT_MEMBERS = { + items: function items() { + return lib._entries(this); + }, + values: function values() { + return lib._values(this); + }, + keys: function keys() { + return lib.keys(this); + }, + get: function get(key, def) { + var output = this[key]; + + if (output === undefined) { + output = def; + } + + return output; + }, + has_key: function has_key(key) { + return hasOwnProp(this, key); + }, + pop: function pop(key, def) { + var output = this[key]; + + if (output === undefined && def !== undefined) { + output = def; + } else if (output === undefined) { + throw new Error('KeyError'); + } else { + delete this[key]; + } + + return output; + }, + popitem: function popitem() { + var keys = lib.keys(this); + + if (!keys.length) { + throw new Error('KeyError'); + } + + var k = keys[0]; + var val = this[k]; + delete this[k]; + return [k, val]; + }, + setdefault: function setdefault(key, def) { + if (def === void 0) { + def = null; + } + + if (!(key in this)) { + this[key] = def; + } + + return this[key]; + }, + update: function update(kwargs) { + lib._assign(this, kwargs); + + return null; // Always returns None + } + }; + OBJECT_MEMBERS.iteritems = OBJECT_MEMBERS.items; + OBJECT_MEMBERS.itervalues = OBJECT_MEMBERS.values; + OBJECT_MEMBERS.iterkeys = OBJECT_MEMBERS.keys; + + runtime.memberLookup = function memberLookup(obj, val, autoescape) { + if (arguments.length === 4) { + return sliceLookup.apply(this, arguments); + } + + obj = obj || {}; // If the object is an object, return any of the methods that Python would + // otherwise provide. + + if (lib.isArray(obj) && hasOwnProp(ARRAY_MEMBERS, val)) { + return ARRAY_MEMBERS[val].bind(obj); + } + + if (lib.isObject(obj) && hasOwnProp(OBJECT_MEMBERS, val)) { + return OBJECT_MEMBERS[val].bind(obj); + } + + return orig_memberLookup.apply(this, arguments); + }; + + return uninstall; +} + +module.exports = installCompat; + +/***/ }), +/* 685 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +/*eslint-disable no-use-before-define*/ + +var common = __webpack_require__(740); +var YAMLException = __webpack_require__(556); +var DEFAULT_FULL_SCHEMA = __webpack_require__(910); +var DEFAULT_SAFE_SCHEMA = __webpack_require__(570); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + && c !== CHAR_COLON + && c !== CHAR_SHARP; +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = state.condenseFlow ? '"' : ''; + + if (index !== 0) pairBuffer += ', '; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; +} + +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + +module.exports.dump = dump; +module.exports.safeDump = safeDump; + + +/***/ }), +/* 686 */, +/* 687 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 688 */, +/* 689 */, +/* 690 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var _require = __webpack_require__(332), + Obj = _require.Obj; + +function traverseAndCheck(obj, type, results) { + if (obj instanceof type) { + results.push(obj); + } + + if (obj instanceof Node) { + obj.findAll(type, results); + } +} + +var Node = /*#__PURE__*/function (_Obj) { + _inheritsLoose(Node, _Obj); + + function Node() { + return _Obj.apply(this, arguments) || this; + } + + var _proto = Node.prototype; + + _proto.init = function init(lineno, colno) { + var _arguments = arguments, + _this = this; + + for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + this.lineno = lineno; + this.colno = colno; + this.fields.forEach(function (field, i) { + // The first two args are line/col numbers, so offset by 2 + var val = _arguments[i + 2]; // Fields should never be undefined, but null. It makes + // testing easier to normalize values. + + if (val === undefined) { + val = null; + } + + _this[field] = val; + }); + }; + + _proto.findAll = function findAll(type, results) { + var _this2 = this; + + results = results || []; + + if (this instanceof NodeList) { + this.children.forEach(function (child) { + return traverseAndCheck(child, type, results); + }); + } else { + this.fields.forEach(function (field) { + return traverseAndCheck(_this2[field], type, results); + }); + } + + return results; + }; + + _proto.iterFields = function iterFields(func) { + var _this3 = this; + + this.fields.forEach(function (field) { + func(_this3[field], field); + }); + }; + + return Node; +}(Obj); // Abstract nodes + + +var Value = /*#__PURE__*/function (_Node) { + _inheritsLoose(Value, _Node); + + function Value() { + return _Node.apply(this, arguments) || this; + } + + _createClass(Value, [{ + key: "typename", + get: function get() { + return 'Value'; + } + }, { + key: "fields", + get: function get() { + return ['value']; + } + }]); + + return Value; +}(Node); // Concrete nodes + + +var NodeList = /*#__PURE__*/function (_Node2) { + _inheritsLoose(NodeList, _Node2); + + function NodeList() { + return _Node2.apply(this, arguments) || this; + } + + var _proto2 = NodeList.prototype; + + _proto2.init = function init(lineno, colno, nodes) { + _Node2.prototype.init.call(this, lineno, colno, nodes || []); + }; + + _proto2.addChild = function addChild(node) { + this.children.push(node); + }; + + _createClass(NodeList, [{ + key: "typename", + get: function get() { + return 'NodeList'; + } + }, { + key: "fields", + get: function get() { + return ['children']; + } + }]); + + return NodeList; +}(Node); + +var Root = NodeList.extend('Root'); +var Literal = Value.extend('Literal'); +var Symbol = Value.extend('Symbol'); +var Group = NodeList.extend('Group'); +var ArrayNode = NodeList.extend('Array'); +var Pair = Node.extend('Pair', { + fields: ['key', 'value'] +}); +var Dict = NodeList.extend('Dict'); +var LookupVal = Node.extend('LookupVal', { + fields: ['target', 'val'] +}); +var If = Node.extend('If', { + fields: ['cond', 'body', 'else_'] +}); +var IfAsync = If.extend('IfAsync'); +var InlineIf = Node.extend('InlineIf', { + fields: ['cond', 'body', 'else_'] +}); +var For = Node.extend('For', { + fields: ['arr', 'name', 'body', 'else_'] +}); +var AsyncEach = For.extend('AsyncEach'); +var AsyncAll = For.extend('AsyncAll'); +var Macro = Node.extend('Macro', { + fields: ['name', 'args', 'body'] +}); +var Caller = Macro.extend('Caller'); +var Import = Node.extend('Import', { + fields: ['template', 'target', 'withContext'] +}); + +var FromImport = /*#__PURE__*/function (_Node3) { + _inheritsLoose(FromImport, _Node3); + + function FromImport() { + return _Node3.apply(this, arguments) || this; + } + + var _proto3 = FromImport.prototype; + + _proto3.init = function init(lineno, colno, template, names, withContext) { + _Node3.prototype.init.call(this, lineno, colno, template, names || new NodeList(), withContext); + }; + + _createClass(FromImport, [{ + key: "typename", + get: function get() { + return 'FromImport'; + } + }, { + key: "fields", + get: function get() { + return ['template', 'names', 'withContext']; + } + }]); + + return FromImport; +}(Node); + +var FunCall = Node.extend('FunCall', { + fields: ['name', 'args'] +}); +var Filter = FunCall.extend('Filter'); +var FilterAsync = Filter.extend('FilterAsync', { + fields: ['name', 'args', 'symbol'] +}); +var KeywordArgs = Dict.extend('KeywordArgs'); +var Block = Node.extend('Block', { + fields: ['name', 'body'] +}); +var Super = Node.extend('Super', { + fields: ['blockName', 'symbol'] +}); +var TemplateRef = Node.extend('TemplateRef', { + fields: ['template'] +}); +var Extends = TemplateRef.extend('Extends'); +var Include = Node.extend('Include', { + fields: ['template', 'ignoreMissing'] +}); +var Set = Node.extend('Set', { + fields: ['targets', 'value'] +}); +var Switch = Node.extend('Switch', { + fields: ['expr', 'cases', 'default'] +}); +var Case = Node.extend('Case', { + fields: ['cond', 'body'] +}); +var Output = NodeList.extend('Output'); +var Capture = Node.extend('Capture', { + fields: ['body'] +}); +var TemplateData = Literal.extend('TemplateData'); +var UnaryOp = Node.extend('UnaryOp', { + fields: ['target'] +}); +var BinOp = Node.extend('BinOp', { + fields: ['left', 'right'] +}); +var In = BinOp.extend('In'); +var Is = BinOp.extend('Is'); +var Or = BinOp.extend('Or'); +var And = BinOp.extend('And'); +var Not = UnaryOp.extend('Not'); +var Add = BinOp.extend('Add'); +var Concat = BinOp.extend('Concat'); +var Sub = BinOp.extend('Sub'); +var Mul = BinOp.extend('Mul'); +var Div = BinOp.extend('Div'); +var FloorDiv = BinOp.extend('FloorDiv'); +var Mod = BinOp.extend('Mod'); +var Pow = BinOp.extend('Pow'); +var Neg = UnaryOp.extend('Neg'); +var Pos = UnaryOp.extend('Pos'); +var Compare = Node.extend('Compare', { + fields: ['expr', 'ops'] +}); +var CompareOperand = Node.extend('CompareOperand', { + fields: ['expr', 'type'] +}); +var CallExtension = Node.extend('CallExtension', { + init: function init(ext, prop, args, contentArgs) { + this.parent(); + this.extName = ext.__name || ext; + this.prop = prop; + this.args = args || new NodeList(); + this.contentArgs = contentArgs || []; + this.autoescape = ext.autoescape; + }, + fields: ['extName', 'prop', 'args', 'contentArgs'] +}); +var CallExtensionAsync = CallExtension.extend('CallExtensionAsync'); // This is hacky, but this is just a debugging function anyway + +function print(str, indent, inline) { + var lines = str.split('\n'); + lines.forEach(function (line, i) { + if (line && (inline && i > 0 || !inline)) { + process.stdout.write(' '.repeat(indent)); + } + + var nl = i === lines.length - 1 ? '' : '\n'; + process.stdout.write("" + line + nl); + }); +} // Print the AST in a nicely formatted tree format for debuggin + + +function printNodes(node, indent) { + indent = indent || 0; + print(node.typename + ': ', indent); + + if (node instanceof NodeList) { + print('\n'); + node.children.forEach(function (n) { + printNodes(n, indent + 2); + }); + } else if (node instanceof CallExtension) { + print(node.extName + "." + node.prop + "\n"); + + if (node.args) { + printNodes(node.args, indent + 2); + } + + if (node.contentArgs) { + node.contentArgs.forEach(function (n) { + printNodes(n, indent + 2); + }); + } + } else { + var nodes = []; + var props = null; + node.iterFields(function (val, fieldName) { + if (val instanceof Node) { + nodes.push([fieldName, val]); + } else { + props = props || {}; + props[fieldName] = val; + } + }); + + if (props) { + print(JSON.stringify(props, null, 2) + '\n', null, true); + } else { + print('\n'); + } + + nodes.forEach(function (_ref) { + var fieldName = _ref[0], + n = _ref[1]; + print("[" + fieldName + "] =>", indent + 2); + printNodes(n, indent + 4); + }); + } +} + +module.exports = { + Node: Node, + Root: Root, + NodeList: NodeList, + Value: Value, + Literal: Literal, + Symbol: Symbol, + Group: Group, + Array: ArrayNode, + Pair: Pair, + Dict: Dict, + Output: Output, + Capture: Capture, + TemplateData: TemplateData, + If: If, + IfAsync: IfAsync, + InlineIf: InlineIf, + For: For, + AsyncEach: AsyncEach, + AsyncAll: AsyncAll, + Macro: Macro, + Caller: Caller, + Import: Import, + FromImport: FromImport, + FunCall: FunCall, + Filter: Filter, + FilterAsync: FilterAsync, + KeywordArgs: KeywordArgs, + Block: Block, + Super: Super, + Extends: Extends, + Include: Include, + Set: Set, + Switch: Switch, + Case: Case, + LookupVal: LookupVal, + BinOp: BinOp, + In: In, + Is: Is, + Or: Or, + And: And, + Not: Not, + Add: Add, + Concat: Concat, + Sub: Sub, + Mul: Mul, + Div: Div, + FloorDiv: FloorDiv, + Mod: Mod, + Pow: Pow, + Neg: Neg, + Pos: Pos, + Compare: Compare, + CompareOperand: CompareOperand, + CallExtension: CallExtension, + CallExtensionAsync: CallExtensionAsync, + printNodes: printNodes +}; + +/***/ }), +/* 691 */ +/***/ (function(module) { + +"use strict"; + + +// https://mathiasbynens.be/notes/javascript-encoding +// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode +module.exports = function ucs2length(str) { + var length = 0 + , len = str.length + , pos = 0 + , value; + while (pos < len) { + length++; + value = str.charCodeAt(pos++); + if (value >= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + + +/***/ }), +/* 692 */, +/* 693 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { createMapOfType, getMapKeyOfType, addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); +const ChannelParameter = __webpack_require__(749); +const PublishOperation = __webpack_require__(185); +const SubscribeOperation = __webpack_require__(229); + +/** + * Implements functions to deal with a Channel object. + * @class + * @extends Base + * @returns {Channel} + */ +class Channel extends Base { + /** + * @returns {string} + */ + description() { + return this._json.description; + } + + /** + * @returns {Object} + */ + parameters() { + return createMapOfType(this._json.parameters, ChannelParameter); + } + + /** + * @param {string} name - Name of the parameter. + * @returns {ChannelParameter} + */ + parameter(name) { + return getMapKeyOfType(this._json.parameters, name, ChannelParameter); + } + + /** + * @returns {boolean} + */ + hasParameters() { + return !!this._json.parameters; + } + + /** + * @returns {PublishOperation} + */ + publish() { + if (!this._json.publish) return null; + return new PublishOperation(this._json.publish); + } + + /** + * @returns {SubscribeOperation} + */ + subscribe() { + if (!this._json.subscribe) return null; + return new SubscribeOperation(this._json.subscribe); + } + + /** + * @returns {boolean} + */ + hasPublish() { + return !!this._json.publish; + } + + /** + * @returns {boolean} + */ + hasSubscribe() { + return !!this._json.subscribe; + } + + /** + * @returns {Object} + */ + bindings() { + return this._json.bindings || null; + } + + /** + * @param {string} name - Name of the binding. + * @returns {Object} + */ + binding(name) { + return this._json.bindings ? this._json.bindings[name] : null; + } +} + +module.exports = addExtensions(Channel); + + +/***/ }), +/* 694 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const toJsonSchema = __webpack_require__(239); + +module.exports = async ({ message, defaultSchemaFormat }) => { + const transformed = toJsonSchema(message.payload, { + cloneSchema: true, + keepNotSupported: [ + 'discriminator', + 'readOnly', + 'writeOnly', + 'deprecated', + 'xml', + 'example', + ], + }); + + iterateSchema(transformed); + + message['x-parser-original-schema-format'] = message.schemaFormat || defaultSchemaFormat; + message['x-parser-original-payload'] = message.payload; + message.payload = transformed; + delete message.schemaFormat; +}; + +function iterateSchema(schema) { + if (schema.example !== undefined) { + const examples = schema.examples || []; + examples.push(schema.example); + schema.examples = examples; + delete schema.example; + } + + if (schema.$schema !== undefined) { + delete schema.$schema; + } + + aliasProps(schema.properties); + aliasProps(schema.patternProperties); + aliasProps(schema.additionalProperties); + aliasProps(schema.items); + aliasProps(schema.additionalItems); + aliasProps(schema.oneOf); + aliasProps(schema.anyOf); + aliasProps(schema.allOf); + aliasProps(schema.not); +} + +function aliasProps(obj) { + for (let key in obj) { + const prop = obj[key]; + + if (prop.xml !== undefined) { + prop['x-xml'] = prop.xml; + delete prop.xml; + } + + iterateSchema(obj[key]); + } +} + + +/***/ }), +/* 695 */, +/* 696 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const YAML = __webpack_require__(414); + +module.exports.toJS = (asyncapiYAMLorJSON) => { + if (!asyncapiYAMLorJSON) { + throw new Error(`Document can't be null, false or empty.`); + } + + if (typeof asyncapiYAMLorJSON === 'object') { + return asyncapiYAMLorJSON; + } + + try { + return JSON.parse(asyncapiYAMLorJSON); + } catch (e) { + try { + return YAML.safeLoad(asyncapiYAMLorJSON); + } catch (err) { + err.message = `Document has to be either JSON or YAML: ${err.message}`; + throw err; + } + } +}; + +module.exports.createMapOfType = (obj, Type) => { + const result = {}; + if (!obj) return result; + + Object.keys(obj).forEach(key => { + result[key] = new Type(obj[key]); + }); + + return result; +}; + +module.exports.getMapKeyOfType = (obj, key, Type) => { + if (!obj) return null; + if (!obj[key]) return null; + return new Type(obj[key]); +}; + +module.exports.addExtensions = (obj) => { + obj.prototype.extensions = function () { + const result = {}; + Object.keys(this._json).forEach(key => { + if (/^x-[\w\d\.\-\_]+$/.test(key)) { + result[key] = this._json[key]; + } + }); + return result; + }; + + obj.prototype.ext = function (name) { + return this._json[name]; + }; + + obj.prototype.extension = obj.prototype.ext; + + return obj; +}; + + +/***/ }), +/* 697 */, +/* 698 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + if ($async) { + it.async = true; + var $es7 = it.opts.async == 'es7'; + it.yieldAwait = $es7 ? 'await' : 'yield'; + } + out += ' var validate = '; + if ($async) { + if ($es7) { + out += ' (async function '; + } else { + if (it.opts.async != '*') { + out += 'co.wrap'; + } + out += '(function* '; + } + } else { + out += ' (function '; + } + out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }); return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + if (it.opts.v5 && it.schema.patternGroups) { + it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); + } + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }); return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + + +/***/ }), +/* 699 */, +/* 700 */, +/* 701 */, +/* 702 */, +/* 703 */, +/* 704 */, +/* 705 */, +/* 706 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 707 */, +/* 708 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const ParserError = __webpack_require__(59); + +class ParserErrorUnsupportedVersion extends ParserError { + constructor(e, json) { + super(e, json); + } +} + +module.exports = ParserErrorUnsupportedVersion; + + +/***/ }), +/* 709 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +module.exports = Pointer; + +const $Ref = __webpack_require__(289); +const url = __webpack_require__(639); +const { ono } = __webpack_require__(114); +const slashes = /\//g; +const tildes = /~/g; +const escapedSlash = /~1/g; +const escapedTilde = /~0/g; + +/** + * This class represents a single JSON pointer and its resolved value. + * + * @param {$Ref} $ref + * @param {string} path + * @param {string} [friendlyPath] - The original user-specified path (used for error messages) + * @constructor + */ +function Pointer ($ref, path, friendlyPath) { + /** + * The {@link $Ref} object that contains this {@link Pointer} object. + * @type {$Ref} + */ + this.$ref = $ref; + + /** + * The file path or URL, containing the JSON pointer in the hash. + * This path is relative to the path of the main JSON schema file. + * @type {string} + */ + this.path = path; + + /** + * The original path or URL, used for error messages. + * @type {string} + */ + this.originalPath = friendlyPath || path; + + /** + * The value of the JSON pointer. + * Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays). + * @type {?*} + */ + this.value = undefined; + + /** + * Indicates whether the pointer references itself. + * @type {boolean} + */ + this.circular = false; + + /** + * The number of indirect references that were traversed to resolve the value. + * Resolving a single pointer may require resolving multiple $Refs. + * @type {number} + */ + this.indirections = 0; +} + +/** + * Resolves the value of a nested property within the given object. + * + * @param {*} obj - The object that will be crawled + * @param {$RefParserOptions} options + * + * @returns {Pointer} + * Returns a JSON pointer whose {@link Pointer#value} is the resolved value. + * If resolving this value required resolving other JSON references, then + * the {@link Pointer#$ref} and {@link Pointer#path} will reflect the resolution path + * of the resolved value. + */ +Pointer.prototype.resolve = function (obj, options) { + let tokens = Pointer.parse(this.path); + + // Crawl the object, one token at a time + this.value = obj; + for (let i = 0; i < tokens.length; i++) { + if (resolveIf$Ref(this, options)) { + // The $ref path has changed, so append the remaining tokens to the path + this.path = Pointer.join(this.path, tokens.slice(i)); + } + + let token = tokens[i]; + if (this.value[token] === undefined) { + throw ono.syntax(`Error resolving $ref pointer "${this.originalPath}". \nToken "${token}" does not exist.`); + } + else { + this.value = this.value[token]; + } + } + + // Resolve the final value + resolveIf$Ref(this, options); + return this; +}; + +/** + * Sets the value of a nested property within the given object. + * + * @param {*} obj - The object that will be crawled + * @param {*} value - the value to assign + * @param {$RefParserOptions} options + * + * @returns {*} + * Returns the modified object, or an entirely new object if the entire object is overwritten. + */ +Pointer.prototype.set = function (obj, value, options) { + let tokens = Pointer.parse(this.path); + let token; + + if (tokens.length === 0) { + // There are no tokens, replace the entire object with the new value + this.value = value; + return value; + } + + // Crawl the object, one token at a time + this.value = obj; + for (let i = 0; i < tokens.length - 1; i++) { + resolveIf$Ref(this, options); + + token = tokens[i]; + if (this.value && this.value[token] !== undefined) { + // The token exists + this.value = this.value[token]; + } + else { + // The token doesn't exist, so create it + this.value = setValue(this, token, {}); + } + } + + // Set the value of the final token + resolveIf$Ref(this, options); + token = tokens[tokens.length - 1]; + setValue(this, token, value); + + // Return the updated object + return obj; +}; + +/** + * Parses a JSON pointer (or a path containing a JSON pointer in the hash) + * and returns an array of the pointer's tokens. + * (e.g. "schema.json#/definitions/person/name" => ["definitions", "person", "name"]) + * + * The pointer is parsed according to RFC 6901 + * {@link https://tools.ietf.org/html/rfc6901#section-3} + * + * @param {string} path + * @returns {string[]} + */ +Pointer.parse = function (path) { + // Get the JSON pointer from the path's hash + let pointer = url.getHash(path).substr(1); + + // If there's no pointer, then there are no tokens, + // so return an empty array + if (!pointer) { + return []; + } + + // Split into an array + pointer = pointer.split("/"); + + // Decode each part, according to RFC 6901 + for (let i = 0; i < pointer.length; i++) { + pointer[i] = decodeURIComponent(pointer[i].replace(escapedSlash, "/").replace(escapedTilde, "~")); + } + + if (pointer[0] !== "") { + throw ono.syntax(`Invalid $ref pointer "${pointer}". Pointers must begin with "#/"`); + } + + return pointer.slice(1); +}; + +/** + * Creates a JSON pointer path, by joining one or more tokens to a base path. + * + * @param {string} base - The base path (e.g. "schema.json#/definitions/person") + * @param {string|string[]} tokens - The token(s) to append (e.g. ["name", "first"]) + * @returns {string} + */ +Pointer.join = function (base, tokens) { + // Ensure that the base path contains a hash + if (base.indexOf("#") === -1) { + base += "#"; + } + + // Append each token to the base path + tokens = Array.isArray(tokens) ? tokens : [tokens]; + for (let i = 0; i < tokens.length; i++) { + let token = tokens[i]; + // Encode the token, according to RFC 6901 + base += "/" + encodeURIComponent(token.replace(tildes, "~0").replace(slashes, "~1")); + } + + return base; +}; + +/** + * If the given pointer's {@link Pointer#value} is a JSON reference, + * then the reference is resolved and {@link Pointer#value} is replaced with the resolved value. + * In addition, {@link Pointer#path} and {@link Pointer#$ref} are updated to reflect the + * resolution path of the new value. + * + * @param {Pointer} pointer + * @param {$RefParserOptions} options + * @returns {boolean} - Returns `true` if the resolution path changed + */ +function resolveIf$Ref (pointer, options) { + // Is the value a JSON reference? (and allowed?) + + if ($Ref.isAllowed$Ref(pointer.value, options)) { + let $refPath = url.resolve(pointer.path, pointer.value.$ref); + + if ($refPath === pointer.path) { + // The value is a reference to itself, so there's nothing to do. + pointer.circular = true; + } + else { + let resolved = pointer.$ref.$refs._resolve($refPath, options); + pointer.indirections += resolved.indirections + 1; + + if ($Ref.isExtended$Ref(pointer.value)) { + // This JSON reference "extends" the resolved value, rather than simply pointing to it. + // So the resolved path does NOT change. Just the value does. + pointer.value = $Ref.dereference(pointer.value, resolved.value); + return false; + } + else { + // Resolve the reference + pointer.$ref = resolved.$ref; + pointer.path = resolved.path; + pointer.value = resolved.value; + } + + return true; + } + } +} + +/** + * Sets the specified token value of the {@link Pointer#value}. + * + * The token is evaluated according to RFC 6901. + * {@link https://tools.ietf.org/html/rfc6901#section-4} + * + * @param {Pointer} pointer - The JSON Pointer whose value will be modified + * @param {string} token - A JSON Pointer token that indicates how to modify `obj` + * @param {*} value - The value to assign + * @returns {*} - Returns the assigned value + */ +function setValue (pointer, token, value) { + if (pointer.value && typeof pointer.value === "object") { + if (token === "-" && Array.isArray(pointer.value)) { + pointer.value.push(value); + } + else { + pointer.value[token] = value; + } + } + else { + throw ono.syntax(`Error assigning $ref pointer "${pointer.path}". \nCannot set "${token}" of a non-object.`); + } + return value; +} + + +/***/ }), +/* 710 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const { addExtensions } = __webpack_require__(696); +const Base = __webpack_require__(31); + +/** + * Implements functions to deal with the License object. + * @class + * @extends Base + * @returns {License} + */ +class License extends Base { + /** + * @returns {string} + */ + name() { + return this._json.name; + } + + /** + * @returns {string} + */ + url() { + return this._json.url; + } +} + +module.exports = addExtensions(License); + + +/***/ }), +/* 711 */, +/* 712 */, +/* 713 */, +/* 714 */, +/* 715 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +(function () { + "use strict"; + + var fs = __webpack_require__(747) + , fsCopy = __webpack_require__(112) + ; + + function noop() {} + + function move(src, dst, cb) { + function copyIfFailed(err) { + if (!err) { + return cb(null); + } + fsCopy(src, dst, function(err) { + if (!err) { + // TODO + // should we revert the copy if the unlink fails? + fs.unlink(src, cb); + } else { + cb(err); + } + }); + } + + cb = cb || noop; + fs.stat(dst, function (err) { + if (!err) { + return cb(new Error("File " + dst + " exists.")); + } + fs.rename(src, dst, copyIfFailed); + }); + } + + module.exports = move; +}()); + + +/***/ }), +/* 716 */, +/* 717 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var resolve = __webpack_require__(246) + , util = __webpack_require__(676) + , errorClasses = __webpack_require__(837) + , stableStringify = __webpack_require__(741); + +var validateGenerator = __webpack_require__(650); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = __webpack_require__(194); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + var validateSchema = rule.definition.validateSchema; + if (validateSchema && self._opts.validateSchema !== false) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + + +/***/ }), +/* 724 */ +/***/ (function(__unusedmodule, exports) { + +/*jshint -W054 */ +;(function (exports) { + 'use strict'; + + function forEachAsync(arr, fn, thisArg) { + var dones = [] + , index = -1 + ; + + function next(BREAK, result) { + index += 1; + + if (index === arr.length || BREAK === forEachAsync.__BREAK) { + dones.forEach(function (done) { + done.call(thisArg, result); + }); + return; + } + + fn.call(thisArg, next, arr[index], index, arr); + } + + setTimeout(next, 4); + + return { + then: function (_done) { + dones.push(_done); + return this; + } + }; + } + forEachAsync.__BREAK = {}; + + exports.forEachAsync = forEachAsync; +}( true && exports || new Function('return this')())); + + +/***/ }), +/* 725 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), +/* 726 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + + +var fs = __webpack_require__(747); + +function exists (path, isFile, isDirectory) { + try { + var matches = false; + var stat = fs.statSync(path); + + matches = matches || isFile && stat.isFile(); + matches = matches || isDirectory && stat.isDirectory(); + + return matches; + } + catch (e) { + if (e.code === 'ENOENT') { + return false; + } + + throw e; + } +} + +module.exports = function (path, type) { + if (!type) { + return exists(path, true, true); + } + + return exists(path, type & 1, type & 2); +}; + +module.exports.FILE = 1; + +module.exports.FOLDER = 2; + + +/***/ }), +/* 727 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +var MissingRefError = __webpack_require__(837).MissingRef; + +module.exports = compileAsync; + + +/** + * Creates validating function for passed schema with asynchronous loading of missing schemas. + * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped + * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function. + * @return {Promise} promise that resolves with a validating function. + */ +function compileAsync(schema, meta, callback) { + /* eslint no-shadow: 0 */ + /* global Promise */ + /* jshint validthis: true */ + var self = this; + if (typeof this._opts.loadSchema != 'function') + throw new Error('options.loadSchema should be a function'); + + if (typeof meta == 'function') { + callback = meta; + meta = undefined; + } + + var p = loadMetaSchemaOf(schema).then(function () { + var schemaObj = self._addSchema(schema, undefined, meta); + return schemaObj.validate || _compileAsync(schemaObj); + }); + + if (callback) { + p.then( + function(v) { callback(null, v); }, + callback + ); + } + + return p; + + + function loadMetaSchemaOf(sch) { + var $schema = sch.$schema; + return $schema && !self.getSchema($schema) + ? compileAsync.call(self, { $ref: $schema }, true) + : Promise.resolve(); + } + + + function _compileAsync(schemaObj) { + try { return self._compile(schemaObj); } + catch(e) { + if (e instanceof MissingRefError) return loadMissingSchema(e); + throw e; + } + + + function loadMissingSchema(e) { + var ref = e.missingSchema; + if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'); + + var schemaPromise = self._loadingSchemas[ref]; + if (!schemaPromise) { + schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref); + schemaPromise.then(removePromise, removePromise); + } + + return schemaPromise.then(function (sch) { + if (!added(ref)) { + return loadMetaSchemaOf(sch).then(function () { + if (!added(ref)) self.addSchema(sch, ref, undefined, meta); + }); + } + }).then(function() { + return _compileAsync(schemaObj); + }); + + function removePromise() { + delete self._loadingSchemas[ref]; + } + + function added(ref) { + return self._refs[ref] || self._schemas[ref]; + } + } + } +} + + +/***/ }), +/* 728 */, +/* 729 */, +/* 730 */ +/***/ (function(module) { + +// MIT license (by Elan Shanker). +(function(globals) { + 'use strict'; + + var executeSync = function(){ + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'function'){ + args[0].apply(null, args.splice(1)); + } + }; + + var executeAsync = function(fn){ + if (typeof setImmediate === 'function') { + setImmediate(fn); + } else if (typeof process !== 'undefined' && process.nextTick) { + process.nextTick(fn); + } else { + setTimeout(fn, 0); + } + }; + + var makeIterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + var _isArray = Array.isArray || function(maybeArray){ + return Object.prototype.toString.call(maybeArray) === '[object Array]'; + }; + + var waterfall = function (tasks, callback, forceAsync) { + var nextTick = forceAsync ? executeAsync : executeSync; + callback = callback || function () {}; + if (!_isArray(tasks)) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback.apply(null, arguments); + callback = function () {}; + } else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } else { + args.push(callback); + } + nextTick(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(makeIterator(tasks))(); + }; + + if (typeof define !== 'undefined' && define.amd) { + define([], function () { + return waterfall; + }); // RequireJS + } else if ( true && module.exports) { + module.exports = waterfall; // CommonJS + } else { + globals.waterfall = waterfall; //